mirror of https://github.com/PCSX2/pcsx2.git
x86/microVU: Write VIs from CTC2 as 16 bits
The micro recompilers only write as 16 bit, so in case the value in the register was greater than 0xFFFF, we don't want to store higher bits that get stuck.
This commit is contained in:
parent
a12accf3fa
commit
a7af3cd483
|
@ -513,11 +513,22 @@ static void recCTC2()
|
|||
xAND(eax, 0x0C0C);
|
||||
xMOV(ptr32[&vu0Regs.VI[REG_FBRST].UL], eax);
|
||||
break;
|
||||
case 0:
|
||||
// Ignore writes to vi00.
|
||||
break;
|
||||
default:
|
||||
// Executing vu0 block here fixes the intro of Ratchet and Clank
|
||||
// sVU's COP2 has a comment that "Donald Duck" needs this too...
|
||||
if (_Rd_)
|
||||
if (_Rd_ < REG_STATUS_FLAG)
|
||||
{
|
||||
// Need to expand this out, because we want to write as 16 bits.
|
||||
_eeMoveGPRtoR(eax, _Rt_);
|
||||
xMOV(ptr16[&vu0Regs.VI[_Rd_].US[0]], ax);
|
||||
}
|
||||
else
|
||||
{
|
||||
_eeMoveGPRtoM((uptr)&vu0Regs.VI[_Rd_].UL, _Rt_);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue