mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 15:01:28 +12:00
Reimplement/fix PRX patches
This commit is contained in:
parent
48296c2ba6
commit
e26ae9899c
4 changed files with 56 additions and 60 deletions
|
@ -385,15 +385,16 @@ extern void ppu_register_range(u32 addr, u32 size)
|
|||
return;
|
||||
}
|
||||
|
||||
size = utils::align(size + addr % 0x10000, 0x10000);
|
||||
addr &= -0x10000;
|
||||
|
||||
// Register executable range at
|
||||
utils::memory_commit(&ppu_ref(addr), size * 2, utils::protection::rw);
|
||||
vm::page_protect(addr, utils::align(size, 0x10000), 0, vm::page_executable);
|
||||
utils::memory_commit(&ppu_ref(addr), u64{size} * 2, utils::protection::rw);
|
||||
vm::page_protect(addr, size, 0, vm::page_executable);
|
||||
|
||||
const u64 fallback = reinterpret_cast<uptr>(ppu_fallback);
|
||||
const u64 seg_base = addr;
|
||||
|
||||
size &= ~3; // Loop assumes `size = n * 4`, enforce that by rounding down
|
||||
|
||||
while (size)
|
||||
{
|
||||
if (g_cfg.core.ppu_decoder == ppu_decoder_type::llvm)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue