diff --git a/pcsx2/PsxInterpreter.c b/pcsx2/PsxInterpreter.c index f59451d9d2..606cc7bdc6 100644 --- a/pcsx2/PsxInterpreter.c +++ b/pcsx2/PsxInterpreter.c @@ -351,7 +351,16 @@ void spyFunctions(){ * Format: OP rt, rs, immediate * *********************************************************/ void psxADDI() { if (!_Rt_) return; _rRt_ = _u32(_rRs_) + _Imm_ ; } // Rt = Rs + Im (Exception on Integer Overflow) -void psxADDIU() { if (!_Rt_) { g_psxNextBranchCycle=psxRegs.cycle; zeroEx(); return; } _rRt_ = _u32(_rRs_) + _Imm_ ; } // Rt = Rs + Im +void psxADDIU() { // Rt = Rs + Im + if (!_Rt_) + { + // BIOS Call -- force a branch test (fixes crashes in many games) + g_psxNextBranchCycle=psxRegs.cycle; + zeroEx(); + return; + } + _rRt_ = _u32(_rRs_) + _Imm_ ; +} void psxANDI() { if (!_Rt_) return; _rRt_ = _u32(_rRs_) & _ImmU_; } // Rt = Rs And Im void psxORI() { if (!_Rt_) return; _rRt_ = _u32(_rRs_) | _ImmU_; } // Rt = Rs Or Im void psxXORI() { if (!_Rt_) return; _rRt_ = _u32(_rRs_) ^ _ImmU_; } // Rt = Rs Xor Im diff --git a/pcsx2/R5900.c b/pcsx2/R5900.c index 651f0546c6..f9ca4001b6 100644 --- a/pcsx2/R5900.c +++ b/pcsx2/R5900.c @@ -701,7 +701,16 @@ void IntcpuBranchTest() if (VU0.VI[REG_VPU_STAT].UL & 0x1) { Cpu->ExecuteVU0Block(); + + // This might be needed to keep the EE and VU0 in sync. + // A better fix will require hefty changes to the VU recs. -_- + if(VU0.VI[REG_VPU_STAT].UL & 0x1) + cpuSetNextBranchDelta( 768 ); + } + + // fixme: why is this in the interpreter but not in the recompiler? (Air) + if (VU0.VI[REG_VPU_STAT].UL & 0x100) { Cpu->ExecuteVU1Block(); } diff --git a/pcsx2/windows/VCprojects/pcsx2_2008.vcproj b/pcsx2/windows/VCprojects/pcsx2_2008.vcproj index df2cf4a892..5e02055c90 100644 --- a/pcsx2/windows/VCprojects/pcsx2_2008.vcproj +++ b/pcsx2/windows/VCprojects/pcsx2_2008.vcproj @@ -1460,6 +1460,14 @@ + + +