mirror of https://github.com/bsnes-emu/bsnes.git
Update the model enum so comparisons work correctly for SGB PAL and no-SFC SGBs
This commit is contained in:
parent
13a1e9d332
commit
aa421258b8
|
@ -31,8 +31,13 @@
|
||||||
#define GB_MODEL_DMG_FAMILY 0x000
|
#define GB_MODEL_DMG_FAMILY 0x000
|
||||||
#define GB_MODEL_MGB_FAMILY 0x100
|
#define GB_MODEL_MGB_FAMILY 0x100
|
||||||
#define GB_MODEL_CGB_FAMILY 0x200
|
#define GB_MODEL_CGB_FAMILY 0x200
|
||||||
#define GB_MODEL_PAL_BIT 0x1000
|
#define GB_MODEL_PAL_BIT 0x40
|
||||||
#define GB_MODEL_NO_SFC_BIT 0x2000
|
#define GB_MODEL_NO_SFC_BIT 0x80
|
||||||
|
|
||||||
|
#ifdef GB_INTERNAL
|
||||||
|
#define GB_MODEL_PAL_BIT_OLD 0x1000
|
||||||
|
#define GB_MODEL_NO_SFC_BIT_OLD 0x2000
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef GB_INTERNAL
|
#ifdef GB_INTERNAL
|
||||||
#if __clang__
|
#if __clang__
|
||||||
|
|
|
@ -163,6 +163,16 @@ static bool verify_and_update_state_compatibility(GB_gameboy_t *gb, GB_gameboy_t
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (save->model & GB_MODEL_PAL_BIT_OLD) {
|
||||||
|
save->model &= ~GB_MODEL_PAL_BIT_OLD;
|
||||||
|
save->model |= GB_MODEL_PAL_BIT;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (save->model & GB_MODEL_NO_SFC_BIT_OLD) {
|
||||||
|
save->model &= ~GB_MODEL_NO_SFC_BIT_OLD;
|
||||||
|
save->model |= GB_MODEL_NO_SFC_BIT;
|
||||||
|
}
|
||||||
|
|
||||||
if (gb->version != save->version) {
|
if (gb->version != save->version) {
|
||||||
GB_log(gb, "The save state is for a different version of SameBoy.\n");
|
GB_log(gb, "The save state is for a different version of SameBoy.\n");
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue