diff --git a/pcsx2/IopDma.cpp b/pcsx2/IopDma.cpp index 6718ab1b5c..53c59619d4 100644 --- a/pcsx2/IopDma.cpp +++ b/pcsx2/IopDma.cpp @@ -574,5 +574,16 @@ s32 CALLBACK errDmaWrite(s32 channel, u32* data, u32 bytesLeft, u32* bytesProces return 0; } +void SaveStateBase::iopDmacFreeze() +{ + FreezeTag("iopDmac"); + + Freeze(IopDmaChannels); + + if( IsLoading() ) + { + SetDmaUpdateTarget(10000); // Might be needed to kickstart the main updater :p + } +} #endif diff --git a/pcsx2/SaveState.cpp b/pcsx2/SaveState.cpp index f306549846..28525cb5e6 100644 --- a/pcsx2/SaveState.cpp +++ b/pcsx2/SaveState.cpp @@ -184,6 +184,9 @@ void SaveStateBase::FreezeRegisters() // Fifth Block - iop-related systems // --------------------------------- FreezeTag( "IOP-Subsystems" ); +#ifdef ENABLE_NEW_IOPDMA + iopDmacFreeze(); +#endif psxRcntFreeze(); sioFreeze(); sio2Freeze(); diff --git a/pcsx2/SaveState.h b/pcsx2/SaveState.h index 882af31daf..07e7bd6f33 100644 --- a/pcsx2/SaveState.h +++ b/pcsx2/SaveState.h @@ -201,6 +201,9 @@ protected: void vuMicroFreeze(); void vif0Freeze(); void vif1Freeze(); +#ifdef ENABLE_NEW_IOPDMA + void iopDmacFreeze(); +#endif void sifFreeze(); void ipuFreeze(); void gifFreeze();