VIF: Hack for Dynasty Warriors 5 Empires. Completely harmless hack to make sure we aren't still waiting for PATH 2 data after a VIF reset. Something really odd is going off with the VIF packets in this game (probably SIF or something), but until we know what, this'll do.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5553 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
refraction@gmail.com 2013-02-10 18:31:35 +00:00
parent e8d865d01d
commit 7b195696a7
2 changed files with 23 additions and 1 deletions

View File

@ -21,6 +21,7 @@
#include "GS.h"
#include "Gif.h"
#include "MTVU.h"
#include "Gif_Unit.h"
__aligned16 vifStruct vif0, vif1;
@ -178,6 +179,27 @@ __fi void vif1FBRST(u32 value) {
psHu64(VIF1_FIFO + 8) = 0;
vif1.done = true;
vif1ch.chcr.STR = false;
//HACK!! Dynasty Warriors 5 Empires has some sort of wierd packet alignment thing going off, meaning
//the packet ends before the DirectHL in progress has finished. Not sure what causes that, but the GIF
//Unit is still waiting for more data, so we have to "pretend" it is finished when the game issues a reset
//which it does without causing any pauses.
//In most cases, this will never ever happen, so doing the following won't matter.
if(!gifUnit.gifPath[GIF_PATH_2].isDone())
{
DevCon.Warning("VIF1 FBRST While GIF Path2 is waiting for data!");
gifUnit.gifPath[GIF_PATH_2].state = GIF_PATH_IDLE;
gifUnit.gifPath[GIF_PATH_2].curSize = gifUnit.gifPath[GIF_PATH_2].curOffset;
if( gifRegs.stat.APATH == 2)
{
gifRegs.stat.APATH = 0;
gifRegs.stat.OPH = 0;
vif1Regs.stat.VGW = false; //Let vif continue if it's stuck on a flush
if(gifUnit.checkPaths(1,0,1)) gifUnit.Execute(false, true);
}
}
#if USE_OLD_GIF == 1 // ...
if(vif1Regs.mskpath3 == 1 && GSTransferStatus.PTH3 == STOPPED_MODE && gifch.chcr.STR == true) {

View File

@ -267,7 +267,7 @@ __fi void vif1Interrupt()
g_vif1Cycles = 0;
if( gifRegs.stat.APATH == 2 && gifUnit.gifPath[1].isDone())
if( gifRegs.stat.APATH == 2 && gifUnit.gifPath[GIF_PATH_2].isDone())
{
gifRegs.stat.APATH = 0;
gifRegs.stat.OPH = 0;