ZeldaHLE: Add support for New Play Control! Pikmin 1

This commit is contained in:
Pierre Bourdon 2015-12-14 04:37:59 +01:00
parent 2ab0bad137
commit 2e5c94865b
2 changed files with 17 additions and 2 deletions

View File

@ -63,7 +63,8 @@ UCodeInterface* UCodeFactory(u32 crc, DSPHLE* dsphle, bool wii)
case 0x42f64ac4: // Luigi's Mansion - US case 0x42f64ac4: // Luigi's Mansion - US
case 0x56d36052: // Super Mario Sunshine - US case 0x56d36052: // Super Mario Sunshine - US
case 0x6c3f6f94: // Zelda TP Wii - 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); return new ZeldaUCode(dsphle, crc);
case 0x2ea36ce6: // Some Wii demos case 0x2ea36ce6: // Some Wii demos

View File

@ -54,6 +54,10 @@ enum ZeldaUCodeFlag
// If set, command 0C is used for an unknown purpose. TODO: rename. // If set, command 0C is used for an unknown purpose. TODO: rename.
WEIRD_CMD_0C = 0x00000200, 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<u32, u32> UCODE_FLAGS = { static const std::map<u32, u32> UCODE_FLAGS = {
@ -89,7 +93,9 @@ static const std::map<u32, u32> UCODE_FLAGS = {
// Super Mario Galaxy. // Super Mario Galaxy.
// Super Mario Galaxy 2. // Super Mario Galaxy 2.
{ 0xD643001F, NO_ARAM | MAKE_DOLBY_LOUDER }, { 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 }, { 0xEAEB38CC, NO_ARAM | MAKE_DOLBY_LOUDER },
// TODO: Other games that use this UCode (exhaustive list): // TODO: Other games that use this UCode (exhaustive list):
@ -455,6 +461,14 @@ void ZeldaUCode::RunPendingCommands()
m_renderer.SetOutputLeftBufferAddr(Read32()); m_renderer.SetOutputLeftBufferAddr(Read32());
m_renderer.SetOutputRightBufferAddr(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_frame = 0;
m_rendering_curr_voice = 0; m_rendering_curr_voice = 0;