aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStapleButter <thetotalworm@gmail.com>2017-04-13 04:16:57 +0200
committerStapleButter <thetotalworm@gmail.com>2017-04-13 04:16:57 +0200
commit2380c2f4ea07c190b5be625bed8b250870077219 (patch)
treea9dcd31210fc557848945602d40b845c28598318
parentc62e160b269b3faeec303de8d593929efd66d107 (diff)
hopefully fix the DMA bug without breaking everything this time.
-rw-r--r--src/ARM.cpp6
-rw-r--r--src/ARM.h1
-rw-r--r--src/NDS.cpp4
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)
diff --git a/src/ARM.h b/src/ARM.h
index 79c2bce..3631f86 100644
--- a/src/ARM.h
+++ b/src/ARM.h
@@ -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);
}
}