add some more missing dsp ucode data to savestates

This commit is contained in:
nitsuja 2011-12-19 16:49:44 -08:00 committed by skidau
parent 152351d96c
commit 5423bca79c
8 changed files with 19 additions and 5 deletions

View File

@ -229,6 +229,7 @@ void DoState(PointerWrap &p)
p.Do(g_ARAM_Info); p.Do(g_ARAM_Info);
p.Do(g_AR_MODE); p.Do(g_AR_MODE);
p.Do(g_AR_REFRESH); p.Do(g_AR_REFRESH);
p.Do(dsp_slice);
dsp_emulator->DoState(p); dsp_emulator->DoState(p);
} }

View File

@ -465,5 +465,6 @@ void CUCode_AX::DoState(PointerWrap &p)
p.Do(numPBaddr); p.Do(numPBaddr);
p.Do(m_addressPBs); p.Do(m_addressPBs);
p.Do(PBaddr); p.Do(PBaddr);
p.Do(m_UploadSetupInProgress);
DoStateShared(p);
} }

View File

@ -261,5 +261,6 @@ void CUCode_AXWii::DoState(PointerWrap &p)
p.Do(m_addressPBs); p.Do(m_addressPBs);
p.Do(wiisportsHack); p.Do(wiisportsHack);
p.Do(m_UploadSetupInProgress);
DoStateShared(p);
} }

View File

@ -41,7 +41,6 @@ private:
// PBs // PBs
u32 m_addressPBs; u32 m_addressPBs;
u32 _CRC;
bool wiisportsHack; bool wiisportsHack;

View File

@ -122,5 +122,7 @@ void CUCode_Rom::DoState(PointerWrap &p)
p.Do(m_CurrentUCode); p.Do(m_CurrentUCode);
p.Do(m_BootTask_numSteps); p.Do(m_BootTask_numSteps);
p.Do(m_NextParameter); p.Do(m_NextParameter);
DoStateShared(p);
} }

View File

@ -612,5 +612,5 @@ void CUCode_Zelda::DoState(PointerWrap &p)
p.Do(m_PBAddress); p.Do(m_PBAddress);
p.Do(m_PBAddress2); p.Do(m_PBAddress2);
p.Do(m_UploadSetupInProgress); DoStateShared(p);
} }

View File

@ -182,3 +182,11 @@ void IUCode::PrepareBootUCode(u32 mail)
m_DSPHLE->SwapUCode(ector_crc); m_DSPHLE->SwapUCode(ector_crc);
} }
} }
void IUCode::DoStateShared(PointerWrap &p)
{
p.Do(m_UploadSetupInProgress);
p.Do(m_NextUCode);
p.Do(m_NextUCode_steps);
p.Do(m_NeedsResumeMail);
}

View File

@ -93,7 +93,7 @@ public:
virtual void Update(int cycles) = 0; virtual void Update(int cycles) = 0;
virtual void MixAdd(short* buffer, int size) {} virtual void MixAdd(short* buffer, int size) {}
virtual void DoState(PointerWrap &p) {} virtual void DoState(PointerWrap &p) { DoStateShared(p); }
static u32 GetCRC(IUCode* pUCode) { return pUCode ? pUCode->m_CRC : UCODE_NULL; } static u32 GetCRC(IUCode* pUCode) { return pUCode ? pUCode->m_CRC : UCODE_NULL; }
@ -105,6 +105,8 @@ protected:
// The HLE can use this to // The HLE can use this to
bool NeedsResumeMail(); bool NeedsResumeMail();
void DoStateShared(PointerWrap &p);
CMailHandler& m_rMailHandler; CMailHandler& m_rMailHandler;
std::mutex m_csMix; std::mutex m_csMix;