mirror of https://github.com/PCSX2/pcsx2.git
Add missing GIF Path buffers to the savestate (untested code); buddy commit to the prev version upgrade -- just a few mins late. ;)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3281 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
6b4882b828
commit
46800c97a0
|
@ -66,12 +66,13 @@ void gsPath1Interrupt()
|
||||||
gifRegs->stat.APATH = GIF_APATH1;
|
gifRegs->stat.APATH = GIF_APATH1;
|
||||||
memcpy_aligned(pDest, Path1Buffer + (Path1ReadPos * 16), size*16);
|
memcpy_aligned(pDest, Path1Buffer + (Path1ReadPos * 16), size*16);
|
||||||
GetMTGS().SendDataPacket();
|
GetMTGS().SendDataPacket();
|
||||||
|
Registers::Thaw();
|
||||||
|
|
||||||
Path1ReadPos += size;
|
Path1ReadPos += size;
|
||||||
if(Path1ReadPos == Path1WritePos)
|
if(Path1ReadPos == Path1WritePos)
|
||||||
{
|
{
|
||||||
Path1WritePos = Path1ReadPos = 0;
|
Path1WritePos = Path1ReadPos = 0;
|
||||||
}
|
}
|
||||||
Registers::Thaw();
|
|
||||||
CPU_INT(28, 16); //Should be size * BIAS (probably) but Tony Hawk doesnt like this, probably to do with vif flush stalling
|
CPU_INT(28, 16); //Should be size * BIAS (probably) but Tony Hawk doesnt like this, probably to do with vif flush stalling
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -680,4 +681,22 @@ void SaveStateBase::gifFreeze()
|
||||||
Freeze( gscycles );
|
Freeze( gscycles );
|
||||||
//Freeze(gifempty);
|
//Freeze(gifempty);
|
||||||
// Note: mfifocycles is not a persistent var, so no need to save it here.
|
// Note: mfifocycles is not a persistent var, so no need to save it here.
|
||||||
|
|
||||||
|
int bufsize = Path1WritePos - Path1ReadPos;
|
||||||
|
Freeze(bufsize);
|
||||||
|
|
||||||
|
if (IsSaving())
|
||||||
|
{
|
||||||
|
// We can just load the queued Path1 data into the front of the buffer, and
|
||||||
|
// reset the ReadPos and WritePos accordingly.
|
||||||
|
FreezeMem(Path1Buffer, bufsize);
|
||||||
|
Path1ReadPos = 0;
|
||||||
|
Path1WritePos = bufsize;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Only want to save the actual Path1 data between readpos and writepos. The
|
||||||
|
// rest of the buffer is just unused-ness!
|
||||||
|
FreezeMem(&Path1Buffer[Path1ReadPos], bufsize);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1134,9 +1134,9 @@ void __fastcall mVU_XGKICK_(u32 addr) {
|
||||||
size = GIFPath_ParseTag(GIF_PATH_1, data, diff, true);
|
size = GIFPath_ParseTag(GIF_PATH_1, data, diff, true);
|
||||||
pDest = &Path1Buffer[Path1WritePos*16];
|
pDest = &Path1Buffer[Path1WritePos*16];
|
||||||
|
|
||||||
|
pxAssumeMsg((Path1WritePos+size < sizeof(Path1Buffer)), "XGKick Buffer Overflow detected on Path1Buffer!");
|
||||||
|
|
||||||
//DevCon.Warning("Storing size %x PATH 1", size);
|
//DevCon.Warning("Storing size %x PATH 1", size);
|
||||||
|
|
||||||
if (size > diff) {
|
if (size > diff) {
|
||||||
// fixme: one of these days the following *16's will get cleaned up when we introduce
|
// fixme: one of these days the following *16's will get cleaned up when we introduce
|
||||||
// a special qwc/simd16 optimized version of memcpy_aligned. :)
|
// a special qwc/simd16 optimized version of memcpy_aligned. :)
|
||||||
|
|
|
@ -1998,6 +1998,8 @@ void __fastcall VU1XGKICK_MTGSTransfer(u32 *pMem, u32 addr)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
pxAssumeMsg((Path1WritePos+size < sizeof(Path1Buffer)), "XGKick Buffer Overflow detected on Path1Buffer!");
|
||||||
|
|
||||||
//DevCon.Warning("GIF APATH busy %x Holding for later W %x, R %x", gifRegs->stat.APATH, Path1WritePos, Path1ReadPos);
|
//DevCon.Warning("GIF APATH busy %x Holding for later W %x, R %x", gifRegs->stat.APATH, Path1WritePos, Path1ReadPos);
|
||||||
size = GIFPath_ParseTag(GIF_PATH_1, data, diff, true);
|
size = GIFPath_ParseTag(GIF_PATH_1, data, diff, true);
|
||||||
pDest = &Path1Buffer[Path1WritePos*16];
|
pDest = &Path1Buffer[Path1WritePos*16];
|
||||||
|
|
Loading…
Reference in New Issue