final hoc 2.0.0 changes
This commit is contained in:
@@ -42,9 +42,9 @@ volatile CustomizeTable C = {
|
||||
|
||||
/* Available: 66MHz step rate, 100MHz step rate and jedec. */
|
||||
/* Jedec freqs are 1333MHz, 1600MHz, 1866MHz, 2133MHz, 2400MHz, 2666MHz, 2933MHz, 3200MHz. */
|
||||
.stepMode = StepMode_66MHz,
|
||||
.stepMode = StepMode_Jedec,
|
||||
|
||||
.marikoEmcMaxClock = 1866000, /* 1866MHz @ 1866tWRL is guaranteed to work on all Mariko units */
|
||||
.marikoEmcMaxClock = 2133000, /* 1866MHz @ 1866tWRL is guaranteed to work on all Mariko units */
|
||||
.marikoEmcVddqVolt = 600000,
|
||||
.emcDvbShift = 0,
|
||||
|
||||
@@ -96,8 +96,8 @@ volatile CustomizeTable C = {
|
||||
* 1331WL = 12
|
||||
*/
|
||||
|
||||
.mem_burst_read_latency = RL_1866,
|
||||
.mem_burst_write_latency = WL_1866,
|
||||
.mem_burst_read_latency = RL_2133,
|
||||
.mem_burst_write_latency = WL_2133,
|
||||
|
||||
.eristaCpuUV = 0,
|
||||
.eristaCpuVmin = 800,
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define CUST_REV 1
|
||||
#define CUST_REV 2
|
||||
|
||||
#include "oc_common.hpp"
|
||||
#include "pcv/pcv_common.hpp"
|
||||
|
||||
@@ -33,19 +33,20 @@
|
||||
#include <switch/types.h>
|
||||
typedef enum
|
||||
{
|
||||
HocClkSocType_Erista = 0,
|
||||
HocClkSocType_Mariko,
|
||||
HocClkSocType_Erista = 0, // T210, found in Icosa and Copper
|
||||
HocClkSocType_Mariko, // T214/T210B01, found in Hoag, Iowa, Calcio and Aula
|
||||
// HocClkSocType_Drake, // T239, found in Switch 2. Maybe someday...
|
||||
HocClkSocType_EnumMax
|
||||
} HocClkSocType;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
HocClkConsoleType_Icosa = 0,
|
||||
HocClkConsoleType_Copper,
|
||||
HocClkConsoleType_Hoag,
|
||||
HocClkConsoleType_Iowa,
|
||||
HocClkConsoleType_Calcio,
|
||||
HocClkConsoleType_Aula,
|
||||
HocClkConsoleType_Icosa = 0, // V1
|
||||
HocClkConsoleType_Copper, // Unreleased Erista
|
||||
HocClkConsoleType_Hoag, // Lite
|
||||
HocClkConsoleType_Iowa, // V2
|
||||
HocClkConsoleType_Calcio, // Unreleased Mariko
|
||||
HocClkConsoleType_Aula, // OLED
|
||||
HocClkConsoleType_EnumMax,
|
||||
} HocClkConsoleType;
|
||||
|
||||
@@ -54,7 +55,7 @@ typedef enum {
|
||||
HocClkVoltage_EMCVDD2,
|
||||
HocClkVoltage_CPU,
|
||||
HocClkVoltage_GPU,
|
||||
HocClkVoltage_EMCVDDQ,
|
||||
HocClkVoltage_EMCVDDQ, // Returns VDD2 on Erista
|
||||
HocClkVoltage_Display,
|
||||
HocClkVoltage_Battery,
|
||||
HocClkVoltage_EnumMax,
|
||||
@@ -63,10 +64,10 @@ typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
HocClkProfile_Handheld = 0,
|
||||
HocClkProfile_HandheldCharging,
|
||||
HocClkProfile_HandheldCharging, // Not a real profile, just a marker
|
||||
HocClkProfile_HandheldChargingUSB,
|
||||
HocClkProfile_HandheldChargingOfficial,
|
||||
HocClkProfile_Docked,
|
||||
HocClkProfile_Docked, // Not shown on Lites
|
||||
HocClkProfile_EnumMax
|
||||
} HocClkProfile;
|
||||
|
||||
@@ -86,11 +87,11 @@ typedef enum
|
||||
HocClkThermalSensor_PCB,
|
||||
HocClkThermalSensor_Skin,
|
||||
HocClkThermalSensor_Battery,
|
||||
HocClkThermalSensor_PMIC,
|
||||
HocClkThermalSensor_PMIC, // Always return 50.0C, as thats the only reasonable value the PMIC sensor can generate
|
||||
HocClkThermalSensor_CPU,
|
||||
HocClkThermalSensor_GPU,
|
||||
HocClkThermalSensor_MEM,
|
||||
HocClkThermalSensor_PLLX,
|
||||
HocClkThermalSensor_MEM, // Returns the PLLX sensor value on Mariko
|
||||
HocClkThermalSensor_PLLX,
|
||||
HocClkThermalSensor_EnumMax
|
||||
} HocClkThermalSensor;
|
||||
|
||||
@@ -107,12 +108,12 @@ typedef enum
|
||||
HocClkPartLoad_EMCCpu,
|
||||
HocClkPartLoad_GPU,
|
||||
HocClkPartLoad_CPUMax,
|
||||
HocClkPartLoad_BAT,
|
||||
HocClkPartLoad_BAT, // Battery raw charge percentage
|
||||
HocClkPartLoad_FAN,
|
||||
HocClkPartLoad_RamBWAll,
|
||||
HocClkPartLoad_RamBWCpu,
|
||||
HocClkPartLoad_RamBWGpu,
|
||||
HocClkPartLoad_RamBWPeak,
|
||||
HocClkPartLoad_RamBWPeak,
|
||||
HocClkPartLoad_EnumMax
|
||||
} HocClkPartLoad;
|
||||
|
||||
@@ -237,7 +238,7 @@ static inline const char* hocclkFormatThermalSensor(HocClkThermalSensor thermSen
|
||||
case HocClkThermalSensor_PLLX:
|
||||
return pretty ? "PLLX" : "pllx";
|
||||
default:
|
||||
return NULL;
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -250,7 +251,7 @@ static inline const char* hocclkFormatPowerSensor(HocClkPowerSensor powSensor, b
|
||||
case HocClkPowerSensor_Avg:
|
||||
return pretty ? "Avg" : "avg";
|
||||
default:
|
||||
return NULL;
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -269,7 +270,7 @@ static inline const char* hocclkFormatProfile(HocClkProfile profile, bool pretty
|
||||
case HocClkProfile_HandheldChargingOfficial:
|
||||
return pretty ? "PD Charger" : "handheld_charging_official";
|
||||
default:
|
||||
return NULL;
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -291,6 +292,6 @@ static inline const char* hocClkFormatVoltage(HocClkVoltage voltage, bool pretty
|
||||
case HocClkVoltage_Display:
|
||||
return pretty ? "Display" : "display";
|
||||
default:
|
||||
return NULL;
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,6 +58,9 @@ typedef struct
|
||||
// FPS / Resolution
|
||||
u8 fps;
|
||||
u16 resolutionHeight;
|
||||
|
||||
// Reserved for future use
|
||||
u8 reserved[0xF28];
|
||||
} HocClkContext;
|
||||
|
||||
typedef struct
|
||||
@@ -70,4 +73,6 @@ typedef struct
|
||||
|
||||
#define HOCCLK_FREQ_LIST_MAX 32
|
||||
|
||||
#define GLOBAL_PROFILE_ID 0xA111111111111111
|
||||
#define GLOBAL_PROFILE_ID 0xA111111111111111
|
||||
|
||||
static_assert(sizeof(HocClkContext) == 0x1000);
|
||||
@@ -70,6 +70,7 @@ typedef enum {
|
||||
|
||||
HocClkConfigValue_MemoryFrequencyMeasurementMode,
|
||||
HocClkConfigValue_RamDisplayUnit,
|
||||
HocClkConfigValue_IsFirstLoad,
|
||||
|
||||
KipConfigValue_custRev,
|
||||
// KipConfigValue_mtcConf,
|
||||
@@ -195,7 +196,6 @@ typedef enum {
|
||||
KipConfigValue_t7_tWTR_fine_tune,
|
||||
|
||||
KipCrc32,
|
||||
HocClkConfigValue_IsFirstLoad,
|
||||
HocClkConfigValue_EnumMax,
|
||||
} HocClkConfigValue;
|
||||
|
||||
@@ -467,7 +467,7 @@ static inline const char* hocclkFormatConfigValue(HocClkConfigValue val, bool pr
|
||||
case KipConfigValue_g_volt_e_998400: return pretty ? "Erista GPU Volt 998 MHz" : "g_volt_e_998400";
|
||||
case KipConfigValue_g_volt_e_1036800: return pretty ? "Erista GPU Volt 1036 MHz" : "g_volt_e_1036800";
|
||||
case KipConfigValue_g_volt_e_1075200: return pretty ? "Erista GPU Volt 1075 MHz" : "g_volt_e_1075200";
|
||||
case KipConfigValue_t6_tRTW_fine_tune: return pretty ? "t6 - tRTW Fine Tune" : "t6_tRTW_fine_fune";
|
||||
case KipConfigValue_t6_tRTW_fine_tune: return pretty ? "t6 - tRTW Fine Tune" : "t6_tRTW_fine_tune";
|
||||
case KipConfigValue_t7_tWTR_fine_tune: return pretty ? "t7 - tWTR Fine Tune" : "t7_tWTR_fine_tune";
|
||||
case KipCrc32:
|
||||
return pretty ? "CRC32" : "crc32";
|
||||
|
||||
@@ -27,7 +27,7 @@ INCLUDES := ../common/include
|
||||
EXEFS_SRC := exefs_src
|
||||
IS_MINIMAL := 0
|
||||
|
||||
APP_TITLE := Horizon OC Zeus
|
||||
APP_TITLE := Horizon OC Gaea
|
||||
NO_ICON := 1
|
||||
|
||||
|
||||
|
||||
@@ -48,10 +48,10 @@ std::string getVersionString() {
|
||||
return std::string(buf);
|
||||
}
|
||||
|
||||
static constexpr tsl::Color dynamicLogoRGB1 = tsl::Color(0, 4, 8, 15);
|
||||
static constexpr tsl::Color dynamicLogoRGB2 = tsl::Color(7, 15, 15, 15);
|
||||
static constexpr tsl::Color STATIC_AQUA = tsl::Color(2, 10, 12, 15);
|
||||
const std::string name = "Horizon OC Zeus";
|
||||
static constexpr tsl::Color dynamicLogoRGB1 = tsl::Color(0, 15, 3, 15);
|
||||
static constexpr tsl::Color dynamicLogoRGB2 = tsl::Color(0, 8, 1, 15);
|
||||
static constexpr tsl::Color STATIC_GREEN = tsl::Color(0, 15, 0, 15);
|
||||
const std::string name = "Horizon OC Gaea";
|
||||
|
||||
static s32 drawDynamicUltraText(
|
||||
tsl::gfx::Renderer* renderer,
|
||||
@@ -100,12 +100,12 @@ static s32 drawDynamicUltraText(
|
||||
g = std::clamp<u8>(g, 0, 15);
|
||||
b = std::clamp<u8>(b, 0, 15);
|
||||
|
||||
bool lightning = (fmod(timeNow, 5.0) < 0.15);
|
||||
if (lightning) {
|
||||
r = std::min<u8>(r + 4, 15);
|
||||
g = std::min<u8>(g + 4, 15);
|
||||
b = std::min<u8>(b + 15, 15);
|
||||
}
|
||||
// bool lightning = (fmod(timeNow, 5.0) < 0.15);
|
||||
// if (lightning) {
|
||||
// r = std::min<u8>(r + 4, 15);
|
||||
// g = std::min<u8>(g + 4, 15);
|
||||
// b = std::min<u8>(b + 15, 15);
|
||||
// }
|
||||
|
||||
tsl::Color color(r, g, b, 15);
|
||||
|
||||
@@ -126,7 +126,7 @@ void BaseGui::preDraw(tsl::gfx::Renderer* renderer) {
|
||||
LOGO_X,
|
||||
LOGO_Y,
|
||||
LOGO_LABEL_FONT_SIZE,
|
||||
STATIC_AQUA,
|
||||
STATIC_GREEN,
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
@@ -58,8 +58,8 @@ void BaseMenuGui::preDraw(tsl::gfx::Renderer* renderer) {
|
||||
if(!this->context) [[unlikely]] return;
|
||||
|
||||
// All constants pre-calculated and cached
|
||||
static constexpr const char* const labels[] = {
|
||||
"App ID", "Profile", "CPU", "GPU", "MEM", "SoC", "Board", "Skin", "Now", "Avg", "BAT", "PMIC", "FAN", "DISP", "FPS", "RES"
|
||||
const char* labels[] = {
|
||||
"App ID", "Profile", "CPU", "GPU", "MEM", "SoC", "Board", "Skin", "Now", "Avg", "BAT", "PMIC", "Fan", IsAula() ? "OLED" : "LCD", "FPS", "RES"
|
||||
};
|
||||
|
||||
static constexpr u32 dataPositions[6] = {63-3+3, 200-1, 344-1-3, 200-1, 342-1, 321-1};
|
||||
|
||||
@@ -568,11 +568,10 @@ protected:
|
||||
);
|
||||
|
||||
tsl::elm::CustomDrawer* exSetWarning = new tsl::elm::CustomDrawer([](tsl::gfx::Renderer *renderer, s32 x, s32 y, s32 w, s32 h) {
|
||||
renderer->drawString("\uE150 Experimental Settings", false, x + 20, y + 30, 18, tsl::style::color::ColorText);
|
||||
renderer->drawString("are a work in progress! Use with caution!", false, x + 20, y + 50, 18, tsl::style::color::ColorText);
|
||||
renderer->drawString("Here be dragons!", false, x + 20, y + 70, 18, tsl::style::color::ColorText);
|
||||
renderer->drawString("\uE150 Experimental Settings are incomplete ", false, x + 20, y + 30, 18, tsl::style::color::ColorText);
|
||||
renderer->drawString("and may not work correctly! Here be dragons!", false, x + 20, y + 50, 18, tsl::style::color::ColorText);
|
||||
});
|
||||
exSetWarning->setBoundaries(0, 0, tsl::cfg::FramebufferWidth, 90);
|
||||
exSetWarning->setBoundaries(0, 0, tsl::cfg::FramebufferWidth, 70);
|
||||
this->listElement->addItem(exSetWarning);
|
||||
|
||||
addConfigToggle(HocClkConfigValue_EnableExperimentalSettings, nullptr);
|
||||
@@ -1376,7 +1375,7 @@ protected:
|
||||
}
|
||||
|
||||
ValueThresholds thresholdsDisabled(0, 0);
|
||||
ValueThresholds mCpuClockThresholds(1963000, 2397000);
|
||||
ValueThresholds mCpuClockThresholds(1963500, 2397000);
|
||||
ValueThresholds mCpuClockThresholdsUV(2397000, 2499000);
|
||||
ValueThresholds eCpuClockThresholds(1785000, 2091000);
|
||||
ValueThresholds eCpuClockThresholdsUV(2091000, 2193000);
|
||||
@@ -1384,7 +1383,7 @@ protected:
|
||||
this->listElement->addItem(new tsl::elm::CategoryHeader("CPU Settings"));
|
||||
if(IsMariko()) {
|
||||
std::vector<NamedValue> ClkOptions = {
|
||||
NamedValue("1963 MHz", 1963000),
|
||||
NamedValue("1963 MHz", 1963500),
|
||||
NamedValue("2091 MHz", 2091000),
|
||||
NamedValue("2193 MHz", 2193000),
|
||||
NamedValue("2295 MHz", 2295000),
|
||||
@@ -1409,7 +1408,7 @@ protected:
|
||||
std::vector<NamedValue> ClkOptionsE = {
|
||||
NamedValue("1785 MHz", 1785000),
|
||||
NamedValue("1887 MHz", 1887000),
|
||||
NamedValue("1963 MHz", 1963000),
|
||||
NamedValue("1989 MHz", 1989000),
|
||||
NamedValue("2091 MHz", 2091000),
|
||||
NamedValue("2193 MHz", 2193000),
|
||||
NamedValue("2295 MHz", 2295000),
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"title_id": "0x00FF0000636C6BFF",
|
||||
"title_id_range_min": "0x00FF0000636C6BFF",
|
||||
"title_id_range_max": "0x00FF0000636C6BFF",
|
||||
"main_thread_stack_size": "0x0000D000",
|
||||
"main_thread_stack_size": "0x0000F000",
|
||||
"main_thread_priority": 16,
|
||||
"default_cpu_id": 3,
|
||||
"process_category": 1,
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace board {
|
||||
|
||||
/* Voltage bug workaround. */
|
||||
if (module == HocClkModule_CPU) {
|
||||
svcSleepThread(250'000);
|
||||
svcSleepThread(300'000);
|
||||
ClkrstSetHz(session, hz);
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace board {
|
||||
PcvSetHz(GetPcvModule(module), hz);
|
||||
|
||||
if (module == HocClkModule_CPU) {
|
||||
svcSleepThread(250'000);
|
||||
svcSleepThread(300'000);
|
||||
PcvSetHz(GetPcvModule(module), hz);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -261,7 +261,7 @@ namespace ipcService {
|
||||
ASSERT_RESULT_OK(rc, "svcGetThreadPriority");
|
||||
rc = ipcServerInit(&gServer, HOCCLK_IPC_SERVICE_NAME, 42);
|
||||
ASSERT_RESULT_OK(rc, "ipcServerInit");
|
||||
rc = threadCreate(&gThread, &ProcessThreadFunc, nullptr, NULL, 0x2000, priority, -2);
|
||||
rc = threadCreate(&gThread, &ProcessThreadFunc, nullptr, NULL, 0x4000, priority, -2);
|
||||
ASSERT_RESULT_OK(rc, "threadCreate");
|
||||
gRunning = false;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "ipc_service.hpp"
|
||||
#include "config.hpp"
|
||||
|
||||
#define INNER_HEAP_SIZE 0x45000
|
||||
#define INNER_HEAP_SIZE 0x4A000
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
BIN
dist/atmosphere/contents/00FF0000636C6BFF/exefs.nsp
vendored
BIN
dist/atmosphere/contents/00FF0000636C6BFF/exefs.nsp
vendored
Binary file not shown.
BIN
dist/atmosphere/kips/hoc.kip
vendored
BIN
dist/atmosphere/kips/hoc.kip
vendored
Binary file not shown.
BIN
dist/switch/.overlays/Horizon-OC-Monitor.ovl
vendored
BIN
dist/switch/.overlays/Horizon-OC-Monitor.ovl
vendored
Binary file not shown.
BIN
dist/switch/.overlays/horizon-oc-overlay.ovl
vendored
BIN
dist/switch/.overlays/horizon-oc-overlay.ovl
vendored
Binary file not shown.
Reference in New Issue
Block a user