diff options
| author | JMC47 <JMC4789@gmail.com> | 2021-12-20 14:27:14 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-20 14:27:14 -0500 |
| commit | 32fed91b0d35f06c46281f55c9f0fa4694c5334a (patch) | |
| tree | 6e47451f525329e5ba57fc615c491b0ca06088d8 /Source/Core/VideoCommon/BPStructs.cpp | |
| parent | 1714dc64bb1cc01aee9d9b52763f20aa6a44a674 (diff) | |
| parent | ffa512f5e7d24d9d9e93366bb596b9473d26d61b (diff) | |
Merge pull request #9718 from Pokechu22/better-fifo-analyzer-part-3
Fifo analyzer improvements, part 3
Diffstat (limited to 'Source/Core/VideoCommon/BPStructs.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/BPStructs.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/Source/Core/VideoCommon/BPStructs.cpp b/Source/Core/VideoCommon/BPStructs.cpp index 0fc4ca6785..503ef6154f 100644 --- a/Source/Core/VideoCommon/BPStructs.cpp +++ b/Source/Core/VideoCommon/BPStructs.cpp @@ -716,29 +716,27 @@ static void BPWritten(const BPCmd& bp, int cycles_into_future) bp.newvalue); } -// Call browser: OpcodeDecoding.cpp ExecuteDisplayList > Decode() > LoadBPReg() -void LoadBPReg(u32 value0, int cycles_into_future) +// Call browser: OpcodeDecoding.cpp RunCallback::OnBP() +void LoadBPReg(u8 reg, u32 value, int cycles_into_future) { - int regNum = value0 >> 24; - int oldval = ((u32*)&bpmem)[regNum]; - int newval = (oldval & ~bpmem.bpMask) | (value0 & bpmem.bpMask); + int oldval = ((u32*)&bpmem)[reg]; + int newval = (oldval & ~bpmem.bpMask) | (value & bpmem.bpMask); int changes = (oldval ^ newval) & 0xFFFFFF; - BPCmd bp = {regNum, changes, newval}; + BPCmd bp = {reg, changes, newval}; // Reset the mask register if we're not trying to set it ourselves. - if (regNum != BPMEM_BP_MASK) + if (reg != BPMEM_BP_MASK) bpmem.bpMask = 0xFFFFFF; BPWritten(bp, cycles_into_future); } -void LoadBPRegPreprocess(u32 value0, int cycles_into_future) +void LoadBPRegPreprocess(u8 reg, u32 value, int cycles_into_future) { - int regNum = value0 >> 24; - // masking could hypothetically be a problem - u32 newval = value0 & 0xffffff; - switch (regNum) + // masking via BPMEM_BP_MASK could hypothetically be a problem + u32 newval = value & 0xffffff; + switch (reg) { case BPMEM_SETDRAWDONE: if ((newval & 0xff) == 0x02) |
