diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/mariko/timing_tables.hpp b/Source/Atmosphere/stratosphere/loader/source/oc/mariko/timing_tables.hpp index 3a30aad3..81231c85 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/mariko/timing_tables.hpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/mariko/timing_tables.hpp @@ -66,7 +66,6 @@ namespace ams::ldr::oc::pcv::mariko { u32 rdv_inc; u32 einput; u32 quse_width; - s32 obdly_delta; }; extern const MiscTimings g_misc_table[]; 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 32074592..7277c9f5 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/mtc_timing_value.hpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/mtc_timing_value.hpp @@ -155,6 +155,8 @@ namespace ams::ldr::oc { inline u32 pdex2rw; inline u32 cke2pden; + const u32 tCKE = CEIL(1.0827 * CEIL(0.0074944 * (C.marikoEmcMaxClock / 1000.0))); + const double tMMRI = tRCD + (tCK_avg * 3); const double pdex2mrr = tMMRI + 10; /* Do this properly? */ } 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 00029875..f4e12eb6 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_mariko.cpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_mariko.cpp @@ -450,7 +450,7 @@ namespace ams::ldr::oc::pcv::mariko { WRITE_PARAM_ALL_REG(table, emc_tfaw, GET_CYCLE_CEIL(tFAW)); WRITE_PARAM_ALL_REG(table, emc_trpab, MIN(GET_CYCLE_CEIL(tRPab), static_cast(0x3F))); WRITE_PARAM_ALL_REG(table, emc_tckesr, GET_CYCLE_CEIL(tSR)); - WRITE_PARAM_ALL_REG(table, emc_tcke, GET_CYCLE_CEIL(tXP) + 1); + WRITE_PARAM_ALL_REG(table, emc_tcke, tCKE); WRITE_PARAM_ALL_REG(table, emc_tpd, GET_CYCLE_CEIL(tXP)); WRITE_PARAM_ALL_REG(table, emc_tclkstop, GET_CYCLE_CEIL(tXP) + 8); WRITE_PARAM_ALL_REG(table, emc_r2p, tR2P);