summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2020-02-20 16:57:29 -0500
committer AJR <ajrhacker@users.noreply.github.com>2020-02-20 16:57:29 -0500
commitf923902e83c21e412315f0285f70a38be9b3dbbd (patch)
treecad2bb48967ad7dc02d27a66e290eb44619dd671
parentaaaf9146f928bf191c3ce43f7c082ad6a27c66b9 (diff)
i8279: More fine-tuning (nw)
-rw-r--r--src/devices/machine/i8279.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/devices/machine/i8279.cpp b/src/devices/machine/i8279.cpp
index 0a2885f8841..47ac639e6bd 100644
--- a/src/devices/machine/i8279.cpp
+++ b/src/devices/machine/i8279.cpp
@@ -223,7 +223,7 @@ void i8279_device::new_key(u8 data, bool skey, bool ckey)
sl = i;
}
else
- sl = m_scanner;
+ sl = m_scanner & 7;
new_fifo( (ckey << 7) | (skey << 6) | (sl << 3) | rl);
}
@@ -302,11 +302,11 @@ void i8279_device::timer_mainloop()
u8 rl = m_in_rl_cb(0);
// see if key still down from last time
- u16 key_down = (m_scanner << 8) | rl;
+ u16 key_down = ((m_scanner & scanner_mask) << 8) | rl;
if (key_down == m_key_down)
rl = 0xff;
else
- if ((rl == 0xff) && (m_scanner == m_key_down >> 8))
+ if ((rl == 0xff) && ((m_scanner & scanner_mask) == m_key_down >> 8))
m_key_down = 0xffff;
// now process new key