summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2020-07-17 10:07:34 +0200
committer hap <happppp@users.noreply.github.com>2020-07-17 10:07:46 +0200
commita31bf42d4360b9252bee87b0c36d6da609b0d06e (patch)
treeaebc3c0515f4b927809d5c688da3b626f7fd73c3
parente15b21023b558462132576ed3c9b1354f9d08dce (diff)
intchess: test 6502 nmi edge-trigger bug (remove || 1 and it works)
-rw-r--r--src/mame/drivers/saitek_intchess.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mame/drivers/saitek_intchess.cpp b/src/mame/drivers/saitek_intchess.cpp
index 6b101e933f5..1c9d781197e 100644
--- a/src/mame/drivers/saitek_intchess.cpp
+++ b/src/mame/drivers/saitek_intchess.cpp
@@ -192,7 +192,7 @@ void intchess_state::control_w(u8 data)
// PB5: speaker
m_dac->write(BIT(data, 5));
- // PB6: cassette input?
+ // PB6: ?
// PB7: cassette output
m_cass->output(BIT(data, 7) ? +1.0 : -1.0);
}
@@ -205,7 +205,14 @@ u8 intchess_state::control_r()
TIMER_DEVICE_CALLBACK_MEMBER(intchess_state::cass_input)
{
- m_via->write_pb6((m_cass->input() > +0.04) ? 1 : 0);
+ static bool nmistate = false;
+ bool state = m_cass->input() < -0.04;
+
+ if (state != nmistate || 1)
+ {
+ m_maincpu->set_input_line(INPUT_LINE_NMI, state ? ASSERT_LINE : CLEAR_LINE);
+ nmistate = state;
+ }
}