fix bugs in arm7's VRAMSTAT register
This commit is contained in:
parent
711f5ef88c
commit
d583566a3e
|
@ -503,8 +503,9 @@ static inline void MMU_VRAMmapRefreshBank(const int bank)
|
||||||
break;
|
break;
|
||||||
case 2: //arm7
|
case 2: //arm7
|
||||||
vramConfiguration.banks[bank].purpose = VramConfiguration::ARM7;
|
vramConfiguration.banks[bank].purpose = VramConfiguration::ARM7;
|
||||||
if(bank == 2) T1WriteByte(MMU.MMU_MEM[ARMCPU_ARM7][0x40], 0x240, T1ReadByte(MMU.MMU_MEM[ARMCPU_ARM7][0x40], 0x240) | 2);
|
if(bank == 2) T1WriteByte(MMU.MMU_MEM[ARMCPU_ARM7][0x40], 0x240, T1ReadByte(MMU.MMU_MEM[ARMCPU_ARM7][0x40], 0x240) | 1);
|
||||||
if(bank == 3) T1WriteByte(MMU.MMU_MEM[ARMCPU_ARM7][0x40], 0x240, T1ReadByte(MMU.MMU_MEM[ARMCPU_ARM7][0x40], 0x240) | 1);
|
if(bank == 3) T1WriteByte(MMU.MMU_MEM[ARMCPU_ARM7][0x40], 0x240, T1ReadByte(MMU.MMU_MEM[ARMCPU_ARM7][0x40], 0x240) | 2);
|
||||||
|
printf("DING!\n");
|
||||||
switch(ofs) {
|
switch(ofs) {
|
||||||
case 0:
|
case 0:
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -729,8 +730,7 @@ static inline void MMU_VRAMmapControl(u8 block, u8 VRAMBankCnt)
|
||||||
MMU_VRAM_unmap_all();
|
MMU_VRAM_unmap_all();
|
||||||
|
|
||||||
//unmap VRAM_BANK_C and VRAM_BANK_D from arm7. theyll get mapped again in a moment if necessary
|
//unmap VRAM_BANK_C and VRAM_BANK_D from arm7. theyll get mapped again in a moment if necessary
|
||||||
T1WriteByte(MMU.MMU_MEM[ARMCPU_ARM7][0x40], 0x240, T1ReadByte(MMU.MMU_MEM[ARMCPU_ARM7][0x40], 0x240) & 2);
|
T1WriteByte(MMU.MMU_MEM[ARMCPU_ARM7][0x40], 0x240, 0);
|
||||||
T1WriteByte(MMU.MMU_MEM[ARMCPU_ARM7][0x40], 0x240, T1ReadByte(MMU.MMU_MEM[ARMCPU_ARM7][0x40], 0x240) & 1);
|
|
||||||
|
|
||||||
//write the new value to the reg
|
//write the new value to the reg
|
||||||
T1WriteByte(MMU.MMU_MEM[ARMCPU_ARM9][0x40], 0x240 + block, VRAMBankCnt);
|
T1WriteByte(MMU.MMU_MEM[ARMCPU_ARM9][0x40], 0x240 + block, VRAMBankCnt);
|
||||||
|
|
Loading…
Reference in New Issue