diff options
Diffstat (limited to 'src/DSi.cpp')
-rw-r--r-- | src/DSi.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/DSi.cpp b/src/DSi.cpp index e8b1231..aea9b5a 100644 --- a/src/DSi.cpp +++ b/src/DSi.cpp @@ -542,15 +542,15 @@ void MapNWRAM_A(u32 num, u8 val) return; } -#ifdef JIT_ENABLED - ARMJIT_Memory::RemapNWRAM(0); -#endif - int mbkn = 0, mbks = 8*num; u8 oldval = (MBK[0][mbkn] >> mbks) & 0xFF; if (oldval == val) return; +#ifdef JIT_ENABLED + ARMJIT_Memory::RemapNWRAM(0); +#endif + MBK[0][mbkn] &= ~(0xFF << mbks); MBK[0][mbkn] |= (val << mbks); MBK[1][mbkn] = MBK[0][mbkn]; @@ -577,15 +577,15 @@ void MapNWRAM_B(u32 num, u8 val) return; } -#ifdef JIT_ENABLED - ARMJIT_Memory::RemapNWRAM(1); -#endif - int mbkn = 1+(num>>2), mbks = 8*(num&3); u8 oldval = (MBK[0][mbkn] >> mbks) & 0xFF; if (oldval == val) return; +#ifdef JIT_ENABLED + ARMJIT_Memory::RemapNWRAM(1); +#endif + MBK[0][mbkn] &= ~(0xFF << mbks); MBK[0][mbkn] |= (val << mbks); MBK[1][mbkn] = MBK[0][mbkn]; @@ -616,15 +616,15 @@ void MapNWRAM_C(u32 num, u8 val) return; } -#ifdef JIT_ENABLED - ARMJIT_Memory::RemapNWRAM(2); -#endif - int mbkn = 3+(num>>2), mbks = 8*(num&3); u8 oldval = (MBK[0][mbkn] >> mbks) & 0xFF; if (oldval == val) return; +#ifdef JIT_ENABLED + ARMJIT_Memory::RemapNWRAM(2); +#endif + MBK[0][mbkn] &= ~(0xFF << mbks); MBK[0][mbkn] |= (val << mbks); MBK[1][mbkn] = MBK[0][mbkn]; |