From e68ae81f3a543ab72b8b9be2cf1f20d772edbe82 Mon Sep 17 00:00:00 2001 From: saulfabreg Wii VC Project Date: Tue, 28 Jun 2022 16:53:33 -0500 Subject: [PATCH 1/2] Disabled peripheral devices by default if not selected in controller settings (Tanooki16) (#1018) --- source/preferences.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/preferences.cpp b/source/preferences.cpp index 1131a02..3df23a8 100644 --- a/source/preferences.cpp +++ b/source/preferences.cpp @@ -486,10 +486,10 @@ DefaultSettings () // General - Settings.MouseMaster = true; - Settings.SuperScopeMaster = true; - Settings.JustifierMaster = true; - Settings.MultiPlayer5Master = true; + Settings.MouseMaster = false; + Settings.SuperScopeMaster = false; + Settings.JustifierMaster = false; + Settings.MultiPlayer5Master = false; Settings.DontSaveOopsSnapshot = true; Settings.ApplyCheats = true; From 9b40986b938ac84de873c14be11f55cbb9ae9688 Mon Sep 17 00:00:00 2001 From: saulfabreg Wii VC Project Date: Tue, 28 Jun 2022 22:54:05 -0500 Subject: [PATCH 2/2] SNES Hi-Res Mode ON/OFF and Sprite Limit ON/OFF (Tanooki16) (#1019) * SNES Hi-Res Mode ON/OFF and Sprite Limit ON/OFF (thanks Tanooki16!) * SNES Hi-Res Mode ON/OFF and Sprite Limit ON/OFF (thanks Tanooki16!) * SNES Hi-Res Mode ON/OFF and Sprite Limit ON/OFF (thanks Tanooki16!) * SNES Hi-Res Mode ON/OFF and Sprite Limit ON/OFF (thanks Tanooki16!) * Add Spanish translation for both options of SNES Hi-Res mode and Sprite Limit * Update es.lang --- source/lang/es.lang | 6 +++++ source/menu.cpp | 59 ++++++++++++++++++++++++++---------------- source/preferences.cpp | 9 +++++-- source/snes9xgx.cpp | 2 ++ source/snes9xgx.h | 2 ++ 5 files changed, 54 insertions(+), 24 deletions(-) diff --git a/source/lang/es.lang b/source/lang/es.lang index bfef695..e8ec79a 100644 --- a/source/lang/es.lang +++ b/source/lang/es.lang @@ -793,12 +793,18 @@ msgstr "Controles de SNES (2)" msgid "SNES Controllers (4)" msgstr "Controles de SNES (4)" +msgid "SNES Hi-Res Mode" +msgstr "Modo Alta-Res SNES" + msgid "SNES Mouse" msgstr "Mouse de SNES" msgid "Snes9x - Copyright (c) Snes9x Team 1996 - 2022" msgstr "Snes9x - Derechos de autor (c) Snes9x Team 1996 - 2022" +msgid "Sprites per-line Limit" +msgstr "LĂ­mite de Sprites" + msgid "SRAM" msgstr "SRAM" diff --git a/source/menu.cpp b/source/menu.cpp index f7c341f..b3186e0 100644 --- a/source/menu.cpp +++ b/source/menu.cpp @@ -3536,8 +3536,10 @@ static int MenuSettingsVideo() sprintf(options.name[i++], "Filtering"); sprintf(options.name[i++], "Screen Zoom"); sprintf(options.name[i++], "Screen Position"); - sprintf(options.name[i++], "Crosshair"); sprintf(options.name[i++], "Video Mode"); + sprintf(options.name[i++], "SNES Hi-Res Mode"); + sprintf(options.name[i++], "Sprites per-line Limit"); + sprintf(options.name[i++], "Crosshair"); sprintf(options.name[i++], "Show Framerate"); sprintf(options.name[i++], "Show Local Time"); sprintf(options.name[i++], "SuperFX Overclock"); @@ -3620,21 +3622,32 @@ static int MenuSettingsVideo() break; case 5: - GCSettings.crosshair ^= 1; - break; - - case 6: GCSettings.videomode++; if(GCSettings.videomode > 4) GCSettings.videomode = 0; break; + + case 6: + GCSettings.HiResolution ^= 1; + break; + case 7: + GCSettings.SpriteLimit ^= 1; + break; + + case 8: + GCSettings.crosshair ^= 1; + break; + + case 9: Settings.DisplayFrameRate ^= 1; break; - case 8: + + case 10: Settings.DisplayTime ^= 1; break; - case 9: + + case 11: #ifdef HW_RVL GCSettings.sfxOverclock++; if (GCSettings.sfxOverclock > 6) { @@ -3685,39 +3698,41 @@ static int MenuSettingsVideo() #endif sprintf (options.value[3], "%.2f%%, %.2f%%", GCSettings.zoomHor*100, GCSettings.zoomVert*100); sprintf (options.value[4], "%d, %d", GCSettings.xshift, GCSettings.yshift); - sprintf (options.value[5], "%s", GCSettings.crosshair == 1 ? "On" : "Off"); switch(GCSettings.videomode) { case 0: - sprintf (options.value[6], "Automatic (Recommended)"); break; + sprintf (options.value[5], "Automatic (Recommended)"); break; case 1: - sprintf (options.value[6], "NTSC (480i)"); break; + sprintf (options.value[5], "NTSC (480i)"); break; case 2: - sprintf (options.value[6], "Progressive (480p)"); break; + sprintf (options.value[5], "Progressive (480p)"); break; case 3: - sprintf (options.value[6], "PAL (50Hz)"); break; + sprintf (options.value[5], "PAL (50Hz)"); break; case 4: - sprintf (options.value[6], "PAL (60Hz)"); break; + sprintf (options.value[5], "PAL (60Hz)"); break; } - sprintf (options.value[7], "%s", Settings.DisplayFrameRate ? "On" : "Off"); - sprintf (options.value[8], "%s", Settings.DisplayTime ? "On" : "Off"); + sprintf (options.value[6], "%s", GCSettings.HiResolution == 1 ? "On" : "Off"); + sprintf (options.value[7], "%s", GCSettings.SpriteLimit == 1 ? "On" : "Off"); + sprintf (options.value[8], "%s", GCSettings.crosshair == 1 ? "On" : "Off"); + sprintf (options.value[9], "%s", Settings.DisplayFrameRate ? "On" : "Off"); + sprintf (options.value[10], "%s", Settings.DisplayTime ? "On" : "Off"); switch(GCSettings.sfxOverclock) { case 0: - sprintf (options.value[9], "Default"); break; + sprintf (options.value[11], "Default"); break; case 1: - sprintf (options.value[9], "20 MHz"); break; + sprintf (options.value[11], "20 MHz"); break; case 2: - sprintf (options.value[9], "40 MHz"); break; + sprintf (options.value[11], "40 MHz"); break; case 3: - sprintf (options.value[9], "60 MHz"); break; + sprintf (options.value[11], "60 MHz"); break; case 4: - sprintf (options.value[9], "80 MHz"); break; + sprintf (options.value[11], "80 MHz"); break; case 5: - sprintf (options.value[9], "100 MHz"); break; + sprintf (options.value[11], "100 MHz"); break; case 6: - sprintf (options.value[9], "120 MHz"); break; + sprintf (options.value[11], "120 MHz"); break; } optionBrowser.TriggerUpdate(); } diff --git a/source/preferences.cpp b/source/preferences.cpp index 3df23a8..258b417 100644 --- a/source/preferences.cpp +++ b/source/preferences.cpp @@ -150,6 +150,8 @@ preparePrefsData () createXMLSetting("widescreen", "Aspect Ratio Correction", toStr(GCSettings.widescreen)); createXMLSetting("crosshair", "Crosshair", toStr(GCSettings.crosshair)); createXMLSetting("FilterMethod", "Filter Method", toStr(GCSettings.FilterMethod)); + createXMLSetting("HiResolution", "SNES Hi-Res Mode", toStr(GCSettings.HiResolution)); + createXMLSetting("SpriteLimit", "Sprites per-line Limit", toStr(GCSettings.SpriteLimit)); createXMLSetting("xshift", "Horizontal Video Shift", toStr(GCSettings.xshift)); createXMLSetting("yshift", "Vertical Video Shift", toStr(GCSettings.yshift)); createXMLSetting("sfxOverclock", "SuperFX Overclock", toStr(GCSettings.sfxOverclock)); @@ -338,6 +340,8 @@ decodePrefsData () loadXMLSetting(&GCSettings.widescreen, "widescreen"); loadXMLSetting(&GCSettings.crosshair, "crosshair"); loadXMLSetting(&GCSettings.FilterMethod, "FilterMethod"); + loadXMLSetting(&GCSettings.HiResolution, "HiResolution"); + loadXMLSetting(&GCSettings.SpriteLimit, "SpriteLimit"); loadXMLSetting(&GCSettings.xshift, "xshift"); loadXMLSetting(&GCSettings.yshift, "yshift"); loadXMLSetting(&GCSettings.TurboModeEnabled, "TurboModeEnabled"); @@ -514,14 +518,15 @@ DefaultSettings () // Graphics Settings.Transparency = true; - Settings.SupportHiRes = true; Settings.MaxSpriteTilesPerLine = 34; Settings.SkipFrames = AUTO_FRAMERATE; Settings.TurboSkipFrames = 19; - Settings.DisplayFrameRate = false; Settings.AutoDisplayMessages = false; Settings.InitialInfoStringTimeout = 200; // # frames to display messages for + Settings.DisplayFrameRate = false; Settings.DisplayTime = false; + GCSettings.HiResolution = 1; // Enabled by default + GCSettings.SpriteLimit = 1; // Enabled by default // Frame timings in 50hz and 60hz cpu mode Settings.FrameTimePAL = 20000; diff --git a/source/snes9xgx.cpp b/source/snes9xgx.cpp index e370f67..924fbed 100644 --- a/source/snes9xgx.cpp +++ b/source/snes9xgx.cpp @@ -531,6 +531,8 @@ int main(int argc, char *argv[]) ScreenshotRequested = 0; SwitchAudioMode(0); + Settings.SupportHiRes = (GCSettings.HiResolution == 1); + Settings.MaxSpriteTilesPerLine = (GCSettings.SpriteLimit ? 34 : 128); Settings.AutoDisplayMessages = (Settings.DisplayFrameRate || Settings.DisplayTime ? true : false); Settings.MultiPlayer5Master = (GCSettings.Controller == CTRL_PAD4 ? true : false); Settings.SuperScopeMaster = (GCSettings.Controller == CTRL_SCOPE ? true : false); diff --git a/source/snes9xgx.h b/source/snes9xgx.h index 48aab3a..d17a3e1 100644 --- a/source/snes9xgx.h +++ b/source/snes9xgx.h @@ -126,6 +126,8 @@ struct SGCSettings{ int render; // 0 - original, 1 - filtered, 2 - unfiltered int FilterMethod; // convert to RenderFilter int Controller; + int HiResolution; + int SpriteLimit; int crosshair; int widescreen; // 0 - 4:3 aspect, 1 - 16:9 aspect int xshift; // video output shift