Dolphin, the GameCube and Wii emulator - Forums

Full Version: [PATCH] DSP LLE faster masked math
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Edit: Just an update for people new to the thread. Most of the work here has already been revised, committed in some form. Best to check with the most recent posts to see what is going on.

This patch will provide a nice DSP LLE speed boost at the expense of possibly breaking sound in a few games.
[attachment=4595]

It replaces the existing LLE masked add/sub/inc/dec functions (both JIT and interpreter) with faster versions that require continuous masks. In the case of a continuous masks these should be functionally identical to the originals functions. In the case of broken masks output will be incorrect.

Games that use broken masks seem to be in the minority (of the dozen games I have only Twighlight Princess seems to) so there is a good chance this could be of use if you rely on DSP LLE to play games.


The change in dsp.cpp isn't related but it can reduce noise in some games with LLE by delaying a bit before pushing it out.


Edit: I made a compatible version of this patch that should be faster without sacrificing compatibility. Dsp.cpp and dspintmultiplier.cpp changes in this patch have unrelated LLE hacks that are nice but you may not want to use.
[attachment=4696]

Edit: Added most compact and probably fastest version. Can go out of bounds on add/sub for ix > wr but this may not be incorrect behavior.
[attachment=4723]
I will test this and report back with the results. Smile
Do those funcs really handle conditions correctly? There was a reason for it to be implemented like that (altho, ToMask was like, rounding up to the next 2-exponent; might be the reason you broke stuff).

Also, please dont use MDisp(reg, something * 2). We have MComplex(reg, 0, 2, something) for that (altho, it just hit me like lightning that we still have those *2 in the code. I'm pretty sure I replaced them last time around).
Does this solely affect the LLE plugin? Could someone upload his plugin (altered with this patch) in that case? thanks Smile
Haha, annoying sound in Zelda Ucode games although the sound appears to be functioning fine in these games if you can get past the annoying screeching, ringing sound that drowns out game audio. Other than that it seems faster, although it would be nice if the slowdowns when multiple sounds/samples are played can be solved. It makes games like Super Mario Galaxy a pain because of the simultaneous effects that play and collecting starbits which causes slowdowns.
Here is the patched LLE dll. The original patch also has a one line change to dolphin.exe but it isn't essential.

I think all the complexities of the originals are due to the need to support uneven mask cases. It seems that the working versions of the masked add/sub can be improved without breaking comparability but the gains wouldn't be as big as this patch. If I get some time this week I will try to work on it.
thanks!
@Myle thanks for upload this plugin.Smile
Very good this patch, but DSP LLE even fullspeed he is sizzling.Sad
Why DSP LLE is simmering.Huh(it seems that the sound quality is bad)
sizzling? simmering? dude, what are you cooking there? Big Grin
(11-08-2010, 09:04 AM)StripTheSoul Wrote: [ -> ]sizzling? simmering? dude, what are you cooking there? Big Grin

You know what I mean.Dodgy
The sound in MKDD xxxxNINxxxxxTENxxxxxDOxxxxxx.Tongue
Seems those TVs, old when the channel does not work with good sound.
Any effect of sound (voice, music) do not sound clean, always gives an error in the sound (like that xissssss)
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20