aboutsummaryrefslogtreecommitdiff
path: root/src/NDS.cpp
diff options
context:
space:
mode:
authorStapleButter <thetotalworm@gmail.com>2017-10-02 04:57:23 +0200
committerStapleButter <thetotalworm@gmail.com>2017-10-02 04:57:23 +0200
commit4781bd56719ded97759cce685a2ba40770905c12 (patch)
treec187fc6213f93bc7a1e11577ac2272b425f0d20c /src/NDS.cpp
parentdbb174c5314b56669d1445dac61b8973aaaf00eb (diff)
fix ARM7 BIOSPROT. not that it matters.
Diffstat (limited to 'src/NDS.cpp')
-rw-r--r--src/NDS.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/NDS.cpp b/src/NDS.cpp
index 03832d6..d25c1ff 100644
--- a/src/NDS.cpp
+++ b/src/NDS.cpp
@@ -2239,6 +2239,8 @@ u32 ARM7IORead32(u32 addr)
case 0x04000210: return IE[1];
case 0x04000214: return IF[1];
+ case 0x04000308: return ARM7BIOSProt;
+
case 0x04100000:
if (IPCFIFOCnt7 & 0x8000)
{
@@ -2453,7 +2455,7 @@ void ARM7IOWrite16(u32 addr, u16 val)
case 0x04000308:
if (ARM7BIOSProt == 0)
- ARM7BIOSProt = val;
+ ARM7BIOSProt = val & 0xFFFE;
return;
}
@@ -2549,6 +2551,11 @@ void ARM7IOWrite32(u32 addr, u32 val)
case 0x04000208: IME[1] = val & 0x1; return;
case 0x04000210: IE[1] = val; return;
case 0x04000214: IF[1] &= ~val; return;
+
+ case 0x04000308:
+ if (ARM7BIOSProt == 0)
+ ARM7BIOSProt = val & 0xFFFE;
+ return;
}
if (addr >= 0x04000400 && addr < 0x04000520)