From 2d10a47c2bbeeab11fd2a904e9d9847f604ea7a2 Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Mon, 14 Dec 2009 01:20:56 +0000 Subject: [PATCH] fix issue where loading wii game then loading gc game would cause garbage audio git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4690 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/HW/DSP.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/Src/HW/DSP.cpp b/Source/Core/Core/Src/HW/DSP.cpp index e287a1c517..d94f26ac97 100644 --- a/Source/Core/Core/Src/HW/DSP.cpp +++ b/Source/Core/Core/Src/HW/DSP.cpp @@ -240,6 +240,10 @@ void Init() } else { + // On the GC, ARAM is accessible only through this interface (unless you're doing mmu tricks?...) + g_ARAM.wii_mode = false; + g_ARAM.size = ARAM_SIZE; + g_ARAM.mask = ARAM_MASK; g_ARAM.ptr = (u8 *)AllocateMemoryPages(g_ARAM.size); } @@ -642,8 +646,8 @@ void Update_ARAM_DMA() u8 ReadARAM(u32 _iAddress) { //NOTICE_LOG(DSPINTERFACE, "ReadARAM 0x%08x (0x%08x)", _iAddress, _iAddress & g_ARAM.mask); - if (g_ARAM.wii_mode && _iAddress < Memory::RAM_SIZE) - return Memory::Read_U8(_iAddress & Memory::RAM_MASK); + if (g_ARAM.wii_mode && _iAddress < Memory::REALRAM_SIZE) + return Memory::Read_U8(_iAddress); else return g_ARAM.ptr[_iAddress & g_ARAM.mask]; }