mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 02:08:49 +12:00
PPU: Allow HLE execution from pure instruction decoder type interpreter
This commit is contained in:
parent
0445ef393f
commit
bfe1a8673a
8 changed files with 38 additions and 27 deletions
|
@ -6,6 +6,7 @@
|
|||
#include "PPUThread.h"
|
||||
#include "Utilities/sysinfo.h"
|
||||
#include "Emu/Cell/Common.h"
|
||||
#include "Emu/Cell/PPUFunction.h"
|
||||
|
||||
#include <bit>
|
||||
#include <cmath>
|
||||
|
@ -5173,5 +5174,15 @@ bool ppu_interpreter::FCFID(ppu_thread& ppu, ppu_opcode_t op)
|
|||
|
||||
bool ppu_interpreter::UNK(ppu_thread& ppu, ppu_opcode_t op)
|
||||
{
|
||||
// HLE function index
|
||||
const u32 index = (ppu.cia - ppu_function_manager::addr) / 8;
|
||||
|
||||
const auto& hle_funcs = ppu_function_manager::get();
|
||||
|
||||
if (ppu.cia % 8 == 4 && index < hle_funcs.size())
|
||||
{
|
||||
return hle_funcs[index](ppu);
|
||||
}
|
||||
|
||||
fmt::throw_exception("Unknown/Illegal opcode: 0x%08x at 0x%x", op.opcode, ppu.cia);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue