diff options
author | StapleButter <thetotalworm@gmail.com> | 2017-04-13 04:16:57 +0200 |
---|---|---|
committer | StapleButter <thetotalworm@gmail.com> | 2017-04-13 04:16:57 +0200 |
commit | 2380c2f4ea07c190b5be625bed8b250870077219 (patch) | |
tree | a9dcd31210fc557848945602d40b845c28598318 | |
parent | c62e160b269b3faeec303de8d593929efd66d107 (diff) |
hopefully fix the DMA bug without breaking everything this time.
-rw-r--r-- | src/ARM.cpp | 6 | ||||
-rw-r--r-- | src/ARM.h | 1 | ||||
-rw-r--r-- | src/NDS.cpp | 4 |
3 files changed, 8 insertions, 3 deletions
diff --git a/src/ARM.cpp b/src/ARM.cpp index 5cd5d85..6bed1b5 100644 --- a/src/ARM.cpp +++ b/src/ARM.cpp @@ -325,7 +325,11 @@ s32 ARM::Execute() { if (Halted) { - if (NDS::HaltInterrupted(Num)) + if (Halted == 2) + { + Halted = 0; + } + else if (NDS::HaltInterrupted(Num)) { Halted = 0; if (NDS::IME[Num]&1) @@ -43,6 +43,7 @@ public: void Halt(u32 halt) { + if (halt==2 && Halted==1) return; Halted = halt; } diff --git a/src/NDS.cpp b/src/NDS.cpp index ac28f74..98eda41 100644 --- a/src/NDS.cpp +++ b/src/NDS.cpp @@ -561,12 +561,12 @@ void StopCPU(u32 cpu, u32 mask) if (cpu) { CPUStop |= (mask << 16); - //ARM7->Halt(2); + ARM7->Halt(2); } else { CPUStop |= mask; - //ARM9->Halt(2); + ARM9->Halt(2); } } |