src/emu/machine/8042kbdc.c
| r2335 | r2336 | |
| 179 | 179 | |
| 180 | 180 | #include "machine/pckeybrd.h" |
| 181 | 181 | #include "machine/8042kbdc.h" |
| 182 | | #include "machine/pit8253.h" |
| 183 | 182 | #include "machine/pcshare.h" |
| 184 | 183 | |
| 185 | 184 | #ifdef MESS |
| r2335 | r2336 | |
| 213 | 212 | kbdc8042_type_t type; |
| 214 | 213 | void (*set_gate_a20)(int a20); |
| 215 | 214 | void (*keyboard_interrupt)(int state); |
| 215 | int (*get_out2)(running_machine *machine); |
| 216 | 216 | |
| 217 | 217 | UINT8 inport, outport, data, command; |
| 218 | 218 | |
| r2335 | r2336 | |
| 276 | 276 | kbdc8042.type = intf->type; |
| 277 | 277 | kbdc8042.set_gate_a20 = intf->set_gate_a20; |
| 278 | 278 | kbdc8042.keyboard_interrupt = intf->keyboard_interrupt; |
| 279 | kbdc8042.get_out2 = intf->get_out2; |
| 279 | 280 | |
| 280 | 281 | /* ibmat bios wants 0x20 set! (keyboard locked when not set) 0x80 */ |
| 281 | 282 | kbdc8042.inport = 0xa0; |
| r2335 | r2336 | |
| 391 | 392 | break; |
| 392 | 393 | |
| 393 | 394 | case 2: |
| 394 | | if (pit8253_get_output(0, 2)) |
| 395 | if (kbdc8042.get_out2(machine)) |
| 395 | 396 | data |= 0x20; |
| 396 | 397 | else |
| 397 | 398 | data &= ~0x20; |
src/mess/machine/at.c
| r2335 | r2336 | |
| 231 | 231 | }; |
| 232 | 232 | |
| 233 | 233 | |
| 234 | static int at_get_out2(running_machine *machine) { |
| 235 | return pit8253_get_output((device_config*)device_list_find_by_tag( machine->config->devicelist, PIT8254, "at_pit8254" ), 2 ); |
| 236 | } |
| 237 | |
| 238 | |
| 234 | 239 | DRIVER_INIT( atcga ) |
| 235 | 240 | { |
| 236 | 241 | static const struct kbdc8042_interface at8042 = |
| 237 | 242 | { |
| 238 | | KBDC8042_STANDARD, at_set_gate_a20, at_keyboard_interrupt |
| 243 | KBDC8042_STANDARD, at_set_gate_a20, at_keyboard_interrupt, at_get_out2 |
| 239 | 244 | }; |
| 240 | 245 | init_at_common(&at8042); |
| 241 | 246 | } |
| r2335 | r2336 | |
| 246 | 251 | { |
| 247 | 252 | static const struct kbdc8042_interface at8042 = |
| 248 | 253 | { |
| 249 | | KBDC8042_AT386, at_set_gate_a20, at_keyboard_interrupt |
| 254 | KBDC8042_AT386, at_set_gate_a20, at_keyboard_interrupt, at_get_out2 |
| 250 | 255 | }; |
| 251 | 256 | init_at_common(&at8042); |
| 252 | 257 | } |
| r2335 | r2336 | |
| 296 | 301 | { |
| 297 | 302 | static const struct kbdc8042_interface at8042 = |
| 298 | 303 | { |
| 299 | | KBDC8042_STANDARD, at_set_gate_a20, at_keyboard_interrupt |
| 304 | KBDC8042_STANDARD, at_set_gate_a20, at_keyboard_interrupt, at_get_out2 |
| 300 | 305 | }; |
| 301 | 306 | |
| 302 | 307 | init_at_common(&at8042); |
| r2335 | r2336 | |
| 310 | 315 | { |
| 311 | 316 | static const struct kbdc8042_interface at8042 = |
| 312 | 317 | { |
| 313 | | KBDC8042_PS2, at_set_gate_a20, at_keyboard_interrupt |
| 318 | KBDC8042_PS2, at_set_gate_a20, at_keyboard_interrupt, at_get_out2 |
| 314 | 319 | }; |
| 315 | 320 | init_at_common(&at8042); |
| 316 | 321 | pc_turbo_setup(0, 3, 0x02, 4.77/12, 1); |
src/mess/drivers/ip22.c
| r2335 | r2336 | |
| 1443 | 1443 | wd33c93_exit(&scsi_intf); |
| 1444 | 1444 | } |
| 1445 | 1445 | |
| 1446 | static int ip22_get_out2(running_machine *machine) { |
| 1447 | return pit8253_get_output((device_config*)device_list_find_by_tag( machine->config->devicelist, PIT8254, "pit8254" ), 2 ); |
| 1448 | } |
| 1449 | |
| 1446 | 1450 | static DRIVER_INIT( ip225015 ) |
| 1447 | 1451 | { |
| 1448 | 1452 | static const struct kbdc8042_interface at8042 = |
| 1449 | 1453 | { |
| 1450 | | KBDC8042_STANDARD, NULL, NULL |
| 1454 | KBDC8042_STANDARD, NULL, NULL, ip22_get_out2 |
| 1451 | 1455 | }; |
| 1452 | 1456 | |
| 1453 | 1457 | // IP22 uses 2 pieces of PC-compatible hardware: the 8042 PS/2 keyboard/mouse |