mirror of https://github.com/PCSX2/pcsx2.git
GIF Unit: Stop multiple fires of FINISH IRQ's
- Fixes Indiecar Series 2005. - Savestate bump was required, sorry, not sorry :P
This commit is contained in:
parent
98c74879bf
commit
68de5228a8
|
@ -108,7 +108,10 @@ static __fi void gsCSRwrite( const tGS_CSR& csr )
|
|||
gifUnit.Execute(false, true); // Resume paused transfers
|
||||
}
|
||||
|
||||
if(csr.FINISH) CSRreg.FINISH = false;
|
||||
if (csr.FINISH) {
|
||||
CSRreg.FINISH = false;
|
||||
gifUnit.gsFINISH.gsFINISHFired = false; //Clear the previously fired FINISH (YS, Indiecar 2005, MGS3)
|
||||
}
|
||||
if(csr.HSINT) CSRreg.HSINT = false;
|
||||
if(csr.VSINT) CSRreg.VSINT = false;
|
||||
if(csr.EDWINT) CSRreg.EDWINT = false;
|
||||
|
|
|
@ -97,8 +97,9 @@ bool Gif_HandlerAD_Debug(u8* pMem) {
|
|||
}
|
||||
|
||||
void Gif_FinishIRQ() {
|
||||
if (CSRreg.FINISH && !(GSIMR&0x200)) {
|
||||
if (CSRreg.FINISH && !(GSIMR & 0x200) && gifUnit.gsFINISH.gsFINISHFired == false) {
|
||||
gsIrq();
|
||||
gifUnit.gsFINISH.gsFINISHFired = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -163,6 +164,7 @@ void SaveStateBase::gifFreeze() {
|
|||
Freeze(mtvuMode);
|
||||
Freeze(gifUnit.stat);
|
||||
Freeze(gifUnit.gsSIGNAL);
|
||||
Freeze(gifUnit.gsFINISH);
|
||||
Freeze(gifUnit.lastTranType);
|
||||
gifPathFreeze(GIF_PATH_1);
|
||||
gifPathFreeze(GIF_PATH_2);
|
||||
|
|
|
@ -133,6 +133,12 @@ struct GS_SIGNAL {
|
|||
void Reset() { memzero(*this); }
|
||||
};
|
||||
|
||||
struct GS_FINISH {
|
||||
bool gsFINISHFired;
|
||||
|
||||
void Reset() { memzero(*this); }
|
||||
};
|
||||
|
||||
static __fi void incTag(u32& offset, u32& size, u32 incAmount) {
|
||||
size += incAmount;
|
||||
offset += incAmount;
|
||||
|
@ -413,6 +419,7 @@ struct Gif_Path {
|
|||
struct Gif_Unit {
|
||||
Gif_Path gifPath[3];
|
||||
GS_SIGNAL gsSIGNAL; // Stalling Signal
|
||||
GS_FINISH gsFINISH; // Finish Signal
|
||||
tGIF_STAT& stat;
|
||||
GIF_TRANSFER_TYPE lastTranType; // Last Transfer Type
|
||||
|
||||
|
@ -427,6 +434,7 @@ struct Gif_Unit {
|
|||
GUNIT_WARN(Color_Red, "Gif Unit Reset!!! [soft=%d]", softReset);
|
||||
ResetRegs();
|
||||
gsSIGNAL.Reset();
|
||||
gsFINISH.Reset();
|
||||
gifPath[0].Reset(softReset);
|
||||
gifPath[1].Reset(softReset);
|
||||
gifPath[2].Reset(softReset);
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
// the lower 16 bit value. IF the change is breaking of all compatibility with old
|
||||
// states, increment the upper 16 bit value, and clear the lower 16 bits to 0.
|
||||
|
||||
static const u32 g_SaveVersion = (0x9A0A << 16) | 0x0000;
|
||||
static const u32 g_SaveVersion = (0x9A0B << 16) | 0x0000;
|
||||
|
||||
// this function is meant to be used in the place of GSfreeze, and provides a safe layer
|
||||
// between the GS saving function and the MTGS's needs. :)
|
||||
|
|
Loading…
Reference in New Issue