From d4d0450145f9a82a4007473e8341e56a1abfb03d Mon Sep 17 00:00:00 2001 From: cottonvibes Date: Wed, 27 Aug 2008 05:25:26 +0000 Subject: [PATCH] fixed the mgs3 missing texture bug! i think Dawn of Mana's minor-texture problems are gone now as well :) i'm still not entirely sure why the old code didn't work, most-likely conflicting reg-allocations... i might have to check some more opcodes in case they also have the allocation problems :x git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@61 a6443dda-0b58-4228-96e9-037be469359c --- pcsx2/x86/iVUmicro.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pcsx2/x86/iVUmicro.c b/pcsx2/x86/iVUmicro.c index f7f2488691..ec7a066137 100644 --- a/pcsx2/x86/iVUmicro.c +++ b/pcsx2/x86/iVUmicro.c @@ -5375,16 +5375,16 @@ void recVUMI_FMAND( VURegs *VU, int info ) int fsreg, ftreg; if ( _Ft_ == 0 ) return; - if( _Ft_ != _Fs_ ) { - fsreg = ALLOCVI(_Fs_, MODE_READ); - ftreg = ALLOCVI(_Ft_, MODE_WRITE); - MOVZX32M16toR( ftreg, VU_VI_ADDR(REG_MAC_FLAG, 1) ); - AND16RtoR( ftreg, fsreg); - } - else { - ftreg = ALLOCVI(_Ft_, MODE_WRITE); - AND16MtoR( ftreg, VU_VI_ADDR(REG_MAC_FLAG, 1) ); + fsreg = _checkX86reg(X86TYPE_VI|(VU==&VU1?X86TYPE_VU1:0), _Fs_, MODE_READ); + ftreg = ALLOCVI(_Ft_, MODE_WRITE);//|MODE_8BITREG); + + if( fsreg >= 0 ) { + if( ftreg != fsreg ) MOV32RtoR(ftreg, fsreg); } + else MOV16MtoR(ftreg, VU_VI_ADDR(_Fs_, 1)); + + AND16MtoR( ftreg, VU_VI_ADDR(REG_MAC_FLAG, 1)); + //MOVZX32R16toR(ftreg, ftreg); } void recVUMI_FMEQ( VURegs *VU, int info )