mirror of https://github.com/mgba-emu/mgba.git
GBA Serialize: Only flunk BIOS check if official BIOS was expected
This commit is contained in:
parent
ffc6880fbc
commit
774aca8462
1
CHANGES
1
CHANGES
|
@ -22,6 +22,7 @@ Other fixes:
|
||||||
- GBA: Reject incorrectly sized BIOSes
|
- GBA: Reject incorrectly sized BIOSes
|
||||||
- Qt: Fix OpenGL 2.1 support (fixes mgba.io/i/1678)
|
- Qt: Fix OpenGL 2.1 support (fixes mgba.io/i/1678)
|
||||||
Misc:
|
Misc:
|
||||||
|
- GBA Serialize: Only flunk BIOS check if official BIOS was expected
|
||||||
- Qt: Disable Replace ROM option when no game loaded
|
- Qt: Disable Replace ROM option when no game loaded
|
||||||
- Qt: Defer texture updates until frame is drawn (fixes mgba.io/i/1590)
|
- Qt: Defer texture updates until frame is drawn (fixes mgba.io/i/1590)
|
||||||
- Qt: Set icon for Discord Rich Presence
|
- Qt: Set icon for Discord Rich Presence
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include <mgba/internal/gba/serialize.h>
|
#include <mgba/internal/gba/serialize.h>
|
||||||
|
|
||||||
#include <mgba/internal/arm/macros.h>
|
#include <mgba/internal/arm/macros.h>
|
||||||
|
#include <mgba/internal/gba/bios.h>
|
||||||
#include <mgba/internal/gba/io.h>
|
#include <mgba/internal/gba/io.h>
|
||||||
#include <mgba/internal/gba/rr/rr.h>
|
#include <mgba/internal/gba/rr/rr.h>
|
||||||
|
|
||||||
|
@ -99,7 +100,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);
|
mLOG(GBA_STATE, WARN, "Savestate created using a different version of the BIOS: expected %08X, got %08X", gba->biosChecksum, ucheck);
|
||||||
uint32_t pc;
|
uint32_t pc;
|
||||||
LOAD_32(pc, ARM_PC * sizeof(state->cpu.gprs[0]), state->cpu.gprs);
|
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;
|
error = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue