src/mess/drivers/kyocera.c
| r6451 | r6452 | |
| 811 | 811 | |
| 812 | 812 | /* uPD1990A Interface */ |
| 813 | 813 | |
| 814 | | static WRITE_LINE_DEVICE_HANDLER( kc85_upd1990a_data_w ) |
| 815 | | { |
| 816 | | kc85_state *driver_state = device->machine->driver_data; |
| 817 | | |
| 818 | | driver_state->upd1990a_data = state; |
| 819 | | } |
| 820 | | |
| 821 | 814 | static UPD1990A_INTERFACE( kc85_upd1990a_intf ) |
| 822 | 815 | { |
| 823 | | DEVCB_LINE(kc85_upd1990a_data_w), |
| 816 | DEVCB_NULL, |
| 824 | 817 | DEVCB_CPU_INPUT_LINE(I8085_TAG, I8085_RST75_LINE) |
| 825 | 818 | }; |
| 826 | 819 | |
| r6451 | r6452 | |
| 852 | 845 | |
| 853 | 846 | UINT8 data = 0; |
| 854 | 847 | |
| 855 | | data |= state->upd1990a_data; |
| 848 | data |= upd1990a_data_out_r(state->upd1990a); |
| 856 | 849 | data |= centronics_not_busy_r(state->centronics) << 1; |
| 857 | 850 | data |= centronics_busy_r(state->centronics) << 2; |
| 858 | 851 | |
| r6451 | r6452 | |
| 896 | 889 | upd1990a_c1_w(state->upd1990a, BIT(data, 1)); |
| 897 | 890 | upd1990a_c2_w(state->upd1990a, BIT(data, 2)); |
| 898 | 891 | upd1990a_clk_w(state->upd1990a, BIT(data, 3)); |
| 899 | | upd1990a_data_w(state->upd1990a, BIT(data, 4)); |
| 892 | upd1990a_data_in_w(state->upd1990a, BIT(data, 4)); |
| 900 | 893 | } |
| 901 | 894 | |
| 902 | 895 | static WRITE8_DEVICE_HANDLER( kc85_8155_port_b_w ) |
| r6451 | r6452 | |
| 972 | 965 | |
| 973 | 966 | UINT8 data = 0; |
| 974 | 967 | |
| 975 | | data |= state->upd1990a_data; |
| 968 | data |= upd1990a_data_out_r(state->upd1990a); |
| 976 | 969 | data |= centronics_not_busy_r(state->centronics) << 1; |
| 977 | 970 | data |= centronics_busy_r(state->centronics) << 2; |
| 978 | 971 | |
| r6451 | r6452 | |
| 1141 | 1134 | /* find devices */ |
| 1142 | 1135 | state->upd1990a = devtag_get_device(machine, UPD1990A_TAG); |
| 1143 | 1136 | state->centronics = devtag_get_device(machine, CENTRONICS_TAG); |
| 1144 | | state->speaker = devtag_get_device(machine, "speaker"); |
| 1137 | state->speaker = devtag_get_device(machine, SPEAKER_TAG); |
| 1145 | 1138 | state->cassette = devtag_get_device(machine, CASSETTE_TAG); |
| 1146 | 1139 | |
| 1147 | 1140 | /* initialize RTC */ |
| r6451 | r6452 | |
| 1172 | 1165 | |
| 1173 | 1166 | /* register for state saving */ |
| 1174 | 1167 | state_save_register_global(machine, state->bank); |
| 1175 | | state_save_register_global(machine, state->upd1990a_data); |
| 1176 | 1168 | state_save_register_global(machine, state->keylatch); |
| 1177 | 1169 | state_save_register_global(machine, state->buzzer); |
| 1178 | 1170 | state_save_register_global(machine, state->bell); |
| r6451 | r6452 | |
| 1185 | 1177 | /* find devices */ |
| 1186 | 1178 | state->upd1990a = devtag_get_device(machine, UPD1990A_TAG); |
| 1187 | 1179 | state->centronics = devtag_get_device(machine, CENTRONICS_TAG); |
| 1188 | | state->speaker = devtag_get_device(machine, "speaker"); |
| 1180 | state->speaker = devtag_get_device(machine, SPEAKER_TAG); |
| 1189 | 1181 | state->cassette = devtag_get_device(machine, CASSETTE_TAG); |
| 1190 | 1182 | |
| 1191 | 1183 | /* initialize RTC */ |
| r6451 | r6452 | |
| 1207 | 1199 | |
| 1208 | 1200 | /* register for state saving */ |
| 1209 | 1201 | state_save_register_global(machine, state->bank); |
| 1210 | | state_save_register_global(machine, state->upd1990a_data); |
| 1211 | 1202 | state_save_register_global(machine, state->keylatch); |
| 1212 | 1203 | state_save_register_global(machine, state->buzzer); |
| 1213 | 1204 | state_save_register_global(machine, state->bell); |
| r6451 | r6452 | |
| 1223 | 1214 | /* find devices */ |
| 1224 | 1215 | state->upd1990a = devtag_get_device(machine, UPD1990A_TAG); |
| 1225 | 1216 | state->centronics = devtag_get_device(machine, CENTRONICS_TAG); |
| 1226 | | state->speaker = devtag_get_device(machine, "speaker"); |
| 1217 | state->speaker = devtag_get_device(machine, SPEAKER_TAG); |
| 1227 | 1218 | state->cassette = devtag_get_device(machine, CASSETTE_TAG); |
| 1228 | 1219 | |
| 1229 | 1220 | /* initialize RTC */ |
| r6451 | r6452 | |
| 1264 | 1255 | |
| 1265 | 1256 | /* register for state saving */ |
| 1266 | 1257 | state_save_register_global(machine, state->bank); |
| 1267 | | state_save_register_global(machine, state->upd1990a_data); |
| 1268 | 1258 | state_save_register_global(machine, state->keylatch); |
| 1269 | 1259 | state_save_register_global(machine, state->buzzer); |
| 1270 | 1260 | state_save_register_global(machine, state->bell); |
| r6451 | r6452 | |
| 1276 | 1266 | |
| 1277 | 1267 | /* find devices */ |
| 1278 | 1268 | state->centronics = devtag_get_device(machine, CENTRONICS_TAG); |
| 1279 | | state->speaker = devtag_get_device(machine, "speaker"); |
| 1269 | state->speaker = devtag_get_device(machine, SPEAKER_TAG); |
| 1280 | 1270 | state->cassette = devtag_get_device(machine, CASSETTE_TAG); |
| 1281 | 1271 | |
| 1282 | 1272 | /* configure ROM banking */ |
| r6451 | r6452 | |
| 1347 | 1337 | |
| 1348 | 1338 | /* sound hardware */ |
| 1349 | 1339 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 1350 | | MDRV_SOUND_ADD("speaker", SPEAKER, 0) |
| 1340 | MDRV_SOUND_ADD(SPEAKER_TAG, SPEAKER, 0) |
| 1351 | 1341 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 1352 | 1342 | |
| 1353 | 1343 | /* devices */ |
| r6451 | r6452 | |
| 1387 | 1377 | |
| 1388 | 1378 | /* sound hardware */ |
| 1389 | 1379 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 1390 | | MDRV_SOUND_ADD("speaker", SPEAKER, 0) |
| 1380 | MDRV_SOUND_ADD(SPEAKER_TAG, SPEAKER, 0) |
| 1391 | 1381 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 1392 | 1382 | |
| 1393 | 1383 | /* devices */ |
| r6451 | r6452 | |
| 1457 | 1447 | |
| 1458 | 1448 | /* sound hardware */ |
| 1459 | 1449 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 1460 | | MDRV_SOUND_ADD("speaker", SPEAKER, 0) |
| 1450 | MDRV_SOUND_ADD(SPEAKER_TAG, SPEAKER, 0) |
| 1461 | 1451 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 1462 | 1452 | // MDRV_TCM5089_ADD(TCM5089_TAG, XTAL_3_579545MHz) |
| 1463 | 1453 | |
| r6451 | r6452 | |
| 1494 | 1484 | ROM_CART_LOAD("cart", 0x0000, 0x8000, ROM_NOMIRROR | ROM_OPTIONAL) |
| 1495 | 1485 | ROM_END |
| 1496 | 1486 | |
| 1497 | | ROM_START( npc8201a ) |
| 1487 | ROM_START( pc8201a ) |
| 1498 | 1488 | ROM_REGION( 0x10000, I8085_TAG, 0 ) |
| 1499 | 1489 | ROM_LOAD( "pc8201rom.rom0", 0x0000, 0x8000, CRC(30555035) SHA1(96f33ff235db3028bf5296052acedbc94437c596) ) |
| 1500 | 1490 | |
| r6451 | r6452 | |
| 1554 | 1544 | COMP( 1983, trsm100, 0, 0, trsm100, kc85, 0, 0, "Tandy Radio Shack", "TRS-80 Model 100", 0 ) |
| 1555 | 1545 | COMP( 1986, tandy102, trsm100,0, tandy102, kc85, 0, 0, "Tandy Radio Shack", "Tandy 102", 0 ) |
| 1556 | 1546 | //COMP( 1983, npc8201, 0, 0, pc8201, pc8201a, 0, 0, "NEC", "PC-8201 (Japan)", 0 ) |
| 1557 | | COMP( 1983, npc8201a, 0, 0, pc8201, pc8201a, 0, 0, "NEC", "PC-8201A", 0 ) |
| 1547 | COMP( 1983, pc8201a, 0, 0, pc8201, pc8201a, 0, 0, "NEC", "PC-8201A", 0 ) |
| 1558 | 1548 | //COMP( 1987, npc8300, npc8201,0, pc8300, pc8300, 0, 0, "NEC", "PC-8300", 0 ) |
| 1559 | 1549 | COMP( 1984, tandy200, 0, 0, tandy200, kc85, 0, 0, "Tandy Radio Shack", "Tandy 200", 0 ) |
src/mess/drivers/pc8001.c
| r6451 | r6452 | |
| 10 | 10 | |
| 11 | 11 | TODO: |
| 12 | 12 | |
| 13 | | - 8257dma has write modes flipped (should be 1=r, 2=w) |
| 14 | | - uPD3301 |
| 13 | - print time$/date$ stalls |
| 14 | - uPD3301 attributes |
| 15 | 15 | - PCG1000 |
| 16 | 16 | - Intel 8251 |
| 17 | 17 | - cassette |
| r6451 | r6452 | |
| 38 | 38 | |
| 39 | 39 | /* Read/Write Handlers */ |
| 40 | 40 | |
| 41 | | static WRITE8_HANDLER( port10_w ) |
| 42 | | { |
| 43 | | /* |
| 44 | | |
| 45 | | bit description |
| 46 | | |
| 47 | | 0 RTC C0 |
| 48 | | 1 RTC C1 |
| 49 | | 2 RTC C2 |
| 50 | | 3 RTC DATA IN |
| 51 | | 4 unused |
| 52 | | 5 unused |
| 53 | | 6 unused |
| 54 | | 7 unused |
| 55 | | |
| 56 | | */ |
| 57 | | |
| 58 | | pc8001_state *state = space->machine->driver_data; |
| 59 | | |
| 60 | | /* real time clock */ |
| 61 | | upd1990a_c0_w(state->upd1990a, BIT(data, 0)); |
| 62 | | upd1990a_c1_w(state->upd1990a, BIT(data, 1)); |
| 63 | | upd1990a_c2_w(state->upd1990a, BIT(data, 2)); |
| 64 | | upd1990a_data_w(state->upd1990a, BIT(data, 3)); |
| 65 | | |
| 66 | | /* printer */ |
| 67 | | centronics_data_w(state->centronics, 0, data); |
| 68 | | } |
| 69 | | |
| 70 | 41 | static WRITE8_HANDLER( port30_w ) |
| 71 | 42 | { |
| 72 | 43 | /* |
| r6451 | r6452 | |
| 114 | 85 | */ |
| 115 | 86 | } |
| 116 | 87 | |
| 117 | | static WRITE8_HANDLER( port40_w ) |
| 118 | | { |
| 119 | | /* |
| 120 | | |
| 121 | | bit description |
| 122 | | |
| 123 | | 0 PRT /STROBE |
| 124 | | 1 RTC STB |
| 125 | | 2 RTC CLK |
| 126 | | 3 CRT /CLDS CLK |
| 127 | | 4 unused |
| 128 | | 5 BEEP |
| 129 | | 6 unused |
| 130 | | 7 unused |
| 131 | | |
| 132 | | */ |
| 133 | | |
| 134 | | pc8001_state *state = space->machine->driver_data; |
| 135 | | |
| 136 | | /* printer */ |
| 137 | | centronics_strobe_w(state->centronics, BIT(data, 0)); |
| 138 | | |
| 139 | | /* real time clock */ |
| 140 | | upd1990a_stb_w(state->upd1990a, BIT(data, 1)); |
| 141 | | upd1990a_clk_w(state->upd1990a, BIT(data, 2)); |
| 142 | | |
| 143 | | /* beep */ |
| 144 | | speaker_level_w(state->speaker, BIT(data, 5)); |
| 145 | | } |
| 146 | | |
| 147 | | static READ8_HANDLER( port40_r ) |
| 148 | | { |
| 149 | | /* |
| 150 | | |
| 151 | | bit description |
| 152 | | |
| 153 | | 0 PRT /READY |
| 154 | | 1 PRT /ACK |
| 155 | | 2 CMT CDIN |
| 156 | | 3 EXP /EXTON |
| 157 | | 4 RTC DATA OUT |
| 158 | | 5 CRT VRTC |
| 159 | | 6 unused |
| 160 | | 7 unused |
| 161 | | |
| 162 | | */ |
| 163 | | |
| 164 | | pc8001_state *state = space->machine->driver_data; |
| 165 | | UINT8 data = 0xc8; |
| 166 | | |
| 167 | | data = centronics_busy_r(state->centronics); |
| 168 | | data |= state->ack << 1; |
| 169 | | data |= state->rtc_data << 4; |
| 170 | | data |= state->vrtc << 5; |
| 171 | | |
| 172 | | return data; |
| 173 | | } |
| 174 | | |
| 175 | 88 | /* Memory Maps */ |
| 176 | 89 | |
| 177 | 90 | static ADDRESS_MAP_START( pc8001_mem, ADDRESS_SPACE_PROGRAM, 8 ) |
| r6451 | r6452 | |
| 193 | 106 | AM_RANGE(0x07, 0x07) AM_READ_PORT("KEY7") |
| 194 | 107 | AM_RANGE(0x08, 0x08) AM_READ_PORT("KEY8") |
| 195 | 108 | AM_RANGE(0x09, 0x09) AM_READ_PORT("KEY9") |
| 196 | | AM_RANGE(0x10, 0x10) AM_MIRROR(0x0f) AM_WRITE(port10_w) |
| 109 | AM_RANGE(0x10, 0x10) AM_MIRROR(0x0f) AM_WRITE_PORT("W10") /* also AM_DEVWRITE(CENTRONICS_TAG, centronics_data_w)*/ |
| 197 | 110 | AM_RANGE(0x20, 0x20) AM_MIRROR(0x0e) AM_DEVREADWRITE(I8251_TAG, msm8251_data_r, msm8251_data_w) |
| 198 | 111 | AM_RANGE(0x21, 0x21) AM_MIRROR(0x0e) AM_DEVREADWRITE(I8251_TAG, msm8251_status_r, msm8251_control_w) |
| 199 | 112 | AM_RANGE(0x30, 0x30) AM_MIRROR(0x0f) AM_WRITE(port30_w) |
| 200 | | AM_RANGE(0x40, 0x40) AM_MIRROR(0x0f) AM_READWRITE(port40_r, port40_w) |
| 113 | AM_RANGE(0x40, 0x40) AM_MIRROR(0x0f) AM_READ_PORT("R40") AM_WRITE_PORT("W40") |
| 201 | 114 | AM_RANGE(0x50, 0x51) AM_DEVREADWRITE(UPD3301_TAG, upd3301_r, upd3301_w) |
| 202 | 115 | AM_RANGE(0x60, 0x68) AM_DEVREADWRITE(I8257_TAG, i8257_r, i8257_w) |
| 203 | 116 | // AM_RANGE(0x70, 0x7f) unused |
| r6451 | r6452 | |
| 259 | 172 | |
| 260 | 173 | static INPUT_PORTS_START( pc8001 ) |
| 261 | 174 | PORT_START("KEY0") |
| 262 | | PORT_BIT (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0_PAD) PORT_CHAR(UCHAR_MAMEKEY(0_PAD)) |
| 263 | | PORT_BIT (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1_PAD) PORT_CHAR(UCHAR_MAMEKEY(1_PAD)) |
| 264 | | PORT_BIT (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2_PAD) PORT_CHAR(UCHAR_MAMEKEY(2_PAD)) |
| 265 | | PORT_BIT (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3_PAD) PORT_CHAR(UCHAR_MAMEKEY(3_PAD)) |
| 266 | | PORT_BIT (0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4_PAD) PORT_CHAR(UCHAR_MAMEKEY(4_PAD)) |
| 267 | | PORT_BIT (0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5_PAD) PORT_CHAR(UCHAR_MAMEKEY(5_PAD)) |
| 268 | | PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6_PAD) PORT_CHAR(UCHAR_MAMEKEY(6_PAD)) |
| 269 | | PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7_PAD) PORT_CHAR(UCHAR_MAMEKEY(7_PAD)) |
| 175 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0_PAD) PORT_CHAR(UCHAR_MAMEKEY(0_PAD)) |
| 176 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1_PAD) PORT_CHAR(UCHAR_MAMEKEY(1_PAD)) |
| 177 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2_PAD) PORT_CHAR(UCHAR_MAMEKEY(2_PAD)) |
| 178 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3_PAD) PORT_CHAR(UCHAR_MAMEKEY(3_PAD)) |
| 179 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4_PAD) PORT_CHAR(UCHAR_MAMEKEY(4_PAD)) |
| 180 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5_PAD) PORT_CHAR(UCHAR_MAMEKEY(5_PAD)) |
| 181 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6_PAD) PORT_CHAR(UCHAR_MAMEKEY(6_PAD)) |
| 182 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7_PAD) PORT_CHAR(UCHAR_MAMEKEY(7_PAD)) |
| 270 | 183 | |
| 271 | 184 | PORT_START("KEY1") |
| 272 | | PORT_BIT (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8_PAD) PORT_CHAR(UCHAR_MAMEKEY(8_PAD)) |
| 273 | | PORT_BIT (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9_PAD) PORT_CHAR(UCHAR_MAMEKEY(9_PAD)) |
| 274 | | PORT_BIT (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR(UCHAR_MAMEKEY(ASTERISK)) |
| 275 | | PORT_BIT (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_PLUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(PLUS_PAD)) |
| 276 | | PORT_BIT (0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Keypad =") PORT_CODE(KEYCODE_PGUP) |
| 277 | | PORT_BIT (0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Keypad ,") PORT_CODE(KEYCODE_PGDN) |
| 278 | | PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DEL_PAD) PORT_CHAR(UCHAR_MAMEKEY(DEL_PAD)) |
| 279 | | PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Return") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_CHAR(13) |
| 185 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8_PAD) PORT_CHAR(UCHAR_MAMEKEY(8_PAD)) |
| 186 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9_PAD) PORT_CHAR(UCHAR_MAMEKEY(9_PAD)) |
| 187 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR(UCHAR_MAMEKEY(ASTERISK)) |
| 188 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PLUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(PLUS_PAD)) |
| 189 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad =") PORT_CODE(KEYCODE_PGUP) |
| 190 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad ,") PORT_CODE(KEYCODE_PGDN) |
| 191 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DEL_PAD) PORT_CHAR(UCHAR_MAMEKEY(DEL_PAD)) |
| 192 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Return") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_CHAR(13) |
| 280 | 193 | |
| 281 | 194 | PORT_START("KEY2") |
| 282 | | PORT_BIT (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('@') |
| 283 | | PORT_BIT (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') |
| 284 | | PORT_BIT (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') |
| 285 | | PORT_BIT (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') |
| 286 | | PORT_BIT (0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') |
| 287 | | PORT_BIT (0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') |
| 288 | | PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') |
| 289 | | PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') |
| 195 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('@') |
| 196 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') |
| 197 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') |
| 198 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') |
| 199 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') |
| 200 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') |
| 201 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') |
| 202 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') |
| 290 | 203 | |
| 291 | 204 | PORT_START("KEY3") |
| 292 | | PORT_BIT (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') |
| 293 | | PORT_BIT (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') |
| 294 | | PORT_BIT (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') |
| 295 | | PORT_BIT (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') |
| 296 | | PORT_BIT (0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') |
| 297 | | PORT_BIT (0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') |
| 298 | | PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') |
| 299 | | PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') |
| 205 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') |
| 206 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') |
| 207 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') |
| 208 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') |
| 209 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') |
| 210 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') |
| 211 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') |
| 212 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') |
| 300 | 213 | |
| 301 | 214 | PORT_START("KEY4") |
| 302 | | PORT_BIT (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') |
| 303 | | PORT_BIT (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') |
| 304 | | PORT_BIT (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') |
| 305 | | PORT_BIT (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') |
| 306 | | PORT_BIT (0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') |
| 307 | | PORT_BIT (0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') |
| 308 | | PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') |
| 309 | | PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') |
| 215 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') |
| 216 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') |
| 217 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') |
| 218 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') |
| 219 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') |
| 220 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') |
| 221 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') |
| 222 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') |
| 310 | 223 | |
| 311 | 224 | PORT_START("KEY5") |
| 312 | | PORT_BIT (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') |
| 313 | | PORT_BIT (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') |
| 314 | | PORT_BIT (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') |
| 315 | | PORT_BIT (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('[') PORT_CHAR('{') |
| 316 | | PORT_BIT (0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR('\xA5') PORT_CHAR('|') |
| 317 | | PORT_BIT (0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(']') PORT_CHAR('}') |
| 318 | | PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('^') |
| 319 | | PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('=') |
| 225 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') |
| 226 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') |
| 227 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') |
| 228 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('[') PORT_CHAR('{') |
| 229 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR('\xA5') PORT_CHAR('|') |
| 230 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(']') PORT_CHAR('}') |
| 231 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('^') |
| 232 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('=') |
| 320 | 233 | |
| 321 | 234 | PORT_START("KEY6") |
| 322 | | PORT_BIT (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') |
| 323 | | PORT_BIT (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') |
| 324 | | PORT_BIT (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"') |
| 325 | | PORT_BIT (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') |
| 326 | | PORT_BIT (0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') |
| 327 | | PORT_BIT (0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') |
| 328 | | PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') |
| 329 | | PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'') |
| 235 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0') |
| 236 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') |
| 237 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"') |
| 238 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') |
| 239 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') |
| 240 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') |
| 241 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') |
| 242 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'') |
| 330 | 243 | |
| 331 | 244 | PORT_START("KEY7") |
| 332 | | PORT_BIT (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') |
| 333 | | PORT_BIT (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') |
| 334 | | PORT_BIT (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(':') PORT_CHAR('*') |
| 335 | | PORT_BIT (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('+') |
| 336 | | PORT_BIT (0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') |
| 337 | | PORT_BIT (0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') |
| 338 | | PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') |
| 339 | | PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(" _") PORT_CODE(KEYCODE_DEL) PORT_CHAR(0) PORT_CHAR('_') |
| 245 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') |
| 246 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') |
| 247 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(':') PORT_CHAR('*') |
| 248 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('+') |
| 249 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') |
| 250 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') |
| 251 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') |
| 252 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(" _") PORT_CODE(KEYCODE_DEL) PORT_CHAR(0) PORT_CHAR('_') |
| 340 | 253 | |
| 341 | 254 | PORT_START("KEY8") |
| 342 | | PORT_BIT (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Clr Home") PORT_CODE(KEYCODE_HOME) PORT_CHAR(UCHAR_MAMEKEY(HOME)) |
| 343 | | PORT_BIT (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\xE2\x86\x91") PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) |
| 344 | | PORT_BIT (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\xE2\x86\x92") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) |
| 345 | | PORT_BIT (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Del Ins") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(UCHAR_MAMEKEY(DEL)) PORT_CHAR(UCHAR_MAMEKEY(INSERT)) |
| 346 | | PORT_BIT (0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Grph") PORT_CODE(KEYCODE_LALT) PORT_CODE(KEYCODE_RALT) PORT_CHAR(UCHAR_MAMEKEY(F7)) |
| 347 | | PORT_BIT (0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Kana") PORT_CODE(KEYCODE_LCONTROL) PORT_TOGGLE PORT_CHAR(UCHAR_MAMEKEY(F6)) |
| 348 | | PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) |
| 349 | | PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_SHIFT_2) |
| 255 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Clr Home") PORT_CODE(KEYCODE_HOME) PORT_CHAR(UCHAR_MAMEKEY(HOME)) |
| 256 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\xE2\x86\x91") PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) |
| 257 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\xE2\x86\x92") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) |
| 258 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Del Ins") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(UCHAR_MAMEKEY(DEL)) PORT_CHAR(UCHAR_MAMEKEY(INSERT)) |
| 259 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Grph") PORT_CODE(KEYCODE_LALT) PORT_CODE(KEYCODE_RALT) PORT_CHAR(UCHAR_MAMEKEY(F7)) |
| 260 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Kana") PORT_CODE(KEYCODE_LCONTROL) PORT_TOGGLE PORT_CHAR(UCHAR_MAMEKEY(F6)) |
| 261 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) |
| 262 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_SHIFT_2) |
| 350 | 263 | |
| 351 | 264 | PORT_START("KEY9") |
| 352 | | PORT_BIT (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Stop") PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC)) |
| 353 | | PORT_BIT (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) |
| 354 | | PORT_BIT (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) |
| 355 | | PORT_BIT (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3)) |
| 356 | | PORT_BIT (0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4)) |
| 357 | | PORT_BIT (0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5)) |
| 358 | | PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') |
| 359 | | PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC)) |
| 265 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Stop") PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC)) |
| 266 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) |
| 267 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) |
| 268 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3)) |
| 269 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4)) |
| 270 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5)) |
| 271 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') |
| 272 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC)) |
| 360 | 273 | |
| 361 | 274 | PORT_START("DSW1") |
| 275 | |
| 276 | PORT_START("W10") |
| 277 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE(UPD1990A_TAG, upd1990a_c0_w) |
| 278 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE(UPD1990A_TAG, upd1990a_c1_w) |
| 279 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE(UPD1990A_TAG, upd1990a_c2_w) |
| 280 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE(UPD1990A_TAG, upd1990a_data_in_w) |
| 281 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 282 | |
| 283 | PORT_START("R40") |
| 284 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE(CENTRONICS_TAG, centronics_busy_r) |
| 285 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE(CENTRONICS_TAG, centronics_ack_r) |
| 286 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) // CMT CDIN |
| 287 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SPECIAL ) // EXP /EXTON |
| 288 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE(UPD1990A_TAG, upd1990a_data_out_r) |
| 289 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE(UPD3301_TAG, upd3301_vrtc_r) |
| 290 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 291 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 292 | |
| 293 | PORT_START("W40") |
| 294 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE(CENTRONICS_TAG, centronics_strobe_w) |
| 295 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE(UPD1990A_TAG, upd1990a_stb_w) |
| 296 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE(UPD1990A_TAG, upd1990a_clk_w) |
| 297 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OUTPUT ) // CRT /CLDS CLK |
| 298 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 299 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE(SPEAKER_TAG, speaker_level_w) |
| 300 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 301 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 362 | 302 | INPUT_PORTS_END |
| 363 | 303 | |
| 364 | 304 | /* Video */ |
| r6451 | r6452 | |
| 423 | 363 | } |
| 424 | 364 | } |
| 425 | 365 | |
| 426 | | static WRITE_LINE_DEVICE_HANDLER( pc8001_vrtc_w ) |
| 427 | | { |
| 428 | | pc8001_state *driver_state = device->machine->driver_data; |
| 429 | | |
| 430 | | driver_state->vrtc = state; |
| 431 | | } |
| 432 | | |
| 433 | 366 | static UPD3301_INTERFACE( pc8001_upd3301_intf ) |
| 434 | 367 | { |
| 435 | 368 | SCREEN_TAG, |
| r6451 | r6452 | |
| 438 | 371 | DEVCB_NULL, |
| 439 | 372 | DEVCB_DEVICE_LINE(I8257_TAG, i8257_drq2_w), |
| 440 | 373 | DEVCB_NULL, |
| 441 | | DEVCB_LINE(pc8001_vrtc_w) |
| 374 | DEVCB_NULL |
| 442 | 375 | }; |
| 443 | 376 | |
| 444 | 377 | /* 8251 Interface */ |
| r6451 | r6452 | |
| 487 | 420 | |
| 488 | 421 | /* uPD1990A Interface */ |
| 489 | 422 | |
| 490 | | static WRITE_LINE_DEVICE_HANDLER( rtc_data_w ) |
| 491 | | { |
| 492 | | pc8001_state *driver_state = device->machine->driver_data; |
| 493 | | |
| 494 | | driver_state->rtc_data = state; |
| 495 | | } |
| 496 | | |
| 497 | 423 | static UPD1990A_INTERFACE( pc8001_upd1990a_intf ) |
| 498 | 424 | { |
| 499 | | DEVCB_LINE(rtc_data_w), |
| 500 | | DEVCB_NULL |
| 501 | | }; |
| 502 | | |
| 503 | | /* Centronics Interface */ |
| 504 | | |
| 505 | | static WRITE_LINE_DEVICE_HANDLER( ack_w ) |
| 506 | | { |
| 507 | | pc8001_state *driver_state = device->machine->driver_data; |
| 508 | | |
| 509 | | driver_state->ack = state; |
| 510 | | } |
| 511 | | |
| 512 | | static centronics_interface pc8001_centronics_intf = |
| 513 | | { |
| 514 | | 0, |
| 515 | | DEVCB_LINE(ack_w), |
| 516 | 425 | DEVCB_NULL, |
| 517 | 426 | DEVCB_NULL |
| 518 | 427 | }; |
| r6451 | r6452 | |
| 533 | 442 | state->cassette = devtag_get_device(machine, CASSETTE_TAG); |
| 534 | 443 | state->centronics = devtag_get_device(machine, CENTRONICS_TAG); |
| 535 | 444 | |
| 536 | | /* find memory regions */ |
| 537 | | state->char_rom = memory_region(machine, "chargen"); |
| 538 | | |
| 539 | 445 | /* initialize RTC */ |
| 540 | 446 | upd1990a_cs_w(state->upd1990a, 1); |
| 541 | 447 | upd1990a_oe_w(state->upd1990a, 1); |
| r6451 | r6452 | |
| 631 | 537 | MDRV_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, pc8001_upd1990a_intf) |
| 632 | 538 | MDRV_UPD3301_ADD(UPD3301_TAG, 14318180, pc8001_upd3301_intf) |
| 633 | 539 | |
| 634 | | MDRV_CENTRONICS_ADD(CENTRONICS_TAG, pc8001_centronics_intf) |
| 540 | MDRV_CENTRONICS_ADD(CENTRONICS_TAG, standard_centronics) |
| 635 | 541 | MDRV_CASSETTE_ADD(CASSETTE_TAG, pc8001_cassette_config) |
| 636 | 542 | |
| 637 | 543 | MDRV_RAM_ADD("messram") |