all repos — mgba @ cd4c7900500bb690de251e08b8e21c9ef5a3b984

mGBA Game Boy Advance Emulator

GBA Memory: Fix open bus 16-bit loads
Jeffrey Pfau jeffrey@endrift.com
Sat, 10 Jan 2015 04:43:58 -0800
commit

cd4c7900500bb690de251e08b8e21c9ef5a3b984

parent

6d18b9aea53e8d510d24fc8412ca8dc00b2e738c

1 files changed, 3 insertions(+), 3 deletions(-)

jump to
M src/gba/gba-memory.csrc/gba/gba-memory.c

@@ -292,14 +292,14 @@ if (memory->activeRegion == REGION_BIOS) {

LOAD_16(value, address, memory->bios); } else { GBALog(gba, GBA_LOG_GAME_ERROR, "Bad BIOS Load16: 0x%08X", address); - value = memory->biosPrefetch; + value = memory->biosPrefetch & 0xFFFF; } } else { GBALog(gba, GBA_LOG_GAME_ERROR, "Bad memory Load16: 0x%08X", address); if (cpu->cycles >= cpu->nextEvent) { - value = gba->bus; + value = gba->bus & 0xFFFF; } else { - value = cpu->prefetch[1]; + value = cpu->prefetch[1] & 0xFFFF; } } break;