BPMemory: Clean up and rename some variables and comments
This is about the register number, not the opcode.
This commit is contained in:
parent
e81b62aad1
commit
4f4e3fad85
|
@ -15,16 +15,15 @@ void BPWritten(const BPCmd& bp);
|
||||||
// Call browser: OpcodeDecoding.cpp ExecuteDisplayList > Decode() > LoadBPReg()
|
// Call browser: OpcodeDecoding.cpp ExecuteDisplayList > Decode() > LoadBPReg()
|
||||||
void LoadBPReg(u32 value0)
|
void LoadBPReg(u32 value0)
|
||||||
{
|
{
|
||||||
//handle the mask register
|
int regNum = value0 >> 24;
|
||||||
int opcode = value0 >> 24;
|
int oldval = ((u32*)&bpmem)[regNum];
|
||||||
int oldval = ((u32*)&bpmem)[opcode];
|
|
||||||
int newval = (oldval & ~bpmem.bpMask) | (value0 & bpmem.bpMask);
|
int newval = (oldval & ~bpmem.bpMask) | (value0 & bpmem.bpMask);
|
||||||
int changes = (oldval ^ newval) & 0xFFFFFF;
|
int changes = (oldval ^ newval) & 0xFFFFFF;
|
||||||
|
|
||||||
BPCmd bp = {opcode, changes, newval};
|
BPCmd bp = {regNum, changes, newval};
|
||||||
|
|
||||||
//reset the mask register
|
// Reset the mask register if we're not trying to set it ourselves.
|
||||||
if (opcode != 0xFE)
|
if (regNum != BPMEM_BP_MASK)
|
||||||
bpmem.bpMask = 0xFFFFFF;
|
bpmem.bpMask = 0xFFFFFF;
|
||||||
|
|
||||||
BPWritten(bp);
|
BPWritten(bp);
|
||||||
|
|
Loading…
Reference in New Issue