mirror of
https://github.com/holub/mame
synced 2025-06-06 04:43:45 +03:00
-8042kbdc: Added timer to periodically check mouse. Fixes mouse in IRIX. [Ryan Holtz]
This commit is contained in:
parent
f2d0f2ffcf
commit
a9f751387c
@ -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)
|
||||
|
@ -58,8 +58,11 @@ protected:
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
|
||||
virtual ioport_constructor device_input_ports() const override;
|
||||
|
||||
static const device_timer_id TIMER_UPDATE = 0;
|
||||
|
||||
private:
|
||||
uint8_t m_inport;
|
||||
uint8_t m_outport;
|
||||
@ -112,6 +115,8 @@ private:
|
||||
uint16_t m_mouse_y;
|
||||
uint8_t m_mouse_btn;
|
||||
|
||||
emu_timer * m_update_timer;
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( keyboard_w );
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user