diff options
Diffstat (limited to 'src/mame/machine/pc9801_kbd.cpp')
-rw-r--r-- | src/mame/machine/pc9801_kbd.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mame/machine/pc9801_kbd.cpp b/src/mame/machine/pc9801_kbd.cpp index 260bd9f6b3d..3e4cd4373f8 100644 --- a/src/mame/machine/pc9801_kbd.cpp +++ b/src/mame/machine/pc9801_kbd.cpp @@ -257,6 +257,7 @@ void pc9801_kbd_device::device_reset() m_keyb_tx = 0xff; m_keyb_rx = 0; + m_key_avail = false; } //------------------------------------------------- @@ -276,6 +277,7 @@ void pc9801_kbd_device::device_timer(emu_timer &timer, device_timer_id id, int p { m_keyb_tx = i | 0x80; m_write_irq(ASSERT_LINE); + m_key_avail = true; m_rx_buf[i] = 0; return; } @@ -288,6 +290,7 @@ void pc9801_kbd_device::device_timer(emu_timer &timer, device_timer_id id, int p { m_keyb_tx = i; m_write_irq(ASSERT_LINE); + m_key_avail = true; m_rx_buf[i] = 0; return; } @@ -303,8 +306,11 @@ READ8_MEMBER( pc9801_kbd_device::rx_r ) { m_write_irq(CLEAR_LINE); if(!offset) + { + m_key_avail = false; return m_keyb_tx; - return 1 | 4 | 2; + } + return 1 | 4 | (m_key_avail ? 2 : 0); } WRITE8_MEMBER( pc9801_kbd_device::tx_w ) |