From be36db02dde589e8f72a6f29e5974aefd3413285 Mon Sep 17 00:00:00 2001 From: Patrick Mackinlay Date: Thu, 23 Jan 2020 12:35:09 +0700 Subject: r4000: identify soft reset (nw) --- src/devices/cpu/mips/r4000.cpp | 7 ++++++- src/devices/cpu/mips/r4000.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/devices/cpu/mips/r4000.cpp b/src/devices/cpu/mips/r4000.cpp index f490d7465cc..13f75f47ed5 100644 --- a/src/devices/cpu/mips/r4000.cpp +++ b/src/devices/cpu/mips/r4000.cpp @@ -191,13 +191,18 @@ void r4000_base_device::device_reset() m_pc = s64(s32(0xbfc00000)); m_r[0] = 0; - m_cp0[CP0_Status] = SR_BEV | SR_ERL; + if (m_hard_reset) + m_cp0[CP0_Status] = SR_BEV | SR_ERL; + else + m_cp0[CP0_Status] = SR_BEV | SR_ERL | SR_SR; + m_cp0[CP0_Wired] = 0; m_cp0[CP0_Compare] = 0; m_cp0[CP0_Count] = 0; m_cp0_timer_zero = total_cycles(); + m_hard_reset = false; m_ll_active = false; m_bus_error = false; diff --git a/src/devices/cpu/mips/r4000.h b/src/devices/cpu/mips/r4000.h index 8c4906263ba..80b2bb1db4b 100644 --- a/src/devices/cpu/mips/r4000.h +++ b/src/devices/cpu/mips/r4000.h @@ -402,6 +402,7 @@ protected: u64 m_cp0[32]; u64 m_cp0_timer_zero; emu_timer *m_cp0_timer; + bool m_hard_reset = true; bool m_ll_active; bool m_bus_error; struct tlb_entry -- cgit v1.2.3