diff --git a/pcsx2/Gif.cpp b/pcsx2/Gif.cpp index 24a82be884..7deaaaa778 100644 --- a/pcsx2/Gif.cpp +++ b/pcsx2/Gif.cpp @@ -55,10 +55,20 @@ __forceinline void gsInterrupt() return; } - if ((vif1.cmd & 0x7f) == 0x51) // DIRECTHL + + + if ((vif1.cmd & 0x7e) == 0x50) // DIRECT/HL { - // Not waiting for the end of the Gif transfer. - if (Path3progress != IMAGE_MODE) vif1Regs->stat.VGW = false; + + //original behaviour here - if (Path3progress != IMAGE_MODE) vif1Regs->stat.VGW = false; + + // Transfer in progress on VIF and GIF has finished so let VIF do its bit + if (Path3progress == STOPPED_MODE) + { + vif1Regs->stat.VGW = false; + CPU_INT( DMAC_GIF, 4 ); + return; + } } if (Path3progress == STOPPED_MODE) @@ -209,7 +219,7 @@ void GIFdma() gifRegs->stat.FQC |= 0x10;// FQC=31, hack ;) (for values of 31 that equal 16) [ used to be 0xE00; // OPH=1 | APATH=3] //Path2 gets priority in intermittent mode - if ((gifRegs->stat.P1Q || (vif1.cmd & 0x7f) == 0x50) && gifRegs->mode.IMT && (Path3progress == IMAGE_MODE)) + if ((gifRegs->stat.P1Q || (vif1.cmd & 0x7e) == 0x50) && gifRegs->mode.IMT && (Path3progress == STOPPED_MODE)) { // We are in image mode doing DIRECTHL, Path 1 is in queue, and in intermittant mode. GIF_LOG("Waiting VU %x, PATH2 %x, GIFMODE %x Progress %x", gifRegs->stat.P1Q, (vif1.cmd & 0x7f), gifRegs->mode._u32, Path3progress); diff --git a/pcsx2/Vif1_Dma.cpp b/pcsx2/Vif1_Dma.cpp index ca3e60b23d..57ec483fec 100644 --- a/pcsx2/Vif1_Dma.cpp +++ b/pcsx2/Vif1_Dma.cpp @@ -200,9 +200,9 @@ __forceinline void vif1Interrupt() if ((vif1Regs->stat.VGW)) { - if (gif->chcr.STR) + if (gif->chcr.STR && (Path3progress != STOPPED_MODE)) { - CPU_INT(DMAC_VIF1, gif->qwc * BIAS); + CPU_INT(DMAC_VIF1, 4); return; } else diff --git a/pcsx2/Vif_Codes.cpp b/pcsx2/Vif_Codes.cpp index 837d95db42..d0dd399350 100644 --- a/pcsx2/Vif_Codes.cpp +++ b/pcsx2/Vif_Codes.cpp @@ -109,14 +109,18 @@ template _f int _vifCode_Direct(int pass, u8* data, bool isDirectHL) { vif1Only(); //return vifTrans_DirectHL((u32*)data); - if (isDirectHL) { - if (gif->chcr.STR && (!vif1Regs->mskpath3 && (Path3progress == IMAGE_MODE))) { - DevCon.WriteLn("DirectHL: Waiting for Path3 to finish!"); - vif1Regs->stat.VGW = true; // PATH3 is in image mode, so wait for end of transfer - vif1.vifstalled = true; - return 0; - } + //Should probably do this for both types of transfer seen as the GS hates taking 2 seperate chunks + //if (isDirectHL) { + if (gif->chcr.STR && (!vif1Regs->mskpath3 && (Path3progress != STOPPED_MODE))) + { + /*if(!isDirectHL) DevCon.WriteLn("Direct: Waiting for Path3 to finish!"); + else DevCon.WriteLn("DirectHL: Waiting for Path3 to finish!");*/ + + vif1Regs->stat.VGW = true; // PATH3 is in image mode, so wait for end of transfer + vif1.vifstalled = true; + return 0; } + //} Registers::Freeze(); nVifStruct& v = nVif[1];