diff --git a/Source/Core/Core/Src/Core.cpp b/Source/Core/Core/Src/Core.cpp index 93c9ca8d09..a8c20f33b3 100644 --- a/Source/Core/Core/Src/Core.cpp +++ b/Source/Core/Core/Src/Core.cpp @@ -335,6 +335,7 @@ THREAD_RETURN EmuThread(void *pArg) dspInit.pGenerateDSPInterrupt = Callback_DSPInterrupt; dspInit.pGetAudioStreaming = AudioInterface::Callback_GetStreaming; dspInit.pEmulatorState = (int *)&PowerPC::state; + dspInit.bWii = _CoreParameter.bWii; Plugins.GetDSP()->Initialize((void *)&dspInit); // Load and Init PadPlugin diff --git a/Source/PluginSpecs/pluginspecs_dsp.h b/Source/PluginSpecs/pluginspecs_dsp.h index 35f4d42101..67bc232fbc 100644 --- a/Source/PluginSpecs/pluginspecs_dsp.h +++ b/Source/PluginSpecs/pluginspecs_dsp.h @@ -29,6 +29,7 @@ typedef struct TGenerateDSPInt pGenerateDSPInterrupt; TAudioGetStreaming pGetAudioStreaming; int *pEmulatorState; + bool bWii; } DSPInitialize; diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCodes.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCodes.cpp index 2e7f1a2838..0514e3756d 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCodes.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCodes.cpp @@ -31,57 +31,60 @@ IUCode* UCodeFactory(u32 _CRC, CMailHandler& _rMailHandler) { switch (_CRC) { - case UCODE_ROM: - return new CUCode_Rom(_rMailHandler); + case UCODE_ROM: + return new CUCode_Rom(_rMailHandler); + + case UCODE_INIT_AUDIO_SYSTEM: + return new CUCode_InitAudioSystem(_rMailHandler); - case UCODE_INIT_AUDIO_SYSTEM: - return new CUCode_InitAudioSystem(_rMailHandler); + case 0x65d6cc6f: // CARD + return new CUCode_CARD(_rMailHandler); - case 0x65d6cc6f: // CARD - return new CUCode_CARD(_rMailHandler); + case 0x088e38a5: // IPL - JAP + case 0xd73338cf: // IPL + case 0x42f64ac4: // Luigi (after fix) + case 0x4be6a5cb: // AC, Pikmin (after fix) + printf("JAC ucode chosen"); + return new CUCode_Jac(_rMailHandler); - case 0x088e38a5: // IPL - JAP - case 0xd73338cf: // IPL - case 0x42f64ac4: // Luigi (after fix) - case 0x4be6a5cb: // AC, Pikmin (after fix) - printf("JAC ucode chosen"); - return new CUCode_Jac(_rMailHandler); + case 0x3ad3b7ac: // Naruto3 + case 0x3daf59b9: // Alien Hominid + case 0x4e8a8b21: // spdemo, ctaxi, 18 wheeler, disney, monkeyball2,cubivore,puzzlecollection,wario, + // capcom vs snk, naruto2, lost kingdoms, star fox, mario party 4, mortal kombat, + // smugglers run warzone, smash brothers, sonic mega collection, ZooCube + // nddemo, starfox + 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 + printf("AX ucode chosen, yay!"); + return new CUCode_AX(_rMailHandler); - case 0x3ad3b7ac: // Naruto3 - case 0x3daf59b9: // Alien Hominid - case 0x4e8a8b21: // spdemo, ctaxi, 18 wheeler, disney, monkeyball2,cubivore,puzzlecollection,wario, - // capcom vs snk, naruto2, lost kingdoms, star fox, mario party 4, mortal kombat, - // smugglers run warzone, smash brothers, sonic mega collection, ZooCube - // nddemo, starfox - 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 - printf("AX ucode chosen, yay!"); - return new CUCode_AX(_rMailHandler); + case 0x6CA33A6D: // DK Jungle Beat + case 0x86840740: // zelda + case 0x56d36052: // mario + case 0x2fcdf1ec: // mariokart, zelda 4 swords + printf("Zelda ucode chosen"); + return new CUCode_Zelda(_rMailHandler); - case 0x6CA33A6D: // DK Jungle Beat - case 0x86840740: // zelda - case 0x56d36052: // mario - case 0x2fcdf1ec: // mariokart, zelda 4 swords - printf("Zelda ucode chosen"); - return new CUCode_Zelda(_rMailHandler); + // WII CRCs + case 0x6c3f6f94: // zelda - PAL + case 0xd643001f: // mario galaxy - PAL + printf("Zelda Wii ucode chosen"); + return new CUCode_Zelda(_rMailHandler); - // WII CRCs - case 0x6c3f6f94: // zelda - PAL - case 0xd643001f: // mario galaxy - PAL - printf("Zelda Wii ucode chosen"); - return new CUCode_Zelda(_rMailHandler); + case 0x5ef56da3: // AX demo + case 0x347112ba: // raving rabbits + case 0xfa450138: // wii sports - PAL + case 0xadbc06bd: // Elebits + case 0xb7eb9a9c: // Wii Pikmin - JAP + printf("Wii - AXWii chosen"); + return new CUCode_AXWii(_rMailHandler, _CRC); - case 0x5ef56da3: // AX demo - case 0x347112ba: // raving rabbits - case 0xfa450138: // wii sports - PAL - case 0xadbc06bd: // Elebits - printf("Wii - AXWii chosen"); - return new CUCode_AXWii(_rMailHandler, _CRC); - - default: - PanicAlert("Unknown ucode (CRC = %08x) - forcing AX", _CRC); - return new CUCode_AX(_rMailHandler); + default: + PanicAlert("Unknown ucode (CRC = %08x) - forcing AX/AXWii", _CRC); + if(g_dspInitialize.bWii) + return new CUCode_AXWii(_rMailHandler, _CRC); + return new CUCode_AX(_rMailHandler); } return NULL;