aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArisotura <thetotalworm@gmail.com>2020-09-03 11:52:41 +0200
committerArisotura <thetotalworm@gmail.com>2020-09-03 11:52:41 +0200
commit1f634ed1579844e5b829bc890f2040343c505360 (patch)
treeb8c6195d0f8977fbf271ea39abbaa54ef2c8abd3 /src
parentaa94cbaeb0cca8c3f05639fd93a979b38757f899 (diff)
parent910050a89887d29d20d3e24a1057f654f4d66365 (diff)
Merge branch 'master' of https://github.com/Arisotura/melonDS
Diffstat (limited to 'src')
-rw-r--r--src/ARMJIT_Memory.cpp4
-rw-r--r--src/NDS.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/ARMJIT_Memory.cpp b/src/ARMJIT_Memory.cpp
index 7885fb7..c5c8f04 100644
--- a/src/ARMJIT_Memory.cpp
+++ b/src/ARMJIT_Memory.cpp
@@ -524,8 +524,8 @@ bool MapAtAddress(u32 addr)
{
u32 sectionOffset = offset;
bool hasCode = isExecutable && ARMJIT::PageContainsCode(&range[offset / 512]);
- while ((!isExecutable || ARMJIT::PageContainsCode(&range[offset / 512]) == hasCode)
- && offset < mirrorSize
+ while (offset < mirrorSize
+ && (!isExecutable || ARMJIT::PageContainsCode(&range[offset / 512]) == hasCode)
&& (!skipDTCM || mirrorStart + offset != NDS::ARM9->DTCMBase))
{
assert(states[(mirrorStart + offset) >> 12] == memstate_Unmapped);
diff --git a/src/NDS.cpp b/src/NDS.cpp
index bb579f6..a23772c 100644
--- a/src/NDS.cpp
+++ b/src/NDS.cpp
@@ -3745,7 +3745,7 @@ void ARM7IOWrite8(u32 addr, u8 val)
return;
case 0x04000301:
- val & 0xC0;
+ val &= 0xC0;
if (val == 0x40) printf("!! GBA MODE NOT SUPPORTED\n");
else if (val == 0x80) ARM7->Halt(1);
else if (val == 0xC0) EnterSleepMode();