From cdc0441405eda0cf91ae959b39f3722c94995d4e Mon Sep 17 00:00:00 2001 From: Eladash Date: Mon, 7 Aug 2023 21:33:36 +0300 Subject: [PATCH] PPU: Fixup interpreter and analyzer --- rpcs3/Emu/Cell/PPUAnalyser.cpp | 2 +- rpcs3/Emu/Cell/PPUThread.cpp | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/rpcs3/Emu/Cell/PPUAnalyser.cpp b/rpcs3/Emu/Cell/PPUAnalyser.cpp index f680b6907e..2a774d0fd3 100644 --- a/rpcs3/Emu/Cell/PPUAnalyser.cpp +++ b/rpcs3/Emu/Cell/PPUAnalyser.cpp @@ -1463,7 +1463,7 @@ bool ppu_module::analyse(u32 lib_toc, u32 entry, const u32 sec_end, const std::b { const u32 target = (op.aa ? 0 : iaddr) + (type == ppu_itype::B ? +op.bt24 : +op.bt14); - if (target >= start && target < end && (op.aa && verify_func(iaddr))) + if (target >= start && target < end && (!op.aa || verify_func(iaddr))) { if (target < func.addr || target >= func.addr + func.size) { diff --git a/rpcs3/Emu/Cell/PPUThread.cpp b/rpcs3/Emu/Cell/PPUThread.cpp index 9936fc4076..27067bb33b 100644 --- a/rpcs3/Emu/Cell/PPUThread.cpp +++ b/rpcs3/Emu/Cell/PPUThread.cpp @@ -3769,9 +3769,7 @@ 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()) + if (g_fxo->is_init() && !g_fxo->get().get_targets(block.first, block.second).empty()) { // Replace the block with ppu_far_jump continue;