Wii sound fix. May remove the broken sound that was sometimes heard in Wii Sports.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1135 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
John Peterson 2008-11-11 23:35:51 +00:00
parent 47dfc9ad38
commit ffa2b49903
1 changed files with 12 additions and 4 deletions

View File

@ -70,7 +70,8 @@ enum
enum
{
ARAM_SIZE = 0x01000000, // 16 MB
ARAM_MASK = 0x00FFFFFF
ARAM_MASK = 0x00FFFFFF,
WII_MASK = 0x017FFFFF
};
// UARAMCount
@ -611,11 +612,18 @@ void Update_ARAM_DMA()
GenerateDSPInterrupt(INT_ARAM);
}
u8 ReadARAM(const u32 _iAddress)
u8 ReadARAM(u32 _iAddress)
{
//LOGV(DSPINTERFACE, 0, "ARAM (r) 0x%08x", _iAddress);
// _dbg_assert_(DSPINTERFACE,(_iAddress) < ARAM_SIZE);
if(Core::GetStartupParameter().bWii)
{
if(_iAddress > WII_MASK)
_iAddress = (_iAddress & WII_MASK);
return g_ARAM[_iAddress];
}
else
return g_ARAM[_iAddress & ARAM_MASK];
}
@ -626,7 +634,7 @@ u8* GetARAMPtr()
void WriteARAM(u8 _iValue, u32 _iAddress)
{
//LOGV(DSPINTERFACE, 0, "ARAM (w) 0x%08x 0x%08x", _iAddress);
//LOGV(DSPINTERFACE, 0, "ARAM (w) 0x%08x = 0x%08x", _iAddress, (_iAddress & ARAM_MASK));
// _dbg_assert_(DSPINTERFACE,(_iAddress) < ARAM_SIZE);
//rouge leader writes WAY outside