mirror of https://github.com/PCSX2/pcsx2.git
-Fix for killzone.
-Did same code for VIF0 just to standardize things a little. If this breaks anything let me know, and make sure it is this revision please. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4013 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
0bf97480b7
commit
d87d13e155
|
@ -107,17 +107,36 @@ __fi void vif0SetupTransfer()
|
|||
|
||||
if (vif0ch.chcr.TTE)
|
||||
{
|
||||
// Transfer dma tag if tte is set
|
||||
|
||||
bool ret;
|
||||
|
||||
if (vif0.vifstalled)
|
||||
ret = VIF0transfer((u32*)ptag + (2 + vif0.irqoffset), 2 - vif0.irqoffset); //Transfer Tag on stall
|
||||
else
|
||||
ret = VIF0transfer((u32*)ptag + 2, 2); //Transfer Tag
|
||||
static __aligned16 u128 masked_tag;
|
||||
|
||||
if ((ret == false) && vif0.irqoffset < 2)
|
||||
masked_tag._u64[0] = 0;
|
||||
masked_tag._u64[1] = *((u64*)ptag + 1);
|
||||
|
||||
VIF_LOG("\tVIF0 SrcChain TTE=1, data = 0x%08x.%08x", masked_tag._u32[3], masked_tag._u32[2]);
|
||||
|
||||
if (vif0.vifstalled)
|
||||
{
|
||||
ret = VIF0transfer((u32*)&masked_tag + vif0.irqoffset, 4 - vif0.irqoffset, true); //Transfer Tag on stall
|
||||
//ret = VIF0transfer((u32*)ptag + (2 + vif0.irqoffset), 2 - vif0.irqoffset); //Transfer Tag on stall
|
||||
}
|
||||
else
|
||||
{
|
||||
//Some games (like killzone) do Tags mid unpack, the nops will just write blank data
|
||||
//to the VU's, which breaks stuff, this is where the 128bit packet will fail, so we ignore the first 2 words
|
||||
vif0.irqoffset = 2;
|
||||
ret = VIF0transfer((u32*)&masked_tag + 2, 2, true); //Transfer Tag
|
||||
//ret = VIF0transfer((u32*)ptag + 2, 2); //Transfer Tag
|
||||
}
|
||||
|
||||
if (!ret && vif0.irqoffset)
|
||||
{
|
||||
vif0.inprogress = 0; //Better clear this so it has to do it again (Jak 1)
|
||||
return; //There has been an error or an interrupt
|
||||
return; //IRQ set by VIFTransfer
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -218,7 +218,10 @@ __fi void vif1SetupTransfer()
|
|||
}
|
||||
else
|
||||
{
|
||||
ret = VIF1transfer((u32*)&masked_tag, 4, true); //Transfer Tag
|
||||
//Some games (like killzone) do Tags mid unpack, the nops will just write blank data
|
||||
//to the VU's, which breaks stuff, this is where the 128bit packet will fail, so we ignore the first 2 words
|
||||
vif1.irqoffset = 2;
|
||||
ret = VIF1transfer((u32*)&masked_tag + 2, 2, true); //Transfer Tag
|
||||
//ret = VIF1transfer((u32*)ptag + 2, 2); //Transfer Tag
|
||||
}
|
||||
|
||||
|
@ -226,8 +229,7 @@ __fi void vif1SetupTransfer()
|
|||
{
|
||||
vif1.inprogress &= ~1; //Better clear this so it has to do it again (Jak 1)
|
||||
return; //IRQ set by VIFTransfer
|
||||
|
||||
} //else vif1.vifstalled = false;
|
||||
}
|
||||
}
|
||||
vif1.irqoffset = 0;
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ _vifT static __fi bool vifTransfer(u32 *data, int size, bool TTE) {
|
|||
vifStruct& vifX = GetVifX;
|
||||
|
||||
// irqoffset necessary to add up the right qws, or else will spin (spiderman)
|
||||
int transferred = vifX.vifstalled ? vifX.irqoffset : 0;
|
||||
int transferred = vifX.irqoffset;
|
||||
|
||||
vifX.irqoffset = 0;
|
||||
vifX.vifstalled = false;
|
||||
|
@ -146,17 +146,20 @@ _vifT static __fi bool vifTransfer(u32 *data, int size, bool TTE) {
|
|||
vifXch.madr +=(transferred << 4);
|
||||
vifXch.qwc -= transferred;
|
||||
}
|
||||
if (!vifXch.qwc && !vifX.irqoffset) vifX.inprogress &= ~0x1;
|
||||
|
||||
if (!vifXch.qwc && !vifX.irqoffset)
|
||||
{
|
||||
vifX.inprogress &= ~0x1;
|
||||
vifX.vifstalled = false;
|
||||
}
|
||||
|
||||
if (vifX.irq && vifX.cmd == 0) {
|
||||
//DevCon.WriteLn("Vif IRQ!");
|
||||
if(((vifXRegs.code >> 24) & 0x7f) != 0x7)
|
||||
{
|
||||
vifX.vifstalled = true;
|
||||
vifXRegs.stat.VIS = true; // Note: commenting this out fixes WALL-E?
|
||||
}
|
||||
|
||||
if (!vifXch.qwc && !vifX.irqoffset) vifX.inprogress &= ~1;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue