Skip to content
Permalink
Browse files

Vif Rec: Emulate Mode = 3 for test, not sure any games use it.

Interpreter is still wrong, but currently crashy on this test, as it doesn't get this far I'm scared to change it in case it kills other stuff
  • Loading branch information...
refractionpcsx2 committed Jan 29, 2016
1 parent eaa2112 commit e5e0f85b50feb943e761944ca4a368402a1600f2
Showing with 22 additions and 7 deletions.
  1. +22 −7 pcsx2/x86/newVif_Dynarec.cpp
@@ -118,14 +118,29 @@ void VifUnpackSSE_Dynarec::doMaskWrite(const xRegisterSSE& regX) const {
if (m5 < 0xf)
{
xPXOR(xmmTemp, xmmTemp);
mergeVectors(xmmTemp, xmmRow, xmmTemp, m5);
xPADD.D(regX, xmmTemp);
if (doMode==2) mergeVectors(xmmRow, regX, xmmTemp, m5);
if (doMode == 3)
{
mergeVectors(xmmRow, regX, xmmTemp, m5);
}
else
{
mergeVectors(xmmTemp, xmmRow, xmmTemp, m5);
xPADD.D(regX, xmmTemp);
if (doMode == 2) mergeVectors(xmmRow, regX, xmmTemp, m5);
}

}
else
{
xPADD.D(regX, xmmRow);
if (doMode==2){ xMOVAPS(xmmRow, regX); }
if (doMode == 3)
{
xMOVAPS(xmmRow, regX);
}
else
{
xPADD.D(regX, xmmRow);
if (doMode == 2) { xMOVAPS(xmmRow, regX); }
}
}
}
xMOVAPS(ptr32[dstIndirect], regX);
@@ -135,7 +150,7 @@ void VifUnpackSSE_Dynarec::writeBackRow() const {
const int idx = v.idx;
xMOVAPS(ptr128[&(MTVU_VifX.MaskRow)], xmmRow);

DevCon.WriteLn("nVif: writing back row reg! [doMode = 2]");
DevCon.WriteLn("nVif: writing back row reg! [doMode = %d]", doMode);
// ToDo: Do we need to write back to vifregs.rX too!? :/
}

@@ -239,7 +254,7 @@ void VifUnpackSSE_Dynarec::CompileRoutine() {
}
}

if (doMode==2) writeBackRow();
if (doMode>=2) writeBackRow();
xRET();
}

0 comments on commit e5e0f85

Please sign in to comment.
You can’t perform that action at this time.