diff options
author | 2019-06-08 12:48:35 +1000 | |
---|---|---|
committer | 2019-06-08 12:48:35 +1000 | |
commit | a75002a19af0ff17f78f7567d301fca6348ad43d (patch) | |
tree | e4d69b8b87de4b772cdb3117c709c821551c9eea | |
parent | 285ff0f377cd7a2e16154ad0348a2866e4d25fc2 (diff) |
(nw) mtx : fixed cassette load
-rw-r--r-- | src/mame/drivers/mtx.cpp | 10 | ||||
-rw-r--r-- | src/mame/includes/mtx.h | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/mame/drivers/mtx.cpp b/src/mame/drivers/mtx.cpp index e322d4ab9c2..6e0f934bd51 100644 --- a/src/mame/drivers/mtx.cpp +++ b/src/mame/drivers/mtx.cpp @@ -10,7 +10,6 @@ TODO: - - cassette - FDX floppy - HDX hard disk - HRX high resolution graphics @@ -260,9 +259,14 @@ static const z80_daisy_config rs128_daisy_chain[] = TIMER_DEVICE_CALLBACK_MEMBER(mtx_state::cassette_tick) { - int data = ((m_cassette)->input() > +0.0) ? 0 : 1; + bool cass_ws = (m_cassette->input() > +0.03) ? 1 : 0; - m_z80ctc->trg3(data); + if (cass_ws != m_cassold) + { + m_cassold = cass_ws; + m_z80ctc->trg3(1); + m_z80ctc->trg3(0); // this causes interrupt + } } /*------------------------------------------------- diff --git a/src/mame/includes/mtx.h b/src/mame/includes/mtx.h index 111ac5931f3..98142043f14 100644 --- a/src/mame/includes/mtx.h +++ b/src/mame/includes/mtx.h @@ -29,6 +29,7 @@ class mtx_state : public driver_device public: mtx_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) + , m_cassold(0) , m_maincpu(*this, "z80") , m_sn(*this, "sn76489a") , m_z80ctc(*this, "z80ctc") @@ -50,6 +51,7 @@ protected: virtual void machine_reset() override; private: + bool m_cassold; required_device<z80_device> m_maincpu; required_device<sn76489a_device> m_sn; required_device<z80ctc_device> m_z80ctc; |