diff options
Diffstat (limited to 'src/mame/machine/p2000t_mdcr.cpp')
-rw-r--r-- | src/mame/machine/p2000t_mdcr.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mame/machine/p2000t_mdcr.cpp b/src/mame/machine/p2000t_mdcr.cpp index 75d860e5bac..a19f3b6a752 100644 --- a/src/mame/machine/p2000t_mdcr.cpp +++ b/src/mame/machine/p2000t_mdcr.cpp @@ -34,12 +34,12 @@ READ_LINE_MEMBER(mdcr_device::bet) READ_LINE_MEMBER(mdcr_device::cip) { - return true; + return m_cassette->get_image() != nullptr; } READ_LINE_MEMBER(mdcr_device::wen) { - return true; + return m_cassette->get_image() != nullptr && m_cassette->is_writeable(); } WRITE_LINE_MEMBER(mdcr_device::rev) @@ -198,8 +198,14 @@ void mdcr_device::stop() bool mdcr_device::tape_start_or_end() { auto pos = m_cassette->get_position(); - return m_cassette->motor_on() && + auto bet = m_cassette->motor_on() && (pos <= 0 || pos >= m_cassette->get_length()); + + // Reset phase decoder at tape start/end. + if (bet) + m_phase_decoder.reset(); + + return bet; } void p2000_mdcr_devices(device_slot_interface &device) |