From fb9b09d0049ce5b0bff586e3ccc6d0ae30c41883 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Sat, 8 Apr 2017 23:20:19 +0300 Subject: [PATCH] PPU disasm: print HLE index --- rpcs3/Emu/Cell/PPUDisAsm.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/rpcs3/Emu/Cell/PPUDisAsm.cpp b/rpcs3/Emu/Cell/PPUDisAsm.cpp index 19740123bb..82750c43cb 100644 --- a/rpcs3/Emu/Cell/PPUDisAsm.cpp +++ b/rpcs3/Emu/Cell/PPUDisAsm.cpp @@ -1,5 +1,6 @@ #include "stdafx.h" #include "PPUDisAsm.h" +#include "PPUFunction.h" const ppu_decoder s_ppu_disasm; @@ -2150,5 +2151,17 @@ void PPUDisAsm::FCFID(ppu_opcode_t op) void PPUDisAsm::UNK(ppu_opcode_t op) { + if (op.opcode == dump_pc && ppu_function_manager::addr) + { + // HLE function index + const u32 index = (dump_pc - ppu_function_manager::addr) / 8; + + if (index < ppu_function_manager::get().size()) + { + Write(fmt::format("Function : (index %u)", index)); + return; + } + } + Write(fmt::format("Unknown/Illegal opcode! (0x%08x)", op.opcode)); }