mirror of https://github.com/PCSX2/pcsx2.git
microVU:
- Fixed a bug with my xgkick delay code from r1282. Fixes GT4. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1292 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
51ab9a6888
commit
cf1f7eda8c
|
@ -274,7 +274,7 @@ microVUf(void*) __fastcall mVUcompile(u32 startPC, uptr pState) {
|
|||
if (isNOP) { incPC(1); doUpperOp(); doIbit(); }
|
||||
else if (!swapOps) { incPC(1); doUpperOp(); doLowerOp(); }
|
||||
else { mVUopL(mVU, 1); incPC(1); doUpperOp(); }
|
||||
if (doXGKICK) { mVU_XGKICK_DELAY(mVU); }
|
||||
if (doXGKICK) { mVU_XGKICK_DELAY(mVU, 1); }
|
||||
|
||||
if (!isBdelay) { incPC(1); }
|
||||
else {
|
||||
|
@ -374,7 +374,7 @@ eBitTemination:
|
|||
AND32ItoR (flagReg, 0x0fcf);
|
||||
OR32MtoR (flagReg, (uptr)&mVU->divFlag);
|
||||
}
|
||||
if (doXGKICK) { mVU_XGKICK_DELAY(mVU); }
|
||||
if (doXGKICK) { mVU_XGKICK_DELAY(mVU, 1); }
|
||||
|
||||
// Do E-bit end stuff here
|
||||
mVUsetupRange(mVU, xPC - 8);
|
||||
|
|
|
@ -78,10 +78,9 @@ microVUt(int) mVUsetFlags(mV, int* xStatus, int* xMac, int* xClip) {
|
|||
u32 aCount = 1; // Amount of instructions needed to get valid mac flag instances for block linking
|
||||
|
||||
// Ensure last ~4+ instructions update mac flags
|
||||
setCode();
|
||||
for (int i = mVUcount; i > 0; i--, aCount++) {
|
||||
if (doStatus) { if (__Mac) { mVUinfo |= _doMac; } if (aCount >= 4) { break; } }
|
||||
incPC(-2);
|
||||
incPC2(-2);
|
||||
}
|
||||
|
||||
// Status/Mac Flags Setup Code
|
||||
|
|
|
@ -1061,24 +1061,26 @@ void __fastcall mVU_XGKICK__(u32 addr) {
|
|||
GSGIFTRANSFER1((u32*)microVU1.regs->Mem, ((addr<<4)&0x3fff));
|
||||
}
|
||||
|
||||
microVUt(void) mVU_XGKICK_DELAY(mV, bool memVI) {
|
||||
mVUbackupRegs(mVU);
|
||||
if (memVI) MOV32MtoR(gprT2, (uptr)&mVU->VIxgkick);
|
||||
else mVUallocVIa(mVU, gprT2, _Is_);
|
||||
if (mtgsThread) CALLFunc((uptr)mVU_XGKICK_);
|
||||
else CALLFunc((uptr)mVU_XGKICK__);
|
||||
mVUrestoreRegs(mVU);
|
||||
}
|
||||
|
||||
mVUop(mVU_XGKICK) {
|
||||
pass1 { mVUanalyzeXGkick(mVU, _Is_, mVU_XGKICK_CYCLES); }
|
||||
pass2 {
|
||||
mVUprint("XGkick");
|
||||
mVUallocVIa(mVU, gprT1, _Is_);
|
||||
if (!mVU_XGKICK_CYCLES) { mVU_XGKICK_DELAY(mVU, 0); return; }
|
||||
else if (doXGKICK) { mVU_XGKICK_DELAY(mVU, 1); mVUinfo &= ~_doXGKICK; }
|
||||
mVUallocVIa(mVU, gprT1, _Is_);
|
||||
MOV32RtoM((uptr)&mVU->VIxgkick, gprT1);
|
||||
}
|
||||
pass3 { mVUlog("XGKICK vi%02d", _Fs_); }
|
||||
}
|
||||
|
||||
microVUt(void) mVU_XGKICK_DELAY(mV) {
|
||||
MOV32MtoR(gprT2, (uptr)&mVU->VIxgkick); // gprT2 = ECX for __fastcall
|
||||
mVUbackupRegs(mVU);
|
||||
if (mtgsThread != NULL) CALLFunc((uptr)mVU_XGKICK_);
|
||||
else CALLFunc((uptr)mVU_XGKICK__);
|
||||
mVUrestoreRegs(mVU);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
// Branches/Jumps
|
||||
//------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue