From 45b9369aea9b73c717645873a80f5aa172795ddf Mon Sep 17 00:00:00 2001 From: souldbminersmwc Date: Mon, 1 Sep 2025 16:32:35 -0400 Subject: [PATCH] fix loader configurator --- .../loader/source/oc/customize.cpp | 17 +-- .../loader/source/oc/customize.hpp | 12 +- docs/main.js | 109 ++++++++++++++++-- 3 files changed, 113 insertions(+), 25 deletions(-) diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp b/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp index 3c08c49c..416bf18d 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp @@ -113,21 +113,13 @@ volatile CustomizeTable C = { .marikoCpuHighVoltOffset = 0, -.marikoB3 = 179, - .marikoCpuHighUV = 0, .cpuMaxFreq = 1963500, .gpuMaxFreq = 1267200, -.eristaCPUvMax = 1300, -.marikoCPUvMax = 1235, - -.MemVltMax = 1350000, - -.marikoVDDQMax = 650000, /* Advanced Settings: * - Erista CPU DVFS Table: */ @@ -300,6 +292,15 @@ volatile CustomizeTable C = { //.eristaMtcTable = const_cast(&EristaMtcTablePlaceholder), //.marikoMtcTable = const_cast(&MarikoMtcTablePlaceholder), +.eristaCPUvMax = 1300, + +.marikoCPUvMax = 1235, + +.MemVltMax = 1350000, + +.marikoVDDQMax = 650000, + +.marikoB3 = 179, }; diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/customize.hpp b/Source/Atmosphere/stratosphere/loader/source/oc/customize.hpp index be9e1c0a..97d82c0f 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/customize.hpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/customize.hpp @@ -67,15 +67,11 @@ typedef struct CustomizeTable { // u32 marikoGpuVoltArray[18]; u8 marikoCpuHighVoltOffset; - u8 marikoB3; u8 marikoCpuHighUV; u32 cpuMaxFreq; u32 gpuMaxFreq; - u32 eristaCPUvMax; - u32 marikoCPUvMax; - u32 MemVltMax; - u32 marikoVDDQMax; + CustomizeCpuDvfsTable eristaCpuDvfsTable; CustomizeCpuDvfsTable marikoCpuDvfsTable; @@ -86,6 +82,12 @@ typedef struct CustomizeTable { CustomizeGpuDvfsTable marikoGpuDvfsTableHiOPT; //EristaMtcTable* eristaMtcTable; //MarikoMtcTable* marikoMtcTable; + u32 eristaCPUvMax; + u32 marikoCPUvMax; + u32 MemVltMax; + u32 marikoVDDQMax; + u8 marikoB3; + } CustomizeTable; //static_assert(sizeof(CustomizeTable) == sizeof(u8) * 4 + sizeof(u32) * 10 + sizeof(CustomizeCpuDvfsTable) * 5 + sizeof(void*) * 2); diff --git a/docs/main.js b/docs/main.js index 201324ff..e1dd082b 100644 --- a/docs/main.js +++ b/docs/main.js @@ -188,15 +188,10 @@ var CustTable = [ "Acceptable range: 0 ~ 100" ], 0, [0, 100], 1), - // Additional fields in struct footer new CustEntry("marikoCpuHighVoltOffset", "CPU Voltage offset at high frequencies", CustPlatform.Mariko, 4, [ "Reduce CPU power draw at high clocks", ], 0, [0, 100], 1), - new CustEntry("marikoB3", "Unknown Mariko B3", CustPlatform.Mariko, 4, [ - "Reserved entry for alignment with header struct" - ], 0, [0, 1], 1), - new CustEntry("marikoCpuHighUV", "Enable Mariko CPU High Undervolt", CustPlatform.Mariko, 4, [ "Reduce CPU power draw at high clocks", ], 0, [0, 12], 1), @@ -210,6 +205,15 @@ var CustTable = [ "Default: 1267200", "This is the maximum frequency for the GPU you can set in sys-clk-ocs2." ], 1267200, [76800, 1305600], 1, !1), + + new CustEntry("eristaCPUvMax", "Erista CPUvMax", CustPlatform.Erista, 4, [], 0, [0, 0], 1), + new CustEntry("marikoCPUvMax", "Mariko CPUvMax", CustPlatform.Mariko, 4, [], 0, [0, 0], 1), + new CustEntry("MemVltMax", "Memory Voltage Max", CustPlatform.All, 4, [], 0, [0, 0], 1), + new CustEntry("marikoVDDQMax", "Mariko VDDQ Max", CustPlatform.Mariko, 4, [], 0, [0, 0], 1), + + new CustEntry("marikoB3", "Unknown Mariko B3", CustPlatform.Mariko, 4, [ + "Reserved entry for alignment with header struct" + ], 0, [0, 1], 1), ]; var AdvTable = [ @@ -219,13 +223,94 @@ var AdvTable = [ "Acceptable range : 0~9" ], 0, [0, 9], 1), - new AdvEntry("ramTimingPresetOne", "Primary RAM Timing Preset", CustPlatform.Mariko, 4, [...], 1, [0, 6], 1), - new AdvEntry("ramTimingPresetTwo", "Secondary RAM Timing Preset", CustPlatform.Mariko, 4, [...], 1, [0, 5], 1), - new AdvEntry("ramTimingPresetThree", "Secondary RAM Timing Preset", CustPlatform.Mariko, 4, [...], 1, [0, 6], 1), - new AdvEntry("ramTimingPresetFour", "Secondary RAM Timing Preset", CustPlatform.Mariko, 4, [...], 1, [0, 6], 1), - new AdvEntry("ramTimingPresetFive", "Secondary RAM Timing Preset", CustPlatform.Mariko, 4, [...], 1, [0, 6], 1), - new AdvEntry("ramTimingPresetSix", "Tertiary RAM Timing Preset", CustPlatform.Mariko, 4, [...], 1, [0, 5], 1), - new AdvEntry("ramTimingPresetSeven", "Latency Decrement", CustPlatform.Mariko, 4, [...], 0, [0, 6], 1), + new AdvEntry("ramTimingPresetOne", "Primary RAM Timing Preset", CustPlatform.Mariko, 4, [ + "WARNING: Unstable timings can corrupt your nand", + "Select Timing Preset for both AUTO_ADJ and CUSTOM_ADJ", + "Values are : tRCD - tRP - tRAS (tRC = tRP + tRAS)", + "0 : Do Not Adjust (2400Mhz: 12 - 12 - 28) (CUST_ADJ only)", + "1 : 18 - 18 - 42 (Default timing)", + "2 : 17 - 17 - 39", + "3 : 16 - 16 - 36", + "4 : 15 - 15 - 34", + "5 : 14 - 14 - 32", + "6 : 13 - 13 - 30" + ], 1, [0, 6], 1), + + new AdvEntry("ramTimingPresetTwo", "Secondary RAM Timing Preset", CustPlatform.Mariko, 4, [ + "WARNING: Unstable timings can corrupt your nand", + "Secondary Timing Preset for both AUTO_ADJ and CUSTOM_ADJ", + "Values are : tRRD - tFAW", + "0 : Do Not Adjust (2400Mhz: 6.6 - 26.6) (CUST_ADJ only)", + "1 : 10 - 40 (Default timing) (3733 specs)", + "2 : 7.5 - 30 (4266 specs)", + "3 : 6 - 24", + "4 : 4 - 16", + "5 : 3 - 12" + ], 1, [0, 5], 1), + + new AdvEntry("ramTimingPresetThree", "Secondary RAM Timing Preset", CustPlatform.Mariko, 4, [ + "WARNING: Unstable timings can corrupt your nand", + "Secondary Timing Preset for both AUTO_ADJ and CUSTOM_ADJ", + "Values are : tWR - tRTP", + "0 : Do Not Adjust (2400Mhz: ?? - 5) (CUST_ADJ only)", + "1 : 18 - 7.5 (Default timing)", + "2 : 15 - 7.5", + "3 : 15 - 6", + "4 : 12 - 6", + "5 : 12 - 4", + "6 : 8 - 4" + ], 1, [0, 6], 1), + + new AdvEntry("ramTimingPresetFour", "Secondary RAM Timing Preset", CustPlatform.Mariko, 4, [ + "WARNING: Unstable timings can corrupt your nand", + "Secondary Timing Preset for both AUTO_ADJ and CUSTOM_ADJ", + "Values are : tRFC", + "0 : Do Not Adjust (2400Mhz: 93.3) (CUST_ADJ only)", + "1 : 140 (Default timing)", + "2 : 120", + "3 : 100", + "4 : 80", + "5 : 70", + "6 : 60" + ], 1, [0, 6], 1), + + new AdvEntry("ramTimingPresetFive", "Secondary RAM Timing Preset", CustPlatform.Mariko, 4, [ + "WARNING: Unstable timings can corrupt your nand", + "Secondary Timing Preset for both AUTO_ADJ and CUSTOM_ADJ", + "Values are : tWTR", + "0 : Do Not Adjust (2400Mhz: ??) (CUST_ADJ only)", + "1 : 10 (Default timing)", + "2 : 8", + "3 : 6", + "4 : 4", + "5 : 2", + "6 : 1" + ], 1, [0, 6], 1), + + new AdvEntry("ramTimingPresetSix", "Tertiary RAM Timing Preset", CustPlatform.Mariko, 4, [ + "WARNING: Unstable timings can corrupt your nand", + "Tertiary Timing Preset for both AUTO_ADJ and CUSTOM_ADJ", + "Values are : tREFpb", + "0 : Do Not Adjust (2400Mhz: 325) (CUST_ADJ only)", + "1 : 488 (Default timing)", + "2 : 976", + "3 : 1952", + "4 : 3256", + "5 : MAX" + ], 1, [0, 5], 1), + + new AdvEntry("ramTimingPresetSeven", "Latency Decrement", CustPlatform.Mariko, 4, [ + "WARNING: Unstable timings can corrupt your nand", + "Latency decrement for both AUTO_ADJ and CUSTOM_ADJ", + "This preset decreases Write/Read related delays. Values are Write - Read", + "0 : 0 - 0, Do Not Adjust for CUST_ADJ", + "1 : '-2' - '-4'", + "2 : '-4' - '-8'", + "3 : '-6' - '-12'", + "4 : '-8' - '-16'", + "5 : '-10' - '-20'", + "6 : '-12' - '-24'" + ], 0, [0, 6], 1) ]; var GpuTable = [