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 3bacec12..b5f77951 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/mtc_timing_value.hpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/mtc_timing_value.hpp @@ -23,7 +23,7 @@ namespace ams::ldr::oc { const std::array tWTR_values = {10, 9, 8, 7, 6}; - const std::array tREFpb_values = {488, 976, 1952, 3400}; + const std::array tREFpb_values = {488, 976, 1952, 3256, 9999}; const std::array tWL_values = {14, 12, 10, 8, 6, 4}; @@ -87,7 +87,8 @@ namespace ams::ldr::oc { // {REFRESH, REFRESH_LO} = max[(tREF/#_of_rows) / (emc_clk_period) - 64, (tREF/#_of_rows) / (emc_clk_period) * 97%] // emc_clk_period = dram_clk / 2; // 1600 MHz: 5894, but N' set to 6176 (~4.8% margin) - const u32 REFRESH = u32(std::ceil((double(tREFpb) * C.marikoEmcMaxClock / numOfRows * 1.048 / 2 - 64))) / 4 * 4; + const u32 REFRESH = MIN((u32)65472, u32(std::ceil((double(tREFpb) * C.marikoEmcMaxClock / numOfRows * 1.048 / 2 - 64))) / 4 * 4); + const u32 REFBW = MIN((u32)65536, REFRESH+64); // tPDEX2WR, tPDEX2RD (timing delay from exiting powerdown mode to a write/read command) in ns // const u32 tPDEX2 = 10; // Exit power-down to next valid command delay diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_mariko.cpp b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_mariko.cpp index b85d5485..f0d5dfd7 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_mariko.cpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_mariko.cpp @@ -165,7 +165,7 @@ void MemMtcTableAutoAdjust(MarikoMtcTable* table, const MarikoMtcTable* ref) { WRITE_PARAM_ALL_REG(table, emc_trpab, GET_CYCLE_CEIL(tRPab)); WRITE_PARAM_ALL_REG(table, emc_tclkstable, GET_CYCLE_CEIL(tCKCKEH)); WRITE_PARAM_ALL_REG(table, emc_tclkstop, GET_CYCLE_CEIL(tCKE)+8); - WRITE_PARAM_ALL_REG(table, emc_trefbw, REFRESH + 64); + WRITE_PARAM_ALL_REG(table, emc_trefbw, REFBW); constexpr u32 MC_ARB_DIV = 4; constexpr u32 MC_ARB_SFA = 2; diff --git a/pages/src/main.ts b/pages/src/main.ts index 33aa7a56..30997046 100644 --- a/pages/src/main.ts +++ b/pages/src/main.ts @@ -375,9 +375,10 @@ var AdvTable: Array = [ "1 : 488 (Default timing)", "2 : 976", "3 : 1952", - "4 : 3256",], + "4 : 3256", + "4 : MAX",], 1, - [0,4], + [0,5], 1, ), new AdvEntry(