From 286b6110f1c358ec76205dc931e7c7dd2669ebc4 Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Wed, 20 Nov 2013 22:53:10 +0100 Subject: [PATCH] Revert "Handle BP mask register better to avoid useless BP writes (causing flushes)" This reverts commit 954be9e2d9bfca8b33ac1cb36d3226bf2555f2c1. Fixes issue 6826. --- Source/Core/VideoCommon/Src/BPMemory.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/Source/Core/VideoCommon/Src/BPMemory.cpp b/Source/Core/VideoCommon/Src/BPMemory.cpp index 7bc976a943..7272ed0993 100644 --- a/Source/Core/VideoCommon/Src/BPMemory.cpp +++ b/Source/Core/VideoCommon/Src/BPMemory.cpp @@ -19,18 +19,15 @@ 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; - int changes = (oldval ^ newval) & 0xFFFFFF; - BPCmd bp = {opcode, changes, newval}; - BPWritten(bp); - } - else - bpmem.bpMask = newval; + BPWritten(bp); } void GetBPRegInfo(const u8* data, char* name, size_t name_size, char* desc, size_t desc_size)