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

Diff of /trunk/pcsx2/Vif.cpp

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

--- trunk/pcsx2/Vif.cpp	2010/12/23 11:48:33	279
+++ trunk/pcsx2/Vif.cpp	2010/12/23 12:02:12	280
@@ -77,12 +77,16 @@
 
 		memzero(vif0);
 		vif0ch.qwc = 0; //?
-		cpuRegs.interrupt &= ~1; //Stop all vif0 DMA's
+		//cpuRegs.interrupt &= ~1; //Stop all vif0 DMA's
 		psHu64(VIF0_FIFO) = 0;
 		psHu64(VIF0_FIFO + 8) = 0;
-		vif0.done = false;
+		vif0.vifstalled = false;
+		vif0.inprogress = 0;
+		vif0.cmd = 0;
+		//vif0.done = false;
 		vif0Regs.err.reset();
 		vif0Regs.stat.clear_flags(VIF0_STAT_FQC | VIF0_STAT_INT | VIF0_STAT_VSS | VIF0_STAT_VIS | VIF0_STAT_VFS | VIF0_STAT_VPS); // FQC=0
+		if(vif0ch.chcr.STR == true) CPU_INT(DMAC_VIF0, 4);
 	}
 
 	/* Fixme: Forcebreaks are pretty unknown for operation, presumption is it just stops it what its doing
@@ -137,7 +141,8 @@
 		memzero(vif1);
 
 		//cpuRegs.interrupt &= ~((1 << 1) | (1 << 10)); //Stop all vif1 DMA's
-		vif1ch.qwc -= min((int)vif1ch.qwc, 16); //?
+		//vif1ch.qwc -= min((int)vif1ch.qwc, 16); //not sure if the dma should stop, FFWDing could be tricky
+		vif1ch.qwc = 0;
 		psHu64(VIF1_FIFO) = 0;
 		psHu64(VIF1_FIFO + 8) = 0;
 		//vif1.done = false;
@@ -160,6 +165,7 @@
 		vif1.vifstalled = false;
 		vif1Regs.stat.FQC = 0;
 		vif1Regs.stat.clear_flags(VIF1_STAT_FDR | VIF1_STAT_INT | VIF1_STAT_VSS | VIF1_STAT_VIS | VIF1_STAT_VFS | VIF1_STAT_VPS);
+		if(vif1ch.chcr.STR == true) CPU_INT(DMAC_VIF1, 4);
 	}
 
 	/* Fixme: Forcebreaks are pretty unknown for operation, presumption is it just stops it what its doing

 

  ViewVC Help
Powered by ViewVC 1.1.22