diff --git a/CHANGES b/CHANGES index 2f83f881e..b44292475 100644 --- a/CHANGES +++ b/CHANGES @@ -40,6 +40,7 @@ Misc: - GBA Video: Clean up unused timers - Qt: Manage window sizes slightly better - Qt: Remember scale option independent of core dimensions + - GB: Reset active region when reloading ROM 0.5.0: (2016-09-19) Features: diff --git a/src/gb/gb.c b/src/gb/gb.c index 68fc4bcbc..72cb775ac 100644 --- a/src/gb/gb.c +++ b/src/gb/gb.c @@ -102,6 +102,11 @@ bool GBLoadROM(struct GB* gb, struct VFile* vf) { gb->memory.romSize = gb->pristineRomSize; gb->romCrc32 = doCrc32(gb->memory.rom, gb->memory.romSize); + if (gb->cpu) { + struct LR35902Core* cpu = gb->cpu; + cpu->memory.setActiveRegion(cpu, cpu->pc); + } + // TODO: error check return true; }