summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2020-02-25 16:21:27 -0500
committer AJR <ajrhacker@users.noreply.github.com>2020-02-25 16:22:08 -0500
commit9b49a98cce4ba9d643e29848eed75bf064b94b71 (patch)
treee9db4d3cf0f1f23036f442ab4ad1d9f1026c7e0c
parent415eef99102af92bad6232afb0ec56c9451348c2 (diff)
i8279: Fix accidentally uncovered crash in turbo (nw)
This device emulation is anything but robust.
-rw-r--r--src/devices/machine/i8279.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/devices/machine/i8279.cpp b/src/devices/machine/i8279.cpp
index c030bae7b1d..12f2a7cd6dd 100644
--- a/src/devices/machine/i8279.cpp
+++ b/src/devices/machine/i8279.cpp
@@ -277,6 +277,10 @@ void i8279_device::timer_mainloop()
bool ctrl_key = 1;
bool strobe_pulse = 0;
+ // hack to prevent infinite loops
+ if (decoded && m_scanner == 0)
+ m_scanner = 1;
+
// keyboard
// type 0 = kbd, 2-key lockout
// type 1 = kdb, n-key