From 6d0399f352acf356113281353674ce74fdded670 Mon Sep 17 00:00:00 2001 From: souldbminersmwc Date: Wed, 21 Jan 2026 15:45:51 -0500 Subject: [PATCH] ldr/sysclk: update tWRL setting method --- .../stratosphere/loader/source/oc/customize.cpp | 4 ++-- .../loader/source/oc/mtc_timing_value.hpp | 4 ++-- Source/sys-clk/overlay/src/ui/gui/misc_gui.cpp | 14 ++++++++------ 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp b/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp index 6d0d3a34..35377624 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp @@ -54,8 +54,8 @@ volatile CustomizeTable C = { /* Set to 4 read and 2 write for 1866b tWRL. */ /* For 2133 tWRL: 8 read and 4 write. */ -.mem_burst_read_latency = 8, -.mem_burst_write_latency = 4, +.mem_burst_read_latency = 40, +.mem_burst_write_latency = 18, .eristaCpuUV = 0, .eristaCpuVmin = 800, diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/mtc_timing_value.hpp b/Source/Atmosphere/stratosphere/loader/source/oc/mtc_timing_value.hpp index 6c0be364..745d36fe 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/mtc_timing_value.hpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/mtc_timing_value.hpp @@ -42,8 +42,8 @@ namespace ams::ldr::oc { const u32 BL = 16; /* Base latency for read and write (tWRL). */ - const u32 RL = 28 + C.mem_burst_read_latency; - const u32 WL = 14 + C.mem_burst_write_latency; + const u32 RL = C.mem_burst_read_latency; + const u32 WL = C.mem_burst_write_latency; /* Switch uses RL_DBI, todo: get rid of non DBI_RL. */ const u32 RL_DBI = RL + 4; diff --git a/Source/sys-clk/overlay/src/ui/gui/misc_gui.cpp b/Source/sys-clk/overlay/src/ui/gui/misc_gui.cpp index f3b87aed..a56a5aed 100644 --- a/Source/sys-clk/overlay/src/ui/gui/misc_gui.cpp +++ b/Source/sys-clk/overlay/src/ui/gui/misc_gui.cpp @@ -692,15 +692,17 @@ protected: this->listElement->addItem(new tsl::elm::CategoryHeader("Memory Latencies")); std::vector rlLabels = { - NamedValue("1600BL", 0), - NamedValue("1866BL", 4), - NamedValue("2133BL", 8) + NamedValue("2133RL", 40) + NamedValue("1866RL", 36), + NamedValue("1600RL", 32), + NamedValue("1333RL", 28), }; std::vector wlLabels = { - NamedValue("1600BL", 0), - NamedValue("1866BL", 2), - NamedValue("2133BL", 4) + NamedValue("2133WL", 18), + NamedValue("1866WL", 16), + NamedValue("1600WL", 14), + NamedValue("1333WL", 12) }; addConfigButton(