Index: pcsx2/x86/microVU_Compile.inl =================================================================== --- pcsx2/x86/microVU_Compile.inl (revision 1268) +++ pcsx2/x86/microVU_Compile.inl (working copy) @@ -187,19 +187,28 @@ void __fastcall mVUprintPC1(u32 PC) { Console::WriteLn("Block startPC [%04x]", params PC); } void __fastcall mVUprintPC2(u32 PC) { Console::WriteLn("Block endPC [%04x]\n", params PC); } +microVUt(void) __fastcall getmeouttahere(u32 pc) +{ + microVU* mVU = mVUx; + if (!vuIndex) + mVUwarning0(pc); + else + mVUwarning1(pc); + VU0.VI[REG_VPU_STAT].UL &= vuIndex ? ~0x100 : ~0x001; + mVU->regs->vifRegs->stat &= ~0x4; // Clear VU 'is busy' signal for vif + mVU->regs->VI[REG_TPC].UL = pc; + static u8** finaldestination; + *finaldestination = mVU->exitFunct; + asm jmp [finaldestination]; +} + microVUt(void) mVUtestCycles() { microVU* mVU = mVUx; iPC = mVUstartPC; mVUdebugNOW(0); - CMP32ItoM((uptr)&mVU->cycles, 0); - u8* jmp8 = JG8(0); - MOV32ItoR(gprT2, xPC); - if (!vuIndex) CALLFunc((uptr)mVUwarning0); - else CALLFunc((uptr)mVUwarning1); - MOV32ItoR(gprR, Roffset); // Restore gprR - mVUendProgram(0, 0, sI, 0, cI); - x86SetJ8(jmp8); - SUB32ItoM((uptr)&mVU->cycles, mVUcycles); + xMOX(ecx, xPC); + xSUB(ptr32[&mVU->cycles], mVUcycles); + xJS(getmeouttahere); } //------------------------------------------------------------------