GBA Memory: Return correct byte in out of bounds ROM read

This commit is contained in:
jsmolka 2020-11-21 16:47:37 +01:00 committed by Vicki Pfau
parent 11f0b9c08d
commit 65c988aaad
2 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@ Emulation fixes:
- ARM: Fix Addressing mode 1 shifter on rs == pc (fixes mgba.io/i/1926) - ARM: Fix Addressing mode 1 shifter on rs == pc (fixes mgba.io/i/1926)
- GBA I/O: Ignore high bits on IME - GBA I/O: Ignore high bits on IME
- GBA Memory: Mark Famicom Mini games 22 through 28 as non-mirroring - GBA Memory: Mark Famicom Mini games 22 through 28 as non-mirroring
- GBA Memory: Return correct byte for odd ROM open bus addresses
Other fixes: Other fixes:
- CMake: Fix build with downstream minizip that exports incompatible symbols - CMake: Fix build with downstream minizip that exports incompatible symbols
- Core: Fix threading improperly setting paused state while interrupted - Core: Fix threading improperly setting paused state while interrupted

View File

@ -670,7 +670,7 @@ uint32_t GBALoad8(struct ARMCore* cpu, uint32_t address, int* cycleCounter) {
value = GBAVFameGetPatternValue(address, 8); value = GBAVFameGetPatternValue(address, 8);
} else { } else {
mLOG(GBA_MEM, GAME_ERROR, "Out of bounds ROM Load8: 0x%08X", address); mLOG(GBA_MEM, GAME_ERROR, "Out of bounds ROM Load8: 0x%08X", address);
value = (address >> 1) & 0xFF; value = ((address >> 1) >> ((address & 1) * 8)) & 0xFF;
} }
break; break;
case REGION_CART_SRAM: case REGION_CART_SRAM: