From 33c49aac86e801253ec2130e31d82c7dc45fe4a0 Mon Sep 17 00:00:00 2001 From: souldbminersmwc Date: Sun, 4 Jan 2026 19:04:18 -0500 Subject: [PATCH] sysclk - start minimal integrations --- Source/sys-clk/common/include/i2c.h | 5 ++++ Source/sys-clk/common/src/i2c.cpp | 5 ++++ Source/sys-clk/overlay/Makefile | 1 + .../overlay/src/ui/gui/app_profile_gui.cpp | 14 ++++++----- .../src/ui/gui/global_override_gui.cpp | 6 +++-- .../sys-clk/overlay/src/ui/gui/main_gui.cpp | 23 ++++++++++--------- Source/sys-clk/sysmodule/Makefile | 1 - .../sys-clk/sysmodule/src/clock_manager.cpp | 4 +++- Source/sys-clk/sysmodule/src/emc_mc_defs.h | 18 +++++++++++++++ Source/sys-clk/sysmodule/src/integrations.cpp | 18 +++++++++++++++ Source/sys-clk/sysmodule/src/integrations.h | 18 +++++++++++++++ Source/sys-clk/sysmodule/src/kip.h | 18 +++++++++++++++ Source/sys-clk/sysmodule/src/main.cpp | 1 - 13 files changed, 110 insertions(+), 22 deletions(-) diff --git a/Source/sys-clk/common/include/i2c.h b/Source/sys-clk/common/include/i2c.h index 300229f5..feb7c9fb 100644 --- a/Source/sys-clk/common/include/i2c.h +++ b/Source/sys-clk/common/include/i2c.h @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 KazushiMe + * Licensed under the GPLv2 + */ + #pragma once #include diff --git a/Source/sys-clk/common/src/i2c.cpp b/Source/sys-clk/common/src/i2c.cpp index 07425514..6100afd0 100644 --- a/Source/sys-clk/common/src/i2c.cpp +++ b/Source/sys-clk/common/src/i2c.cpp @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 KazushiMe + * Licensed under the GPLv2 + */ + #include "i2c.h" Result I2cSet_U8(I2cDevice dev, u8 reg, u8 val) { diff --git a/Source/sys-clk/overlay/Makefile b/Source/sys-clk/overlay/Makefile index 6c2f85ee..d233aea5 100644 --- a/Source/sys-clk/overlay/Makefile +++ b/Source/sys-clk/overlay/Makefile @@ -25,6 +25,7 @@ SOURCES := src src/ui/gui src/ui/elements ../common/src ../common/src/client DATA := data INCLUDES := ../common/include EXEFS_SRC := exefs_src +IS_MINIMAL := 0 APP_TITLE := Horizon OC NO_ICON := 1 diff --git a/Source/sys-clk/overlay/src/ui/gui/app_profile_gui.cpp b/Source/sys-clk/overlay/src/ui/gui/app_profile_gui.cpp index f3414de8..67fcd263 100644 --- a/Source/sys-clk/overlay/src/ui/gui/app_profile_gui.cpp +++ b/Source/sys-clk/overlay/src/ui/gui/app_profile_gui.cpp @@ -271,12 +271,14 @@ void AppProfileGui::addProfileUI(SysClkProfile profile) this->addModuleListItem(profile, SysClkModule_CPU); this->addModuleListItem(profile, SysClkModule_GPU); this->addModuleListItem(profile, SysClkModule_MEM); - if(!IsHoag()) { - if(profile != SysClkProfile_Docked) - this->addModuleListItemValue(profile, HorizonOCModule_Display, "Display", 40, 72, 1, " Hz", 1, 0); - else - this->addModuleListItemValue(profile, HorizonOCModule_Display, "Display", 50, 120, 5, " Hz", 1, 0); - } + #ifndef IS_MINIMAL + if(!IsHoag()) { + if(profile != SysClkProfile_Docked) + this->addModuleListItemValue(profile, HorizonOCModule_Display, "Display", 40, 72, 1, " Hz", 1, 0); + else + this->addModuleListItemValue(profile, HorizonOCModule_Display, "Display", 50, 120, 5, " Hz", 1, 0); + } + #endif this->addModuleListItemToggle(profile, HorizonOCModule_Governor); } diff --git a/Source/sys-clk/overlay/src/ui/gui/global_override_gui.cpp b/Source/sys-clk/overlay/src/ui/gui/global_override_gui.cpp index 29c397a8..801cf2b9 100644 --- a/Source/sys-clk/overlay/src/ui/gui/global_override_gui.cpp +++ b/Source/sys-clk/overlay/src/ui/gui/global_override_gui.cpp @@ -255,8 +255,10 @@ void GlobalOverrideGui::listUI() this->addModuleListItem(SysClkModule_CPU); this->addModuleListItem(SysClkModule_GPU); this->addModuleListItem(SysClkModule_MEM); - if(!IsHoag()) - this->addModuleListItemValue(HorizonOCModule_Display, "Display", 40, 72, 1, " Hz", 1, 0); + #ifndef IS_MINIMAL + if(!IsHoag()) + this->addModuleListItemValue(HorizonOCModule_Display, "Display", 40, 72, 1, " Hz", 1, 0); + #endif this->addModuleToggleItem(HorizonOCModule_Governor); } 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 aa8bb42f..656c13b4 100644 --- a/Source/sys-clk/overlay/src/ui/gui/main_gui.cpp +++ b/Source/sys-clk/overlay/src/ui/gui/main_gui.cpp @@ -97,18 +97,19 @@ void MainGui::listUI() return false; }); this->listElement->addItem(miscItem); + #ifndef IS_MINIMAL + tsl::elm::ListItem* infoItem = new tsl::elm::ListItem("Information"); + infoItem->setClickListener([this](u64 keys) { + if((keys & HidNpadButton_A) == HidNpadButton_A && this->context) + { + tsl::changeTo(); + return true; + } - tsl::elm::ListItem* infoItem = new tsl::elm::ListItem("Information"); - infoItem->setClickListener([this](u64 keys) { - if((keys & HidNpadButton_A) == HidNpadButton_A && this->context) - { - tsl::changeTo(); - return true; - } - - return false; - }); - this->listElement->addItem(infoItem); + return false; + }); + this->listElement->addItem(infoItem); + #endif } void MainGui::refresh() diff --git a/Source/sys-clk/sysmodule/Makefile b/Source/sys-clk/sysmodule/Makefile index 097e5252..c5bd564a 100644 --- a/Source/sys-clk/sysmodule/Makefile +++ b/Source/sys-clk/sysmodule/Makefile @@ -18,7 +18,6 @@ include $(DEVKITPRO)/libnx/switch_rules # EXEFS_SRC is the optional input directory containing data copied into exefs, if anything this normally should only contain "main.npdm". #--------------------------------------------------------------------------------- TARGET := horizon-oc -KIP_CUST_REV := 1 BUILD := build OUTDIR := out RESOURCES := res diff --git a/Source/sys-clk/sysmodule/src/clock_manager.cpp b/Source/sys-clk/sysmodule/src/clock_manager.cpp index 54c6dcc5..35e94c75 100644 --- a/Source/sys-clk/sysmodule/src/clock_manager.cpp +++ b/Source/sys-clk/sysmodule/src/clock_manager.cpp @@ -991,4 +991,6 @@ void ClockManager::calculateGpuVmin (void) configValues.values[KipConfigValue_marikoGpuVmin] = GetGpuVoltage(freq, speedo); this->config->SetConfigValues(&configValues, true); } -} \ No newline at end of file +} + +void ClockManager::CalculatePMICLimit(void) {} \ No newline at end of file diff --git a/Source/sys-clk/sysmodule/src/emc_mc_defs.h b/Source/sys-clk/sysmodule/src/emc_mc_defs.h index abc7648b..8bddf98b 100644 --- a/Source/sys-clk/sysmodule/src/emc_mc_defs.h +++ b/Source/sys-clk/sysmodule/src/emc_mc_defs.h @@ -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 . + * + */ + + #pragma once #define EMC_INTSTATUS_0 0x0 diff --git a/Source/sys-clk/sysmodule/src/integrations.cpp b/Source/sys-clk/sysmodule/src/integrations.cpp index 7ac0b04e..935ed91e 100644 --- a/Source/sys-clk/sysmodule/src/integrations.cpp +++ b/Source/sys-clk/sysmodule/src/integrations.cpp @@ -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 . + * + */ + + #include "integrations.h" ReverseNXSync::ReverseNXSync() diff --git a/Source/sys-clk/sysmodule/src/integrations.h b/Source/sys-clk/sysmodule/src/integrations.h index 19678641..34a8e04f 100644 --- a/Source/sys-clk/sysmodule/src/integrations.h +++ b/Source/sys-clk/sysmodule/src/integrations.h @@ -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 . + * + */ + + #pragma once #include #include diff --git a/Source/sys-clk/sysmodule/src/kip.h b/Source/sys-clk/sysmodule/src/kip.h index 2e87a151..3a67621d 100644 --- a/Source/sys-clk/sysmodule/src/kip.h +++ b/Source/sys-clk/sysmodule/src/kip.h @@ -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 . + * + */ + + #pragma once #include #include diff --git a/Source/sys-clk/sysmodule/src/main.cpp b/Source/sys-clk/sysmodule/src/main.cpp index d092e48d..bb320b31 100644 --- a/Source/sys-clk/sysmodule/src/main.cpp +++ b/Source/sys-clk/sysmodule/src/main.cpp @@ -24,7 +24,6 @@ * -------------------------------------------------------------------------- */ - #include #include #include