diff options
| author | Pierre Bourdon <delroth@gmail.com> | 2012-08-05 05:19:52 +0200 |
|---|---|---|
| committer | degasus <wickmarkus@web.de> | 2013-11-07 03:06:53 +0100 |
| commit | 954be9e2d9bfca8b33ac1cb36d3226bf2555f2c1 (patch) | |
| tree | f5d2d89e0de5f94683ed6078db60b0d906bde73f /Source/Core | |
| parent | cdc27e46f11040c4a76fdae78c166f842d90b507 (diff) | |
Handle BP mask register better to avoid useless BP writes (causing flushes)
Patch from konpie: http://forums.dolphin-emulator.com/showthread.php?tid=24658
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/VideoCommon/Src/BPMemory.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Source/Core/VideoCommon/Src/BPMemory.cpp b/Source/Core/VideoCommon/Src/BPMemory.cpp index 7272ed0993..7bc976a943 100644 --- a/Source/Core/VideoCommon/Src/BPMemory.cpp +++ b/Source/Core/VideoCommon/Src/BPMemory.cpp @@ -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) |
