From 316a1dcf18257e2771b4709081b32761b8bb380c Mon Sep 17 00:00:00 2001 From: hap Date: Tue, 1 Nov 2022 18:15:24 +0100 Subject: Revert "emu_timer adjust(): set enable flag to false if timer isn't running" This reverts commit 220a2cc8f6d7095348e21af6d0a99f8ee74ce072. --- src/emu/schedule.cpp | 4 ++-- src/mame/entex/advision.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/emu/schedule.cpp b/src/emu/schedule.cpp index bdba5a71d3d..838e70c22b6 100644 --- a/src/emu/schedule.cpp +++ b/src/emu/schedule.cpp @@ -142,8 +142,9 @@ void emu_timer::adjust(attotime start_delay, s32 param, const attotime &period) if (m_scheduler->m_callback_timer == this) m_scheduler->m_callback_timer_modified = true; - // set callback parameter + // compute the time of the next firing and insert into the list m_param = param; + m_enabled = true; // clamp negative times to 0 if (start_delay.seconds() < 0) @@ -152,7 +153,6 @@ void emu_timer::adjust(attotime start_delay, s32 param, const attotime &period) // set the start and expire times m_start = m_scheduler->time(); m_expire = m_start + start_delay; - m_enabled = !m_expire.is_never(); m_period = period; // remove and re-insert the timer in its new order diff --git a/src/mame/entex/advision.cpp b/src/mame/entex/advision.cpp index f2b8149522c..0b94bc839f6 100644 --- a/src/mame/entex/advision.cpp +++ b/src/mame/entex/advision.cpp @@ -143,7 +143,7 @@ private: u32 advision_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { - const bool hint_enable = bool(m_conf->read() & 1); + bool hint_enable = bool(m_conf->read() & 1); for (int y = 0; y < 40; y++) { @@ -180,7 +180,7 @@ void advision_state::av_control_w(u8 data) // disable led outputs (there is some delay before it takes effect) // see for example codered twister and anime girl, gaps between the 'pixels' should be visible but minimal - if (m_video_bank == 0 && !m_led_off->enabled()) + if (m_video_bank == 0) m_led_off->adjust(attotime::from_usec(39)); // P24 rising edge: transfer led latches to outputs -- cgit v1.2.3