diff --git a/src/devices/bus/isa/finalchs.cpp b/src/devices/bus/isa/finalchs.cpp index 00740d9f264..f9e3add076a 100644 --- a/src/devices/bus/isa/finalchs.cpp +++ b/src/devices/bus/isa/finalchs.cpp @@ -106,7 +106,6 @@ void isa8_finalchs_device::device_start() //the included setup program allows any port from 0x100 to 0x1F0 to be selected, at increments of 0x10 //picked the following at random until we get dips hooked up m_isa->install_device(0x160, 0x0161, read8_delegate(FUNC(isa8_finalchs_device::finalchs_r), this), write8_delegate(FUNC(isa8_finalchs_device::finalchs_w), this)); -// timer_pulse(machine, ATTOTIME_IN_HZ(1), nullptr, 0, cause_M6502_irq); } //------------------------------------------------- diff --git a/src/devices/cpu/sc61860/sc61860.cpp b/src/devices/cpu/sc61860/sc61860.cpp index 4c10bdb288c..5b636dcfb94 100644 --- a/src/devices/cpu/sc61860/sc61860.cpp +++ b/src/devices/cpu/sc61860/sc61860.cpp @@ -101,7 +101,8 @@ void sc61860_device::device_reset() void sc61860_device::device_start() { - machine().scheduler().timer_pulse(attotime::from_hz(500), timer_expired_delegate( FUNC(sc61860_device::sc61860_2ms_tick), this)); + m_2ms_tick_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(sc61860_device::sc61860_2ms_tick), this)); + m_2ms_tick_timer->adjust(attotime::from_hz(500), 0, attotime::from_hz(500)); m_program = &space(AS_PROGRAM); m_direct = &m_program->direct(); diff --git a/src/devices/cpu/sc61860/sc61860.h b/src/devices/cpu/sc61860/sc61860.h index 90385223cd0..2131673616b 100644 --- a/src/devices/cpu/sc61860/sc61860.h +++ b/src/devices/cpu/sc61860/sc61860.h @@ -134,6 +134,7 @@ private: int m_carry, m_zero; struct { int t2ms, t512ms; int count; } m_timer; + emu_timer *m_2ms_tick_timer; address_space *m_program; direct_read_data *m_direct; diff --git a/src/devices/machine/rtc9701.cpp b/src/devices/machine/rtc9701.cpp index a37e79ed7ba..6221f057989 100644 --- a/src/devices/machine/rtc9701.cpp +++ b/src/devices/machine/rtc9701.cpp @@ -92,7 +92,8 @@ void rtc9701_device::device_validity_check(validity_checker &valid) const void rtc9701_device::device_start() { /* let's call the timer callback every second */ - machine().scheduler().timer_pulse(attotime::from_hz(clock() / XTAL_32_768kHz), timer_expired_delegate(FUNC(rtc9701_device::timer_callback), this)); + m_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(rtc9701_device::timer_callback), this)); + m_timer->adjust(attotime::from_hz(clock() / XTAL_32_768kHz), 0, attotime::from_hz(clock() / XTAL_32_768kHz)); system_time systime; machine().base_datetime(systime); diff --git a/src/devices/machine/rtc9701.h b/src/devices/machine/rtc9701.h index b0d35929945..ac840247ad1 100644 --- a/src/devices/machine/rtc9701.h +++ b/src/devices/machine/rtc9701.h @@ -91,6 +91,8 @@ protected: uint16_t rtc9701_data[0x100]; regs_t m_rtc; + + emu_timer *m_timer; }; diff --git a/src/devices/machine/s3520cf.cpp b/src/devices/machine/s3520cf.cpp index 9e5100ed30f..902e03becf3 100644 --- a/src/devices/machine/s3520cf.cpp +++ b/src/devices/machine/s3520cf.cpp @@ -90,7 +90,8 @@ void s3520cf_device::device_validity_check(validity_checker &valid) const void s3520cf_device::device_start() { /* let's call the timer callback every second for now */ - machine().scheduler().timer_pulse(attotime::from_hz(clock() / XTAL_32_768kHz), timer_expired_delegate(FUNC(s3520cf_device::timer_callback), this)); + m_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(s3520cf_device::timer_callback), this)); + m_timer->adjust(attotime::from_hz(clock() / XTAL_32_768kHz), 0, attotime::from_hz(clock() / XTAL_32_768kHz)); system_time systime; machine().base_datetime(systime); diff --git a/src/devices/machine/s3520cf.h b/src/devices/machine/s3520cf.h index 168097e0e16..72b75fc4238 100644 --- a/src/devices/machine/s3520cf.h +++ b/src/devices/machine/s3520cf.h @@ -71,6 +71,7 @@ protected: state_t m_rtc_state; rtc_regs_t m_rtc; + emu_timer *m_timer; }; diff --git a/src/devices/machine/v3021.cpp b/src/devices/machine/v3021.cpp index c405641b72f..3af94decb70 100644 --- a/src/devices/machine/v3021.cpp +++ b/src/devices/machine/v3021.cpp @@ -85,7 +85,8 @@ void v3021_device::device_validity_check(validity_checker &valid) const void v3021_device::device_start() { /* let's call the timer callback every second */ - machine().scheduler().timer_pulse(attotime::from_hz(clock() / XTAL_32_768kHz), timer_expired_delegate(FUNC(v3021_device::timer_callback),this)); + m_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(v3021_device::timer_callback), this)); + m_timer->adjust(attotime::from_hz(clock() / XTAL_32_768kHz), 0, attotime::from_hz(clock() / XTAL_32_768kHz)); system_time systime; machine().base_datetime(systime); diff --git a/src/devices/machine/v3021.h b/src/devices/machine/v3021.h index d7ac0eae603..45024917d89 100644 --- a/src/devices/machine/v3021.h +++ b/src/devices/machine/v3021.h @@ -55,6 +55,8 @@ protected: uint8_t m_cal_mask,m_cal_com,m_cal_cnt,m_cal_val; rtc_regs_t m_rtc; + + emu_timer *m_timer; }; diff --git a/src/devices/sound/sp0250.cpp b/src/devices/sound/sp0250.cpp index 21d7a4f2ec5..4b2ae39af27 100644 --- a/src/devices/sound/sp0250.cpp +++ b/src/devices/sound/sp0250.cpp @@ -76,7 +76,8 @@ void sp0250_device::device_start() if (!m_drq.isnull()) { m_drq( ASSERT_LINE); - machine().scheduler().timer_pulse(attotime::from_hz(clock()) * CLOCK_DIVIDER, timer_expired_delegate(FUNC(sp0250_device::timer_tick), this)); + m_tick_timer= machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(sp0250_device::timer_tick), this)); + m_tick_timer->adjust(attotime::from_hz(clock()) * CLOCK_DIVIDER, 0, attotime::from_hz(clock()) * CLOCK_DIVIDER); } m_stream = machine().sound().stream_alloc(*this, 0, 1, clock() / CLOCK_DIVIDER); diff --git a/src/devices/sound/sp0250.h b/src/devices/sound/sp0250.h index 11c063ecf8d..13fc7973f0f 100644 --- a/src/devices/sound/sp0250.h +++ b/src/devices/sound/sp0250.h @@ -44,6 +44,7 @@ private: void load_values(); TIMER_CALLBACK_MEMBER( timer_tick ); + emu_timer * m_tick_timer; }; DECLARE_DEVICE_TYPE(SP0250, sp0250_device)