Skip to content

Commit

Permalink
GBA Serialize: Only flunk BIOS check if official BIOS was expected
Browse files Browse the repository at this point in the history
  • Loading branch information
endrift committed May 31, 2020
1 parent 7f64f8c commit 42fdc75
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES
Expand Up @@ -42,6 +42,7 @@ Other fixes:
Misc:
- Debugger: Keep track of global cycle count
- FFmpeg: Add looping option for GIF/APNG
- GBA Serialize: Only flunk BIOS check if official BIOS was expected
- Qt: Renderer can be changed while a game is running
- Qt: Add hex index to palette view
- Qt: Add transformation matrix info to sprite view
Expand Down
3 changes: 2 additions & 1 deletion src/gba/serialize.c
Expand Up @@ -6,6 +6,7 @@
#include <mgba/internal/gba/serialize.h>

#include <mgba/internal/arm/macros.h>
#include <mgba/internal/gba/bios.h>
#include <mgba/internal/gba/io.h>

#include <mgba-util/memory.h>
Expand Down Expand Up @@ -94,7 +95,7 @@ bool GBADeserialize(struct GBA* gba, const struct GBASerializedState* state) {
mLOG(GBA_STATE, WARN, "Savestate created using a different version of the BIOS: expected %08X, got %08X", gba->biosChecksum, ucheck);
uint32_t pc;
LOAD_32(pc, ARM_PC * sizeof(state->cpu.gprs[0]), state->cpu.gprs);
if (pc < SIZE_BIOS && pc >= 0x20) {
if ((ucheck == GBA_BIOS_CHECKSUM || gba->biosChecksum == GBA_BIOS_CHECKSUM) && pc < SIZE_BIOS && pc >= 0x20) {
error = true;
}
}
Expand Down

0 comments on commit 42fdc75

Please sign in to comment.