DSPHLE - the same thing for AXWII - fixes De Blob, Cursed Mountain, ...

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5284 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Marko Pusljar 2010-04-05 13:12:15 +00:00
parent ff9b185a7f
commit 8549b30170
1 changed files with 37 additions and 17 deletions

View File

@ -19,6 +19,7 @@
#include "../MailHandler.h" #include "../MailHandler.h"
#include "Mixer.h" #include "Mixer.h"
#include "../DSPHandler.h"
#include "UCodes.h" #include "UCodes.h"
#include "UCode_AXStructs.h" #include "UCode_AXStructs.h"
@ -50,26 +51,45 @@ CUCode_AXWii::~CUCode_AXWii()
void CUCode_AXWii::HandleMail(u32 _uMail) void CUCode_AXWii::HandleMail(u32 _uMail)
{ {
static s8 newucodemails = -1;
if (newucodemails > -1) {
newucodemails++;
if (newucodemails == 10) {
newucodemails = -1;
m_rMailHandler.PushMail(DSP_RESUME);
}
}
else {
if ((_uMail & 0xFFFF0000) == MAIL_AX_ALIST) if ((_uMail & 0xFFFF0000) == MAIL_AX_ALIST)
{ {
// a new List // We are expected to get a new CmdBlock
DEBUG_LOG(DSPHLE, "GetNextCmdBlock (%ibytes)", (u16)_uMail);
} }
else if (_uMail == 0xCDD10000) // Action 0 - restart else if (_uMail == 0xCDD10000) // Action 0 - AX_ResumeTask();
{ {
m_rMailHandler.PushMail(DSP_RESUME); m_rMailHandler.PushMail(DSP_RESUME);
} }
else if (_uMail == 0xCDD10001) // Action 1 - new ucode upload else if (_uMail == 0xCDD10001) // Action 1 - new ucode upload
{ {
NOTICE_LOG(DSPHLE,"Game wanted to upload new ucode!"); NOTICE_LOG(DSPHLE,"DSP IROM - New Ucode!");
newucodemails = 0;
} }
else if ((_uMail & 0xFFFF0000) == 0xCDD10000) // Action 2/3 else if (_uMail == 0xCDD10002) // Action 2 - IROM_Reset(); ( WII: De Blob, Cursed Mountain,...)
{
NOTICE_LOG(DSPHLE,"DSP IROM - Reset!");
CDSPHandler::GetInstance().SetUCode(UCODE_ROM);
}
else if (_uMail == 0xCDD10003) // Action 3 - AX_GetNextCmdBlock();
{ {
} }
else else
{ {
DEBUG_LOG(DSPHLE, " >>>> u32 MAIL : AXTask Mail (%08x)", _uMail);
AXTask(_uMail); AXTask(_uMail);
} }
} }
}
void CUCode_AXWii::MixAdd(short* _pBuffer, int _iSize) void CUCode_AXWii::MixAdd(short* _pBuffer, int _iSize)
{ {