aboutsummaryrefslogtreecommitdiff
path: root/src/ARM.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ARM.cpp')
-rw-r--r--src/ARM.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/ARM.cpp b/src/ARM.cpp
index a2e0066..bbfb7f7 100644
--- a/src/ARM.cpp
+++ b/src/ARM.cpp
@@ -322,10 +322,14 @@ s32 ARM::Execute()
{
if (Halted)
{
- if (NDS::HaltInterrupted(Num))
+ if (Halted == 2)
{
Halted = 0;
- if (NDS::IME[Num]&1)
+ }
+ else if (NDS::HaltInterrupted(Num))
+ {
+ Halted = 0;
+ if (NDS::IME[Num] & 0x1)
TriggerIRQ();
}
else
@@ -376,8 +380,6 @@ s32 ARM::Execute()
}
}
- //if (R[15]==0x037F9364) printf("R8=%08X R9=%08X\n", R[8], R[9]);
-
if (Num==0)
{
s32 diff = Cycles - lastcycles;
@@ -398,9 +400,9 @@ s32 ARM::Execute()
Cycles = CyclesToRun;
break;
}
- if (NDS::HaltInterrupted(Num))
+ if (NDS::IF[Num] & NDS::IE[Num])
{
- if (NDS::IME[Num]&1)
+ if (NDS::IME[Num] & 0x1)
TriggerIRQ();
}
}