aboutsummaryrefslogtreecommitdiff
path: root/src/NDS.cpp
diff options
context:
space:
mode:
authorNadia Holmquist Pedersen <nadia@nhp.sh>2023-12-08 18:29:30 +0100
committerNadia Holmquist Pedersen <nadia@nhp.sh>2023-12-08 18:34:38 +0100
commit69491004460fd623b81cfa3ad4bcede3e8d6250c (patch)
tree339968b31931cffc30a1d781113d3040c4e52354 /src/NDS.cpp
parent5ef35a4ccfc2d39dd62ca5901b435f4bcf149e7b (diff)
Fix GBA<->DS comm not working when using FreeBIOS
Thanks CasualPokePlayer for pointing this out
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 54aa270..c00aa51 100644
--- a/src/NDS.cpp
+++ b/src/NDS.cpp
@@ -284,6 +284,13 @@ void NDS::SetupDirectBoot()
const u8* cartrom = NDSCartSlot.GetCart()->GetROM();
MapSharedWRAM(3);
+ // Copy the Nintendo logo from the NDS ROM header to the ARM9 BIOS if using FreeBIOS
+ // Games need this for DS<->GBA comm to work
+ if (IsLoadedARM9BIOSBuiltIn())
+ {
+ memcpy(ARM9BIOS.data() + 0x20, header.NintendoLogo, 0x9C);
+ }
+
// setup main RAM data
for (u32 i = 0; i < 0x170; i+=4)
@@ -4192,4 +4199,4 @@ void NDS::ARM7IOWrite32(u32 addr, u32 val)
Log(LogLevel::Debug, "unknown ARM7 IO write32 %08X %08X %08X\n", addr, val, ARM7.R[15]);
}
-} \ No newline at end of file
+}