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 e050a2ae3d
commit 99944093f5
1 changed files with 1 additions and 1 deletions

View File

@ -679,7 +679,7 @@ uint32_t GBALoad8(struct ARMCore* cpu, uint32_t address, int* cycleCounter) {
value = GBAVFameGetPatternValue(address, 8);
} else {
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;
case REGION_CART_SRAM: