mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Handle BP mask register better to avoid useless BP writes (causing flushes)
Patch from konpie: http://forums.dolphin-emulator.com/showthread.php?tid=24658
This commit is contained in:
@ -19,15 +19,18 @@ void LoadBPReg(u32 value0)
|
||||
int opcode = value0 >> 24;
|
||||
int oldval = ((u32*)&bpmem)[opcode];
|
||||
int newval = (oldval & ~bpmem.bpMask) | (value0 & bpmem.bpMask);
|
||||
int changes = (oldval ^ newval) & 0xFFFFFF;
|
||||
|
||||
BPCmd bp = {opcode, changes, newval};
|
||||
|
||||
//reset the mask register
|
||||
if (opcode != 0xFE)
|
||||
{
|
||||
//reset the mask register
|
||||
bpmem.bpMask = 0xFFFFFF;
|
||||
|
||||
BPWritten(bp);
|
||||
int changes = (oldval ^ newval) & 0xFFFFFF;
|
||||
BPCmd bp = {opcode, changes, newval};
|
||||
BPWritten(bp);
|
||||
}
|
||||
else
|
||||
bpmem.bpMask = newval;
|
||||
}
|
||||
|
||||
void GetBPRegInfo(const u8* data, char* name, size_t name_size, char* desc, size_t desc_size)
|
||||
|
Reference in New Issue
Block a user