mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-11 00:29:11 +01:00
ZeldaHLE: Properly implement light command 03.
On at least one version (AC/Pikmin 1 NTSC) it doesn't even send a sync mail and just reloops to the dispatcher.
This commit is contained in:
parent
7f7e036a02
commit
8526a4131c
@ -264,6 +264,8 @@ void ZeldaUCode::HandleMailDefault(u32 mail)
|
||||
|
||||
void ZeldaUCode::HandleMailLight(u32 mail)
|
||||
{
|
||||
bool add_command = true;
|
||||
|
||||
switch (m_mail_current_state)
|
||||
{
|
||||
case MailState::WAITING:
|
||||
@ -274,11 +276,15 @@ void ZeldaUCode::HandleMailLight(u32 mail)
|
||||
// for each command - the alternative is to rewrite command handling as
|
||||
// an asynchronous procedure, and we wouldn't want that, would we?
|
||||
Write32(mail);
|
||||
|
||||
switch ((mail >> 24) & 0x7F)
|
||||
{
|
||||
case 0: m_mail_expected_cmd_mails = 0; break;
|
||||
case 1: m_mail_expected_cmd_mails = 4; break;
|
||||
case 2: m_mail_expected_cmd_mails = 2; break;
|
||||
// Doesn't even register as a command, just rejumps to the dispatcher.
|
||||
case 3: add_command = false; break;
|
||||
|
||||
default:
|
||||
PanicAlert("Received unknown command in light protocol: %08x", mail);
|
||||
break;
|
||||
@ -287,7 +293,7 @@ void ZeldaUCode::HandleMailLight(u32 mail)
|
||||
{
|
||||
SetMailState(MailState::WRITING_CMD);
|
||||
}
|
||||
else
|
||||
else if (add_command)
|
||||
{
|
||||
m_pending_commands_count += 1;
|
||||
RunPendingCommands();
|
||||
|
Loading…
x
Reference in New Issue
Block a user