diff options
Diffstat (limited to 'src/devices/machine/8042kbdc.cpp')
-rw-r--r-- | src/devices/machine/8042kbdc.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/devices/machine/8042kbdc.cpp b/src/devices/machine/8042kbdc.cpp index 602435369ab..5a7815f3ccd 100644 --- a/src/devices/machine/8042kbdc.cpp +++ b/src/devices/machine/8042kbdc.cpp @@ -69,6 +69,9 @@ void kbdc8042_device::device_start() m_sending = 0; m_last_write_to_control = 0; m_status_read_mode = 0; + + m_update_timer = timer_alloc(TIMER_UPDATE); + m_update_timer->adjust(attotime::never); } /*------------------------------------------------- @@ -86,6 +89,8 @@ void kbdc8042_device::device_reset() m_mouse_x = 0; m_mouse_y = 0; m_mouse_btn = 0; + + m_update_timer->adjust(attotime::from_hz(100), 0, attotime::from_hz(100)); } void kbdc8042_device::at_8042_set_outport(uint8_t data, int initial) @@ -195,7 +200,14 @@ void kbdc8042_device::at_8042_clear_keyboard_received() m_mouse.received = 0; } - +void kbdc8042_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) +{ + if (id == TIMER_UPDATE) + { + at_8042_check_keyboard(); + at_8042_check_mouse(); + } +} /* ************************************************************************** * Port 0x60 Input and Output Buffer (keyboard and mouse data) |