From c3675af538b2e6f3e812e786e973029d613e8e9f Mon Sep 17 00:00:00 2001 From: StapleButter Date: Thu, 9 Nov 2017 16:02:37 +0100 Subject: [PATCH] properly reset IE/IF, fixes some reset issues. --- src/NDS.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/NDS.cpp b/src/NDS.cpp index d4f6594c..ab7b5a26 100644 --- a/src/NDS.cpp +++ b/src/NDS.cpp @@ -290,7 +290,11 @@ void Reset() memset(ROMSeed1, 0, 2*8); IME[0] = 0; + IE[0] = 0; + IF[0] = 0; IME[1] = 0; + IE[1] = 0; + IF[1] = 0; PostFlag9 = 0x00; PostFlag7 = 0x00; @@ -395,6 +399,7 @@ void RunSystem(s32 cycles) continue; SchedList[i].WaitCycles -= cycles; + if (SchedList[i].WaitCycles < 1) { SchedListMask &= ~(1<