aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArisotura <thetotalworm@gmail.com>2021-10-28 22:45:23 +0200
committerArisotura <thetotalworm@gmail.com>2021-10-28 22:45:23 +0200
commitc532059cd33eb594fb30302abf02822496d3389c (patch)
tree609dcff7ad3e583b1b18c447c518ff1ff81ba1e4
parent15a66b1be1552615ac3017a225009e0f12cad351 (diff)
oops!
-rw-r--r--src/CP15.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/CP15.cpp b/src/CP15.cpp
index 1d81931..c258478 100644
--- a/src/CP15.cpp
+++ b/src/CP15.cpp
@@ -109,6 +109,7 @@ void ARMv5::UpdateDTCMSetting()
if (CP15Control & (1<<16))
{
newDTCMSize = 0x200 << ((DTCMSetting >> 1) & 0x1F);
+ if (newDTCMSize < 0x1000) newDTCMSize = 0x1000;
newDTCMMask = 0xFFFFF000 & ~(newDTCMSize-1);
newDTCMBase = DTCMSetting & newDTCMMask;
}
@@ -122,7 +123,7 @@ void ARMv5::UpdateDTCMSetting()
if (newDTCMBase != DTCMBase || newDTCMMask != DTCMMask)
{
#ifdef JIT_ENABLED
- ARMJIT_Memory::RemapDTCM(newDTCMBase, newDTCMMask);
+ ARMJIT_Memory::RemapDTCM(newDTCMBase, newDTCMSize);
#endif
DTCMBase = newDTCMBase;
DTCMMask = newDTCMMask;