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
merged 7 commits into from Mar 27, 2014
Merged

Conversation

magumagu
Copy link
Contributor

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.

This commit intentionally breaks audio output from HLE Zelda UCode; no other functional change.
The code previously mixed up the addresses of the right and left buffer;
testing shows that the address of the left buffer comes first.
The code is still completely wrong, and it only outputs some sound,
but the mess is confined to the Zelda Ucode implementation.
Stupid mistake in my previous commit; the value of m_CurBuffer was
off-by-one.
The Ucode's output should be independent of the sample rate Dolphin is using.
@delroth
Copy link
Member

delroth 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.

@delroth
Copy link
Member

delroth 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 :)

@JMC47
Copy link
Contributor

JMC47 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
@magumagu magumagu deleted the zelda-ucode-cleanup branch March 29, 2014 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants