Skip to content

Commit

Permalink
More bpm changes #2
Browse files Browse the repository at this point in the history
  • Loading branch information
RipleyTom committed Dec 21, 2018
1 parent 475b5f3 commit 80bdf6e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions rpcs3/Emu/Cell/PPUInterpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3621,6 +3621,13 @@ bool ppu_interpreter::STWUX(ppu_thread& ppu, ppu_opcode_t op)
{
const u64 addr = ppu.gpr[op.ra] + ppu.gpr[op.rb];
vm::write32(vm::cast(addr, HERE), (u32)ppu.gpr[op.rs]);

if (g_breakpoint_handler->HasBreakpoint(addr, breakpoint_type::bp_mwrite))
{
LOG_SUCCESS(GENERAL, "BPMW: STWUX breakpoint writing 0x%x at 0x%x", (u32)ppu.gpr[op.rs], addr);
ppubreak(ppu);
}

ppu.gpr[op.ra] = addr;
return true;
}
Expand Down Expand Up @@ -4497,6 +4504,13 @@ bool ppu_interpreter::STWU(ppu_thread& ppu, ppu_opcode_t op)
{
const u64 addr = ppu.gpr[op.ra] + op.simm16;
vm::write32(vm::cast(addr, HERE), (u32)ppu.gpr[op.rs]);

if (g_breakpoint_handler->HasBreakpoint(addr, breakpoint_type::bp_mwrite))
{
LOG_SUCCESS(GENERAL, "BPMW: STWU breakpoint writing 0x%x at 0x%x", (u32)ppu.gpr[op.rs], addr);
ppubreak(ppu);
}

ppu.gpr[op.ra] = addr;
return true;
}
Expand Down

0 comments on commit 80bdf6e

Please sign in to comment.