- A small optimization from my r2732 fix.
- Enabled some code for some questionable vifcode MARK behavior. Prints to console if the case happens since unsure if its correct.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2736 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
cottonvibes 2010-03-18 23:17:42 +00:00
parent ef20c1a93f
commit 6212789a96
2 changed files with 14 additions and 9 deletions

View File

@ -22,13 +22,13 @@
// VifCode Transfer Interpreter (Vif0/Vif1)
//------------------------------------------------------------------
// Runs the next vifCode if its the Mark command
_vifT void runMark(u32* &data) {
// Doesn't stall if the next vifCode is the Mark command
_vifT bool runMark(u32* &data) {
if (vifX.vifpacketsize && (((data[0]>>24)&0x7f)==7)) {
vifX.vifpacketsize--;
vifXCode[7](0, data++);
DevCon.WriteLn("Vif%d: Running Mark on I-bit", idx);
Console.WriteLn("Vif%d: Running Mark after I-bit", idx);
return 0; // No Stall?
}
return 1; // Stall
}
// Returns 1 if i-bit && finished vifcode && i-bit not masked
@ -37,9 +37,14 @@ _vifT bool analyzeIbit(u32* &data, int iBit) {
//DevCon.WriteLn("Vif I-Bit IRQ");
vifX.irq++;
// On i-bit, the command is run, vif stalls etc,
// however if the vifcode is MASK, you do NOT stall, just send IRQ. - Max Payne shows this up.
// however if the vifcode is MARK, you do NOT stall, just send IRQ. - Max Payne shows this up.
if((vifX.cmd & 0x7f) == 0x7) return 0;
else return 1;
// If we have a vifcode with i-bit, the following instruction
// should stall unless its MARK?.. we test that case here...
// Not 100% sure if this is the correct behavior, so printing
// a console message to see games that use this. (cottonvibes)
return runMark<idx>(data);
}
return 0;
}

View File

@ -57,8 +57,8 @@ _f void VifUnpackSSE_Dynarec::SetMasks(int cS) const {
u32 m3 = (m1>>1) & ~m0;
u32* row = (v.idx) ? g_vifmask.Row1 : g_vifmask.Row0;
u32* col = (v.idx) ? g_vifmask.Col1 : g_vifmask.Col0;
if (isFill||(m2&&doMask)||doMode) { xMOVAPS(xmmRow, ptr32[row]); }
if (isFill||(m3&&doMask)) {
if((m2&&(doMask||isFill))||doMode) { xMOVAPS(xmmRow, ptr32[row]); }
if (m3&&(doMask||isFill)) {
xMOVAPS(xmmCol0, ptr32[col]);
if ((cS>=2) && (m3&0x0000ff00)) xPSHUF.D(xmmCol1, xmmCol0, _v1);
if ((cS>=3) && (m3&0x00ff0000)) xPSHUF.D(xmmCol2, xmmCol0, _v2);