mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 00:41:26 +12:00
Implement runtime PPU executable code modification via Cheat Manager
This commit is contained in:
parent
93a6e9e4e4
commit
8427af8886
2 changed files with 47 additions and 5 deletions
|
@ -165,6 +165,7 @@ extern void ppu_initialize();
|
|||
extern void ppu_initialize(const ppu_module& info);
|
||||
static void ppu_initialize2(class jit_compiler& jit, const ppu_module& module_part, const std::string& cache_path, const std::string& obj_name);
|
||||
extern void ppu_execute_syscall(ppu_thread& ppu, u64 code);
|
||||
static bool ppu_break(ppu_thread& ppu, ppu_opcode_t op);
|
||||
|
||||
// Get pointer to executable cache
|
||||
template<typename T = u64>
|
||||
|
@ -308,11 +309,11 @@ extern void ppu_register_function_at(u32 addr, u32 size, ppu_function_t ptr)
|
|||
}
|
||||
|
||||
// Initialize interpreter cache
|
||||
const u32 fallback = ::narrow<u32>(reinterpret_cast<std::uintptr_t>(ppu_fallback));
|
||||
const u32 _break = ::narrow<u32>(reinterpret_cast<std::uintptr_t>(ppu_break));
|
||||
|
||||
while (size)
|
||||
{
|
||||
if (ppu_ref<u32>(addr) == fallback)
|
||||
if (ppu_ref<u32>(addr) != _break)
|
||||
{
|
||||
ppu_ref(addr) = ppu_cache(addr);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue