diff --git a/Assets/dll/gpgx.wbx.zst b/Assets/dll/gpgx.wbx.zst index bb1c4045f8..3ce5849e0e 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 540eeb3849..36a42ec915 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.ISettable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.ISettable.cs @@ -263,6 +263,11 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx [DefaultValue(LibGPGX.Region.Autodetect)] public LibGPGX.Region Region { get; set; } + [DisplayName("Force VDP Mode")] + [Description("Overrides the VDP mode to force it to run at either 60Hz (NTSC) or 50Hz (PAL), regardless of system region.")] + [DefaultValue(LibGPGX.ForceVDP.Disabled)] + public LibGPGX.ForceVDP ForceVDP { get; set; } + [DisplayName("Load BIOS")] [Description("Indicates whether to load the system BIOS rom.")] [DefaultValue(false)] @@ -349,6 +354,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx InputSystemA = SystemForSystem(ControlTypeLeft), InputSystemB = SystemForSystem(ControlTypeRight), Region = Region, + ForceVDP = ForceVDP, LoadBIOS = LoadBIOS, ForceSram = game["sram"], SMSFMSoundChip = SMSFMSoundChip, diff --git a/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/LibGPGX.cs b/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/LibGPGX.cs index 0dd9a00fc6..e090289327 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/LibGPGX.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/LibGPGX.cs @@ -30,11 +30,19 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx Japan_PAL = 4 } + public enum ForceVDP : int + { + Disabled = 0, + NTSC = 1, + PAL = 2 + } + [StructLayout(LayoutKind.Sequential)] public struct InitSettings { public uint BackdropColor; public Region Region; + public ForceVDP ForceVDP; public ushort LowPassRange; public short LowFreq; public short HighFreq; diff --git a/waterbox/gpgx/cinterface/cinterface.c b/waterbox/gpgx/cinterface/cinterface.c index 15aff3376c..52b6aa55f8 100644 --- a/waterbox/gpgx/cinterface/cinterface.c +++ b/waterbox/gpgx/cinterface/cinterface.c @@ -715,6 +715,7 @@ struct InitSettings { uint32_t BackdropColor; int32_t Region; + int32_t ForceVDP; uint16_t LowPassRange; int16_t LowFreq; int16_t HighFreq; @@ -917,8 +918,8 @@ GPGX_EX int gpgx_init(const char* feromextension, /* system options */ config.system = 0; /* = AUTO (or SYSTEM_SG, SYSTEM_SGII, SYSTEM_SGII_RAM_EXT, SYSTEM_MARKIII, SYSTEM_SMS, SYSTEM_SMS2, SYSTEM_GG, SYSTEM_MD) */ - config.region_detect = settings->Region; /* = AUTO (1 = USA, 2 = EUROPE, 3 = JAPAN/NTSC, 4 = JAPAN/PAL) */ - config.vdp_mode = 0; /* = AUTO (1 = NTSC, 2 = PAL) */ + config.region_detect = settings->Region; /* 0 = AUTO, 1 = USA, 2 = EUROPE, 3 = JAPAN/NTSC, 4 = JAPAN/PAL */ + config.vdp_mode = settings->ForceVDP; /* 0 = AUTO, 1 = NTSC, 2 = PAL */ config.master_clock = 0; /* = AUTO (1 = NTSC, 2 = PAL) */ config.force_dtack = 0; config.addr_error = 1;