diff options
author | 2022-06-15 15:02:55 +0200 | |
---|---|---|
committer | 2022-06-15 15:03:03 +0200 | |
commit | 1ded6ae6d6ad0b0fbbaeea81fa2b480852c13206 (patch) | |
tree | 1540e3505dce056f783c85aee2923a19f1099763 | |
parent | 5982daf1022333bb0b15b5e64b1cefc6d5b69ecf (diff) |
ics2115: make fast timers less expensive
-rw-r--r-- | src/devices/sound/ics2115.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/devices/sound/ics2115.cpp b/src/devices/sound/ics2115.cpp index 4b9f1ef152b..a84a5c1208e 100644 --- a/src/devices/sound/ics2115.cpp +++ b/src/devices/sound/ics2115.cpp @@ -1087,14 +1087,20 @@ void ics2115_device::recalc_irq() TIMER_CALLBACK_MEMBER( ics2115_device::timer_cb_0 ) { - m_irq_pending |= 1 << 0; - recalc_irq(); + if (!(m_irq_pending & (1 << 0))) + { + m_irq_pending |= 1 << 0; + recalc_irq(); + } } TIMER_CALLBACK_MEMBER( ics2115_device::timer_cb_1 ) { - m_irq_pending |= 1 << 1; - recalc_irq(); + if (!(m_irq_pending & (1 << 1))) + { + m_irq_pending |= 1 << 1; + recalc_irq(); + } } void ics2115_device::recalc_timer(int timer) @@ -1109,6 +1115,7 @@ void ics2115_device::recalc_timer(int timer) if (m_timer[timer].period != period) { + logerror("Timer %d period %dns (%dHz)\n", timer, period, 1e9/period); m_timer[timer].period = period; // Adjust the timer lengths if (period) // Reset the length |