From 04228543846578721693450caddc423ed862bd4c Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Fri, 11 Sep 2015 20:01:01 +0200 Subject: [PATCH] pcsx2:interpreter: always false condition Both fields are 10 bits but the ~ operation apply on the 32 bits. Therefore msb bits were always '1' and the condition always false. Code is only used on the interpreter but it could explain some hangs --- pcsx2/COP0.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcsx2/COP0.cpp b/pcsx2/COP0.cpp index 57dc869ecd..fa52d5aef4 100644 --- a/pcsx2/COP0.cpp +++ b/pcsx2/COP0.cpp @@ -509,7 +509,7 @@ void MTC0() } int CPCOND0() { - return ((dmacRegs.stat.CIS | ~dmacRegs.pcr.CPC) == 0x3ff); + return (((dmacRegs.stat.CIS | ~dmacRegs.pcr.CPC) & 0x3FF) == 0x3ff); } //#define CPCOND0 1