From 2b843ce49d404e19e395a1fb80463888b428b98a Mon Sep 17 00:00:00 2001 From: tmkkmac Date: Sat, 14 Mar 2009 16:59:03 +0000 Subject: [PATCH] Fixed a problem around the VU clip code, introduced in r659. GoW and Persona (and more) now work without a gamefix. I'll remove the gamefix if there is no problem. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@783 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/x86/iVUzerorec.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pcsx2/x86/iVUzerorec.cpp b/pcsx2/x86/iVUzerorec.cpp index 7cf66ef529..e8e4b06efb 100644 --- a/pcsx2/x86/iVUzerorec.cpp +++ b/pcsx2/x86/iVUzerorec.cpp @@ -3002,21 +3002,22 @@ void VuInstruction::Recompile(list::iterator& itinst, u32 vuxyz) if( !CHECK_VUCLIPFLAGHACK && pparentinst != NULL ) { - if( pparentinst->pClipWrite == 0 ) { - pparentinst->pClipWrite = (uptr)SuperVUStaticAlloc(4); - } - if( nParentCheckForExecution >= 0 ) { + if( pparentinst->pClipWrite == 0 ) + pparentinst->pClipWrite = (uptr)SuperVUStaticAlloc(4); + if( s_ClipRead == 0 ) s_ClipRead = (uptr)&VU->VI[REG_CLIP_FLAG]; CMP32ItoM((uptr)&g_nLastBlockExecuted, nParentCheckForExecution); u8* jptr = JNE8(0); + CMP32ItoM((uptr)&s_ClipRead, (uptr)&VU->VI[REG_CLIP_FLAG]); + u8* jptr2 = JE8(0); MOV32MtoR(EAX, pparentinst->pClipWrite); MOV32RtoM(s_ClipRead, EAX); x86SetJ8(jptr); + x86SetJ8(jptr2); } - else s_ClipRead = (uptr)&VU->VI[REG_CLIP_FLAG]; } else s_ClipRead = (uptr)&VU->VI[REG_CLIP_FLAG]; }