From 996440558635c5c41ffc8bba9b5f25d6fe016202 Mon Sep 17 00:00:00 2001 From: souldbminersmwc Date: Wed, 24 Sep 2025 17:21:50 -0400 Subject: [PATCH] Revert "Fix tW2R and tR2W patch and multiple ram freqs" This reverts commit 49f3e73b10fad36a3a6225745f4bf746ad282fa4. --- LICENSE | 2 +- .../loader/source/oc/customize.cpp | 10 +++++----- .../loader/source/oc/customize.hpp | 2 +- .../loader/source/oc/oc_common.hpp | 2 +- .../loader/source/oc/oc_loader.hpp | 2 +- .../stratosphere/loader/source/oc/oc_test.cpp | 2 +- .../stratosphere/loader/source/oc/oc_test.hpp | 2 +- .../stratosphere/loader/source/oc/pcv/pcv.cpp | 2 +- .../stratosphere/loader/source/oc/pcv/pcv.hpp | 2 +- .../loader/source/oc/pcv/pcv_common.hpp | 2 +- .../loader/source/oc/pcv/pcv_erista.cpp | 18 +++++++++--------- .../loader/source/oc/pcv/pcv_mariko.cpp | 2 +- .../stratosphere/loader/source/oc/ptm/ptm.cpp | 2 +- .../stratosphere/loader/source/oc/ptm/ptm.hpp | 2 +- Source/sys-clk/manager/src/about_tab.cpp | 12 ++++++------ Source/sys-clk/manager/src/main.cpp | 18 +++++++++--------- Source/sys-clk/overlay/src/main.cpp | 6 +++--- .../overlay/src/ui/gui/freq_choice_gui.cpp | 3 +-- Source/sys-clk/overlay/src/ui/gui/main_gui.cpp | 2 +- 19 files changed, 46 insertions(+), 47 deletions(-) diff --git a/LICENSE b/LICENSE index 390b4ad6..de2c221c 100644 --- a/LICENSE +++ b/LICENSE @@ -4,7 +4,7 @@ - Tinymembench is under MIT license, which is compatible with GPL v2. -- Although "sys-clk" uses permissive license, all modifications towards it in this repo ("Horizon OC") are licensed under GPL v2. +- Although "sys-clk" uses permissive license, all modifications towards it in this repo ("sys-clk-OC") are licensed under GPL v2. GNU GENERAL PUBLIC LICENSE diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp b/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp index 1c1fadca..0b8c957d 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) Horizon OC Contributors + * Copyright (C) Switch-OC-Suite * * Copyright (c) 2023 hanai3Bi * @@ -40,7 +40,7 @@ volatile CustomizeTable C = { * Value should be divided evenly by 12'500. * Not enabled by default. */ -.commonEmcMemVolt = 1175000, +.commonEmcMemVolt = 1237500, /* Erista CPU: * - Max Voltage in mV @@ -57,11 +57,11 @@ volatile CustomizeTable C = { * - NAND corruption */ -.eristaEmcClock1 = 1996800, // Lowest +.eristaEmcClock1 = 1862400, // Lowest -.eristaEmcClock2 = 2032640, // Middle +.eristaEmcClock2 = 1996800, // Middle -.eristaEmcClock3 = 2232640, // Highest +.eristaEmcClock3 = 2132640, // Highest /* Mariko CPU: diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/customize.hpp b/Source/Atmosphere/stratosphere/loader/source/oc/customize.hpp index 9d33250f..83083e0c 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/customize.hpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/customize.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) Horizon OC Contributors + * Copyright (C) Switch-OC-Suite * * Copyright (c) 2023 hanai3Bi * diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/oc_common.hpp b/Source/Atmosphere/stratosphere/loader/source/oc/oc_common.hpp index 2c0f719a..1645c6af 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/oc_common.hpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/oc_common.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) Horizon OC Contributors + * Copyright (C) Switch-OC-Suite * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/oc_loader.hpp b/Source/Atmosphere/stratosphere/loader/source/oc/oc_loader.hpp index e0f684bb..e0445818 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/oc_loader.hpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/oc_loader.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) Horizon OC Contributors + * Copyright (C) Switch-OC-Suite * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/oc_test.cpp b/Source/Atmosphere/stratosphere/loader/source/oc/oc_test.cpp index a775f47a..c0cb1c75 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/oc_test.cpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/oc_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) Horizon OC Contributors + * Copyright (C) Switch-OC-Suite * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/oc_test.hpp b/Source/Atmosphere/stratosphere/loader/source/oc/oc_test.hpp index 1d63f769..32537644 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/oc_test.hpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/oc_test.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) Horizon OC Contributors + * Copyright (C) Switch-OC-Suite * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv.cpp b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv.cpp index 0d958732..e2a5cfc0 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv.cpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) Horizon OC Contributors + * Copyright (C) Switch-OC-Suite * * Copyright (c) 2023 hanai3Bi * diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv.hpp b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv.hpp index 05970af7..3d6c2a4a 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv.hpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) Horizon OC Contributors + * Copyright (C) Switch-OC-Suite * * Copyright (c) 2023 hanai3Bi * diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_common.hpp b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_common.hpp index 660f8c51..d0eb52c3 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_common.hpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_common.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) Horizon OC Contributors + * Copyright (C) Switch-OC-Suite * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_erista.cpp b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_erista.cpp index aafa6db8..13367515 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_erista.cpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_erista.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) Horizon OC Contributors + * Copyright (C) Switch-OC-Suite * * Copyright (c) 2023 hanai3Bi * @@ -161,8 +161,8 @@ table->burst_mc_regs.mc_emem_arb_timing_rrd = CEIL(GET_CYCLE_CEIL(tRRD) / MC_ARB_DIV) - 1; table->burst_mc_regs.mc_emem_arb_timing_rap2pre = CEIL(GET_CYCLE_CEIL(tRTP) / MC_ARB_DIV); table->burst_mc_regs.mc_emem_arb_timing_wap2pre = CEIL(WTP / MC_ARB_DIV); - table->burst_mc_regs.mc_emem_arb_timing_r2r = CEIL(table->burst_regs.emc_rext / MC_ARB_DIV) - 1 + MC_ARB_SFA; // ocs does not patch this - table->burst_mc_regs.mc_emem_arb_timing_w2w = CEIL(table->burst_regs.emc_wext / MC_ARB_DIV) - 1 + MC_ARB_SFA; + // table->burst_mc_regs.mc_emem_arb_timing_r2r = CEIL(table->burst_regs.emc_rext / MC_ARB_DIV) - 1 + MC_ARB_SFA; + // table->burst_mc_regs.mc_emem_arb_timing_w2w = CEIL(table->burst_regs.emc_wext / MC_ARB_DIV) - 1 + MC_ARB_SFA; table->burst_mc_regs.mc_emem_arb_timing_r2w = CEIL(R2W / MC_ARB_DIV) - 1 + MC_ARB_SFA; table->burst_mc_regs.mc_emem_arb_timing_w2r = CEIL(W2R / MC_ARB_DIV) - 1 + MC_ARB_SFA; table->burst_mc_regs.mc_emem_arb_timing_rfcpb = CEIL(GET_CYCLE_CEIL(tRFCpb) / MC_ARB_DIV); @@ -257,9 +257,9 @@ R_UNLESS(table_list[i]->rev == MTC_TABLE_REV, ldr::ResultInvalidMtcTable()); } - if (C.eristaEmcClock1 >= EmcClkOSLimit || - C.eristaEmcClock2 >= EmcClkOSLimit || - C.eristaEmcClock3 >= EmcClkOSLimit) + if (C.eristaEmcClock1 <= EmcClkOSLimit || + C.eristaEmcClock2 <= EmcClkOSLimit || + C.eristaEmcClock3 <= EmcClkOSLimit) R_SKIP(); // Make room for three new mtc tables, discarding useless 40.8, 68.0, and 102 MHz tables @@ -278,11 +278,11 @@ u32 *patch_ptr2 = ptr - sizeof(EristaMtcTable) / sizeof(u32); u32 *patch_ptr3 = ptr - 2 * (sizeof(EristaMtcTable) / sizeof(u32)); - if (C.eristaEmcClock3 < EmcClkOSLimit) + if (C.eristaEmcClock3 > EmcClkOSLimit) PATCH_OFFSET(patch_ptr1, C.eristaEmcClock3); - if (C.eristaEmcClock2 < EmcClkOSLimit) + if (C.eristaEmcClock2 > EmcClkOSLimit) PATCH_OFFSET(patch_ptr2, C.eristaEmcClock2); - if (C.eristaEmcClock3 < EmcClkOSLimit) + if (C.eristaEmcClock3 > EmcClkOSLimit) PATCH_OFFSET(patch_ptr3, C.eristaEmcClock1); // Handle customize table replacement diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_mariko.cpp b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_mariko.cpp index beae5b64..31eb40a0 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_mariko.cpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_mariko.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) Horizon OC Contributors + * Copyright (C) Switch-OC-Suite * * Copyright (c) 2023 hanai3Bi * diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/ptm/ptm.cpp b/Source/Atmosphere/stratosphere/loader/source/oc/ptm/ptm.cpp index 920a9234..543415e5 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/ptm/ptm.cpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/ptm/ptm.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) Horizon OC Contributors + * Copyright (C) Switch-OC-Suite * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/ptm/ptm.hpp b/Source/Atmosphere/stratosphere/loader/source/oc/ptm/ptm.hpp index 9543acc9..72360e44 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/ptm/ptm.hpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/ptm/ptm.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) Horizon OC Contributors + * Copyright (C) Switch-OC-Suite * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, diff --git a/Source/sys-clk/manager/src/about_tab.cpp b/Source/sys-clk/manager/src/about_tab.cpp index 486fca9a..7d163fe5 100644 --- a/Source/sys-clk/manager/src/about_tab.cpp +++ b/Source/sys-clk/manager/src/about_tab.cpp @@ -33,7 +33,7 @@ AboutTab::AboutTab() // Subtitle brls::Label *subTitle = new brls::Label( brls::LabelStyle::REGULAR, - "Nittendo Switch Overclocking tool by Souldbminer based on sys-clk by RetroNX", + "Nintendo Switch overclocking / underclocking system module and frontend app by the RetroNX Team", true ); subTitle->setHorizontalAlign(NVG_ALIGN_CENTER); @@ -42,9 +42,9 @@ AboutTab::AboutTab() // Copyright brls::Label *copyright = new brls::Label( brls::LabelStyle::DESCRIPTION, - "System module licensed under the GPLv2\n" \ + "System module licensed under the Beerware license\n" \ "Frontend app licensed under GPL-3.0\n" \ - "\u00A9 2019 - 2020 natinusala, p-sam, m4xw, \u00A9 2025 Souldbminer", + "\u00A9 2019 - 2020 natinusala, p-sam, m4xw", true ); copyright->setHorizontalAlign(NVG_ALIGN_CENTER); @@ -54,9 +54,9 @@ AboutTab::AboutTab() this->addView(new brls::Header("Links and Resources")); brls::Label *links = new brls::Label( brls::LabelStyle::SMALL, - "\uE016 User guide and code source can be found on my GitHub repository (souldbminersmwc/horizon-oc)\n" \ - "\uE016 The Horizon OC manager is powered by Borealis, an hardware accelerated UI library\n" \ - "\uE016 Join the OC Discord server for support, to request features or just hang out!", + "\uE016 User guide and code source can be found on our GitHub repository\n" \ + "\uE016 The sys-clk manager is powered by Borealis, an hardware accelerated UI library\n" \ + "\uE016 Join the RetroNX Discord server for support, to request features or just hang out!", true ); this->addView(links); diff --git a/Source/sys-clk/manager/src/main.cpp b/Source/sys-clk/manager/src/main.cpp index 39e2c010..426f0f6a 100644 --- a/Source/sys-clk/manager/src/main.cpp +++ b/Source/sys-clk/manager/src/main.cpp @@ -54,24 +54,24 @@ int main(int argc, char* argv[]) // Check that sys-clk is running if (!sysclkIpcRunning()) { - brls::Logger::error("Horizon OC is not running"); - brls::Application::crash("Horizon OC does not seem to be running, please check that it is correctly installed and enabled."); + brls::Logger::error("sys-clk is not running"); + brls::Application::crash("sys-clk does not seem to be running, please check that it is correctly installed and enabled."); } // Initialize sys-clk IPC client else if (R_FAILED(sysclkIpcInitialize()) || R_FAILED(sysclkIpcGetAPIVersion(&apiVersion))) { - brls::Logger::error("Unable to initialize Horizon OC IPC client"); - brls::Application::crash("Could not connect to Horizon OC, please check that it is correctly installed and enabled."); + brls::Logger::error("Unable to initialize sys-clk IPC client"); + brls::Application::crash("Could not connect to sys-clk, please check that it is correctly installed and enabled."); } else if (SYSCLK_IPC_API_VERSION != apiVersion) { - brls::Logger::error("Horizon OC IPC API version mismatch (expected: %u; actual: %u)", SYSCLK_IPC_API_VERSION, apiVersion); - brls::Application::crash("The manager is not compatible with the currently running sysmodule of Horizon OC, please check that you have correctly installed the latest version (reboot?)."); + brls::Logger::error("sys-clk IPC API version mismatch (expected: %u; actual: %u)", SYSCLK_IPC_API_VERSION, apiVersion); + brls::Application::crash("The manager is not compatible with the currently running sysmodule of sys-clk, please check that you have correctly installed the latest version (reboot?)."); } else if (R_FAILED(cacheFreqList())) { - brls::Logger::error("Failed to get the freq list from Horizon OC"); - brls::Application::crash("Failed to get the freq list from Horizon OC, please check that you have correctly installed the latest version (reboot?)."); + brls::Logger::error("Failed to get the freq list from sys-clk"); + brls::Application::crash("Failed to get the freq list from sys-clk, please check that you have correctly installed the latest version (reboot?)."); } else { @@ -84,7 +84,7 @@ int main(int argc, char* argv[]) } else { - brls::Logger::error("Unable to get Horizon OC version string"); + brls::Logger::error("Unable to get sys-clk version string"); brls::Application::setCommonFooter("[unknown]"); } diff --git a/Source/sys-clk/overlay/src/main.cpp b/Source/sys-clk/overlay/src/main.cpp index d6b0ca0c..03c69f35 100644 --- a/Source/sys-clk/overlay/src/main.cpp +++ b/Source/sys-clk/overlay/src/main.cpp @@ -40,7 +40,7 @@ class AppOverlay : public tsl::Overlay if(!sysclkIpcRunning()) { return initially( - "Horizon OC is not running.\n\n" + "sys-clk is not running.\n\n" "\n" "Please make sure it is correctly\n\n" "installed and enabled.", @@ -51,7 +51,7 @@ class AppOverlay : public tsl::Overlay if(R_FAILED(sysclkIpcInitialize()) || R_FAILED(sysclkIpcGetAPIVersion(&apiVersion))) { return initially( - "Could not connect to Horizon OC.\n\n" + "Could not connect to sys-clk.\n\n" "\n" "Please make sure it is correctly\n\n" "installed and enabled.", @@ -63,7 +63,7 @@ class AppOverlay : public tsl::Overlay { return initially( "Overlay not compatible with\n\n" - "the running Horizon OC version.\n\n" + "the running sys-clk version.\n\n" "\n" "Please make sure everything is\n\n" "installed and up to date.", diff --git a/Source/sys-clk/overlay/src/ui/gui/freq_choice_gui.cpp b/Source/sys-clk/overlay/src/ui/gui/freq_choice_gui.cpp index ff2f5052..c768a969 100644 --- a/Source/sys-clk/overlay/src/ui/gui/freq_choice_gui.cpp +++ b/Source/sys-clk/overlay/src/ui/gui/freq_choice_gui.cpp @@ -80,7 +80,6 @@ uint32_t unsafe_gpu; uint32_t danger_cpu; uint32_t danger_gpu; - if (IsMariko()) { unsafe_cpu = 1964; @@ -93,7 +92,7 @@ unsafe_cpu = 1786; unsafe_gpu = 922; danger_cpu = 2092; - danger_gpu = 1076; + danger_gpu = 999; } if (moduleName == "cpu") { diff --git a/Source/sys-clk/overlay/src/ui/gui/main_gui.cpp b/Source/sys-clk/overlay/src/ui/gui/main_gui.cpp index f36895fc..9fd8e11b 100644 --- a/Source/sys-clk/overlay/src/ui/gui/main_gui.cpp +++ b/Source/sys-clk/overlay/src/ui/gui/main_gui.cpp @@ -80,7 +80,7 @@ void MainGui::listUI() return false; }); - // this->listElement->addItem(miscItem); + this->listElement->addItem(miscItem); } void MainGui::refresh()