Added a workaround for the savestate freeze bug in Gust games when the MTVU speedhack is active.

Aligning GIF packets on state save actions seems to cause some issues with the hack.

Still hope to find a better solution.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5032 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
ramapcsx2 2011-12-29 17:08:17 +00:00
parent f550ffe991
commit b97dff6c89
2 changed files with 7 additions and 2 deletions

View File

@ -135,8 +135,10 @@ void SaveStateBase::gifPathFreeze(u32 path) {
pxAssertDev(!gifPath.gsPack.readAmount, "GS Pack readAmount should be 0!");
pxAssertDev(!gifPath.GetPendingGSPackets(), "MTVU GS Pack Queue should be 0!");
if (IsSaving()) { // Move all the buffered data to the start of buffer
gifPath.RealignPacket(); // May add readAmount which we need to clear on load
if (!gifPath.isMTVU()) { // FixMe: savestate freeze bug (Gust games) with MTVU enabled
if (IsSaving()) { // Move all the buffered data to the start of buffer
gifPath.RealignPacket(); // May add readAmount which we need to clear on load
}
}
u8* bufferPtr = gifPath.buffer; // Backup current buffer ptr
Freeze(gifPath.mtvu.fakePackets);

View File

@ -176,6 +176,9 @@ SaveStateBase& SaveStateBase::FreezeMainMemory()
SaveStateBase& SaveStateBase::FreezeInternals()
{
vu1Thread.WaitVU(); // Finish VU1 just in-case...
// Print this until the MTVU problem in gifPathFreeze is taken care of (rama)
if (THREAD_VU1) Console.Warning("MTVU speedhack is enabled, saved states may not be stable");
if (IsLoading()) PreLoadPrep();
// Second Block - Various CPU Registers and States