mirror of https://github.com/mgba-emu/mgba.git
GBA Memory: Fix open bus 16-bit loads
This commit is contained in:
parent
6d18b9aea5
commit
cd4c790050
|
@ -292,14 +292,14 @@ uint32_t GBALoad16(struct ARMCore* cpu, uint32_t address, int* cycleCounter) {
|
||||||
LOAD_16(value, address, memory->bios);
|
LOAD_16(value, address, memory->bios);
|
||||||
} else {
|
} else {
|
||||||
GBALog(gba, GBA_LOG_GAME_ERROR, "Bad BIOS Load16: 0x%08X", address);
|
GBALog(gba, GBA_LOG_GAME_ERROR, "Bad BIOS Load16: 0x%08X", address);
|
||||||
value = memory->biosPrefetch;
|
value = memory->biosPrefetch & 0xFFFF;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
GBALog(gba, GBA_LOG_GAME_ERROR, "Bad memory Load16: 0x%08X", address);
|
GBALog(gba, GBA_LOG_GAME_ERROR, "Bad memory Load16: 0x%08X", address);
|
||||||
if (cpu->cycles >= cpu->nextEvent) {
|
if (cpu->cycles >= cpu->nextEvent) {
|
||||||
value = gba->bus;
|
value = gba->bus & 0xFFFF;
|
||||||
} else {
|
} else {
|
||||||
value = cpu->prefetch[1];
|
value = cpu->prefetch[1] & 0xFFFF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue