Quick fix to get Zelda: Wind Waker booting again.

This commit is contained in:
skidau 2013-04-07 07:18:28 +10:00
parent ecb4337209
commit 8a2109691a
2 changed files with 17 additions and 9 deletions

View File

@ -112,16 +112,23 @@ u8 *CUCode_Zelda::GetARAMPointer(u32 address)
void CUCode_Zelda::Update(int cycles)
{
if (!IsLightVersion())
{
if (m_rMailHandler.GetNextMail() == DSP_FRAME_END)
DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
}
m_cycles += cycles;
if (NeedsResumeMail())
if (m_cycles >= 243000)
{
m_rMailHandler.PushMail(DSP_RESUME);
DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
m_cycles = 0;
if (!IsLightVersion())
{
if (m_rMailHandler.GetNextMail() == DSP_FRAME_END)
DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
}
if (NeedsResumeMail())
{
m_rMailHandler.PushMail(DSP_RESUME);
DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
}
}
}

View File

@ -218,7 +218,6 @@ private:
s32* m_LeftBuffer;
s32* m_RightBuffer;
// If you add variables, remember to keep DoState() and the constructor up to date.
s16 m_AFCCoefTable[32];
@ -276,6 +275,8 @@ private:
u32 m_PBAddress; // The main param block array
u32 m_PBAddress2; // 4 smaller param blocks
u32 m_cycles;
void ExecuteList();
u8 *GetARAMPointer(u32 address);