mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-12 17:58:37 +12:00
SPU: Implement Accurate DMA (#8822)
This commit is contained in:
parent
ddfa077c3e
commit
73d23eb6e6
12 changed files with 170 additions and 60 deletions
|
@ -4433,8 +4433,17 @@ bool ppu_interpreter::ICBI(ppu_thread& ppu, ppu_opcode_t op)
|
|||
bool ppu_interpreter::DCBZ(ppu_thread& ppu, ppu_opcode_t op)
|
||||
{
|
||||
const u64 addr = op.ra ? ppu.gpr[op.ra] + ppu.gpr[op.rb] : ppu.gpr[op.rb];
|
||||
const u32 addr0 = vm::cast(addr, HERE) & ~127;
|
||||
|
||||
std::memset(vm::base(vm::cast(addr, HERE) & ~127), 0, 128);
|
||||
if (g_cfg.core.spu_accurate_dma)
|
||||
{
|
||||
auto [res, rtime] = vm::reservation_lock(addr0, 128, vm::dma_lockb);
|
||||
std::memset(vm::base(addr0), 0, 128);
|
||||
res.release(rtime + 128);
|
||||
return true;
|
||||
}
|
||||
|
||||
std::memset(vm::base(addr0), 0, 128);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue