mirror of https://github.com/PCSX2/pcsx2.git
microVU: Fix for Red Faction 2
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4622 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
00132caca1
commit
9a3934af89
|
@ -168,13 +168,16 @@ void mVUdispatcherD(mV) {
|
|||
_mVUt void* __fastcall mVUexecute(u32 startPC, u32 cycles) {
|
||||
|
||||
microVU& mVU = mVUx;
|
||||
//DevCon.WriteLn("microVU%x: startPC = 0x%x, cycles = 0x%x", vuIndex, startPC, cycles);
|
||||
u32 vuLimit = vuIndex ? 0x3fff : 0xfff;
|
||||
if (startPC > vuLimit) {
|
||||
DevCon.Warning("microVU%x Warning: startPC = 0x%x, cycles = 0x%x", vuIndex, startPC, cycles);
|
||||
}
|
||||
|
||||
mVU.cycles = cycles;
|
||||
mVU.totalCycles = cycles;
|
||||
|
||||
xSetPtr(mVU.prog.x86ptr); // Set x86ptr to where last program left off
|
||||
return mVUsearchProg<vuIndex>(startPC, (uptr)&mVU.prog.lpState); // Find and set correct program
|
||||
return mVUsearchProg<vuIndex>(startPC & vuLimit, (uptr)&mVU.prog.lpState); // Find and set correct program
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
|
|
|
@ -85,9 +85,9 @@ __fi void mVUsetFlags(mV, microFlagCycles& mFC) {
|
|||
// Ensure last ~4+ instructions update mac/status flags (if next block's first 4 instructions will read them)
|
||||
for(int i = mVUcount; i > 0; i--, aCount++) {
|
||||
if (sFLAG.doFlag) {
|
||||
if (__Mac) { mFLAG.doFlag = 1; }
|
||||
if (__Status) { sFLAG.doNonSticky = 1; }
|
||||
if (aCount >= 4) { break; }
|
||||
if (__Mac) mFLAG.doFlag = 1;
|
||||
if (__Status) sFLAG.doNonSticky = 1;
|
||||
if (aCount >= 4) break;
|
||||
}
|
||||
incPC2(-2);
|
||||
}
|
||||
|
|
|
@ -227,6 +227,7 @@ typedef u32 (__fastcall *mVUCall)(void*, void*);
|
|||
#define shuffleSS(x) ((x==1)?(0x27):((x==2)?(0xc6):((x==4)?(0xe1):(0xe4))))
|
||||
#define clampE CHECK_VU_EXTRA_OVERFLOW
|
||||
#define elif else if
|
||||
#define varPrint(x) DevCon.WriteLn(#x " = %d", (int)x)
|
||||
|
||||
#define branchAddr ( \
|
||||
pxAssumeDev((iPC & 1) == 0, "microVU: Expected Lower Op for valid branch addr."), \
|
||||
|
|
Loading…
Reference in New Issue