aboutsummaryrefslogtreecommitdiff
path: root/src/ARM.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ARM.cpp')
-rw-r--r--src/ARM.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/ARM.cpp b/src/ARM.cpp
index b7fe3c7..2d8c807 100644
--- a/src/ARM.cpp
+++ b/src/ARM.cpp
@@ -1,5 +1,5 @@
/*
- Copyright 2016-2019 Arisotura
+ Copyright 2016-2020 Arisotura
This file is part of melonDS.
@@ -20,6 +20,7 @@
#include "NDS.h"
#include "ARM.h"
#include "ARMInterpreter.h"
+#include "AREngine.h"
// instruction timing notes
@@ -227,6 +228,8 @@ void ARMv5::JumpTo(u32 addr, bool restorecpsr)
PrefetchAbort();
return;
}*/
+
+ NDS::MonitorARM9Jump(addr);
}
void ARMv4::JumpTo(u32 addr, bool restorecpsr)
@@ -405,6 +408,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()