diff options
| author | JosJuice <josjuice@gmail.com> | 2023-04-01 18:02:04 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-01 18:02:04 +0200 |
| commit | 450ca0b69ea70f56e25670040f1dfdc01bf52ba9 (patch) | |
| tree | 061833f63b86e19169024afd9ca8179ecaff066f /Source/Core/DiscIO/RiivolutionPatcher.cpp | |
| parent | 7e9a63b9873d56f0a2c1b814a04437374621fb24 (diff) | |
| parent | 8dabd1a0256e4761ad88494280d74397e16af9f5 (diff) | |
Merge pull request #11700 from AdmiralCurtiss/mmu-class
PowerPC/MMU: Refactor to class, move to System.
Diffstat (limited to 'Source/Core/DiscIO/RiivolutionPatcher.cpp')
| -rw-r--r-- | Source/Core/DiscIO/RiivolutionPatcher.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/DiscIO/RiivolutionPatcher.cpp b/Source/Core/DiscIO/RiivolutionPatcher.cpp index 0f9bbec3ca..309e9e5ea1 100644 --- a/Source/Core/DiscIO/RiivolutionPatcher.cpp +++ b/Source/Core/DiscIO/RiivolutionPatcher.cpp @@ -502,7 +502,7 @@ static bool MemoryMatchesAt(const Core::CPUThreadGuard& guard, u32 offset, { for (u32 i = 0; i < value.size(); ++i) { - auto result = PowerPC::HostTryReadU8(guard, offset + i); + auto result = PowerPC::MMU::HostTryReadU8(guard, offset + i); if (!result || result->value != value[i]) return false; } @@ -521,7 +521,7 @@ static void ApplyMemoryPatch(const Core::CPUThreadGuard& guard, u32 offset, auto& system = Core::System::GetInstance(); const u32 size = static_cast<u32>(value.size()); for (u32 i = 0; i < size; ++i) - PowerPC::HostTryWriteU8(guard, value[i], offset + i); + PowerPC::MMU::HostTryWriteU8(guard, value[i], offset + i); const u32 overlapping_hook_count = HLE::UnpatchRange(system, offset, offset + size); if (overlapping_hook_count != 0) { @@ -585,13 +585,13 @@ static void ApplyOcarinaMemoryPatch(const Core::CPUThreadGuard& guard, const Pat { // from the pattern find the next blr instruction const u32 blr_address = ram_start + i; - auto blr = PowerPC::HostTryReadU32(guard, blr_address); + auto blr = PowerPC::MMU::HostTryReadU32(guard, blr_address); if (blr && blr->value == 0x4e800020) { // and replace it with a jump to the given offset const u32 target = memory_patch.m_offset | 0x80000000; const u32 jmp = ((target - blr_address) & 0x03fffffc) | 0x48000000; - PowerPC::HostTryWriteU32(guard, jmp, blr_address); + PowerPC::MMU::HostTryWriteU32(guard, jmp, blr_address); const u32 overlapping_hook_count = HLE::UnpatchRange(system, blr_address, blr_address + 4); if (overlapping_hook_count != 0) |
