summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2020-02-24 22:22:10 -0500
committer AJR <ajrhacker@users.noreply.github.com>2020-02-24 22:22:20 -0500
commit5d1ebeb648a4fca524e497417d66a4c3d4b8009e (patch)
treea868a4cec16e73fd32da3b1f0d23f619edb1c7e0 /src/devices/machine
parent516651c2981cf6dd488c940a2e419b804d2f7309 (diff)
i8279: Correct keyboard scan rate and logging thereof
pp: Fix shift/control key polarity (nw)
Diffstat (limited to 'src/devices/machine')
-rw-r--r--src/devices/machine/i8279.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/devices/machine/i8279.cpp b/src/devices/machine/i8279.cpp
index 47ac639e6bd..c030bae7b1d 100644
--- a/src/devices/machine/i8279.cpp
+++ b/src/devices/machine/i8279.cpp
@@ -159,8 +159,8 @@ void i8279_device::device_reset()
// from here is confirmed
m_cmd[0] = 8;
m_cmd[1] = 31;
- logerror("Initial clock = 3100kHz\n");
timer_adjust();
+ logerror("Initial clock = %.2f kHz\n", m_scanclock / 1000.0);
}
@@ -169,12 +169,12 @@ void i8279_device::timer_adjust()
// Real device runs at about 100kHz internally, clock divider is chosen so that
// this is the case. If this is too long, the sensor mode doesn't work correctly.
- u8 divider = (m_cmd[1]) ? m_cmd[1] : 1;
+ u8 divider = (m_cmd[1] >= 2) ? m_cmd[1] : 2;
u32 new_clock = clock() / divider;
if (m_scanclock != new_clock)
{
- m_timer->adjust(attotime::from_hz(new_clock), 0, attotime::from_hz(new_clock));
+ m_timer->adjust(attotime::from_ticks(64, new_clock), 0, attotime::from_ticks(64, new_clock));
m_scanclock = new_clock;
}
@@ -477,8 +477,8 @@ void i8279_device::cmd_w(u8 data)
case 1:
if (data > 1)
{
- logerror("Clock set to %dkHz\n",data*100);
timer_adjust();
+ logerror("Clock set to %.2f kHz\n", m_scanclock / 1000.0);
}
break;
case 2: