From b9bf6dd719f71691d7e4c74e40661990a6560dca Mon Sep 17 00:00:00 2001 From: Lightos1 <124387232+Lightos1@users.noreply.github.com> Date: Mon, 27 Jul 2026 14:59:09 +0200 Subject: [PATCH] remove erista mrf repointing --- .../loader/source/oc/pcv/pcv_erista.cpp | 33 ------------------- 1 file changed, 33 deletions(-) diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_erista.cpp b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_erista.cpp index 6042bcf1..c4d51f97 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_erista.cpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_erista.cpp @@ -463,39 +463,6 @@ namespace ams::ldr::hoc::pcv::erista { } } - /* Relocate the table */ - /* Rescanning is simpler than trying to extract a bunch of data from the asm patch, performance impact is negligable */ - /* Also, this is more stable :P */ - u32 RepointEristaEmcTablePtr(uintptr_t fromSlot, uintptr_t toTable) { - constexpr u32 RetIns = 0xD65F03C0; /* ret */ - u32 patched = 0; - - for (u32 *p = nsoStart; p + 4 < nsoEnd; ++p) { - const u32 ins = *p; - if (!AsmIsAdrX0(ins)) { - continue; - } - - const uintptr_t pc = reinterpret_cast(p); - if (AsmAdrTarget(ins, pc) != fromSlot) { - continue; - } - if (!(AsmIsLdpX(p[1]) && AsmIsLdpX(p[2]) && p[3] == RetIns)) { - continue; - } - - /* adr only reaches +-1MB */ - const s64 delta = static_cast(toTable) - static_cast(pc); - if (delta > 0xFFFFF || delta < -0x100000) { - continue; - } - - PATCH_OFFSET(p, AsmSetAdrTarget(ins, pc, toTable)); - ++patched; - } - return patched; - } - /* The silicon instructs; the children obey... */ void MtcGenerateFreqTables() { newEmcList.clear();