mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-04 03:40:11 +00:00
Complex STOP 0x0 hack
This commit is contained in:
parent
07d49b1bd8
commit
8369cb2af6
@ -140,7 +140,7 @@ public:
|
||||
//0 - 10
|
||||
void STOP(spu_opcode_t op)
|
||||
{
|
||||
DisAsm("stop", op.opcode & 0x1fffff);
|
||||
op.rb ? UNK(op) : DisAsm("stop", op.opcode & 0x3fff);
|
||||
}
|
||||
void LNOP(spu_opcode_t op)
|
||||
{
|
||||
|
@ -1061,8 +1061,37 @@ bool SPUThread::stop_and_signal(u32 code)
|
||||
{
|
||||
case 0x000:
|
||||
{
|
||||
// Hack: execute as NOP
|
||||
return true;
|
||||
LOG_WARNING(SPU, "STOP 0x0");
|
||||
|
||||
// HACK: find an ILA instruction
|
||||
for (u32 addr = pc; addr < 0x40000; addr += 4)
|
||||
{
|
||||
const u32 instr = _ref<u32>(addr);
|
||||
|
||||
if (instr >> 25 == 0x21)
|
||||
{
|
||||
pc = addr;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (instr > 0x1fffff)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// HACK: wait for executable code
|
||||
while (!_ref<u32>(pc))
|
||||
{
|
||||
if (test(state & cpu_flag::stop))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
thread_ctrl::wait_for(1000);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
case 0x001:
|
||||
|
Loading…
x
Reference in New Issue
Block a user