sys-clk-OC manager

This commit is contained in:
KazushiM
2022-10-29 22:29:30 +08:00
parent 26c0bff4dd
commit 1dcd8cc1bb
8 changed files with 48 additions and 49 deletions

View File

@@ -35,6 +35,15 @@ This project will not be actively maintained or regularly updated along with Atm
</details>
- **Modded sys-clk and ReverseNX**(-RT)
- Global profile
- Designated a dummy title id `0xA111111111111111`.
- Priority: "Temp overrides" > "Application profile" > "Global profile" > "System default".
- Miscellaneous
- Sync ReverseNX Mode: No need to change clocks manually after toggling modes in ReverseNX
- **[System Settings (Optional)](https://github.com/KazushiMe/Switch-OC-Suite/blob/master/system_settings.md)**
@@ -48,22 +57,13 @@ This project will not be actively maintained or regularly updated along with Atm
- **Disabled by default**, toggle "Allow Unsafe Frequencies" on in overlay or add `allow_unsafe_freq=1` to `config.ini`
- Power draw will be significant higher than what the mainboard was designed to tolerate at anything higher than 1963/921 MHz.
- See [README for sys-clk-OC](https://github.com/KazushiMe/Switch-OC-Suite/blob/master/Source/sys-clk-OC/README.md)
- **Modded sys-clk and ReverseNX**(-RT)
- Global profile
- Designated a dummy title id `0xA111111111111111`.
- Priority: "Temp overrides" > "Application profile" > "Global profile" > "System default".
- Miscellaneous
- Auto CPU Boost: For faster game loading
- Enable CPU Boost (1785 MHz, could be configured higher) when CPU Core#3 (System Core) is stressed, especially when the game is loading assets from eMMC/SD card (I/O ops).
- Auto-Boost will be enabled only when charger is connected.
- Sync ReverseNX Mode: No need to change clocks manually after toggling modes in ReverseNX
- View charger & battery info, toggle fast-charging(2A) or set charge limit (20% - 100%) in overlay
- Note: Long-term use of charge limit may render the battery gauge inaccurate. Performing full cycles could help recalibration, or try [battery_desync_fix_nx](https://github.com/CTCaer/battery_desync_fix_nx).
- Auto CPU Boost: For faster game loading
- Enable CPU Boost (1785 MHz, could be configured higher) when CPU Core#3 (System Core) is stressed, especially when the game is loading assets from eMMC/SD card (I/O ops).
- Auto-Boost will be enabled only when charger is connected.
- View charger & battery info, toggle fast-charging(2A) or set charge limit (20% - 100%) in overlay
- Note: Long-term use of charge limit may render the battery gauge inaccurate. Performing full cycles could help recalibration, or try [battery_desync_fix_nx](https://github.com/CTCaer/battery_desync_fix_nx).
@@ -71,9 +71,7 @@ This project will not be actively maintained or regularly updated along with Atm
1. Download latest [release](https://github.com/KazushiMe/Switch-OC-Suite/releases/latest).
2. Mariko Only: Copy all files in `SdOut` to the root of SD card.
Erista user: Use other modified sys-clk instead. (Add your RAM OC frequency to sys-clk and recompiling). Only `loader.kip` and some benchmark homebrew are available in this repo for now.
2. Copy all files in `SdOut` to the root of SD card.
3. Grab `x.x.x_loader.kip` for your Atmosphere version, rename it to `loader.kip` and place it in `/atmosphere/kips/`.

View File

@@ -54,7 +54,7 @@ APP_RESOURCES := romfs:/
#---------------------------------------------------------------------------------
# version control constants
#---------------------------------------------------------------------------------
TARGET_VERSION := OC-$$(date +%Y/%m/%d)
TARGET_VERSION := $$(date +%Y/%m/%d)
APP_VERSION := $(TARGET_VERSION)
#---------------------------------------------------------------------------------

View File

@@ -33,7 +33,8 @@ AboutTab::AboutTab()
// Subtitle
brls::Label *subTitle = new brls::Label(
brls::LabelStyle::REGULAR,
"Nintendo Switch overclocking / underclocking system module and frontend app by the RetroNX Team",
"This is a modified version of official sys-clk, which is not associated with any author below.\n" \
"Nintendo Switch overclocking / underclocking system module and frontend app by the RetroNX Team.\n",
true
);
subTitle->setHorizontalAlign(NVG_ALIGN_CENTER);

View File

@@ -53,7 +53,7 @@ AdvancedSettingsTab::AdvancedSettingsTab()
cpuFreqListItem->getValueSelectedEvent()->subscribe([](int result){
Result rc = result == 0 ?
sysclkIpcRemoveOverride(SysClkModule_CPU) :
sysclkIpcSetOverride(SysClkModule_CPU, sysclk_g_freq_table_cpu_hz[result - 1]);
sysclkIpcSetOverride(SysClkModule_CPU, g_freq_table_cpu_hz[result - 1]);
if (R_FAILED(rc))
{
@@ -68,7 +68,7 @@ AdvancedSettingsTab::AdvancedSettingsTab()
gpuFreqListItem->getValueSelectedEvent()->subscribe([](int result){
Result rc = result == 0 ?
sysclkIpcRemoveOverride(SysClkModule_GPU) :
sysclkIpcSetOverride(SysClkModule_GPU, sysclk_g_freq_table_gpu_hz[result - 1]);
sysclkIpcSetOverride(SysClkModule_GPU, g_freq_table_gpu_hz[result - 1]);
if (R_FAILED(rc))
{
@@ -84,7 +84,7 @@ AdvancedSettingsTab::AdvancedSettingsTab()
{
Result rc = result == 0 ?
sysclkIpcRemoveOverride(SysClkModule_MEM) :
sysclkIpcSetOverride(SysClkModule_MEM, sysclk_g_freq_table_mem_hz[result - 1]);
sysclkIpcSetOverride(SysClkModule_MEM, g_freq_table_mem_hz[result - 1]);
if (R_FAILED(rc))
{

View File

@@ -101,7 +101,7 @@ void AppProfileFrame::addFreqs(brls::List* list, SysClkProfile profile)
cpuListItem->getValueSelectedEvent()->subscribe([this, profile](int result) {
this->onProfileChanged();
this->profiles.mhzMap[profile][SysClkModule_CPU] = result == 0 ? result : sysclk_g_freq_table_cpu_hz[result - 1];
this->profiles.mhzMap[profile][SysClkModule_CPU] = result == 0 ? result : g_freq_table_cpu_hz[result - 1];
brls::Logger::debug("Caching freq for module %d and profile %d to %" PRIu32, SysClkModule_CPU, profile, this->profiles.mhzMap[profile][SysClkModule_CPU]);
});
@@ -114,7 +114,7 @@ void AppProfileFrame::addFreqs(brls::List* list, SysClkProfile profile)
gpuListItem->getValueSelectedEvent()->subscribe([this, profile](int result) {
this->onProfileChanged();
this->profiles.mhzMap[profile][SysClkModule_GPU] = result == 0 ? result : sysclk_g_freq_table_gpu_hz[result - 1];
this->profiles.mhzMap[profile][SysClkModule_GPU] = result == 0 ? result : g_freq_table_gpu_hz[result - 1];
brls::Logger::debug("Caching freq for module %d and profile %d to %" PRIu32, SysClkModule_GPU, profile, this->profiles.mhzMap[profile][SysClkModule_GPU]);
});
@@ -127,7 +127,7 @@ void AppProfileFrame::addFreqs(brls::List* list, SysClkProfile profile)
memListItem->getValueSelectedEvent()->subscribe([this, profile](int result) {
this->onProfileChanged();
this->profiles.mhzMap[profile][SysClkModule_MEM] = result == 0 ? result : sysclk_g_freq_table_mem_hz[result - 1];
this->profiles.mhzMap[profile][SysClkModule_MEM] = result == 0 ? result : g_freq_table_mem_hz[result - 1];
brls::Logger::debug("Caching freq for module %d and profile %d to %" PRIu32, SysClkModule_MEM, profile, this->profiles.mhzMap[profile][SysClkModule_MEM]);
});

View File

@@ -23,7 +23,7 @@
#include "status_tab.h"
#include "advanced_settings_tab.h"
#include "app_profiles_tab.h"
#include "cheat_sheet_tab.h"
// #include "cheat_sheet_tab.h"
#include "about_tab.h"
#include "logo.h"
@@ -46,7 +46,7 @@ MainFrame::MainFrame() : TabFrame()
this->addSeparator();
this->addTab("Cheat Sheet", new CheatSheetTab());
// this->addTab("Cheat Sheet", new CheatSheetTab());
this->addTab("About", new AboutTab());
}

View File

@@ -200,23 +200,23 @@ StatusTab::StatusTab(RefreshTask *refreshTask) :
void StatusTab::updateWarningForProfile(SysClkProfile profile, bool animated)
{
switch (profile)
{
case SysClkProfile_Handheld:
if (this->warningLabel->isHidden())
this->warningLabel->show([](){});
this->warningLabel->setText("\uE140 Handheld Mode: Max GPU freq: " + formatFreq(SYSCLK_GPU_HANDHELD_MAX_HZ));
break;
case SysClkProfile_HandheldChargingUSB:
if (this->warningLabel->isHidden())
this->warningLabel->show([](){});
this->warningLabel->setText("\uE140 USB Charging Mode: Max GPU freq: " + formatFreq(SYSCLK_GPU_CHARGING_USB_MAX_HZ));
break;
default:
if (!this->warningLabel->isHidden())
this->warningLabel->hide([](){}, animated);
break;
}
// switch (profile)
// {
// case SysClkProfile_Handheld:
// if (this->warningLabel->isHidden())
// this->warningLabel->show([](){});
// this->warningLabel->setText("\uE140 Handheld Mode: Max GPU freq: " + formatFreq(SYSCLK_GPU_HANDHELD_MAX_HZ));
// break;
// case SysClkProfile_HandheldChargingUSB:
// if (this->warningLabel->isHidden())
// this->warningLabel->show([](){});
// this->warningLabel->setText("\uE140 USB Charging Mode: Max GPU freq: " + formatFreq(SYSCLK_GPU_CHARGING_USB_MAX_HZ));
// break;
// default:
// if (!this->warningLabel->isHidden())
// this->warningLabel->hide([](){}, animated);
// break;
// }
}
StatusTab::~StatusTab()

View File

@@ -81,15 +81,15 @@ brls::SelectListItem* createFreqListItem(SysClkModule module, uint32_t selectedF
{
case SysClkModule_CPU:
name = "CPU Frequency";
table = sysclk_g_freq_table_cpu_hz;
table = g_freq_table_cpu_hz;
break;
case SysClkModule_GPU:
name = "GPU Frequency";
table = sysclk_g_freq_table_gpu_hz;
table = g_freq_table_gpu_hz;
break;
case SysClkModule_MEM:
name = "MEM Frequency";
table = sysclk_g_freq_table_mem_hz;
table = g_freq_table_mem_hz;
break;
default:
return nullptr;