diff --git a/src/mame/drivers/xerox820.cpp b/src/mame/drivers/xerox820.cpp index 02d48199d76..ff80cb9b300 100644 --- a/src/mame/drivers/xerox820.cpp +++ b/src/mame/drivers/xerox820.cpp @@ -229,7 +229,7 @@ static INPUT_PORTS_START( xerox820 ) // inputs defined in machine/keyboard.c INPUT_PORTS_END -TIMER_CALLBACK_MEMBER( bigboard_state::bigboard_beepoff ) +TIMER_DEVICE_CALLBACK_MEMBER(bigboard_state::beep_timer) { m_beeper->set_state(0); } @@ -322,7 +322,7 @@ void bigboard_state::kbpio_pa_w(uint8_t data) /* beeper on bigboard */ if (BIT(data, 5) & (!m_bit5)) { - machine().scheduler().timer_set(attotime::from_msec(40), timer_expired_delegate(FUNC(bigboard_state::bigboard_beepoff),this)); + m_beep_timer->adjust(attotime::from_msec(40)); m_beeper->set_state(1); } m_bit5 = BIT(data, 5); @@ -696,6 +696,7 @@ void bigboard_state::bigboard(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); BEEP(config, m_beeper, 950).add_route(ALL_OUTPUTS, "mono", 1.00); /* bigboard only */ + TIMER(config, m_beep_timer).configure_generic(FUNC(bigboard_state::beep_timer)); } void xerox820ii_state::xerox820ii(machine_config &config) diff --git a/src/mame/includes/xerox820.h b/src/mame/includes/xerox820.h index 86f436f6432..e5e9c9c3f81 100644 --- a/src/mame/includes/xerox820.h +++ b/src/mame/includes/xerox820.h @@ -22,6 +22,7 @@ #include "machine/z80sio.h" #include "sound/spkrdev.h" #include "sound/beep.h" +#include "machine/timer.h" #include "imagedev/floppy.h" #include "imagedev/snapquik.h" #include "emupal.h" @@ -136,6 +137,7 @@ public: bigboard_state(const machine_config &mconfig, device_type type, const char *tag) : xerox820_state(mconfig, type, tag) , m_beeper(*this, "beeper") + , m_beep_timer(*this, "beep_timer") { } void kbpio_pa_w(uint8_t data); @@ -144,9 +146,10 @@ public: protected: virtual void machine_reset() override; - TIMER_CALLBACK_MEMBER(bigboard_beepoff); + TIMER_DEVICE_CALLBACK_MEMBER(beep_timer); required_device m_beeper; + required_device m_beep_timer; bool m_bit5; };