diff options
Diffstat (limited to 'src/mame/drivers/dolphunk.cpp')
-rw-r--r-- | src/mame/drivers/dolphunk.cpp | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/src/mame/drivers/dolphunk.cpp b/src/mame/drivers/dolphunk.cpp index 3ac545a18ca..34ba551a718 100644 --- a/src/mame/drivers/dolphunk.cpp +++ b/src/mame/drivers/dolphunk.cpp @@ -106,17 +106,16 @@ public: private: DECLARE_READ_LINE_MEMBER(cass_r); - DECLARE_WRITE_LINE_MEMBER(cass_w); DECLARE_READ8_MEMBER(port07_r); DECLARE_WRITE8_MEMBER(port00_w); DECLARE_WRITE8_MEMBER(port06_w); - TIMER_DEVICE_CALLBACK_MEMBER(dauphin_c); + TIMER_DEVICE_CALLBACK_MEMBER(kansas_w); void dauphin_io(address_map &map); void dauphin_mem(address_map &map); uint8_t m_cass_data; uint8_t m_last_key; - bool m_cass_state; + bool m_cassbit; bool m_cassold; bool m_speaker_state; virtual void machine_start() override { m_digits.resolve(); } @@ -131,11 +130,6 @@ READ_LINE_MEMBER( dauphin_state::cass_r ) return (m_cass->input() > 0.03) ? 1 : 0; } -WRITE_LINE_MEMBER( dauphin_state::cass_w ) -{ - m_cass_state = state; // get flag bit -} - WRITE8_MEMBER( dauphin_state::port00_w ) { m_digits[offset] = data; @@ -173,17 +167,17 @@ READ8_MEMBER( dauphin_state::port07_r ) return data; } -TIMER_DEVICE_CALLBACK_MEMBER(dauphin_state::dauphin_c) +TIMER_DEVICE_CALLBACK_MEMBER(dauphin_state::kansas_w) { m_cass_data++; - if (m_cass_state != m_cassold) + if (m_cassbit != m_cassold) { m_cass_data = 0; - m_cassold = m_cass_state; + m_cassold = m_cassbit; } - if (m_cass_state) + if (m_cassbit) m_cass->output(BIT(m_cass_data, 1) ? -1.0 : +1.0); // 1000Hz else m_cass->output(BIT(m_cass_data, 0) ? -1.0 : +1.0); // 2000Hz @@ -240,7 +234,7 @@ void dauphin_state::dauphin(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &dauphin_state::dauphin_mem); m_maincpu->set_addrmap(AS_IO, &dauphin_state::dauphin_io); m_maincpu->sense_handler().set(FUNC(dauphin_state::cass_r)); - m_maincpu->flag_handler().set(FUNC(dauphin_state::cass_w)); + m_maincpu->flag_handler().set([this] (bool state) { m_cassbit = state; }); /* video hardware */ config.set_default_layout(layout_dolphunk); @@ -252,7 +246,7 @@ void dauphin_state::dauphin(machine_config &config) /* cassette */ CASSETTE(config, m_cass); - TIMER(config, "dauphin_c").configure_periodic(FUNC(dauphin_state::dauphin_c), attotime::from_hz(4000)); + TIMER(config, "kansas_w").configure_periodic(FUNC(dauphin_state::kansas_w), attotime::from_hz(4000)); } /* ROM definition */ |