mirror of
https://github.com/holub/mame
synced 2025-05-16 02:42:05 +03:00
(nw) mtx : fixed cassette load
This commit is contained in:
parent
285ff0f377
commit
a75002a19a
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user