make sure to axe the GBA slot in DSi mode. (EXMEMCNT bit7 still applies to it, tho)

This commit is contained in:
Arisotura 2021-04-25 13:13:16 +02:00
parent f8bb1aa98d
commit 55a129e1a2
1 changed files with 78 additions and 0 deletions

View File

@ -790,6 +790,11 @@ u8 ARM9Read8(u32 addr)
case 0x04000000:
return ARM9IORead8(addr);
case 0x08000000:
case 0x09000000:
case 0x0A000000:
return (NDS::ExMemCnt[0] & (1<<7)) ? 0 : 0xFF;
}
return NDS::ARM9Read8(addr);
@ -827,6 +832,11 @@ u16 ARM9Read16(u32 addr)
case 0x04000000:
return ARM9IORead16(addr);
case 0x08000000:
case 0x09000000:
case 0x0A000000:
return (NDS::ExMemCnt[0] & (1<<7)) ? 0 : 0xFFFF;
}
return NDS::ARM9Read16(addr);
@ -870,6 +880,11 @@ u32 ARM9Read32(u32 addr)
case 0x04000000:
return ARM9IORead32(addr);
case 0x08000000:
case 0x09000000:
case 0x0A000000:
return (NDS::ExMemCnt[0] & (1<<7)) ? 0 : 0xFFFFFFFF;
}
return NDS::ARM9Read32(addr);
@ -935,6 +950,11 @@ void ARM9Write8(u32 addr, u8 val)
case 0x00600000: GPU::WriteVRAM_BOBJ<u8>(addr, val); return;
default: GPU::WriteVRAM_LCDC<u8>(addr, val); return;
}
case 0x08000000:
case 0x09000000:
case 0x0A000000:
return;
}
return NDS::ARM9Write8(addr, val);
@ -986,6 +1006,11 @@ void ARM9Write16(u32 addr, u16 val)
case 0x04000000:
ARM9IOWrite16(addr, val);
return;
case 0x08000000:
case 0x09000000:
case 0x0A000000:
return;
}
return NDS::ARM9Write16(addr, val);
@ -1037,6 +1062,11 @@ void ARM9Write32(u32 addr, u32 val)
case 0x04000000:
ARM9IOWrite32(addr, val);
return;
case 0x08000000:
case 0x09000000:
case 0x0A000000:
return;
}
return NDS::ARM9Write32(addr, val);
@ -1115,6 +1145,14 @@ u8 ARM7Read8(u32 addr)
case 0x04000000:
return ARM7IORead8(addr);
case 0x08000000:
case 0x08800000:
case 0x09000000:
case 0x09800000:
case 0x0A000000:
case 0x0A800000:
return (NDS::ExMemCnt[0] & (1<<7)) ? 0xFF : 0;
}
return NDS::ARM7Read8(addr);
@ -1156,6 +1194,14 @@ u16 ARM7Read16(u32 addr)
case 0x04000000:
return ARM7IORead16(addr);
case 0x08000000:
case 0x08800000:
case 0x09000000:
case 0x09800000:
case 0x0A000000:
case 0x0A800000:
return (NDS::ExMemCnt[0] & (1<<7)) ? 0xFFFF : 0;
}
return NDS::ARM7Read16(addr);
@ -1197,6 +1243,14 @@ u32 ARM7Read32(u32 addr)
case 0x04000000:
return ARM7IORead32(addr);
case 0x08000000:
case 0x08800000:
case 0x09000000:
case 0x09800000:
case 0x0A000000:
case 0x0A800000:
return (NDS::ExMemCnt[0] & (1<<7)) ? 0xFFFFFFFF : 0;
}
return NDS::ARM7Read32(addr);
@ -1248,6 +1302,14 @@ void ARM7Write8(u32 addr, u8 val)
case 0x04000000:
ARM7IOWrite8(addr, val);
return;
case 0x08000000:
case 0x08800000:
case 0x09000000:
case 0x09800000:
case 0x0A000000:
case 0x0A800000:
return;
}
return NDS::ARM7Write8(addr, val);
@ -1299,6 +1361,14 @@ void ARM7Write16(u32 addr, u16 val)
case 0x04000000:
ARM7IOWrite16(addr, val);
return;
case 0x08000000:
case 0x08800000:
case 0x09000000:
case 0x09800000:
case 0x0A000000:
case 0x0A800000:
return;
}
return NDS::ARM7Write16(addr, val);
@ -1350,6 +1420,14 @@ void ARM7Write32(u32 addr, u32 val)
case 0x04000000:
ARM7IOWrite32(addr, val);
return;
case 0x08000000:
case 0x08800000:
case 0x09000000:
case 0x09800000:
case 0x0A000000:
case 0x0A800000:
return;
}
return NDS::ARM7Write32(addr, val);