Allow for savestates to be loaded between BIOS versions so long as they aren't in BIOS code

This commit is contained in:
Jeffrey Pfau 2014-07-07 22:59:24 -07:00
parent ea656f188e
commit 6bf0e704d2
1 changed files with 3 additions and 1 deletions

View File

@ -37,7 +37,9 @@ void GBADeserialize(struct GBA* gba, struct GBASerializedState* state) {
}
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");