SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit a13469c4e2c97873be4725e18074f09ea3ab048f parent e08df2a089c9fe3984ab52c8e86df9a16a591636 Author: Lior Halphon <LIJI32@gmail.com> Date: Thu, 25 Feb 2021 22:42:02 +0200 Fix PAL SGB in the Cocoa port Diffstat:
| M | Cocoa/Document.m | 9 | +++++++-- |
| M | Cocoa/Preferences.xib | 2 | +- |
| M | Core/gb.h | 2 | -- |
3 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/Cocoa/Document.m b/Cocoa/Document.m @@ -237,8 +237,13 @@ static void infraredStateChanged(GB_gameboy_t *gb, bool on) case MODEL_CGB: return (GB_model_t)[[NSUserDefaults standardUserDefaults] integerForKey:@"GBCGBModel"]; - case MODEL_SGB: - return (GB_model_t)[[NSUserDefaults standardUserDefaults] integerForKey:@"GBSGBModel"]; + case MODEL_SGB: { + GB_model_t model = (GB_model_t)[[NSUserDefaults standardUserDefaults] integerForKey:@"GBSGBModel"]; + if (model == (GB_MODEL_SGB | GB_MODEL_PAL_BIT_OLD)) { + model = GB_MODEL_SGB_PAL; + } + return model; + } case MODEL_AGB: return GB_MODEL_AGB; diff --git a/Cocoa/Preferences.xib b/Cocoa/Preferences.xib @@ -396,7 +396,7 @@ <menu key="menu" autoenablesItems="NO" id="czw-Hi-jyM"> <items> <menuItem title="Super Game Boy (NTSC)" state="on" tag="4" id="x5A-7f-ef9"/> - <menuItem title="Super Game Boy (PAL)" tag="4100" id="Cix-n2-l4L"/> + <menuItem title="Super Game Boy (PAL)" tag="68" id="Cix-n2-l4L"/> <menuItem title="Super Game Boy 2" tag="257" id="gZG-1g-KF0"/> </items> </menu> diff --git a/Core/gb.h b/Core/gb.h @@ -34,10 +34,8 @@ #define GB_MODEL_PAL_BIT 0x40 #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 #if __clang__
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.