From edf4f7eacc4d1c87fc1fade32f1662e49e2748ad Mon Sep 17 00:00:00 2001 From: Eladash Date: Mon, 7 Aug 2023 18:33:47 +0300 Subject: [PATCH] PPU/Patches: Fix CALLOC patch with interpreter --- rpcs3/Emu/Cell/PPUThread.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/rpcs3/Emu/Cell/PPUThread.cpp b/rpcs3/Emu/Cell/PPUThread.cpp index b3f2da300605..9936fc40763a 100644 --- a/rpcs3/Emu/Cell/PPUThread.cpp +++ b/rpcs3/Emu/Cell/PPUThread.cpp @@ -3769,10 +3769,18 @@ bool ppu_initialize(const ppu_module& info, bool check_only) { for (auto& block : func.blocks) { + const auto targets = g_fxo->get().get_targets(block.first, block.second); + + if (!targets.empty()) + { + // Replace the block with ppu_far_jump + continue; + } + ppu_register_function_at(block.first, block.second); } - if (g_cfg.core.ppu_debug && func.size && func.toc != umax) + if (g_cfg.core.ppu_debug && func.size && func.toc != umax && !ppu_get_far_jump(func.addr)) { ppu_toc[func.addr] = func.toc; ppu_ref(func.addr) = &ppu_check_toc;