summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2018-03-17 17:23:48 -0400
committer AJR <ajrhacker@users.noreply.github.com>2018-03-17 17:23:48 -0400
commit48f77bb45bf6073cc92b855be296238c96ce917f (patch)
treec143b77e6d011929f1a61b811a7f0d5099074ccc
parentffd19cda0fc58d335d3cb8293bd8e09fd9a6fcd2 (diff)
vt100_kbd: Fix for last fix (nw)
-rw-r--r--src/mame/machine/vt100_kbd.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/mame/machine/vt100_kbd.cpp b/src/mame/machine/vt100_kbd.cpp
index 819352cba4a..253022285a9 100644
--- a/src/mame/machine/vt100_kbd.cpp
+++ b/src/mame/machine/vt100_kbd.cpp
@@ -13,6 +13,8 @@
#include "emu.h"
#include "machine/vt100_kbd.h"
+#include "logmacro.h"
+
//**************************************************************************
// DEVICE DEFINITIONS
@@ -275,10 +277,7 @@ WRITE_LINE_MEMBER(vt100_keyboard_device::signal_line_w)
m_speaker->set_state(BIT(data, 7));
if (BIT(data, 6))
- {
- m_last_scan = 0;
m_scan_counter->reset_w(0);
- }
}
}
@@ -310,10 +309,18 @@ WRITE8_MEMBER(vt100_keyboard_device::key_scan_w)
{
u8 input_row = m_key_row[(data >> 1) & 15]->read();
if (!BIT(input_row, (data >> 5) & 7))
+ {
+ if (data != 0xff)
+ LOG("Keycode pressed: %02X\n", (data >> 1) & 0x7f);
m_uart->set_transmit_data((data >> 1) & 0x7f);
+ }
}
- else if (!BIT(data, 7) && BIT(m_last_scan, 7))
- m_scan_counter->reset_w(1);
- m_last_scan = data;
+ if (!BIT(data, 7) && BIT(m_last_scan, 7))
+ {
+ m_last_scan = 0;
+ m_scan_counter->reset_w(1);
+ }
+ else
+ m_last_scan = data;
}