all repos — mgba @ 6bf0e704d2233518aaade380d86d3143530a75fc

mGBA Game Boy Advance Emulator

Allow for savestates to be loaded between BIOS versions so long as they aren't in BIOS code
Jeffrey Pfau jeffrey@endrift.com
Mon, 07 Jul 2014 22:59:24 -0700
commit

6bf0e704d2233518aaade380d86d3143530a75fc

parent

ea656f188e306f5ac475dad2fd12a0f29e404cf3

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

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

@@ -37,7 +37,9 @@ return;

} if (state->biosChecksum != gba->biosChecksum) { GBALog(gba, GBA_LOG_WARN, "Savestate created using a different version of the BIOS"); - return; + if (state->cpu.gprs[ARM_PC] < SIZE_BIOS && state->cpu.gprs[ARM_PC] >= 0x20) { + return; + } } if (state->id != ((struct GBACartridge*) gba->memory.rom)->id || memcmp(state->title, ((struct GBACartridge*) gba->memory.rom)->title, sizeof(state->title))) { GBALog(gba, GBA_LOG_WARN, "Savestate is for a different game");