mirror of https://github.com/PCSX2/pcsx2.git
MTVU: Actually add MTVU to savestates
On loading a savestate, restore the VIF state on the MTVU side
This commit is contained in:
parent
c278e6414c
commit
2859123c47
|
@ -56,7 +56,13 @@ void SaveStateBase::mtvuFreeze()
|
||||||
FreezeTag("MTVU");
|
FreezeTag("MTVU");
|
||||||
pxAssert(vu1Thread.IsDone());
|
pxAssert(vu1Thread.IsDone());
|
||||||
if (!IsSaving())
|
if (!IsSaving())
|
||||||
|
{
|
||||||
vu1Thread.Reset();
|
vu1Thread.Reset();
|
||||||
|
vu1Thread.WriteCol(vif1);
|
||||||
|
vu1Thread.WriteRow(vif1);
|
||||||
|
vu1Thread.WriteMicroMem(0, VU1.Micro, 0x4000);
|
||||||
|
vu1Thread.WriteDataMem(0, VU1.Mem, 0x4000);
|
||||||
|
}
|
||||||
for (size_t i = 0; i < 4; ++i)
|
for (size_t i = 0; i < 4; ++i)
|
||||||
{
|
{
|
||||||
unsigned int v = vu1Thread.vuCycles[i].load();
|
unsigned int v = vu1Thread.vuCycles[i].load();
|
||||||
|
|
|
@ -214,6 +214,7 @@ SaveStateBase& SaveStateBase::FreezeInternals()
|
||||||
gifFreeze();
|
gifFreeze();
|
||||||
gifDmaFreeze();
|
gifDmaFreeze();
|
||||||
sprFreeze();
|
sprFreeze();
|
||||||
|
mtvuFreeze();
|
||||||
|
|
||||||
// Fifth Block - iop-related systems
|
// Fifth Block - iop-related systems
|
||||||
// ---------------------------------
|
// ---------------------------------
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
// the lower 16 bit value. IF the change is breaking of all compatibility with old
|
// 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.
|
// states, increment the upper 16 bit value, and clear the lower 16 bits to 0.
|
||||||
|
|
||||||
static const u32 g_SaveVersion = (0x9A15 << 16) | 0x0000;
|
static const u32 g_SaveVersion = (0x9A16 << 16) | 0x0000;
|
||||||
|
|
||||||
// this function is meant to be used in the place of GSfreeze, and provides a safe layer
|
// 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. :)
|
// between the GS saving function and the MTGS's needs. :)
|
||||||
|
|
Loading…
Reference in New Issue