mirror of https://github.com/mgba-emu/mgba.git
GBA Memory: Fix AGBPrint writing past 16MB ROMs
This commit is contained in:
parent
938f2a4924
commit
1e017ade23
|
@ -85,7 +85,7 @@ enum {
|
|||
AGB_PRINT_TOP = 0x00FE0000,
|
||||
AGB_PRINT_PROTECT = 0x00FE2FFE,
|
||||
AGB_PRINT_STRUCT = 0x00FE20F8,
|
||||
AGB_PRINT_FLUSH_ADDR = 0x01FE209C,
|
||||
AGB_PRINT_FLUSH_ADDR = 0x00FE209C,
|
||||
};
|
||||
|
||||
mLOG_DECLARE_CATEGORY(GBA_MEM);
|
||||
|
|
|
@ -313,7 +313,7 @@ static void GBASetActiveRegion(struct ARMCore* cpu, uint32_t address) {
|
|||
if ((address & (SIZE_CART0 - 1)) < memory->romSize) {
|
||||
break;
|
||||
}
|
||||
if ((address & (SIZE_CART0 - 1)) == AGB_PRINT_FLUSH_ADDR && memory->agbPrintProtect == 0x20) {
|
||||
if ((address & 0x00FFFFFE) == AGB_PRINT_FLUSH_ADDR && memory->agbPrintProtect == 0x20) {
|
||||
cpu->memory.activeRegion = &_agbPrintFunc;
|
||||
cpu->memory.activeMask = sizeof(_agbPrintFunc) - 1;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue