summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author yz70s <yz70s@users.noreply.github.com>2020-01-14 00:35:16 +0100
committer yz70s <yz70s@users.noreply.github.com>2020-01-14 00:40:41 +0100
commit1329d54013b1e8c67a2eaf858493d8ab1694faaa (patch)
tree02b8ff8da9edaed13c2846c2cd1ce882a28f102d
parent93dd4bb85bd16f6b8bf630683e80624cffed926b (diff)
sh4.cpp: disable timers at reset (nw)
-rw-r--r--src/devices/cpu/sh/sh4.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/devices/cpu/sh/sh4.cpp b/src/devices/cpu/sh/sh4.cpp
index 636bcd05ddb..b646882e0dc 100644
--- a/src/devices/cpu/sh/sh4.cpp
+++ b/src/devices/cpu/sh/sh4.cpp
@@ -1569,7 +1569,21 @@ void sh34_base_device::device_reset()
m_nmi_line_state = 0;
m_sh2_state->m_frt_input = 0;
m_internal_irq_vector = 0;
+ for (int i = 0; i < 3; i++)
+ {
+ if (m_timer[i])
+ m_timer[i]->adjust(attotime::never, i);
+ }
+ for (int i = 0; i < 4; i++)
+ {
+ if (m_dma_timer[i])
+ m_dma_timer[i]->adjust(attotime::never, i);
+ }
+ if (m_refresh_timer)
+ m_refresh_timer->adjust(attotime::never);
m_refresh_timer_base = 0;
+ if (m_rtc_timer)
+ m_rtc_timer->adjust(attotime::never);
memset(m_dma_timer_active, 0, sizeof(m_dma_timer_active));
memset(m_dma_source, 0, sizeof(m_dma_source));
memset(m_dma_destination, 0, sizeof(m_dma_destination));