diff --git a/Assets/dll/gpgx.wbx.zst b/Assets/dll/gpgx.wbx.zst index fab2d65aa8..676b5dd046 100644 Binary files a/Assets/dll/gpgx.wbx.zst and b/Assets/dll/gpgx.wbx.zst differ diff --git a/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.ISettable.cs b/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.ISettable.cs index 02f59d175a..9616c11485 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.ISettable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.ISettable.cs @@ -268,6 +268,16 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx [DefaultValue(false)] public bool LoadBIOS { get; set; } + [DisplayName("Overscan")] + [Description("Sets overscan borders shown.")] + [DefaultValue(LibGPGX.InitSettings.OverscanType.None)] + public LibGPGX.InitSettings.OverscanType Overscan { get; set; } + + [DisplayName("[GG] Display Extra Area")] + [Description("Enables displaying extended Game Gear screen (256x192).")] + [DefaultValue(false)] + public bool GGExtra { get; set; } + [DisplayName("[SMS] FM Sound Chip Type")] [Description("Sets the method used to emulate the FM Sound Unit of the Sega Mark III/Master System. 'MAME' is fast and runs full speed on most systems.'Nuked' is cycle accurate, very high quality, and have substantial CPU requirements.")] [DefaultValue(LibGPGX.InitSettings.SMSFMSoundChipType.YM2413_MAME)] @@ -343,7 +353,9 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx ForceSram = game["sram"], SMSFMSoundChip = SMSFMSoundChip, GenesisFMSoundChip = GenesisFMSoundChip, - SpritesAlwaysOnTop = SpritesAlwaysOnTop + SpritesAlwaysOnTop = SpritesAlwaysOnTop, + Overscan = Overscan, + GGExtra = GGExtra, }; } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/LibGPGX.cs b/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/LibGPGX.cs index 8aad1e6985..7b6e87cd86 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/LibGPGX.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/LibGPGX.cs @@ -74,6 +74,16 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx public bool SpritesAlwaysOnTop; public bool LoadBIOS; + + public enum OverscanType : byte + { + None, + Vertical, + Horizontal, + All + } + public OverscanType Overscan; + public bool GGExtra; } [BizImport(CallingConvention.Cdecl)] diff --git a/waterbox/gpgx/cinterface/cinterface.c b/waterbox/gpgx/cinterface/cinterface.c index 3dbf03a301..a5b4460df5 100644 --- a/waterbox/gpgx/cinterface/cinterface.c +++ b/waterbox/gpgx/cinterface/cinterface.c @@ -607,7 +607,7 @@ enum GenesisFMSoundChipType struct InitSettings { uint32_t BackdropColor; - int Region; + int32_t Region; uint16_t LowPassRange; int16_t LowFreq; int16_t HighFreq; @@ -615,14 +615,16 @@ struct InitSettings int16_t MidGain; int16_t HighGain; uint8_t Filter; - char InputSystemA; - char InputSystemB; - char SixButton; - char ForceSram; + uint8_t InputSystemA; + uint8_t InputSystemB; + uint8_t SixButton; + uint8_t ForceSram; uint8_t SMSFMSoundChip; uint8_t GenesisFMSoundChip; uint8_t SpritesAlwaysOnTop; uint8_t LoadBios; + uint8_t Overscan; + uint8_t GGExtra; }; @@ -759,7 +761,7 @@ GPGX_EX int gpgx_init(const char* feromextension, // Selecting FM Sound chip to use for SMS / GG emulation. Using a default for now, until we also // accept this core for SMS/GG emulation in BizHawk - switch (settings->SMSFMSoundChip) + switch (settings->SMSFMSoundChip) { case YM2413_DISABLED: config.opll = 0; @@ -819,8 +821,8 @@ GPGX_EX int gpgx_init(const char* feromextension, config.cd_latency = 1; /* display options */ - config.overscan = 0; /* 3 = all borders (0 = no borders , 1 = vertical borders only, 2 = horizontal borders only) */ - config.gg_extra = 0; /* 1 = show extended Game Gear screen (256x192) */ + config.overscan = settings->Overscan; /* 3 = all borders (0 = no borders , 1 = vertical borders only, 2 = horizontal borders only) */ + config.gg_extra = settings->GGExtra; /* 1 = show extended Game Gear screen (256x192) */ config.render = 1; /* 1 = double resolution output (only when interlaced mode 2 is enabled) */ config.ntsc = 0; config.lcd = 0; /* 0.8 fixed point */