Previous fix for Eragon was incorrect. Game makes PATH3 busy then performs a reset, allowing VIF to continue, this is the fix I should have made ;)

This commit is contained in:
refractionpcsx2 2018-05-26 16:00:37 +01:00
parent 342c10bd85
commit 823431599f
1 changed files with 7 additions and 3 deletions

View File

@ -17,6 +17,7 @@
#include <deque>
#include "System/SysThreads.h"
#include "Gif.h"
#include "Vif.h"
#include "GS.h"
// FIXME common path ?
@ -290,9 +291,7 @@ struct Gif_Path {
gifTag.setTag(&buffer[curOffset], 1);
//Don't set state to PACKED if it is a NOP packet. Must check if PRIM or Regs are transferring
if (gifTag.tag.NLOOP > 0 || gifTag.tag.NREG != 0 || gifTag.tag.PRE)
state = (GIF_PATH_STATE)(gifTag.tag.FLG + 1);
state = (GIF_PATH_STATE)(gifTag.tag.FLG + 1);
// We don't have enough data for a complete GS packet
if(!gifTag.hasAD && curOffset + 16 + gifTag.len > curSize) {
@ -452,6 +451,11 @@ struct Gif_Unit {
if(!softReset) {
lastTranType = GIF_TRANS_INVALID;
}
//If the VIF has paused waiting for PATH3, recheck it after the reset has occurred (Eragon)
if (vif1Regs.stat.VGW) {
if (!(cpuRegs.interrupt & (1 << DMAC_VIF1)))
CPU_INT(DMAC_VIF1, 1);
}
}
// Resets Gif HW Regs