I've sent ggn the code to reset the module.
And of course that didn't work .
After a lot of fiddling I did came up with a way to reset the module. I pushed an update to the repositories, so you have to get the updated rbasic.h from that for this method to work. What it boils down to is something like this:
MODPLAY(0) SNDKILL(0) SNDKILL(1) SNDKILL(2) SNDKILL(3) VSYNC U235SE_modregdump=0 U235SE_modregdump=0 U235SE_modregdump=0 U235SE_modregdump=0 U235SE_modregdump=0 'Play module 2 MODPLAY((int)strptr(Module2))
- The first command will stop the module playing.
- The next four will attempt to silence any samples played (some times this doesn't work, I couldn't figure out why).
- The vsync was empirically added because I saw that this helped the code to be stable.
- Then the U235SE's internal parameters are reset.
- Finally the new module will start playing.
Not tested on real hardware - had to rely on VJ here. So who knows what happens!
Edited by ggn, Tue Mar 21, 2017 5:26 AM.