From a2c95f2dc33a5bca3ba6deeb079fe3b312004d52 Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Tue, 24 Apr 2018 22:31:52 +0200 Subject: [PATCH] Add 32bit IPCSYNC reads and writes. --- src/NDS.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/NDS.cpp b/src/NDS.cpp index 34eccf75..dfd7d809 100644 --- a/src/NDS.cpp +++ b/src/NDS.cpp @@ -1616,6 +1616,8 @@ u32 ARM9IORead32(u32 addr) case 0x04000130: return (KeyInput & 0xFFFF) | (KeyCnt << 16); + case 0x04000180: return IPCSync9; + case 0x040001A0: return NDSCart::SPICnt | (NDSCart::ReadSPIData() << 16); case 0x040001A4: return NDSCart::ROMCnt; @@ -1983,6 +1985,9 @@ void ARM9IOWrite32(u32 addr, u32 val) case 0x04000130: KeyCnt = val >> 16; return; + case 0x04000180: + ARM9IOWrite16(addr, val); + return; case 0x04000188: if (IPCFIFOCnt9 & 0x8000) @@ -2235,6 +2240,8 @@ u32 ARM7IORead32(u32 addr) case 0x04000134: return RCnt | (KeyCnt & 0xFFFF0000); case 0x04000138: return RTC::Read(); + case 0x04000180: return IPCSync7; + case 0x040001A0: return NDSCart::SPICnt | (NDSCart::ReadSPIData() << 16); case 0x040001A4: return NDSCart::ROMCnt; @@ -2521,6 +2528,9 @@ void ARM7IOWrite32(u32 addr, u32 val) case 0x04000134: RCnt = val & 0xFFFF; return; case 0x04000138: RTC::Write(val & 0xFFFF, false); return; + case 0x04000180: + ARM7IOWrite16(addr, val); + return; case 0x04000188: if (IPCFIFOCnt7 & 0x8000) {