ZeroByte wrote: ↑Wed Mar 12, 2025 8:30 pm
Glad that fixed it. Once I got thinking about it, I realized how familiar that "works on emu, but not hw" problem was.
I knew you would find a solution quite quickly since the music already worked.
Now, while the sound effects are primitive, they give the cycles to the game engine to come up with a queue system etc, so that is good. But converting from ZSM to sound effects is quite a hack at the moment. Your
zsm2sfx php script has a line like this:
Is 18 correct here?
When using the script unmodified, there is always the result:
We've gone off the rails!!!
The switch statement differs quite heavily from the one in
zsmdecode.
My modified script managed to get the sound exactly like I wanted it, but that was probably with luck. Also, I don't like that DefleMask instruments are required for
dmp2x16. It isn't a free software, like Furnace who has its own instrument format.
Maybe
zsm2sfx should be able to export the instrument for function
patchym from the ZSM directly instead?
DragWx wrote: ↑Wed Mar 12, 2025 9:21 pm
9 NOPs is 18 cycles, are you sure that many are necessary after an address write? Our own documentation recommends 10 cycles, which would just be 5 NOPs.
I tested it with 5 NOPs on real hardware with success! All updates to the YM registers that were using 9 NOPs were changed to 5, and I am playing that Super Mario 64 ZSM at the same time at as spamming YM ZFX and PSG at the highest channels not to screw up the music. No errors.
It all runs at 60 Hz even at loop points, which is so ridiculous awesome.
I also introduced artificial lag and music and sound effects are still playing at slower rate (because I am not updating in vblank), but there are no errors in the playback, so 5 NOPs (10 cycles) were correct DragWx!
I will later test 5 NOPs on the real hardware with both sound effects and music playing at the same time. I'll post my result then.
EDIT: Works with the Green Hill Zone ZSM as well, spammed sound effects, and doesn't miss a beat. That ZSM have many instruments changes though so it lags every loop, and is a typical example of how to not make music for the X16. The 5 NOPs work perfectly!