From b12631f94cdad3b4cdcdba7d10fba7611132766f Mon Sep 17 00:00:00 2001 From: Marko Pusljar Date: Wed, 27 Jul 2011 19:10:49 +0000 Subject: [PATCH] dsphle - Added ucode used by MP1/MP2 (Metroid Prime Trilogy). Audio is not perfect + you need to replace DOLs to start those games. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7686 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.cpp | 9 +++++++-- Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.h | 1 + Source/Core/Core/Src/HW/DSPHLE/UCodes/UCodes.cpp | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.cpp b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.cpp index 3170deedde..3083fea1a4 100644 --- a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.cpp +++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.cpp @@ -36,6 +36,8 @@ CUCode_AX::CUCode_AX(DSPHLE *dsp_hle) templbuffer = new int[1024 * 1024]; temprbuffer = new int[1024 * 1024]; + + mptHack = _CRC == 0x3389a79e; } CUCode_AX::~CUCode_AX() @@ -172,8 +174,11 @@ void CUCode_AX::MixAdd(short* _pBuffer, int _iSize) if (!ReadPB(blockAddr, PB)) break; - ProcessUpdates(PB); - VoiceHacks(PB); + if (!mptHack) + { + ProcessUpdates(PB); + VoiceHacks(PB); + } MixAddVoice(PB, templbuffer, temprbuffer, _iSize); if (!WritePB(blockAddr, PB)) diff --git a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.h b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.h index 3ad87c228f..4007cadd9a 100644 --- a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.h +++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.h @@ -42,6 +42,7 @@ public: u32 PBaddr[8]; //2 needed for MP2 u32 m_addressPBs; u32 _CRC; + bool mptHack; private: enum diff --git a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCodes.cpp b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCodes.cpp index bb7125a612..556ac2d828 100644 --- a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCodes.cpp +++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCodes.cpp @@ -55,6 +55,7 @@ IUCode* UCodeFactory(u32 _CRC, DSPHLE *dsp_hle, bool bWii) case 0x07f88145: // bustamove, ikaruga, fzero, robotech battle cry, star soldier, soul calibur2, // Zelda:OOT, Tony hawk, viewtiful joe case 0xe2136399: // billy hatcher, dragonballz, mario party 5, TMNT, ava1080 + case 0x3389a79e: // MP1/MP2 Wii (Metroid Prime Trilogy) INFO_LOG(DSPHLE, "CRC %08x: AX ucode chosen", _CRC); return new CUCode_AX(dsp_hle);