aboutsummaryrefslogtreecommitdiff
path: root/src/ARM.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ARM.cpp')
-rw-r--r--src/ARM.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ARM.cpp b/src/ARM.cpp
index 43838ca..2faffcd 100644
--- a/src/ARM.cpp
+++ b/src/ARM.cpp
@@ -20,6 +20,7 @@
#include "NDS.h"
#include "ARM.h"
#include "ARMInterpreter.h"
+#include "AREngine.h"
// instruction timing notes
@@ -408,6 +409,14 @@ void ARM::TriggerIRQ()
R_IRQ[2] = oldcpsr;
R[14] = R[15] + (oldcpsr & 0x20 ? 2 : 0);
JumpTo(ExceptionBase + 0x18);
+
+ // ARDS cheat support
+ // normally, those work by hijacking the ARM7 VBlank handler
+ if (Num == 1)
+ {
+ if ((NDS::IF[1] & NDS::IE[1]) & (1<<NDS::IRQ_VBlank))
+ AREngine::RunCheats();
+ }
}
void ARMv5::PrefetchAbort()