From 20ace6b0ed6d30d2517aa503a55aefe319a3b11b Mon Sep 17 00:00:00 2001 From: saulfabreg Wii VC Project Date: Sat, 30 Apr 2022 13:23:05 -0500 Subject: [PATCH] Snes9x - Add option for overclock Super FX at 20 MHz and update selectable options (Taken from niuus' Snes9x RX) (#1003) * Add option for overclock Super FX at 20 MHz and update selectable options (niuus) Add an option for overclock Super FX 1 / GSU-1 (MARIO Chip) games to 20 MHz, taken from @niuus' fork of Snes9xGX, called Snes9x RX. Overclocking to 40 MHz/60 MHz are unstable for these games that used the SFX GSU-1 chip, and makes it unplayable due to too fast speed, so this modification adds this 20MHz overclock option. * Add option for overclock Super FX at 20 MHz (niuus) Add an option for overclock Super FX 1 / GSU-1 (MARIO Chip) games to 20 MHz, taken from @niuus' fork of Snes9xGX, called Snes9x RX. Overclocking to 40 MHz/60 MHz are unstable for these games that used the SFX GSU-1 chip, and makes it unplayable due to too fast speed, so this modification adds this 20MHz overclock option. * Forgot to update option order for avoid conflict between menus --- source/menu.cpp | 11 +++++++---- source/snes9xgx.cpp | 5 +++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/source/menu.cpp b/source/menu.cpp index f739fe3..c3542ac 100644 --- a/source/menu.cpp +++ b/source/menu.cpp @@ -3484,14 +3484,15 @@ static int MenuSettingsVideo() break; case 9: GCSettings.sfxOverclock++; - if (GCSettings.sfxOverclock > 2) { + if (GCSettings.sfxOverclock > 3) { GCSettings.sfxOverclock = 0; } switch(GCSettings.sfxOverclock) { case 0: Settings.SuperFXSpeedPerLine = 5823405; break; - case 1: Settings.SuperFXSpeedPerLine = 0.417 * 40.5e6; break; - case 2: Settings.SuperFXSpeedPerLine = 0.417 * 60.5e6; break; + case 1: Settings.SuperFXSpeedPerLine = 0.417 * 20.5e6; break; + case 2: Settings.SuperFXSpeedPerLine = 0.417 * 40.5e6; break; + case 3: Settings.SuperFXSpeedPerLine = 0.417 * 60.5e6; break; } S9xResetSuperFX(); S9xReset(); @@ -3544,8 +3545,10 @@ static int MenuSettingsVideo() case 0: sprintf (options.value[9], "Default"); break; case 1: - sprintf (options.value[9], "40 MHz"); break; + sprintf (options.value[9], "20 MHz"); break; case 2: + sprintf (options.value[9], "40 MHz"); break; + case 3: sprintf (options.value[9], "60 MHz"); break; } optionBrowser.TriggerUpdate(); diff --git a/source/snes9xgx.cpp b/source/snes9xgx.cpp index 8fd6975..ebbb33c 100644 --- a/source/snes9xgx.cpp +++ b/source/snes9xgx.cpp @@ -482,8 +482,9 @@ int main(int argc, char *argv[]) switch (GCSettings.sfxOverclock) { case 0: Settings.SuperFXSpeedPerLine = 5823405; break; - case 1: Settings.SuperFXSpeedPerLine = 0.417 * 40.5e6; break; - case 2: Settings.SuperFXSpeedPerLine = 0.417 * 60.5e6; break; + case 1: Settings.SuperFXSpeedPerLine = 0.417 * 20.5e6; break; + case 2: Settings.SuperFXSpeedPerLine = 0.417 * 40.5e6; break; + case 3: Settings.SuperFXSpeedPerLine = 0.417 * 60.5e6; break; } if (GCSettings.sfxOverclock > 0)