/[pcsx2_0.9.7]/trunk/pcsx2/Vif1_Dma.cpp
ViewVC logotype

Diff of /trunk/pcsx2/Vif1_Dma.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/pcsx2/Vif1_Dma.cpp	2010/11/12 00:35:47	272
+++ trunk/pcsx2/Vif1_Dma.cpp	2010/11/12 01:10:22	273
@@ -204,19 +204,32 @@
 
 			    bool ret;
 
+				static __aligned16 u128 masked_tag;
+				
+				masked_tag._u64[0] = 0;
+				masked_tag._u64[1] = *((u64*)ptag + 1);
+
+				VIF_LOG("\tVIF1 SrcChain TTE=1, data = 0x%08x.%08x", masked_tag._u32[3], masked_tag._u32[2]);
+
 				if (vif1.vifstalled)
 				{
-					ret = VIF1transfer((u32*)ptag + (2 + vif1.irqoffset), 2 - vif1.irqoffset);  //Transfer Tag on stall
+					ret = VIF1transfer((u32*)&masked_tag + vif1.irqoffset, 4 - vif1.irqoffset, true);  //Transfer Tag on stall
+					//ret = VIF1transfer((u32*)ptag + (2 + vif1.irqoffset), 2 - vif1.irqoffset);  //Transfer Tag on stall
 				}
 				else
-					ret = VIF1transfer((u32*)ptag + 2, 2);  //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
+				}
 				
-				if (!ret && vif1.irqoffset < 2)
+				if (!ret && vif1.irqoffset)
 				{
 					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;
 

 

  ViewVC Help
Powered by ViewVC 1.1.22