diff --git a/Source/Core/Core/HW/DSPHLE/UCodes/UCodes.cpp b/Source/Core/Core/HW/DSPHLE/UCodes/UCodes.cpp index 2ecb0ec270..1b8c533a96 100644 --- a/Source/Core/Core/HW/DSPHLE/UCodes/UCodes.cpp +++ b/Source/Core/Core/HW/DSPHLE/UCodes/UCodes.cpp @@ -63,7 +63,8 @@ UCodeInterface* UCodeFactory(u32 crc, DSPHLE* dsphle, bool wii) case 0x42f64ac4: // Luigi's Mansion - US case 0x56d36052: // Super Mario Sunshine - US case 0x6c3f6f94: // Zelda TP Wii - US - case 0xeaeb38cc: // Pikmin 1/2 New Play Control Wii - US + case 0xb7eb9a9c: // Pikmin 1 New Play Control Wii - US + case 0xeaeb38cc: // Pikmin 2 New Play Control Wii - US return new ZeldaUCode(dsphle, crc); case 0x2ea36ce6: // Some Wii demos diff --git a/Source/Core/Core/HW/DSPHLE/UCodes/Zelda.cpp b/Source/Core/Core/HW/DSPHLE/UCodes/Zelda.cpp index 4d2c52a85a..15a09c09e3 100644 --- a/Source/Core/Core/HW/DSPHLE/UCodes/Zelda.cpp +++ b/Source/Core/Core/HW/DSPHLE/UCodes/Zelda.cpp @@ -54,6 +54,10 @@ enum ZeldaUCodeFlag // If set, command 0C is used for an unknown purpose. TODO: rename. WEIRD_CMD_0C = 0x00000200, + + // If set, command 0D (unknown purpose) is combined with the render command, + // which as such takes two more command arguments. TODO: rename. + COMBINED_CMD_0D = 0x00000400, }; static const std::map UCODE_FLAGS = { @@ -89,7 +93,9 @@ static const std::map UCODE_FLAGS = { // Super Mario Galaxy. // Super Mario Galaxy 2. { 0xD643001F, NO_ARAM | MAKE_DOLBY_LOUDER }, - // Pikmin 1/2 New Play Control. + // Pikmin 1 New Play Control. + { 0xB7EB9A9C, NO_ARAM | MAKE_DOLBY_LOUDER | COMBINED_CMD_0D }, + // Pikmin 2 New Play Control. { 0xEAEB38CC, NO_ARAM | MAKE_DOLBY_LOUDER }, // TODO: Other games that use this UCode (exhaustive list): @@ -455,6 +461,14 @@ void ZeldaUCode::RunPendingCommands() m_renderer.SetOutputLeftBufferAddr(Read32()); m_renderer.SetOutputRightBufferAddr(Read32()); + if (m_flags & COMBINED_CMD_0D) + { + // Ignore the two values which are equivalent to arguments passed to + // command 0D. + Read32(); + Read32(); + } + m_rendering_curr_frame = 0; m_rendering_curr_voice = 0;