Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DSPHLE: fix problems with older ucodes #9954

Merged
merged 2 commits into from Jul 28, 2021
Merged

Conversation

Tilka
Copy link
Member

@Tilka Tilka commented Jul 24, 2021

@Tilka Tilka changed the title DSPHLE: handle Wii Startup Menu ucode correctly DSPHLE: fix problems with older ucodes Jul 24, 2021
@Rumi-Larry
Copy link

Rumi-Larry commented Jul 24, 2021

Above on the lines 246-248 where it says:
// Capcom vs. SNK 2, Naruto 2, Lost Kingdoms, Star Fox, Mario Party 4, Mortal Kombat, // Smugglers Run Warzone, Smash Brothers, Sonic Mega Collection, ZooCube // nddemo, Star Fox
There seems to be some issues with the indentation. If some UCodes are supposed to be there, then some kind of placeholder should be placed.

@Rumi-Larry
Copy link

Also, on line 234 there's this //CARD comment that's missing from the other cases like GBA or ROMS. I think it can be removed.

@@ -214,7 +214,7 @@ void AXWiiUCode::HandleCommandList()

case CMD_OUTPUT:
case CMD_OUTPUT_DPL2:
volume = m_cmdlist[curr_idx++];
volume = m_crc == 0xd9c4bf34 ? 0x8000 : m_cmdlist[curr_idx++];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does this value come from? Is it hardcoded in that particular µcode?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0x8000 is full volume. I'm just copying the behavior of CMD_OUTPUT_OLD. I haven't independently verified that this is correct.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMD_OUTPUT in µcode 0xd9c4bf34:

image

Seems to match what we do in OutputSamples (the whole clamping loop is a no-op considering the volume never changes from 0x8000).

@leoetlino
Copy link
Member

@Rumi-Larry while the formatting should probably be fixed (in a separate PR), those changes are not relevant to this PR at all.

@@ -214,7 +214,7 @@ void AXWiiUCode::HandleCommandList()

case CMD_OUTPUT:
case CMD_OUTPUT_DPL2:
volume = m_cmdlist[curr_idx++];
volume = m_crc == 0xd9c4bf34 ? 0x8000 : m_cmdlist[curr_idx++];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMD_OUTPUT in µcode 0xd9c4bf34:

image

Seems to match what we do in OutputSamples (the whole clamping loop is a no-op considering the volume never changes from 0x8000).

@leoetlino leoetlino merged commit 0553b4a into dolphin-emu:master Jul 28, 2021
11 checks passed
@Tilka Tilka deleted the ax branch July 29, 2021 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants