- Fixed a bug from r1630 (it was breaking SO3 and probably some other games)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1632 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
cottonvibes 2009-08-16 06:09:11 +00:00
parent e0aaf5569a
commit a364c72a57
2 changed files with 12 additions and 7 deletions

View File

@ -360,8 +360,11 @@ microVUt(void) analyzeBranchVI(mV, int xReg, bool &infoVar) {
int bPC = iPC;
incPC2(-2);
for (i = 0; i < iEnd; i++) {
if (i == mVUcount) {
if (mVUpBlock->pState.viBackUp == xReg) infoVar = 1;
if ((i == mVUcount) && (i < 5)) {
if (mVUpBlock->pState.viBackUp == xReg) {
infoVar = 1;
i++;
}
break;
}
if ((mVUlow.VI_write.reg == xReg) && mVUlow.VI_write.used) {
@ -374,13 +377,15 @@ microVUt(void) analyzeBranchVI(mV, int xReg, bool &infoVar) {
break;
}
if (i) {
if (!infoVar) {
incPC2(2);
if (!infoVar) mVUlow.backupVI = 1;
iPC = bPC;
mVUlow.backupVI = 1;
infoVar = 1;
DevCon::Status("microVU%d: Branch VI-Delay (%d) [%04x]", params getIndex, i, xPC);
}
iPC = bPC;
DevCon::Status("microVU%d: Branch VI-Delay (%d) [%04x]", params getIndex, i, xPC);
}
else iPC = bPC;
}
microVUt(void) mVUanalyzeBranch1(mV, int Is) {

View File

@ -163,7 +163,7 @@ microVUt(void) branchWarning(mV) {
mVUlow.isNOP = 1;
}
if (mVUinfo.isBdelay) { // Check if VI Reg Written to on Branch Delay
if (mVUlow.VI_write.reg && mVUlow.VI_write.used) {
if (mVUlow.VI_write.reg && mVUlow.VI_write.used && !mVUlow.readFlags) {
mVUlow.backupVI = 1;
mVUregs.viBackUp = mVUlow.VI_write.reg;
}