diff options
author | RSDuck <RSDuck@users.noreply.github.com> | 2021-10-29 12:09:00 +0200 |
---|---|---|
committer | RSDuck <RSDuck@users.noreply.github.com> | 2021-10-29 12:09:00 +0200 |
commit | c233d992118088d2bd153ceae4c1ca1e30c7b3f5 (patch) | |
tree | d0c0a93b4ce5ab4cc7739b3939e88d7068268603 /src | |
parent | 6c2ea9317328632f3086f4b9957ae743d6c53ed7 (diff) |
dtcm not dtcb
Diffstat (limited to 'src')
-rw-r--r-- | src/ARMJIT_Memory.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ARMJIT_Memory.cpp b/src/ARMJIT_Memory.cpp index d72a63c..0f1dd25 100644 --- a/src/ARMJIT_Memory.cpp +++ b/src/ARMJIT_Memory.cpp @@ -481,11 +481,11 @@ void RemapDTCM(u32 newBase, u32 newSize) // by unmapping DTCM first and then map the holes u32 oldDTCMBase = NDS::ARM9->DTCMBase; u32 oldDTCMSize = ~NDS::ARM9->DTCMMask + 1; - u32 oldDTCBEnd = oldDTCMBase + NDS::ARM9->DTCMMask; + u32 oldDTCMEnd = oldDTCMBase + NDS::ARM9->DTCMMask; u32 newEnd = newBase + newSize; - printf("remapping DTCM %x %x %x %x\n", newBase, newEnd, oldDTCMBase, oldDTCBEnd); + printf("remapping DTCM %x %x %x %x\n", newBase, newEnd, oldDTCMBase, oldDTCMEnd); // unmap all regions containing the old or the current DTCM mapping for (int region = 0; region < memregions_Count; region++) { @@ -501,7 +501,7 @@ void RemapDTCM(u32 newBase, u32 newSize) printf("unmapping %d %x %x %x %x\n", region, mapping.Addr, mapping.Size, mapping.Num, mapping.LocalOffset); - bool overlap = (oldDTCMSize > 0 && oldDTCMBase < end && oldDTCBEnd > start) + bool overlap = (oldDTCMSize > 0 && oldDTCMBase < end && oldDTCMEnd > start) || (newSize > 0 && newBase < end && newEnd > start); if (mapping.Num == 0 && overlap) |