From 1fb288cbda50bf31b1bc1bd37f70860b2b625831 Mon Sep 17 00:00:00 2001 From: zeromus Date: Wed, 20 Jun 2012 21:08:24 +0000 Subject: [PATCH] change vram bank A-D conflict priorities, since we found a test case where they were wrong. --- desmume/src/MMU.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/desmume/src/MMU.cpp b/desmume/src/MMU.cpp index db3a131fb..37a72aada 100644 --- a/desmume/src/MMU.cpp +++ b/desmume/src/MMU.cpp @@ -737,6 +737,7 @@ static inline void MMU_VRAMmapControl(u8 block, u8 VRAMBankCnt) T1WriteByte(MMU.MMU_MEM[ARMCPU_ARM9][0x40], 0x240 + block, VRAMBankCnt); //refresh all bank settings + //zero XX-XX-200X (long before jun 2012) //these are enumerated so that we can tune the order they get applied //in order to emulate prioritization rules for memory regions //with multiple banks mapped. @@ -749,10 +750,14 @@ static inline void MMU_VRAMmapControl(u8 block, u8 VRAMBankCnt) MMU_VRAMmapRefreshBank(VRAM_BANK_G); MMU_VRAMmapRefreshBank(VRAM_BANK_F); MMU_VRAMmapRefreshBank(VRAM_BANK_E); - MMU_VRAMmapRefreshBank(VRAM_BANK_D); - MMU_VRAMmapRefreshBank(VRAM_BANK_C); - MMU_VRAMmapRefreshBank(VRAM_BANK_B); + //zero 21-jun-2012 + //tomwi's streaming music demo sets A and D to ABG (the A is an accident). + //in this case, D should get priority. + //this is somewhat risky. will it break other things? MMU_VRAMmapRefreshBank(VRAM_BANK_A); + MMU_VRAMmapRefreshBank(VRAM_BANK_B); + MMU_VRAMmapRefreshBank(VRAM_BANK_C); + MMU_VRAMmapRefreshBank(VRAM_BANK_D); //printf(vramConfiguration.describe().c_str()); //printf("vram remapped at vcount=%d\n",nds.VCount);