mirror of
https://github.com/libretro/pcsx2.git
synced 2024-11-28 20:00:44 +00:00
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:
parent
e8d865d01d
commit
7b195696a7
@ -21,6 +21,7 @@
|
|||||||
#include "GS.h"
|
#include "GS.h"
|
||||||
#include "Gif.h"
|
#include "Gif.h"
|
||||||
#include "MTVU.h"
|
#include "MTVU.h"
|
||||||
|
#include "Gif_Unit.h"
|
||||||
|
|
||||||
__aligned16 vifStruct vif0, vif1;
|
__aligned16 vifStruct vif0, vif1;
|
||||||
|
|
||||||
@ -179,6 +180,27 @@ __fi void vif1FBRST(u32 value) {
|
|||||||
vif1.done = true;
|
vif1.done = true;
|
||||||
vif1ch.chcr.STR = false;
|
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 USE_OLD_GIF == 1 // ...
|
||||||
if(vif1Regs.mskpath3 == 1 && GSTransferStatus.PTH3 == STOPPED_MODE && gifch.chcr.STR == true) {
|
if(vif1Regs.mskpath3 == 1 && GSTransferStatus.PTH3 == STOPPED_MODE && gifch.chcr.STR == true) {
|
||||||
DevCon.Warning("VIF Path3 Resume on FBRST MSK = %x", vif1Regs.mskpath3);
|
DevCon.Warning("VIF Path3 Resume on FBRST MSK = %x", vif1Regs.mskpath3);
|
||||||
|
@ -267,7 +267,7 @@ __fi void vif1Interrupt()
|
|||||||
|
|
||||||
g_vif1Cycles = 0;
|
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.APATH = 0;
|
||||||
gifRegs.stat.OPH = 0;
|
gifRegs.stat.OPH = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user