From 0621ba82752bc23dbeca16e9f97d050b33688b9f Mon Sep 17 00:00:00 2001 From: saulfabreg Wii VC Project Date: Thu, 19 May 2022 08:29:41 -0500 Subject: [PATCH] Update to v1.0.9b (Tanooki16) - Fixed SuperFX overclock issues (thanks InfiniteBlueGX) --- README.txt | 5 +++++ hbc/meta.xml | 2 +- source/snes9xtx.cpp | 28 +++++++++++++++++----------- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/README.txt b/README.txt index e67e7ce..c4297f5 100644 --- a/README.txt +++ b/README.txt @@ -7,6 +7,11 @@ Snes9x TX is a fork of Snes9x GX: https://github.com/dborth/snes9xgx Update History -------------- +---Snes9x TX 1.0.9b--- +---May 19 2022--- + +- Fixed SuperFX overclock issues (thanks InfiniteBlueGX) + ---Snes9x TX 1.0.9--- ---May 17 2022--- diff --git a/hbc/meta.xml b/hbc/meta.xml index 44fc5bd..2d08d74 100644 --- a/hbc/meta.xml +++ b/hbc/meta.xml @@ -3,7 +3,7 @@ Snes9x TX Tanooki 1.0.9 - 20220517 + 20220519 Super Nintendo Emulator Snes9x TX is a fork of Snes9x GX on Wii. diff --git a/source/snes9xtx.cpp b/source/snes9xtx.cpp index 1a0b512..00f21ce 100644 --- a/source/snes9xtx.cpp +++ b/source/snes9xtx.cpp @@ -60,6 +60,7 @@ int ExitRequested = 0; bool isWiiVC = false; char appPath[1024] = { 0 }; static int currentMode; +bool firstRun = true; extern "C" { #ifdef USE_VM @@ -489,28 +490,33 @@ int main(int argc, char *argv[]) #ifdef HW_RVL SelectFilterMethod(); #endif - switch (GCSettings.sfxOverclock) + if (firstRun) { - case 0: Settings.SuperFXSpeedPerLine = 5823405; 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; - } + firstRun = false; + switch (GCSettings.sfxOverclock) + { + case 0: Settings.SuperFXSpeedPerLine = 5823405; 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) + if (GCSettings.sfxOverclock > 0) + { S9xResetSuperFX(); - else S9xReset(); + } - switch (GCSettings.Interpolation) - { + switch (GCSettings.Interpolation) + { case 0: Settings.InterpolationMethod = DSP_INTERPOLATION_GAUSSIAN; break; case 1: Settings.InterpolationMethod = DSP_INTERPOLATION_LINEAR; break; case 2: Settings.InterpolationMethod = DSP_INTERPOLATION_CUBIC; break; case 3: Settings.InterpolationMethod = DSP_INTERPOLATION_SINC; break; case 4: Settings.InterpolationMethod = DSP_INTERPOLATION_NONE; break; + } } - + autoboot = false; ConfigRequested = 0; ScreenshotRequested = 0;