aboutsummaryrefslogtreecommitdiff
path: root/src/NDS.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/NDS.cpp')
-rw-r--r--src/NDS.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/NDS.cpp b/src/NDS.cpp
index 4b50d9c..62a52aa 100644
--- a/src/NDS.cpp
+++ b/src/NDS.cpp
@@ -162,7 +162,9 @@ bool Init()
ARM9 = new ARMv5();
ARM7 = new ARMv4();
+#ifdef JIT_ENABLED
ARMJIT::Init();
+#endif
DMAs[0] = new DMA(0, 0);
DMAs[1] = new DMA(0, 1);
@@ -194,7 +196,9 @@ void DeInit()
delete ARM9;
delete ARM7;
+#ifdef JIT_ENABLED
ARMJIT::DeInit();
+#endif
for (int i = 0; i < 8; i++)
delete DMAs[i];
@@ -524,7 +528,9 @@ void Reset()
KeyCnt = 0;
RCnt = 0;
+#ifdef JIT_ENABLED
ARMJIT::InvalidateBlockCache();
+#endif
NDSCart::Reset();
GBACart::Reset();
@@ -741,10 +747,12 @@ bool DoSavestate(Savestate* file)
GPU::SetPowerCnt(PowerControl9);
}
+#ifdef JIT_ENABLED
if (!file->Saving)
{
ARMJIT::InvalidateBlockCache();
}
+#endif
return true;
}
@@ -864,9 +872,11 @@ u32 RunFrame()
}
else
{
+#ifdef JIT_ENABLED
if (EnableJIT)
ARM9->ExecuteJIT();
else
+#endif
ARM9->Execute();
}
@@ -889,9 +899,11 @@ u32 RunFrame()
}
else
{
+#ifdef JIT_ENABLED
if (EnableJIT)
ARM7->ExecuteJIT();
else
+#endif
ARM7->Execute();
}
@@ -924,9 +936,11 @@ u32 RunFrame()
u32 RunFrame()
{
+#ifdef JIT_ENABLED
if (Config::JIT_Enable)
return RunFrame<true>();
else
+#endif
return RunFrame<false>();
}
@@ -1849,7 +1863,9 @@ u32 ARM9Read32(u32 addr)
void ARM9Write8(u32 addr, u8 val)
{
+#ifdef JIT_ENABLED
ARMJIT::Invalidate16(0, addr);
+#endif
switch (addr & 0xFF000000)
{
@@ -1901,7 +1917,9 @@ void ARM9Write8(u32 addr, u8 val)
void ARM9Write16(u32 addr, u16 val)
{
+#ifdef JIT_ENABLED
ARMJIT::Invalidate16(0, addr);
+#endif
switch (addr & 0xFF000000)
{
@@ -1969,7 +1987,9 @@ void ARM9Write16(u32 addr, u16 val)
void ARM9Write32(u32 addr, u32 val)
{
+#ifdef JIT_ENABLED
ARMJIT::Invalidate32(0, addr);
+#endif
switch (addr & 0xFF000000)
{
@@ -2264,7 +2284,9 @@ u32 ARM7Read32(u32 addr)
void ARM7Write8(u32 addr, u8 val)
{
+#ifdef JIT_ENABLED
ARMJIT::Invalidate16(1, addr);
+#endif
switch (addr & 0xFF800000)
{
@@ -2325,7 +2347,9 @@ void ARM7Write8(u32 addr, u8 val)
void ARM7Write16(u32 addr, u16 val)
{
+#ifdef JIT_ENABLED
ARMJIT::Invalidate16(1, addr);
+#endif
switch (addr & 0xFF800000)
{
@@ -2396,7 +2420,9 @@ void ARM7Write16(u32 addr, u16 val)
void ARM7Write32(u32 addr, u32 val)
{
+#ifdef JIT_ENABLED
ARMJIT::Invalidate32(1, addr);
+#endif
switch (addr & 0xFF800000)
{