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

Zelda ucode cleanup #214

merged 7 commits into from Mar 27, 2014


3 participants
Copy link

commented Mar 26, 2014

Fixes the Zelda Ucode so it doesn't directly interact with Dolphin's audio output. Inspired by Issue 7111.

I haven't tested this on anything other than Twilight Princess; I wouldn't be surprised if this breaks other games. And I haven't touched the mail handling code, so it's still a complete mess.

magumagu added some commits Mar 26, 2014

Delete a bunch of old audio HLE cruft.
This commit intentionally breaks audio output from HLE Zelda UCode; no other functional change.
Fix sound buffer addresses in Zelda UCode HLE.
The code previously mixed up the addresses of the right and left buffer;
testing shows that the address of the left buffer comes first.
Zelda Ucode partly working without Premix hack.
The code is still completely wrong, and it only outputs some sound,
but the mess is confined to the Zelda Ucode implementation.
Fix minor Zelda Ucode audio corruption.
Stupid mistake in my previous commit; the value of m_CurBuffer was
Use correct sample rate in Zelda Ucode HLE.
The Ucode's output should be independent of the sample rate Dolphin is using.

This comment has been minimized.

Copy link

commented Mar 26, 2014

Wow, that's one thing I did not expect to see :)

I'll try to take some time to review that tomorrow. Meanwhile, please fix the Linux/OS X build.


This comment has been minimized.

Copy link

commented Mar 26, 2014

Tested Zelda Four Swords and Zelda TWW, seems to work as well. At this point I think it's safe to consider the change does what it's supposed to do on all Zelda HLE games.

I hope it also fixes the random freezing of Zelda HLE :)


This comment has been minimized.

Copy link

commented Mar 27, 2014

Super Mario Galaxy 1 and 2 no longer freeze on Grand Stars, Wind Waker no longer freezes under slowdown. Super Mario Galaxy 1 and 2 both have music that works forever (at least in my testing, it never stopped.)

Wind Waker's Magic Meter, SMG1/2's volume issues, and SMS's pause sound being weird all are unaffected so far.

Regardless, the big issues seem to be fixed, amazing!

Edit, few more notes

Mario Kart Double Dash no longer loses music, but the volume levels of certain sounds vs music is still way off.

Pikmin 1 no longer freezes if you spam savestates around the day/night transitions (was able to reproduce in master, not in this pull request)

Other notable thing I found is that Zelda ucode is no longer asynchronous, so it now acts like the rest of HLE.

delroth added a commit that referenced this pull request Mar 27, 2014

@delroth delroth merged commit 784c636 into dolphin-emu:master Mar 27, 2014

1 check passed

default Build succeeded on the Buildbot.

@magumagu magumagu deleted the magumagu:zelda-ucode-cleanup branch Mar 29, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.