From 42667020d83b9ae45c00f94fff919cc6663c7273 Mon Sep 17 00:00:00 2001 From: zeromus Date: Tue, 27 Aug 2024 04:15:00 -0400 Subject: [PATCH] fix ensata emulation? (re: #184) --- desmume/src/MMU.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/desmume/src/MMU.cpp b/desmume/src/MMU.cpp index bb0ba58d8..f8a7ed159 100644 --- a/desmume/src/MMU.cpp +++ b/desmume/src/MMU.cpp @@ -2468,7 +2468,16 @@ bool validateIORegsWrite(u32 addr, u8 size, u32 val) { if (PROCNUM == ARMCPU_ARM9) { - switch (addr & 0x0FFFFFFC) + u32 addrMasked = addr & 0x0FFFFFFC; + + if(nds.ensataEmulation) + { + if(addrMasked == eng_3D_CLIPMTX_RESULT) return true; + if(addrMasked == 0x04FFF000) return true; + if(addrMasked == 0x04FFF010) return true; + } + + switch (addrMasked) { // Display Engine A case REG_DISPA_DISPCNT: