From bcc319f04c88ad43a1c2fcfc5010ed88a607cfb0 Mon Sep 17 00:00:00 2001 From: RocketRobz Date: Thu, 3 Oct 2024 17:49:14 -0600 Subject: [PATCH] Reapply "Remove `Slot-1 Touch Mode` setting" This reverts commit c3aa10b3ca7c0dba1e7e56dea40bb97c1f655f93. --- settings/arm9/source/main.cpp | 1 - slot1launch/arm9/source/main.cpp | 2 +- slot1launch/bootloader/source/main.arm7.c | 8 ++++---- slot1launch/bootloaderAlt/source/main.arm7.c | 6 +++--- universal/include/common/twlmenusettings.h | 1 - universal/source/common/twlmenusettings.cpp | 3 --- 6 files changed, 8 insertions(+), 13 deletions(-) diff --git a/settings/arm9/source/main.cpp b/settings/arm9/source/main.cpp index ecee0aba3d..c7c6e07f09 100644 --- a/settings/arm9/source/main.cpp +++ b/settings/arm9/source/main.cpp @@ -1452,7 +1452,6 @@ int settingsMode(void) miscPage .option(STR_SLOT1SCFGUNLOCK, STR_DESCRIPTION_SLOT1SCFGUNLOCK, Option::Bool(&ms().slot1SCFGUnlock), {STR_ON, STR_OFF}, {true, false}) .option(STR_SLOT1SDACCESS, STR_DESCRIPTION_SLOT1SDACCESS, Option::Bool(&ms().slot1AccessSD), {STR_ON, STR_OFF}, {true, false}) - .option(STR_SLOT1TOUCHMODE, STR_DESCRIPTION_SLOT1TOUCHMODE, Option::Bool(&ms().slot1TouchMode), {STR_DSI_MODE, STR_DS_MODE}, {true, false}) .option(STR_S1SDACCESS, STR_DESCRIPTION_S1SDACCESS_1, Option::Bool(&ms().secondaryAccess), {STR_ON, STR_OFF}, {true, false}); } diff --git a/slot1launch/arm9/source/main.cpp b/slot1launch/arm9/source/main.cpp index da8a30e0fb..185a8f2542 100644 --- a/slot1launch/arm9/source/main.cpp +++ b/slot1launch/arm9/source/main.cpp @@ -99,7 +99,7 @@ int main() { CIniFile settingsini("/_nds/TWiLightMenu/settings.ini"); ignoreBlacklists = settingsini.GetInt("SRLOADER","IGNORE_BLACKLISTS",false); - TWLTOUCH = settingsini.GetInt("SRLOADER","SLOT1_TOUCH_MODE",0); + // TWLTOUCH = settingsini.GetInt("SRLOADER","SLOT1_TOUCH_MODE",0); soundFreq = settingsini.GetInt("NDS-BOOTSTRAP","SOUND_FREQ",0); sleepMode = settingsini.GetInt("SRLOADER","SLEEP_MODE",1); runCardEngine = settingsini.GetInt("SRLOADER","SLOT1_CARDENGINE",1); diff --git a/slot1launch/bootloader/source/main.arm7.c b/slot1launch/bootloader/source/main.arm7.c index 9ffb56628f..d37902ddf2 100644 --- a/slot1launch/bootloader/source/main.arm7.c +++ b/slot1launch/bootloader/source/main.arm7.c @@ -657,7 +657,7 @@ static void NDSTouchscreenMode(void) { writePowerManagement(PM_CONTROL_REG, 0x0D); //*(unsigned char*)0x40001C2 = 0x00, 0x0D; // PWR[0]=0Dh ;<-- also part of TSC ! } -static void DSiTouchscreenMode(void) { +/* static void DSiTouchscreenMode(void) { if (strncmp((const char*)0x04FFFA00, "no$gba", 6) != 0) { return; } @@ -721,7 +721,7 @@ static void DSiTouchscreenMode(void) { // Finish up! cdcReadReg (CDC_TOUCHCNT, 0x02); cdcWriteReg(CDC_TOUCHCNT, 0x02, 0x00); -} +} */ // SDK 5 static bool ROMsupportsDsiMode(const tNDSHeader* ndsHeader) { @@ -1030,13 +1030,13 @@ void arm7_main (void) { *(u32*)0x3FFFFC8 = 0x7884; // Fix sound pitch table for DSi mode (works with SDK5 binaries) if (ndsHeader->unitCode == 0 || (ndsHeader->unitCode > 0 && !(*(u8*)0x02FFE1BF & BIT(0)))) { - twlTouch ? DSiTouchscreenMode() : NDSTouchscreenMode(); + NDSTouchscreenMode(); *(vu16*)0x4000500 = 0x807F; } } else { REG_SCFG_ROM = 0x703; - twlTouch ? DSiTouchscreenMode() : NDSTouchscreenMode(); + NDSTouchscreenMode(); *(vu16*)0x4000500 = 0x807F; REG_GPIO_WIFI |= BIT(8); // Old NDS-Wifi mode diff --git a/slot1launch/bootloaderAlt/source/main.arm7.c b/slot1launch/bootloaderAlt/source/main.arm7.c index 9b281560d9..1e1ae31b9c 100644 --- a/slot1launch/bootloaderAlt/source/main.arm7.c +++ b/slot1launch/bootloaderAlt/source/main.arm7.c @@ -479,7 +479,7 @@ static void NDSTouchscreenMode(void) { writePowerManagement(PM_CONTROL_REG, 0x0D); //*(unsigned char*)0x40001C2 = 0x00, 0x0D; // PWR[0]=0Dh ;<-- also part of TSC ! } -static void DSiTouchscreenMode(void) { +/* static void DSiTouchscreenMode(void) { if (strncmp((const char*)0x04FFFA00, "no$gba", 6) != 0) { return; } @@ -543,7 +543,7 @@ static void DSiTouchscreenMode(void) { // Finish up! cdcReadReg (CDC_TOUCHCNT, 0x02); cdcWriteReg(CDC_TOUCHCNT, 0x02, 0x00); -} +} */ int arm7_loadBinary (void) { u32 chipID; @@ -733,7 +733,7 @@ void arm7_main (void) { } } - twlTouch ? DSiTouchscreenMode() : NDSTouchscreenMode(); + NDSTouchscreenMode(); *(vu16*)0x4000500 = 0x807F; REG_GPIO_WIFI |= BIT(8); // Old NDS-Wifi mode diff --git a/universal/include/common/twlmenusettings.h b/universal/include/common/twlmenusettings.h index 5ba41662f7..fb52702f84 100644 --- a/universal/include/common/twlmenusettings.h +++ b/universal/include/common/twlmenusettings.h @@ -348,7 +348,6 @@ class TWLSettings bool slot1AccessSD; bool slot1SCFGUnlock; - bool slot1TouchMode; bool ezFlashRam; int limitedMode; bool dontShowDSiWareInDSModeWarning; diff --git a/universal/source/common/twlmenusettings.cpp b/universal/source/common/twlmenusettings.cpp index 387ed450df..e0d09d3744 100644 --- a/universal/source/common/twlmenusettings.cpp +++ b/universal/source/common/twlmenusettings.cpp @@ -110,7 +110,6 @@ TWLSettings::TWLSettings() slot1AccessSD = false; slot1SCFGUnlock = false; - slot1TouchMode = false; ezFlashRam = false; limitedMode = 0; dontShowDSiWareInDSModeWarning = false; @@ -308,7 +307,6 @@ void TWLSettings::loadSettings() slot1AccessSD = settingsini.GetInt("SRLOADER", "SLOT1_ENABLESD", slot1AccessSD); slot1SCFGUnlock = settingsini.GetInt("SRLOADER", "SLOT1_SCFG_UNLOCK", slot1SCFGUnlock); - slot1TouchMode = settingsini.GetInt("SRLOADER", "SLOT1_TOUCH_MODE", slot1TouchMode); ezFlashRam = settingsini.GetInt("SRLOADER", "EZ_FLASH_RAM", ezFlashRam); limitedMode = settingsini.GetInt("SRLOADER", "LIMITED_MODE", limitedMode); dontShowDSiWareInDSModeWarning = settingsini.GetInt("SRLOADER", "DONT_SHOW_DSIWARE_IN_DS_MODE_WARNING", dontShowDSiWareInDSModeWarning); @@ -474,7 +472,6 @@ void TWLSettings::saveSettings() settingsini.SetInt("SRLOADER", "SLOT1_ENABLESD", slot1AccessSD); settingsini.SetInt("SRLOADER", "SLOT1_SCFG_UNLOCK", slot1SCFGUnlock); - settingsini.SetInt("SRLOADER", "SLOT1_TOUCH_MODE", slot1TouchMode); settingsini.SetInt("SRLOADER", "LIMITED_MODE", limitedMode); settingsini.SetInt("SRLOADER", "DONT_SHOW_DSIWARE_IN_DS_MODE_WARNING", dontShowDSiWareInDSModeWarning); settingsini.SetInt("SRLOADER", "DSIWARE_BOOTER", dsiWareBooter);