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.
lle_mask_math.patch (Size: 10.97 KB / Downloads: 991)
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.
lle_masked_math_compatible4.patch (Size: 18.78 KB / Downloads: 792)
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.
lle_masked_math_special.patch (Size: 13.46 KB / Downloads: 1,081)
This patch will provide a nice DSP LLE speed boost at the expense of possibly breaking sound in a few games.
lle_mask_math.patch (Size: 10.97 KB / Downloads: 991)
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.
lle_masked_math_compatible4.patch (Size: 18.78 KB / Downloads: 792)
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.
lle_masked_math_special.patch (Size: 13.46 KB / Downloads: 1,081)