diff options
Diffstat (limited to 'src/mame/drivers/h8.cpp')
-rw-r--r-- | src/mame/drivers/h8.cpp | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/mame/drivers/h8.cpp b/src/mame/drivers/h8.cpp index 470b8ca8bc1..7d17716e3e1 100644 --- a/src/mame/drivers/h8.cpp +++ b/src/mame/drivers/h8.cpp @@ -63,11 +63,11 @@ class h8_state : public driver_device { public: h8_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_uart(*this, "uart"), - m_cass(*this, "cassette"), - m_beep(*this, "beeper") + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_uart(*this, "uart") + , m_cass(*this, "cassette") + , m_beep(*this, "beeper") { } DECLARE_READ8_MEMBER(portf0_r); @@ -76,10 +76,10 @@ public: DECLARE_WRITE8_MEMBER(h8_status_callback); DECLARE_WRITE_LINE_MEMBER(h8_inte_callback); DECLARE_WRITE_LINE_MEMBER(txdata_callback); - DECLARE_WRITE_LINE_MEMBER(write_cassette_clock); TIMER_DEVICE_CALLBACK_MEMBER(h8_irq_pulse); TIMER_DEVICE_CALLBACK_MEMBER(h8_c); TIMER_DEVICE_CALLBACK_MEMBER(h8_p); + private: uint8_t m_digit; uint8_t m_segment; @@ -271,12 +271,6 @@ WRITE_LINE_MEMBER( h8_state::txdata_callback ) m_cass_state = state; } -WRITE_LINE_MEMBER( h8_state::write_cassette_clock ) -{ - m_uart->write_txc(state); - m_uart->write_rxc(state); -} - TIMER_DEVICE_CALLBACK_MEMBER(h8_state::h8_c) { m_cass_data[3]++; @@ -330,7 +324,8 @@ static MACHINE_CONFIG_START( h8 ) MCFG_I8251_TXD_HANDLER(WRITELINE(h8_state, txdata_callback)) MCFG_DEVICE_ADD("cassette_clock", CLOCK, 4800) - MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(h8_state, write_cassette_clock)) + MCFG_CLOCK_SIGNAL_HANDLER(DEVWRITELINE("uart", i8251_device, write_txc)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("uart", i8251_device, write_rxc)) MCFG_CASSETTE_ADD("cassette") MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) |