Skip to content

Commit

Permalink
MTVU: Add new savestate variables, bump savestate version
Browse files Browse the repository at this point in the history
  • Loading branch information
refractionpcsx2 committed Dec 24, 2020
1 parent 3f4bb44 commit 20695d6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions pcsx2/MTVU.cpp
Expand Up @@ -57,6 +57,22 @@ void SaveStateBase::mtvuFreeze()
unsigned int v = vu1Thread.vuCycles[i].load();
Freeze(v);
}
u32 gsInterrupts;
u64 gsSignals;

gsInterrupts = vu1Thread.gsToClear.load();
Freeze(gsInterrupts);
vu1Thread.gsToClear.store(gsInterrupts);
gsInterrupts = vu1Thread.gsInterrupts.load();
Freeze(gsInterrupts);
vu1Thread.gsInterrupts.store(gsInterrupts);
gsSignals = vu1Thread.gsSignal.load();
Freeze(gsSignals);
vu1Thread.gsSignal.store(gsSignals);
gsSignals = vu1Thread.gsLabel.load();
Freeze(gsSignals);
vu1Thread.gsLabel.store(gsSignals);

Freeze(vu1Thread.vuCycleIdx);
}

Expand Down
2 changes: 1 addition & 1 deletion pcsx2/SaveState.h
Expand Up @@ -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 = (0x9A13 << 16) | 0x0000;
static const u32 g_SaveVersion = (0x9A14 << 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. :)
Expand Down

0 comments on commit 20695d6

Please sign in to comment.