From 243a02767ac73787c14c6d2962d633832f504dd5 Mon Sep 17 00:00:00 2001 From: Arisotura Date: Fri, 14 Oct 2022 00:22:39 +0200 Subject: [PATCH] I don't think NWRAMMask is relevant here --- src/DSi_DSP.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/DSi_DSP.cpp b/src/DSi_DSP.cpp index 333418cd1d..b89fca3ccd 100644 --- a/src/DSi_DSP.cpp +++ b/src/DSi_DSP.cpp @@ -93,12 +93,12 @@ u16 DSPRead16(u32 addr) { if (!(addr & 0x40000)) { - u8* ptr = DSi::NWRAMMap_B[2][(addr >> 15) & DSi::NWRAMMask[0][1]]; + u8* ptr = DSi::NWRAMMap_B[2][(addr >> 15) & 0x7]; return ptr ? *(u16*)&ptr[addr & 0x7FFF] : 0; } else { - u8* ptr = DSi::NWRAMMap_C[2][(addr >> 15) & DSi::NWRAMMask[0][2]]; + u8* ptr = DSi::NWRAMMap_C[2][(addr >> 15) & 0x7]; return ptr ? *(u16*)&ptr[addr & 0x7FFF] : 0; } } @@ -109,12 +109,12 @@ void DSPWrite16(u32 addr, u16 val) if (!(addr & 0x40000)) { - u8* ptr = DSi::NWRAMMap_B[2][(addr >> 15) & DSi::NWRAMMask[0][1]]; + u8* ptr = DSi::NWRAMMap_B[2][(addr >> 15) & 0x7]; if (ptr) *(u16*)&ptr[addr & 0x7FFF] = val; } else { - u8* ptr = DSi::NWRAMMap_C[2][(addr >> 15) & DSi::NWRAMMask[0][2]]; + u8* ptr = DSi::NWRAMMap_C[2][(addr >> 15) & 0x7]; if (ptr) *(u16*)&ptr[addr & 0x7FFF] = val; } }