better tcke formular, fixed w2r array, fixed refresh

This commit is contained in:
Lightos1
2025-12-23 16:32:54 +01:00
parent a0cf26b0a8
commit 152f92a9a9
2 changed files with 2 additions and 2 deletions

View File

@@ -40,7 +40,7 @@ namespace ams::ldr::oc {
const std::array<u32, 10> tRAS_values = { 42, 36, 34, 32, 30, 28, 26, 24, 22, 20 };
const std::array<double, 7> tRRD_values = { /*10.0,*/ 7.5, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0 }; /* 10.0 is used for <2133mhz; do we care? */
const std::array<u32, 11> tRFC_values = { 140, 130, 120, 110, 100, 90, 80, 70, 60, 50, 40 };
const std::array<u32, 10> tWTR_values = { 10, 9, 8, 7, 6, 5, 4, 3, 3, 1 };
const std::array<u32, 10> tWTR_values = { 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 };
const std::array<u32, 6> tREFpb_values = { 3900, 5850, 7800, 11700, 15600, 99999 };
const u32 BL = 16;

View File

@@ -428,7 +428,7 @@ namespace ams::ldr::oc::pcv::mariko {
u32 refresh_raw = 0xFFFF;
if (C.t8_tREFI != 6) {
refresh_raw = std::floor(tREFpb_values[C.t8_tREFI] / tCK_avg) - 0x40;
refresh_raw = CEIL(tREFpb_values[C.t8_tREFI] / tCK_avg) - 0x40;
refresh_raw = MIN(refresh_raw, static_cast<u32>(0xFFFF));
}