aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRSDuck <rsduck@users.noreply.github.com>2020-07-31 22:39:27 +0200
committerRSDuck <rsduck@users.noreply.github.com>2020-07-31 22:39:27 +0200
commit2a3147db461d8538334245cb1073e8b46ad2a99d (patch)
treebff1e86572c990c38889ef8cc93154b8685d4e29 /src
parentc5ecef7410c1fefb7d62af898221228128233f8d (diff)
reset fastmem on DSi soft reset
Diffstat (limited to 'src')
-rw-r--r--src/ARMJIT_Internal.h1
-rw-r--r--src/ARMJIT_Memory.cpp2
-rw-r--r--src/DSi.cpp8
3 files changed, 7 insertions, 4 deletions
diff --git a/src/ARMJIT_Internal.h b/src/ARMJIT_Internal.h
index bb6621f..4244470 100644
--- a/src/ARMJIT_Internal.h
+++ b/src/ARMJIT_Internal.h
@@ -114,6 +114,7 @@ struct __attribute__((packed)) TinyVector
void Remove(int index)
{
+ assert(Length > 0);
assert(index >= 0 && index < Length);
Length--;
diff --git a/src/ARMJIT_Memory.cpp b/src/ARMJIT_Memory.cpp
index cc8ad67..35cfdf0 100644
--- a/src/ARMJIT_Memory.cpp
+++ b/src/ARMJIT_Memory.cpp
@@ -414,7 +414,7 @@ void RemapDTCM(u32 newBase, u32 newSize)
u32 start = mapping.Addr;
u32 end = mapping.Addr + mapping.Size;
- printf("mapping %d %x %x %x %x\n", region, mapping.Addr, mapping.Size, mapping.Num, mapping.LocalOffset);
+ printf("unmapping %d %x %x %x %x\n", region, mapping.Addr, mapping.Size, mapping.Num, mapping.LocalOffset);
bool oldOverlap = NDS::ARM9->DTCMSize > 0 && !(oldDTCMBase >= end || oldDTCBEnd <= start);
bool newOverlap = newSize > 0 && !(newBase >= end || newEnd <= start);
diff --git a/src/DSi.cpp b/src/DSi.cpp
index 56f5356..42541fe 100644
--- a/src/DSi.cpp
+++ b/src/DSi.cpp
@@ -181,15 +181,17 @@ void SoftReset()
// also, BPTWL[0x70] could be abused to quickly boot specific titles
+#ifdef JIT_ENABLED
+ ARMJIT_Memory::Reset();
+ ARMJIT::CheckAndInvalidateITCM();
+#endif
+
NDS::ARM9->Reset();
NDS::ARM7->Reset();
NDS::ARM9->CP15Reset();
memcpy(NDS::ARM9->ITCM, ITCMInit, 0x8000);
-#ifdef JIT_ENABLED
- ARMJIT::CheckAndInvalidateITCM();
-#endif
DSi_AES::Reset();