diff --git a/CHANGES b/CHANGES index 382ce85ad..3855918da 100644 --- a/CHANGES +++ b/CHANGES @@ -57,6 +57,7 @@ Other fixes: - FFmpeg: Fix crash when encoding audio with some containers - FFmpeg: Fix GIF recording (fixes mgba.io/i/2393) - GB: Fix temporary saves + - GB: Fix replacing the ROM crashing when accessing ROM base - GB, GBA: Save writeback-pending masked saves on unload (fixes mgba.io/i/2396) - mGUI: Fix FPS counter after closing menu - Qt: Fix some hangs when using the debugger console diff --git a/src/gb/gb.c b/src/gb/gb.c index edcd548d1..81d059b00 100644 --- a/src/gb/gb.c +++ b/src/gb/gb.c @@ -189,6 +189,9 @@ bool GBLoadROM(struct GB* gb, struct VFile* vf) { if (gb->cpu) { struct SM83Core* cpu = gb->cpu; + if (!gb->memory.romBase) { + GBMBCSwitchBank0(gb, 0); + } cpu->memory.setActiveRegion(cpu, cpu->pc); }