mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 14:08:37 +00:00
Savestates Support For PS3 Emulation (#10478)
This commit is contained in:
parent
969b9eb89d
commit
fcd297ffb2
154 changed files with 4948 additions and 635 deletions
|
|
@ -5544,11 +5544,7 @@ public:
|
|||
spu_runtime::g_escape(_spu);
|
||||
}
|
||||
|
||||
if (_spu->test_stopped())
|
||||
{
|
||||
_spu->pc += 4;
|
||||
spu_runtime::g_escape(_spu);
|
||||
}
|
||||
static_cast<void>(_spu->test_stopped());
|
||||
}
|
||||
|
||||
void STOP(spu_opcode_t op) //
|
||||
|
|
@ -5591,12 +5587,7 @@ public:
|
|||
spu_runtime::g_escape(_spu);
|
||||
}
|
||||
|
||||
if (_spu->test_stopped())
|
||||
{
|
||||
_spu->pc += 4;
|
||||
spu_runtime::g_escape(_spu);
|
||||
}
|
||||
|
||||
static_cast<void>(_spu->test_stopped());
|
||||
return static_cast<u32>(result & 0xffffffff);
|
||||
}
|
||||
|
||||
|
|
@ -5614,12 +5605,7 @@ public:
|
|||
{
|
||||
_spu->state += cpu_flag::wait;
|
||||
std::this_thread::yield();
|
||||
|
||||
if (_spu->test_stopped())
|
||||
{
|
||||
_spu->pc += 4;
|
||||
spu_runtime::g_escape(_spu);
|
||||
}
|
||||
static_cast<void>(_spu->test_stopped());
|
||||
}
|
||||
|
||||
return res;
|
||||
|
|
@ -5655,6 +5641,8 @@ public:
|
|||
val0 = m_ir->CreateTrunc(val0, get_type<u32>());
|
||||
m_ir->CreateCondBr(cond, done, wait);
|
||||
m_ir->SetInsertPoint(wait);
|
||||
update_pc();
|
||||
m_block->store.fill(nullptr);
|
||||
const auto val1 = call("spu_read_channel", &exec_rdch, m_thread, m_ir->getInt32(op.ra));
|
||||
m_ir->CreateBr(done);
|
||||
m_ir->SetInsertPoint(done);
|
||||
|
|
@ -5685,6 +5673,7 @@ public:
|
|||
case SPU_RdInMbox:
|
||||
{
|
||||
update_pc();
|
||||
m_block->store.fill(nullptr);
|
||||
res.value = call("spu_read_in_mbox", &exec_read_in_mbox, m_thread);
|
||||
break;
|
||||
}
|
||||
|
|
@ -5731,6 +5720,7 @@ public:
|
|||
case SPU_RdEventStat:
|
||||
{
|
||||
update_pc();
|
||||
m_block->store.fill(nullptr);
|
||||
res.value = call("spu_read_events", &exec_read_events, m_thread);
|
||||
break;
|
||||
}
|
||||
|
|
@ -5744,6 +5734,7 @@ public:
|
|||
default:
|
||||
{
|
||||
update_pc();
|
||||
m_block->store.fill(nullptr);
|
||||
res.value = call("spu_read_channel", &exec_rdch, m_thread, m_ir->getInt32(op.ra));
|
||||
break;
|
||||
}
|
||||
|
|
@ -5954,6 +5945,7 @@ public:
|
|||
m_ir->CreateCondBr(m_ir->CreateICmpNE(m_ir->CreateLoad(spu_ptr<u32>(&spu_thread::ch_tag_upd)), m_ir->getInt32(MFC_TAG_UPDATE_IMMEDIATE)), _mfc, next);
|
||||
m_ir->SetInsertPoint(_mfc);
|
||||
update_pc();
|
||||
m_block->store.fill(nullptr);
|
||||
call("spu_write_channel", &exec_wrch, m_thread, m_ir->getInt32(op.ra), val.value);
|
||||
m_ir->CreateBr(next);
|
||||
m_ir->SetInsertPoint(next);
|
||||
|
|
@ -6106,6 +6098,7 @@ public:
|
|||
m_ir->SetInsertPoint(next);
|
||||
m_ir->CreateStore(ci, spu_ptr<u8>(&spu_thread::ch_mfc_cmd, &spu_mfc_cmd::cmd));
|
||||
update_pc();
|
||||
m_block->store.fill(nullptr);
|
||||
call("spu_exec_mfc_cmd", &exec_mfc_cmd, m_thread);
|
||||
return;
|
||||
}
|
||||
|
|
@ -6373,6 +6366,7 @@ public:
|
|||
m_ir->CreateCondBr(m_ir->CreateICmpNE(_old, _new), _mfc, next);
|
||||
m_ir->SetInsertPoint(_mfc);
|
||||
update_pc();
|
||||
m_block->store.fill(nullptr);
|
||||
call("spu_list_unstall", &exec_list_unstall, m_thread, eval(val & 0x1f).value);
|
||||
m_ir->CreateBr(next);
|
||||
m_ir->SetInsertPoint(next);
|
||||
|
|
@ -6396,6 +6390,7 @@ public:
|
|||
}
|
||||
|
||||
update_pc();
|
||||
m_block->store.fill(nullptr);
|
||||
call("spu_write_channel", &exec_wrch, m_thread, m_ir->getInt32(op.ra), val.value);
|
||||
}
|
||||
|
||||
|
|
@ -6416,6 +6411,7 @@ public:
|
|||
{
|
||||
m_block->block_end = m_ir->GetInsertBlock();
|
||||
update_pc(m_pos + 4);
|
||||
m_block->store.fill(nullptr);
|
||||
tail_chunk(m_dispatch);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue