src/mess/drivers/abc80x.c
| r5732 | r5733 | |
| 721 | 721 | driver_state->abc77_txd = state; |
| 722 | 722 | } |
| 723 | 723 | |
| 724 | | static WRITE_LINE_DEVICE_HANDLER( abc77_clock_w ) |
| 725 | | { |
| 726 | | const device_config *z80dart = devtag_get_device(device->machine, Z80DART_TAG); |
| 727 | | |
| 728 | | /* connected to DART channel B clock */ |
| 729 | | z80dart_rxtxcb_w(z80dart, state); |
| 730 | | } |
| 731 | | |
| 732 | | static WRITE_LINE_DEVICE_HANDLER( abc77_keydown_w ) |
| 733 | | { |
| 734 | | const device_config *z80dart = devtag_get_device(device->machine, Z80DART_TAG); |
| 735 | | |
| 736 | | /* connected to DART channel B DCD */ |
| 737 | | z80dart_dcdb_w(z80dart, state); |
| 738 | | } |
| 739 | | |
| 740 | 724 | static ABC77_INTERFACE( abc800_abc77_intf ) |
| 741 | 725 | { |
| 742 | 726 | DEVCB_LINE(abc800_abc77_txd_w), |
| 743 | | DEVCB_LINE(abc77_clock_w), |
| 744 | | DEVCB_LINE(abc77_keydown_w) |
| 727 | DEVCB_DEVICE_LINE(Z80DART_TAG, z80dart_rxtxcb_w), |
| 728 | DEVCB_DEVICE_LINE(Z80DART_TAG, z80dart_dcdb_w) |
| 745 | 729 | }; |
| 746 | 730 | |
| 747 | 731 | static WRITE_LINE_DEVICE_HANDLER( abc802_abc77_txd_w ) |
| r5732 | r5733 | |
| 754 | 738 | static ABC77_INTERFACE( abc802_abc77_intf ) |
| 755 | 739 | { |
| 756 | 740 | DEVCB_LINE(abc802_abc77_txd_w), |
| 757 | | DEVCB_LINE(abc77_clock_w), |
| 758 | | DEVCB_LINE(abc77_keydown_w) |
| 741 | DEVCB_DEVICE_LINE(Z80DART_TAG, z80dart_rxtxcb_w), |
| 742 | DEVCB_DEVICE_LINE(Z80DART_TAG, z80dart_dcdb_w) |
| 759 | 743 | }; |
| 760 | 744 | |
| 761 | 745 | static WRITE_LINE_DEVICE_HANDLER( abc806_abc77_txd_w ) |
| r5732 | r5733 | |
| 768 | 752 | static ABC77_INTERFACE( abc806_abc77_intf ) |
| 769 | 753 | { |
| 770 | 754 | DEVCB_LINE(abc806_abc77_txd_w), |
| 771 | | DEVCB_LINE(abc77_clock_w), |
| 772 | | DEVCB_LINE(abc77_keydown_w) |
| 755 | DEVCB_DEVICE_LINE(Z80DART_TAG, z80dart_rxtxcb_w), |
| 756 | DEVCB_DEVICE_LINE(Z80DART_TAG, z80dart_dcdb_w) |
| 773 | 757 | }; |
| 774 | 758 | |
| 775 | 759 | /* Z80 CTC */ |
| r5732 | r5733 | |
| 1038 | 1022 | abc800_state *state = machine->driver_data; |
| 1039 | 1023 | |
| 1040 | 1024 | /* find devices */ |
| 1041 | | |
| 1042 | 1025 | state->z80ctc = devtag_get_device(machine, Z80CTC_TAG); |
| 1043 | 1026 | state->z80dart = devtag_get_device(machine, Z80DART_TAG); |
| 1044 | 1027 | state->z80sio = devtag_get_device(machine, Z80SIO_TAG); |
| 1045 | | //state->abc77 = devtag_get_device(machine, ABC77_TAG); |
| 1028 | state->abc77 = devtag_get_device(machine, ABC77_TAG); |
| 1046 | 1029 | state->cassette = devtag_get_device(machine, CASSETTE_TAG); |
| 1047 | 1030 | |
| 1048 | 1031 | /* initialize the ABC BUS */ |
| 1049 | | |
| 1050 | 1032 | abcbus_init(machine, Z80_TAG, abcbus_config); |
| 1051 | 1033 | |
| 1052 | 1034 | /* configure memory */ |
| 1053 | | |
| 1054 | 1035 | state->videoram = auto_alloc_array(machine, UINT8, ABC800_VIDEO_RAM_SIZE); |
| 1055 | 1036 | |
| 1056 | 1037 | memory_configure_bank(machine, 1, 0, 1, memory_region(machine, Z80_TAG), 0); |
| 1057 | 1038 | memory_configure_bank(machine, 1, 1, 1, state->videoram, 0); |
| 1058 | 1039 | |
| 1059 | 1040 | /* register for state saving */ |
| 1060 | | |
| 1061 | 1041 | state_save_register_global(machine, state->fetch_charram); |
| 1062 | 1042 | state_save_register_global(machine, state->abc77_txd); |
| 1063 | 1043 | state_save_register_global(machine, state->pling); |
| r5732 | r5733 | |
| 1074 | 1054 | abc802_state *state = machine->driver_data; |
| 1075 | 1055 | |
| 1076 | 1056 | /* find devices */ |
| 1077 | | |
| 1078 | 1057 | state->z80ctc = devtag_get_device(machine, Z80CTC_TAG); |
| 1079 | 1058 | state->z80dart = devtag_get_device(machine, Z80DART_TAG); |
| 1080 | 1059 | state->z80sio = devtag_get_device(machine, Z80SIO_TAG); |
| 1081 | | // state->abc77 = devtag_get_device(machine, ABC77_TAG); |
| 1060 | state->abc77 = devtag_get_device(machine, ABC77_TAG); |
| 1082 | 1061 | state->cassette = devtag_get_device(machine, CASSETTE_TAG); |
| 1083 | 1062 | |
| 1084 | 1063 | /* initialize the ABC BUS */ |
| 1085 | | |
| 1086 | 1064 | abcbus_init(machine, Z80_TAG, abcbus_config); |
| 1087 | 1065 | |
| 1088 | 1066 | /* configure memory */ |
| 1089 | | |
| 1090 | 1067 | memory_configure_bank(machine, 1, 0, 1, mess_ram, 0); |
| 1091 | 1068 | memory_configure_bank(machine, 1, 1, 1, memory_region(machine, Z80_TAG), 0); |
| 1092 | 1069 | |
| 1093 | 1070 | /* register for state saving */ |
| 1094 | | |
| 1095 | 1071 | state_save_register_global(machine, state->lrs); |
| 1096 | 1072 | state_save_register_global(machine, state->abc77_txd); |
| 1097 | 1073 | state_save_register_global(machine, state->pling); |
| r5732 | r5733 | |
| 1128 | 1104 | int bank; |
| 1129 | 1105 | |
| 1130 | 1106 | /* find devices */ |
| 1131 | | |
| 1132 | 1107 | state->z80ctc = devtag_get_device(machine, Z80CTC_TAG); |
| 1133 | 1108 | state->z80dart = devtag_get_device(machine, Z80DART_TAG); |
| 1134 | 1109 | state->z80sio = devtag_get_device(machine, Z80SIO_TAG); |
| 1135 | 1110 | state->e0516 = devtag_get_device(machine, E0516_TAG); |
| 1136 | | //state->abc77 = devtag_get_device(machine, ABC77_TAG); |
| 1111 | state->abc77 = devtag_get_device(machine, ABC77_TAG); |
| 1137 | 1112 | state->cassette = devtag_get_device(machine, CASSETTE_TAG); |
| 1138 | 1113 | |
| 1139 | 1114 | /* initialize the ABC BUS */ |
| 1140 | | |
| 1141 | 1115 | abcbus_init(machine, Z80_TAG, abcbus_config); |
| 1142 | 1116 | |
| 1143 | 1117 | /* setup memory banking */ |
| 1144 | | |
| 1145 | 1118 | state->videoram = auto_alloc_array(machine, UINT8, videoram_size); |
| 1146 | 1119 | |
| 1147 | 1120 | for (bank = 1; bank <= 16; bank++) |
| r5732 | r5733 | |
| 1152 | 1125 | } |
| 1153 | 1126 | |
| 1154 | 1127 | /* register for state saving */ |
| 1155 | | |
| 1156 | 1128 | state_save_register_global(machine, state->abc77_txd); |
| 1157 | 1129 | state_save_register_global(machine, state->keydtr); |
| 1158 | 1130 | state_save_register_global(machine, state->eme); |
| r5732 | r5733 | |
| 1165 | 1137 | abc806_state *state = machine->driver_data; |
| 1166 | 1138 | |
| 1167 | 1139 | /* setup memory banking */ |
| 1168 | | |
| 1169 | 1140 | int bank; |
| 1170 | 1141 | |
| 1171 | 1142 | for (bank = 1; bank <= 16; bank++) |