9 Commits
0.26 ... 0.27

Author SHA1 Message Date
souldbminersmwc
b8faa12495 Merge branch 'develop' of https://github.com/Horizon-OC/Horizon-OC into develop 2026-01-11 16:36:51 -05:00
souldbminersmwc
1cb739ccdc sysclk: automatically get speedo 2026-01-11 16:36:49 -05:00
Souldbminer
5bf85f7e86 Update README.md 2026-01-11 11:48:25 -05:00
Lightos1
73498b871e Update main.c 2026-01-11 15:12:30 +01:00
Lightos1
94c8a0fd00 Add w2w patching (for 8gb) 2026-01-10 23:00:20 +01:00
Souldbminer
26979fdd43 Modify static.yml for deployment branch and actions
Updated GitHub Actions workflow to deploy from master branch and changed action versions.
2026-01-10 16:46:40 -05:00
souldbminersmwc
b446ba5d80 Update Makefile 2026-01-10 16:45:23 -05:00
souldbminersmwc
c4a450e58d sysclk: fix crashing issue 2026-01-10 16:43:31 -05:00
souldbminersmwc
b7b6153f6e sysclk: refactor speedo code 2026-01-10 15:52:15 -05:00
27 changed files with 223 additions and 92 deletions

42
.github/workflows/static.yml vendored Normal file
View File

@@ -0,0 +1,42 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages
on:
# Runs on pushes targeting the default branch
push:
branches: ["master"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload entire repository
path: './pages/dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1

View File

@@ -35,13 +35,14 @@ It enables advanced CPU, GPU, and RAM tuning with user-friendly configuration to
## Features ## Features
* **CPU:** Up to 1963MHz (Mariko) / 1785MHz (Erista) * **CPU:** Up to 1963MHz (Mariko) / 1785MHz (Erista)
* **GPU:** Up to 1075MHz (Mariko) / 998MHz (Erista) * **GPU:** Up to 1075MHz (Mariko) / 921MHz (Erista)
* **RAM:** Up to 1866MHz (Mariko) / 1600MHz (Erista) * **RAM:** Up to 1866MHz (Mariko) / 1600MHz (Erista)
* Over/undervolting support * Over/undervolting support
* Built-in configurator * Built-in configurator
* Compatible with most homebrew * Compatible with most homebrew
> *Higher (potentially dangerous) frequencies are unlockable via configuration.* > *Higher (potentially dangerous) frequencies are unlockable via configuration.*
> *Erista and Mariko units can usually push a bit further fully safely with a bit of undervolting, however this may not work on all units.*
> *The exact maximum overclock possible varies per console, although most consoles should be able to do this safely.* > *The exact maximum overclock possible varies per console, although most consoles should be able to do this safely.*
--- ---

View File

@@ -496,6 +496,10 @@ namespace ams::ldr::oc::pcv::mariko {
table->burst_mc_regs.mc_emem_arb_timing_r2r = CEIL(table->burst_regs.emc_rext / 4) - 1 + MC_ARB_SFA; table->burst_mc_regs.mc_emem_arb_timing_r2r = CEIL(table->burst_regs.emc_rext / 4) - 1 + MC_ARB_SFA;
} }
if (table->burst_mc_regs.mc_emem_arb_timing_w2w > 1) {
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(tR2W / MC_ARB_DIV) - 1 + MC_ARB_SFA; table->burst_mc_regs.mc_emem_arb_timing_r2w = CEIL(tR2W / MC_ARB_DIV) - 1 + MC_ARB_SFA;
table->burst_mc_regs.mc_emem_arb_timing_w2r = CEIL(tW2R / MC_ARB_DIV) - 1 + MC_ARB_SFA; table->burst_mc_regs.mc_emem_arb_timing_w2r = CEIL(tW2R / MC_ARB_DIV) - 1 + MC_ARB_SFA;

View File

@@ -222,7 +222,7 @@ uint64_t lastFrameNumber = 0;
uint32_t realCPU_Hz = 0; uint32_t realCPU_Hz = 0;
uint32_t realGPU_Hz = 0; uint32_t realGPU_Hz = 0;
uint32_t realRAM_Hz = 0; uint32_t realRAM_Hz = 0;
uint32_t PartLoad[SysClkPartLoad_EnumMax]; uint32_t partLoad[SysClkPartLoad_EnumMax];
uint32_t realCPU_mV = 0; uint32_t realCPU_mV = 0;
uint32_t realGPU_mV = 0; uint32_t realGPU_mV = 0;
uint32_t realVDD2_mV = 0; uint32_t realVDD2_mV = 0;
@@ -578,8 +578,8 @@ void Misc(void*) {
realCPU_Hz = sysclkCTX.realFreqs[SysClkModule_CPU]; realCPU_Hz = sysclkCTX.realFreqs[SysClkModule_CPU];
realGPU_Hz = sysclkCTX.realFreqs[SysClkModule_GPU]; realGPU_Hz = sysclkCTX.realFreqs[SysClkModule_GPU];
realRAM_Hz = sysclkCTX.realFreqs[SysClkModule_MEM]; realRAM_Hz = sysclkCTX.realFreqs[SysClkModule_MEM];
PartLoad[SysClkPartLoad_EMC] = sysclkCTX.PartLoad[SysClkPartLoad_EMC]; partLoad[SysClkPartLoad_EMC] = sysclkCTX.partLoad[SysClkPartLoad_EMC];
PartLoad[SysClkPartLoad_EMCCpu] = sysclkCTX.PartLoad[SysClkPartLoad_EMCCpu]; partLoad[SysClkPartLoad_EMCCpu] = sysclkCTX.partLoad[SysClkPartLoad_EMCCpu];
realCPU_mV = sysclkCTX.voltages[HocClkVoltage_CPU]; realCPU_mV = sysclkCTX.voltages[HocClkVoltage_CPU];
realGPU_mV = sysclkCTX.voltages[HocClkVoltage_GPU]; realGPU_mV = sysclkCTX.voltages[HocClkVoltage_GPU];
@@ -704,8 +704,8 @@ void Misc3(void*) {
if (R_SUCCEEDED(sysclkCheck)) { if (R_SUCCEEDED(sysclkCheck)) {
SysClkContext sysclkCTX; SysClkContext sysclkCTX;
if (R_SUCCEEDED(sysclkIpcGetCurrentContext(&sysclkCTX))) { if (R_SUCCEEDED(sysclkIpcGetCurrentContext(&sysclkCTX))) {
PartLoad[SysClkPartLoad_EMC] = sysclkCTX.PartLoad[SysClkPartLoad_EMC]; partLoad[SysClkPartLoad_EMC] = sysclkCTX.partLoad[SysClkPartLoad_EMC];
PartLoad[SysClkPartLoad_EMCCpu] = sysclkCTX.PartLoad[SysClkPartLoad_EMCCpu]; partLoad[SysClkPartLoad_EMCCpu] = sysclkCTX.partLoad[SysClkPartLoad_EMCCpu];
realCPU_mV = sysclkCTX.voltages[HocClkVoltage_CPU]; realCPU_mV = sysclkCTX.voltages[HocClkVoltage_CPU];
realGPU_mV = sysclkCTX.voltages[HocClkVoltage_GPU]; realGPU_mV = sysclkCTX.voltages[HocClkVoltage_GPU];

View File

@@ -496,8 +496,8 @@ public:
snprintf(CPU_Load_c, sizeof(CPU_Load_c), "%.1f%%", cpu_usageM); snprintf(CPU_Load_c, sizeof(CPU_Load_c), "%.1f%%", cpu_usageM);
snprintf(GPU_Load_c, sizeof(GPU_Load_c), "%d.%d%%", GPU_Load_u / 10, GPU_Load_u % 10); snprintf(GPU_Load_c, sizeof(GPU_Load_c), "%d.%d%%", GPU_Load_u / 10, GPU_Load_u % 10);
snprintf(RAM_Load_c, sizeof(RAM_Load_c), "%hu.%hhu%%", snprintf(RAM_Load_c, sizeof(RAM_Load_c), "%hu.%hhu%%",
PartLoad[SysClkPartLoad_EMC] / 10, partLoad[SysClkPartLoad_EMC] / 10,
PartLoad[SysClkPartLoad_EMC] % 10); partLoad[SysClkPartLoad_EMC] % 10);
mutexUnlock(&mutex_Misc); mutexUnlock(&mutex_Misc);

View File

@@ -446,11 +446,11 @@ public:
); );
if (R_SUCCEEDED(sysclkCheck)) { if (R_SUCCEEDED(sysclkCheck)) {
const int RAM_GPU_Load = PartLoad[SysClkPartLoad_EMC] - PartLoad[SysClkPartLoad_EMCCpu]; const int RAM_GPU_Load = partLoad[SysClkPartLoad_EMC] - partLoad[SysClkPartLoad_EMCCpu];
snprintf(RAM_load_c, sizeof RAM_load_c, snprintf(RAM_load_c, sizeof RAM_load_c,
"%u.%u%% CPU %u.%u%% GPU %u.%u%%", "%u.%u%% CPU %u.%u%% GPU %u.%u%%",
PartLoad[SysClkPartLoad_EMC] / 10, PartLoad[SysClkPartLoad_EMC] % 10, partLoad[SysClkPartLoad_EMC] / 10, partLoad[SysClkPartLoad_EMC] % 10,
PartLoad[SysClkPartLoad_EMCCpu] / 10, PartLoad[SysClkPartLoad_EMCCpu] % 10, partLoad[SysClkPartLoad_EMCCpu] / 10, partLoad[SysClkPartLoad_EMCCpu] % 10,
RAM_GPU_Load / 10, RAM_GPU_Load % 10); RAM_GPU_Load / 10, RAM_GPU_Load % 10);
} }
///Thermal ///Thermal

View File

@@ -821,7 +821,7 @@ public:
if (R_SUCCEEDED(sysclkCheck)) { if (R_SUCCEEDED(sysclkCheck)) {
// Use sys-clk's RAM load if available // Use sys-clk's RAM load if available
snprintf(MICRO_RAM_all_c, sizeof(MICRO_RAM_all_c), "%hu%%", snprintf(MICRO_RAM_all_c, sizeof(MICRO_RAM_all_c), "%hu%%",
PartLoad[SysClkPartLoad_EMC] / 10); partLoad[SysClkPartLoad_EMC] / 10);
} else { } else {
// Calculate percentage manually when sys-clk isn't available // Calculate percentage manually when sys-clk isn't available
const uint64_t RAM_Total_all = RAM_Total_application_u + RAM_Total_applet_u + RAM_Total_system_u + RAM_Total_systemunsafe_u; const uint64_t RAM_Total_all = RAM_Total_application_u + RAM_Total_applet_u + RAM_Total_system_u + RAM_Total_systemunsafe_u;

View File

@@ -994,11 +994,11 @@ public:
unsigned PartLoadInt; unsigned PartLoadInt;
if (R_SUCCEEDED(sysclkCheck)) { if (R_SUCCEEDED(sysclkCheck)) {
PartLoadInt = PartLoad[SysClkPartLoad_EMC] / 10; PartLoadInt = partLoad[SysClkPartLoad_EMC] / 10;
if (settings.showRAMLoadCPUGPU) { if (settings.showRAMLoadCPUGPU) {
unsigned ramCpuLoadInt = PartLoad[SysClkPartLoad_EMCCpu] / 10; unsigned ramCpuLoadInt = partLoad[SysClkPartLoad_EMCCpu] / 10;
int RAM_GPU_Load = PartLoad[SysClkPartLoad_EMC] - PartLoad[SysClkPartLoad_EMCCpu]; int RAM_GPU_Load = partLoad[SysClkPartLoad_EMC] - partLoad[SysClkPartLoad_EMCCpu];
unsigned ramGpuLoadInt = RAM_GPU_Load / 10; unsigned ramGpuLoadInt = RAM_GPU_Load / 10;
if (settings.realFrequencies && realRAM_Hz) { if (settings.realFrequencies && realRAM_Hz) {

View File

@@ -907,6 +907,7 @@ int main(int argc, char* argv[])
(based on tinymembench-pthread, a multi-thread fork of simple benchmark for memory throughput and latency)\n\n"); (based on tinymembench-pthread, a multi-thread fork of simple benchmark for memory throughput and latency)\n\n");
printf("Copyright (c) 2011-2016 Siarhei Siamashka\n"); printf("Copyright (c) 2011-2016 Siarhei Siamashka\n");
printf("Copyright (c) 2023 KazushiMe\n"); printf("Copyright (c) 2023 KazushiMe\n");
printf("Copyright (c) 2023 hanai3Bi\n");
printf("Copyright (c) 2025 Souldbminer\n"); printf("Copyright (c) 2025 Souldbminer\n");
printf("\n"); printf("\n");
@@ -1074,4 +1075,4 @@ latency:
// Deinitialize and clean up resources used by the console (important!) // Deinitialize and clean up resources used by the console (important!)
consoleExit(NULL); consoleExit(NULL);
return 0; return 0;
} }

View File

@@ -39,13 +39,14 @@ typedef struct
uint32_t overrideFreqs[SysClkModule_EnumMax]; uint32_t overrideFreqs[SysClkModule_EnumMax];
uint32_t temps[SysClkThermalSensor_EnumMax]; uint32_t temps[SysClkThermalSensor_EnumMax];
int32_t power[SysClkPowerSensor_EnumMax]; int32_t power[SysClkPowerSensor_EnumMax];
uint32_t PartLoad[SysClkPartLoad_EnumMax]; uint32_t partLoad[SysClkPartLoad_EnumMax];
uint32_t voltages[HocClkVoltage_EnumMax]; uint32_t voltages[HocClkVoltage_EnumMax];
u16 speedos[HorizonOCSpeedo_EnumMax]; u16 speedos[HorizonOCSpeedo_EnumMax];
uint32_t perfConfId; u16 iddq[HorizonOCSpeedo_EnumMax];
u8 maxDisplayFreq; u8 maxDisplayFreq;
u8 fps; u8 fps;
u8 dramID; u8 dramID;
bool isDram8GB;
} SysClkContext; } SysClkContext;
typedef struct typedef struct

View File

@@ -30,6 +30,7 @@ IS_MINIMAL := 0
APP_TITLE := Horizon OC APP_TITLE := Horizon OC
NO_ICON := 1 NO_ICON := 1
# This location should reflect where you place the libultrahand directory (lib can vary between projects). # This location should reflect where you place the libultrahand directory (lib can vary between projects).
include ${TOPDIR}/lib/libultrahand/ultrahand.mk include ${TOPDIR}/lib/libultrahand/ultrahand.mk

View File

@@ -259,9 +259,9 @@ void BaseMenuGui::refresh()
sprintf(displayStrings[16], "%d mW", context->power[1]); // Avg sprintf(displayStrings[16], "%d mW", context->power[1]); // Avg
sprintf(displayStrings[17], "%u%%", context->PartLoad[HocClkPartLoad_GPU] / 10); sprintf(displayStrings[17], "%u%%", context->partLoad[HocClkPartLoad_GPU] / 10);
sprintf(displayStrings[18], "%u%%", context->PartLoad[SysClkPartLoad_EMC] / 10); sprintf(displayStrings[18], "%u%%", context->partLoad[SysClkPartLoad_EMC] / 10);
// sprintf(displayStrings[19], "%u", context->PartLoad[HocClkPartLoad_CPUAvg]); // sprintf(displayStrings[19], "%u", context->partLoad[HocClkPartLoad_CPUAvg]);
millis = context->temps[HorizonOCThermalSensor_Battery]; // Battery millis = context->temps[HorizonOCThermalSensor_Battery]; // Battery
sprintf(displayStrings[20], "%u.%u °C", millis / 1000U, (millis % 1000U) / 100U); sprintf(displayStrings[20], "%u.%u °C", millis / 1000U, (millis % 1000U) / 100U);
@@ -269,9 +269,9 @@ void BaseMenuGui::refresh()
sprintf(displayStrings[21], "%d mV", context->voltages[HocClkVoltage_Battery]); // BAT AVG sprintf(displayStrings[21], "%d mV", context->voltages[HocClkVoltage_Battery]); // BAT AVG
sprintf(displayStrings[23], "%u%%", context->PartLoad[HocClkPartLoad_BAT] / 1000); sprintf(displayStrings[23], "%u%%", context->partLoad[HocClkPartLoad_BAT] / 1000);
sprintf(displayStrings[24], "%u%%", context->PartLoad[HocClkPartLoad_FAN]); sprintf(displayStrings[24], "%u%%", context->partLoad[HocClkPartLoad_FAN]);
sprintf(displayStrings[25], "%u Hz", context->realFreqs[HorizonOCModule_Display]); sprintf(displayStrings[25], "%u Hz", context->realFreqs[HorizonOCModule_Display]);

View File

@@ -40,7 +40,7 @@ void FatalGui::openWithResultCode(std::string tag, Result rc)
info.append(rcStr, snprintf(rcStr, sizeof(rcStr), "\n\n[0x%x] %04d-%04d", rc, R_MODULE(rc), R_DESCRIPTION(rc))); info.append(rcStr, snprintf(rcStr, sizeof(rcStr), "\n\n[0x%x] %04d-%04d", rc, R_MODULE(rc), R_DESCRIPTION(rc)));
tsl::changeTo<FatalGui>( tsl::changeTo<FatalGui>(
"Could not connect to Horizon OC sysmodule.\n\n" "Could not connect to hoc-clk sysmodule.\n\n"
"\n" "\n"
"Please make sure everything is\n\n" "Please make sure everything is\n\n"
"correctly installed and enabled.", "correctly installed and enabled.",

View File

@@ -1,3 +1,20 @@
/*
*
* Copyright (c) Souldbminer and Horizon OC Contributors
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "../format.h" #include "../format.h"
#include "fatal_gui.h" #include "fatal_gui.h"
#include "global_override_gui.h" #include "global_override_gui.h"

View File

@@ -17,14 +17,14 @@
#include "../format.h" #include "../format.h"
#include <tesla.hpp> #include <tesla.hpp>
#include <string> #include <string>
tsl::elm::ListItem* cpuSpeedoItem;
tsl::elm::ListItem* gpuSpeedoItem; tsl::elm::ListItem* SpeedoItem;
tsl::elm::ListItem* socSpeedoItem; tsl::elm::ListItem* IddqItem;
InfoGui::InfoGui() InfoGui::InfoGui()
{ {
// Initialize display strings // Initialize display strings
memset(speedoStrings, 0, sizeof(speedoStrings)); memset(strings, 0, sizeof(strings));
} }
InfoGui::~InfoGui() InfoGui::~InfoGui()
@@ -33,17 +33,14 @@ InfoGui::~InfoGui()
void InfoGui::listUI() void InfoGui::listUI()
{ {
cpuSpeedoItem = SpeedoItem =
new tsl::elm::ListItem("CPU Speedo"); new tsl::elm::ListItem("Speedos:");
this->listElement->addItem(cpuSpeedoItem); this->listElement->addItem(SpeedoItem);
gpuSpeedoItem = IddqItem =
new tsl::elm::ListItem("GPU Speedo"); new tsl::elm::ListItem("IDDQ:");
this->listElement->addItem(gpuSpeedoItem); this->listElement->addItem(IddqItem);
socSpeedoItem =
new tsl::elm::ListItem("SOC Speedo");
this->listElement->addItem(socSpeedoItem);
} }
void InfoGui::update() void InfoGui::update()
@@ -58,12 +55,10 @@ void InfoGui::refresh()
if (!this->context) if (!this->context)
return; return;
// Format speedo strings once per refresh // Format strings once per refresh
sprintf(speedoStrings[0], "%u", this->context->speedos[HorizonOCSpeedo_CPU]); sprintf(strings[0], "%u/%u/%u", this->context->speedos[HorizonOCSpeedo_CPU], this->context->speedos[HorizonOCSpeedo_GPU], this->context->speedos[HorizonOCSpeedo_SOC]);
sprintf(speedoStrings[1], "%u", this->context->speedos[HorizonOCSpeedo_GPU]); sprintf(strings[1], "%u/%u/%u", this->context->iddq[HorizonOCSpeedo_CPU], this->context->iddq[HorizonOCSpeedo_GPU], this->context->iddq[HorizonOCSpeedo_SOC]);
sprintf(speedoStrings[2], "%u", this->context->speedos[HorizonOCSpeedo_SOC]); SpeedoItem->setValue(strings[0]);
cpuSpeedoItem->setValue(speedoStrings[HorizonOCSpeedo_CPU]); // this is SO hacky but it works i guess IddqItem->setValue(strings[1]);
gpuSpeedoItem->setValue(speedoStrings[HorizonOCSpeedo_GPU]);
socSpeedoItem->setValue(speedoStrings[HorizonOCSpeedo_SOC]);
} }

View File

@@ -25,7 +25,7 @@
class InfoGui : public BaseMenuGui class InfoGui : public BaseMenuGui
{ {
protected: protected:
char speedoStrings[3][16]; // Pre-formatted speedo strings char strings[32][32]; // Pre-formatted strings
public: public:
InfoGui(); InfoGui();

View File

@@ -16,7 +16,6 @@
* *
*/ */
#include "misc_gui.h" #include "misc_gui.h"
#include "fatal_gui.h" #include "fatal_gui.h"
#include "../format.h" #include "../format.h"

View File

@@ -1,3 +1,21 @@
/*
*
* Copyright (c) Souldbminer and Horizon OC Contributors
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once #pragma once
#include "../../ipc.h" #include "../../ipc.h"
#include "base_menu_gui.h" #include "base_menu_gui.h"

View File

@@ -1,3 +1,21 @@
/*
*
* Copyright (c) Souldbminer and Horizon OC Contributors
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "value_choice_gui.h" #include "value_choice_gui.h"
#include "../format.h" #include "../format.h"
#include "fatal_gui.h" #include "fatal_gui.h"

View File

@@ -1,3 +1,21 @@
/*
*
* Copyright (c) Souldbminer and Horizon OC Contributors
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once #pragma once
#include <list> #include <list>
#include <functional> #include <functional>

View File

@@ -57,24 +57,6 @@
"is_io": true "is_io": true
} }
}, },
{
"type": "map",
"value": {
"address": "0x700E2000",
"size": "0x1000",
"is_ro": false,
"is_io": true
}
},
{
"type": "map",
"value": {
"address": "0x7000F800",
"size": "0x400",
"is_ro": false,
"is_io": true
}
},
{ {
"type": "syscalls", "type": "syscalls",
"value": { "value": {

View File

@@ -323,17 +323,34 @@ void Board::fuseReadSpeedos() {
svcCloseHandle(debug); svcCloseHandle(debug);
} }
u16 Board::getCPUSpeedo() { u16 Board::getSpeedo(HorizonOCSpeedo speedoType) {
return cpuSpeedo0; switch(speedoType) {
case HorizonOCSpeedo_CPU:
return cpuSpeedo0;
case HorizonOCSpeedo_GPU:
return cpuSpeedo2;
case HorizonOCSpeedo_SOC:
return socSpeedo0;
default:
ASSERT_ENUM_VALID(HorizonOCSpeedo, speedoType);
return 0;
}
} }
u16 Board::getGPUSpeedo() { u16 Board::getIDDQ(HorizonOCSpeedo speedoType) {
return cpuSpeedo2; switch(speedoType) {
case HorizonOCSpeedo_CPU:
return cpuIDDQ;
case HorizonOCSpeedo_GPU:
return gpuIDDQ;
case HorizonOCSpeedo_SOC:
return socIDDQ;
default:
ASSERT_ENUM_VALID(HorizonOCSpeedo, speedoType);
return 0;
}
} }
u16 Board::getSOCSpeedo() {
return socSpeedo0;
}
void Board::Exit() void Board::Exit()
{ {
@@ -1066,3 +1083,17 @@ void Board::UpdateShadowRegs(u32 tRCD_i, u32 tRP_i, u32 tRAS_i, u32 tRRD_i, u32
WRITE_REGISTER_MC(MC_TIMING_CONTROL_0, 0x1); // update timing regs as they are shadowed WRITE_REGISTER_MC(MC_TIMING_CONTROL_0, 0x1); // update timing regs as they are shadowed
WRITE_REGISTER_EMC(EMC_TIMING_CONTROL_0, 0x1); WRITE_REGISTER_EMC(EMC_TIMING_CONTROL_0, 0x1);
} }
bool Board::IsDram8GB() {
SecmonArgs args = {};
args.X[0] = 0xF0000002;
args.X[1] = MC_REGISTER_BASE + MC_EMEM_CFG_0;
svcCallSecureMonitor(&args);
if(args.X[1] == (MC_REGISTER_BASE + MC_EMEM_CFG_0)) { // if param 1 is identical read failed
writeNotification("Horizon OC\nSecmon read failed!\n This may be a hardware issue!");
return false;
} else
return args.X[1] == 0x00002000 ? true : false;
}

View File

@@ -34,9 +34,8 @@ class Board
{ {
public: public:
static void fuseReadSpeedos(); static void fuseReadSpeedos();
static u16 getCPUSpeedo(); static u16 getSpeedo(HorizonOCSpeedo speedoType);
static u16 getGPUSpeedo(); static u16 getIDDQ(HorizonOCSpeedo speedoType);
static u16 getSOCSpeedo();
static const char* GetProfileName(SysClkProfile profile, bool pretty); static const char* GetProfileName(SysClkProfile profile, bool pretty);
static const char* GetModuleName(SysClkModule module, bool pretty); static const char* GetModuleName(SysClkModule module, bool pretty);
static const char* GetThermalSensorName(SysClkThermalSensor sensor, bool pretty); static const char* GetThermalSensorName(SysClkThermalSensor sensor, bool pretty);
@@ -63,6 +62,7 @@ class Board
static u8 GetFanRotationLevel(); static u8 GetFanRotationLevel();
static u8 GetDramID(); static u8 GetDramID();
static void UpdateShadowRegs(u32 tRCD_i, u32 tRP_i, u32 tRAS_i, u32 tRRD_i, u32 tRFC_i, u32 tRTW_i, u32 tWTR_i, u32 tREFpb_i, u32 ramFreq, u32 rlAdd, u32 wlAdd, bool hpMode); static void UpdateShadowRegs(u32 tRCD_i, u32 tRP_i, u32 tRAS_i, u32 tRRD_i, u32 tRFC_i, u32 tRTW_i, u32 tWTR_i, u32 tREFpb_i, u32 ramFreq, u32 rlAdd, u32 wlAdd, bool hpMode);
static bool IsDram8GB();
protected: protected:
static void FetchHardwareInfos(); static void FetchHardwareInfos();
static PcvModule GetPcvModule(SysClkModule sysclkModule); static PcvModule GetPcvModule(SysClkModule sysclkModule);

View File

@@ -102,12 +102,14 @@ ClockManager::ClockManager()
); );
threadStart(&governorTHREAD); threadStart(&governorTHREAD);
this->context->speedos[HorizonOCSpeedo_CPU] = Board::getCPUSpeedo(); for(int i = 0; i < HorizonOCSpeedo_EnumMax; i++) {
this->context->speedos[HorizonOCSpeedo_GPU] = Board::getGPUSpeedo(); this->context->speedos[i] = Board::getSpeedo((HorizonOCSpeedo)i);
this->context->speedos[HorizonOCSpeedo_SOC] = Board::getSOCSpeedo(); this->context->iddq[i] = Board::getIDDQ((HorizonOCSpeedo)i);
}
this->context->dramID = Board::GetDramID(); this->context->dramID = Board::GetDramID();
this->context->isDram8GB = Board::IsDram8GB();
} }
void ClockManager::FixCpuBug() { void ClockManager::FixCpuBug() {
@@ -666,7 +668,7 @@ bool ClockManager::RefreshContext()
// ram load do not and should not force a refresh, hasChanged untouched // ram load do not and should not force a refresh, hasChanged untouched
for (unsigned int loadSource = 0; loadSource < SysClkPartLoad_EnumMax; loadSource++) for (unsigned int loadSource = 0; loadSource < SysClkPartLoad_EnumMax; loadSource++)
{ {
this->context->PartLoad[loadSource] = Board::GetPartLoad((SysClkPartLoad)loadSource); this->context->partLoad[loadSource] = Board::GetPartLoad((SysClkPartLoad)loadSource);
} }
for (unsigned int voltageSource = 0; voltageSource < HocClkVoltage_EnumMax; voltageSource++) for (unsigned int voltageSource = 0; voltageSource < HocClkVoltage_EnumMax; voltageSource++)
@@ -918,7 +920,7 @@ void ClockManager::GetKipData() {
configValues.values[KipConfigValue_marikoGpuVmin] = cust_get_mariko_gpu_vmin(&table); configValues.values[KipConfigValue_marikoGpuVmin] = cust_get_mariko_gpu_vmin(&table);
configValues.values[KipConfigValue_marikoGpuVmax] = cust_get_mariko_gpu_vmax(&table); configValues.values[KipConfigValue_marikoGpuVmax] = cust_get_mariko_gpu_vmax(&table);
configValues.values[KipConfigValue_commonGpuVoltOffset] = cust_get_common_gpu_offset(&table); configValues.values[KipConfigValue_commonGpuVoltOffset] = cust_get_common_gpu_offset(&table);
configValues.values[KipConfigValue_gpuSpeedo] = cust_get_gpu_speedo(&table); configValues.values[KipConfigValue_gpuSpeedo] = Board::getSpeedo(HorizonOCSpeedo_GPU); // cust_get_gpu_speedo(&table);
for (int i = 0; i < 24; i++) { for (int i = 0; i < 24; i++) {
configValues.values[KipConfigValue_g_volt_76800 + i] = cust_get_mariko_gpu_volt(&table, i); configValues.values[KipConfigValue_g_volt_76800 + i] = cust_get_mariko_gpu_volt(&table, i);
@@ -1037,7 +1039,7 @@ void ClockManager::calculateGpuVmin (void)
SysClkConfigValueList configValues; SysClkConfigValueList configValues;
this->config->GetConfigValues(&configValues); this->config->GetConfigValues(&configValues);
int speedo = Board::getGPUSpeedo(), freq = this->config->GetConfigValue(KipConfigValue_marikoEmcMaxClock); int speedo = Board::getSpeedo(HorizonOCSpeedo_CPU), freq = this->config->GetConfigValue(KipConfigValue_marikoEmcMaxClock);
configValues.values[KipConfigValue_marikoGpuVmin] = GetGpuVoltage(freq, speedo); configValues.values[KipConfigValue_marikoGpuVmin] = GetGpuVoltage(freq, speedo);
this->config->SetConfigValues(&configValues, true); this->config->SetConfigValues(&configValues, true);
} }

19
dist/README.md vendored
View File

@@ -66,11 +66,10 @@ It enables advanced CPU, GPU, and RAM tuning with user-friendly configuration to
## Configuration ## Configuration
1. Download the latest **Configurator** on your computer. 1. Open the Horizon OC Overlay
2. Run the executable. 2. Open the settings menu
3. Select your SD card or UMS drive. 3. Adjust your overclocking settings as desired.
4. Adjust overclocking settings as desired. 4. Click **Save KIP Settings** to apply your configuration.
5. Click **Save** to apply your configuration.
--- ---
@@ -81,16 +80,18 @@ Refer to COMPILATION.md
--- ---
## Credits ## Credits
* **Lightos** loader patches development
* **Lightos's Cat** - Cat * **Lightos's Cat** - Cat
* **Souldbminer** hoc-clk and loader development
* **Lightos** loader patches development
* **SciresM** - Atmosphere CFW * **SciresM** - Atmosphere CFW
* **KazushiMe** Switch OC Suite * **KazushiMe** Switch OC Suite
* **hanai3bi** Switch OC Suite, EOS, sys-clk-eos * **hanai3bi (meha)** Switch OC Suite, EOS, sys-clk-eos
* **NaGaa95** L4T-OC-kernel * **NaGaa95** L4T-OC-kernel
* **B3711 (halop)** EOS * **B3711 (halop)** EOS
* **sys-clk team** sys-clk * **sys-clk team (m4xw, p-sam, nautalis)** sys-clk
* **b0rd2death** Ultrahand sys-clk & Status Monitor fork * **b0rd2death** Ultrahand sys-clk & Status Monitor fork
* **MasaGratoR and ZachyCatGames** - General help * **MasaGratoR and ZachyCatGames** - General help
* **MasaGratoR** - Status Monitor & Display Refresh Rate Driver * **MasaGratoR** - Status Monitor & Display Refresh Rate Driver
* **Dom, Samybigio, Arcdelta, Miki, Happy, Flopsider, Winnerboi77, Blaise, Alvise, TDRR, agjeococh and Xenshen** - Testing * **Dom, Samybigio, Arcdelta, Miki, Happy, Flopsider, Winnerboi77, Blaise, Alvise, TDRR, agjeococh and Xenshen** - Testing
* **Samybigio2011** - Italian translations