Wii Sports sound works

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1128 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
John Peterson 2008-11-11 18:46:48 +00:00
parent e6a34eed9f
commit eaf0f3b583
2 changed files with 28 additions and 9 deletions

View File

@ -204,7 +204,7 @@ void Init()
if (Core::GetStartupParameter().bWii)
{
// On the Wii, ARAM is simply mapped to EXRAM.
g_ARAM = Memory::GetPointer(0x10000000);
g_ARAM = Memory::GetPointer(0x00000000);
}
else
{
@ -595,7 +595,8 @@ void Update_ARAM_DMA()
u32 iARAMAddress = g_arDMA.ARAddr;
//write to g_ARAM
LOGV(DSPINTERFACE, 1, "g_ARAM DMA write %08x bytes from %08x to Aram: %08x",g_arDMA.Cnt.count, g_arDMA.MMAddr, g_arDMA.ARAddr);
LOGV(DSPINTERFACE, 1, "g_ARAM DMA write %08x bytes from %08x to Aram: %08x",
g_arDMA.Cnt.count, g_arDMA.MMAddr, g_arDMA.ARAddr);
for (u32 i = 0; i < g_arDMA.Cnt.count; i++)
{
if (iARAMAddress < ARAM_SIZE)
@ -612,6 +613,8 @@ void Update_ARAM_DMA()
u8 ReadARAM(const u32 _iAddress)
{
//LOGV(DSPINTERFACE, 0, "ARAM (r) 0x%08x", _iAddress);
// _dbg_assert_(DSPINTERFACE,(_iAddress) < ARAM_SIZE);
return g_ARAM[_iAddress & ARAM_MASK];
}
@ -623,6 +626,8 @@ u8* GetARAMPtr()
void WriteARAM(u8 _iValue, u32 _iAddress)
{
//LOGV(DSPINTERFACE, 0, "ARAM (w) 0x%08x 0x%08x", _iAddress);
// _dbg_assert_(DSPINTERFACE,(_iAddress) < ARAM_SIZE);
//rouge leader writes WAY outside
//not really surprising since it uses a totally different memory model :P

View File

@ -319,13 +319,21 @@ bool CUCode_AXWii::AXTask(u32& _uMail)
break;
case 0x0005:
Addr__5_1 = Memory_Read_U32(uAddress);
uAddress += 4;
Addr__5_2 = Memory_Read_U32(uAddress);
uAddress += 4;
uAddress += 2;
SaveLog("%08x : AXLIST 5_1 5_2 addresses: %08x %08x", uAddress, Addr__5_1, Addr__5_2);
if(Memory_Read_U16(uAddress) > 25) // this occured in Wii Sports
{
Addr__5_1 = Memory_Read_U32(uAddress);
uAddress += 4;
Addr__5_2 = Memory_Read_U32(uAddress);
uAddress += 4;
uAddress += 2;
SaveLog("%08x : AXLIST 5_1 5_2 addresses: %08x %08x", uAddress, Addr__5_1, Addr__5_2);
}
else
{
uAddress += 2;
SaveLog("%08x : AXLIST Empty 0x0005", uAddress);
}
break;
case 0x0006:
@ -380,6 +388,12 @@ bool CUCode_AXWii::AXTask(u32& _uMail)
static bool bFirst = true;
if (bFirst == true)
{
// A little more descreet way to say that there is a problem, that also let you
// take a look at the mail (and possible previous mails) in the debugger
SaveLog("%08x : Unknown AX-Command 0x%04x", uAddress, iCommand);
bExecuteList = false;
break;
char szTemp[2048];
sprintf(szTemp, "Unknown AX-Command 0x%04x (address: 0x%08x). Last valid: %02x\n",
iCommand, uAddress - 2, last_valid_command);