diff options
author | Aaron Giles <aaron@aarongiles.com> | 2021-03-25 08:22:16 -0700 |
---|---|---|
committer | Aaron Giles <aaron@aarongiles.com> | 2021-03-25 08:22:16 -0700 |
commit | 7473bee00b4a1ffbc63553ce1f57818841ab6127 (patch) | |
tree | 684fbe231dac1acfb2e365d3d2730a9b1f68f7d6 | |
parent | d198928598090840ecf2a315980f5c3296d90814 (diff) |
Require a timer ID for device's synchronize. Several people were calling synchronize() with no parameters and it's clear they had no idea that it would call the device's device_timer() callback with ID 0. Fix those cases.
-rw-r--r-- | src/devices/cpu/h8/h8_sci.cpp | 10 | ||||
-rw-r--r-- | src/emu/device.h | 2 | ||||
-rw-r--r-- | src/mame/drivers/hazeltin.cpp | 8 | ||||
-rw-r--r-- | src/mame/drivers/starfire.cpp | 2 |
4 files changed, 11 insertions, 11 deletions
diff --git a/src/devices/cpu/h8/h8_sci.cpp b/src/devices/cpu/h8/h8_sci.cpp index 2393703c473..d2e3d22036d 100644 --- a/src/devices/cpu/h8/h8_sci.cpp +++ b/src/devices/cpu/h8/h8_sci.cpp @@ -368,7 +368,7 @@ uint64_t h8_sci_device::internal_update(uint64_t current_time) bool new_clock = delta >= divider; if(new_clock != clock_value) { - cpu->synchronize(); + scheduler().synchronize(); if((!new_clock) && (clock_state & CLK_TX)) tx_dropped_edge(); @@ -397,7 +397,7 @@ uint64_t h8_sci_device::internal_update(uint64_t current_time) assert(delta < fp); bool new_clock = delta >= divider*8; if(new_clock != clock_value) { - cpu->synchronize(); + scheduler().synchronize(); if((!new_clock) && (clock_state & CLK_TX)) tx_dropped_edge(); @@ -423,7 +423,7 @@ uint64_t h8_sci_device::internal_update(uint64_t current_time) delta &= 1; bool new_clock = delta >= 1; if(new_clock != clock_value) { - cpu->synchronize(); + scheduler().synchronize(); if((!new_clock) && (clock_state & CLK_TX)) tx_dropped_edge(); @@ -447,7 +447,7 @@ uint64_t h8_sci_device::internal_update(uint64_t current_time) delta &= 15; bool new_clock = delta >= 8; if(new_clock != clock_value) { - cpu->synchronize(); + scheduler().synchronize(); if((!new_clock) && (clock_state & CLK_TX)) tx_dropped_edge(); @@ -485,7 +485,7 @@ void h8_sci_device::clock_start(int mode) return; if(!clock_state) { - cpu->synchronize(); + scheduler().synchronize(); clock_state = mode; switch(clock_mode) { case CLKM_INTERNAL_ASYNC: diff --git a/src/emu/device.h b/src/emu/device.h index 46fd496968f..c1e8badbdf5 100644 --- a/src/emu/device.h +++ b/src/emu/device.h @@ -612,7 +612,7 @@ public: return m_scheduler->timer_alloc(timer_expired_delegate(callback, name, &device), ptr); } void timer_set(const attotime &duration, device_timer_id id = 0, int param = 0); - void synchronize(device_timer_id id = 0, int param = 0) { timer_set(attotime::zero, id, param); } + void synchronize(device_timer_id id, int param = 0) { timer_set(attotime::zero, id, param); } emu_timer_cb const &device_timer_cb() const { return m_device_timer_cb; } // state saving interfaces diff --git a/src/mame/drivers/hazeltin.cpp b/src/mame/drivers/hazeltin.cpp index 71f5c6c0ce2..15b3fc197c9 100644 --- a/src/mame/drivers/hazeltin.cpp +++ b/src/mame/drivers/hazeltin.cpp @@ -394,7 +394,7 @@ WRITE_LINE_MEMBER(hazl1500_state::ay3600_data_ready_w) NETDEV_ANALOG_CALLBACK_MEMBER(hazl1500_state::vblank_cb) { - synchronize(); + scheduler().synchronize(); if (int(data) > 1) { m_kbd_status_latch &= ~KBD_STATUS_TV_UB; @@ -407,7 +407,7 @@ NETDEV_ANALOG_CALLBACK_MEMBER(hazl1500_state::vblank_cb) NETDEV_ANALOG_CALLBACK_MEMBER(hazl1500_state::tvinterq_cb) { - synchronize(); + scheduler().synchronize(); if (int(data) > 1) { m_kbd_status_latch &= ~KBD_STATUS_TV_INT; @@ -422,7 +422,7 @@ NETDEV_ANALOG_CALLBACK_MEMBER(hazl1500_state::tvinterq_cb) NETDEV_ANALOG_CALLBACK_MEMBER(hazl1500_state::video_out_cb) { - synchronize(); + scheduler().synchronize(); attotime second_fraction(0, time.attoseconds()); attotime frame_fraction(0, (second_fraction * 60).attoseconds()); attotime pixel_time = frame_fraction * (SCREEN_HTOTAL * SCREEN_VTOTAL); @@ -461,7 +461,7 @@ NETDEV_ANALOG_CALLBACK_MEMBER(hazl1500_state::video_out_cb) void hazl1500_state::refresh_address_w(uint8_t data) { - synchronize(); + scheduler().synchronize(); //printf("refresh: %02x, %d, %d\n", data, m_screen->hpos(), m_screen->vpos()); m_iowq_timer->adjust(attotime::from_hz(XTAL(18'000'000)/9)); m_cpu_iowq->write(0); diff --git a/src/mame/drivers/starfire.cpp b/src/mame/drivers/starfire.cpp index 7b03b2d79c6..95547653ba7 100644 --- a/src/mame/drivers/starfire.cpp +++ b/src/mame/drivers/starfire.cpp @@ -111,7 +111,7 @@ void starfire_state::sound_w(offs_t offset, uint8_t data) m_sound_lock->write(BIT(data, 5)); m_sound_scanner->write(BIT(data, 6)); m_sound_overheat->write(BIT(data, 7)); - synchronize(); + scheduler().synchronize(); } void fireone_state::sound_w(offs_t offset, uint8_t data) |