Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Quick fix to get Zelda: Wind Waker booting again.
  • Loading branch information
skidau committed Apr 6, 2013
1 parent ecb4337 commit 8a21096
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
23 changes: 15 additions & 8 deletions Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda.cpp
Expand Up @@ -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);
}
}
}

Expand Down
3 changes: 2 additions & 1 deletion Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda.h
Expand Up @@ -218,7 +218,6 @@ class CUCode_Zelda : public IUCode
s32* m_LeftBuffer;
s32* m_RightBuffer;


// If you add variables, remember to keep DoState() and the constructor up to date.

s16 m_AFCCoefTable[32];
Expand Down Expand Up @@ -276,6 +275,8 @@ class CUCode_Zelda : public IUCode
u32 m_PBAddress; // The main param block array
u32 m_PBAddress2; // 4 smaller param blocks

u32 m_cycles;

void ExecuteList();

u8 *GetARAMPointer(u32 address);
Expand Down

0 comments on commit 8a21096

Please sign in to comment.