- Increased mVU run cycles (Fixes Kloana 2's Inf Loop messages)
- Fixed some potential problems with the log code that would cause some games to crash.
- Minor Changes...

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1271 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
cottonvibes 2009-05-27 05:33:36 +00:00
parent 47bdb31473
commit b1eadad216
5 changed files with 31 additions and 9 deletions

View File

@ -279,7 +279,7 @@ namespace VU1micro
FreezeXMMRegs(1);
//FreezeMMXRegs(1);
runVUrec(VU1.VI[REG_TPC].UL, 300000 /*0x7fffffff*/, 1);
runVUrec(VU1.VI[REG_TPC].UL, 3000000 /*0x7fffffff*/, 1);
//FreezeMMXRegs(0);
FreezeXMMRegs(0);

View File

@ -56,6 +56,8 @@
#define incP() { mVU->p = (mVU->p+1) & 1; }
#define incQ() { mVU->q = (mVU->q+1) & 1; }
#define doUpperOp() { mVUopU<vuIndex, 1>(); mVUdivSet<vuIndex>(); }
#define doLowerOp() { incPC(-1); mVUopL<vuIndex, 1>(); incPC(1); }
#define doIbit() { if (curI & _Ibit_) { incPC(-1); MOV32ItoM((uptr)&mVU->regs->VI[REG_I].UL, curI); incPC(1); } }
//------------------------------------------------------------------
// Helper Functions
@ -274,8 +276,8 @@ microVUt(void*) __fastcall mVUcompile(u32 startPC, uptr pState) {
int x;
for (x = 0; x < (vuIndex ? (0x3fff/8) : (0xfff/8)); x++) {
if (isEOB) { x = 0xffff; }
if (isNOP) { incPC(1); doUpperOp(); if (curI & _Ibit_) { incPC(-1); MOV32ItoM((uptr)&mVU->regs->VI[REG_I].UL, curI); incPC(1); } }
else if (!swapOps) { incPC(1); doUpperOp(); incPC(-1); mVUopL<vuIndex, 1>(); incPC(1); }
if (isNOP) { incPC(1); doUpperOp(); doIbit(); }
else if (!swapOps) { incPC(1); doUpperOp(); doLowerOp(); }
else { mVUopL<vuIndex, 1>(); incPC(1); doUpperOp(); }
if (!isBdelay) { incPC(1); }
@ -364,12 +366,22 @@ microVUt(void*) __fastcall mVUcompile(u32 startPC, uptr pState) {
eBitTemination:
mVUprint("mVUcompile ebit");
int lStatus = findFlagInst(xStatus, 0x7fffffff);
int lMac = findFlagInst(xMac, 0x7fffffff);
int lClip = findFlagInst(xClip, 0x7fffffff);
mVUinfo = 0;
incCycles(100); // Ensures Valid P/Q instances (And sets all cycle data to 0)
mVUcycles -= 100;
if (doDivFlag) {
int flagReg;
getFlagReg(flagReg, lStatus);
AND32ItoR (flagReg, 0x0fcf);
OR32MtoR (flagReg, (uptr)&mVU->divFlag);
}
// Do E-bit end stuff here
mVUsetupRange<vuIndex>(xPC - 8);
mVUendProgram<vuIndex>(mVU->q, mVU->p, findFlagInst(xStatus, 0x7fffffff), findFlagInst(xMac, 0x7fffffff), findFlagInst(xClip, 0x7fffffff));
mVUendProgram<vuIndex>(mVU->q, mVU->p, lStatus, lMac, lClip);
return thisPtr;
}

View File

@ -44,6 +44,9 @@ microVUt(void) __mVUdumpProgram(int progIndex) {
bool bitX[7];
char str[30];
int delay = 0;
int bBranch = mVUbranch;
int bCode = mVU->code;
int bPC = iPC;
mVUbranch = 0;
sprintf(str, "%s\\microVU%d prog - %02d.html", LOGS_DIR, vuIndex, progIndex);
@ -116,6 +119,10 @@ microVUt(void) __mVUdumpProgram(int progIndex) {
mVUlog("</body>\n");
mVUlog("</html>\n");
fclose(mVU->logFile);
mVUbranch = bBranch;
mVU->code = bCode;
iPC = bPC;
setCode();
}
#endif //PCSX2_MICROVU

View File

@ -291,9 +291,9 @@ declareAllVariables
#endif
// Speed Hacks (Set to 1 to turn On)
#define CHECK_VU_FLAGHACK 0 // Status Flag Speed Hack (Very-Compatible)
#define CHECK_VU_FLAGHACK2 0 // Status Flag Speed Hack (More-Hacky)
#define CHECK_VU_MINMAXHACK 0 // Min/Max Speed Hack (Semi-Compatible)
#define CHECK_VU_FLAGHACK 0 // Status Flag Speed Hack (Can cause Infinite loops, SPS, etc...)
#define CHECK_VU_FLAGHACK2 0 // Status Flag Speed Hack (Can cause Infinite loops, SPS, etc...)
#define CHECK_VU_MINMAXHACK 0 // Min/Max Speed Hack (Can cause SPS, Black Screens, etc...)
// Cache Limit Check
#define mVUcacheCheck(ptr, start, limit) { \

View File

@ -302,12 +302,15 @@ microVUt(void) mVUrestoreRegs() {
microVUt(void) mVUcheckSflag(int progIndex) {
if (CHECK_VU_FLAGHACK) {
microVU* mVU = mVUx;
mVUsFlagHack = 1;
int bFlagInfo = mVUflagInfo;
int bCode = mVU->code;
mVUsFlagHack = 1;
for (u32 i = 0; i < mVU->progSize; i+=2) {
mVU->code = mVU->prog.prog[progIndex].data[i];
mVUopL<vuIndex, 3>();
}
mVUflagInfo = 0;
mVUflagInfo = bFlagInfo;
mVU->code = bCode;
mVU->prog.prog[progIndex].sFlagHack = mVUsFlagHack;
}
}