Page 1 of 1
SNES and sound programming question?
Posted: Wed Dec 16, 2009 1:01 am
by joshie
http://en.wikibooks.org/wiki/Super_NES_ ... 0_programs
I recently followed this tutorial, and I discovered on zsnes, it works great, but on snes9x, it doesn't work at all. I am curious if this would work on real hardware but I would think it would not...
Does anyone have any good references on SNES SPC700, or does anyone know why the above doesn't work on snes9x (and perhaps could tell me if it fails on real hardware?)
Posted: Wed Dec 16, 2009 1:35 am
by Bregalad
I'm not sure but I'd double check the "initialization code" is stored somewhere that the SPC file doesn't use, and maybe you should be carefully when initialisating $f0 - $ff values - they are registers and it may be bad if you simply "copy" the values as it from the .spc file. You'd only want to copy the values at $f0, $f1, $f8, $f9 and $fa.
Posted: Wed Dec 16, 2009 2:30 am
by mic_
That code worked for me in snes9x. It doesn't work in bsnes though, or on a real SNES.
Posted: Wed Dec 16, 2009 12:22 pm
by MottZilla
Test your code in BSNES or on a real SNES. If it doesn't work, it doesn't work. ZSNES and SNES9X leave alot to be desired in the accuracy department.
Posted: Wed Dec 16, 2009 2:10 pm
by mic_
That code worked for me in snes9x.
The snes9x I'm talking about here is Geiger's debugger version (1.43?), so they might have improved accuracy since then, which could explain why it doesn't work in snes9x for you.
Anyway, when I was testing this code on my SNES it seemed like it froze somewhere in the "copy data from RAM to the SPC" inner loop, so something is wrong in the way it communicates with the SPC. I haven't bothered trying to work out a fix yet.
Posted: Wed Dec 16, 2009 3:07 pm
by Bregalad
It's probably when it writes to $f4-$f7.... it kills the communication protocol.
Posted: Sun Dec 20, 2009 12:07 pm
by joshie
Thank you everyone for the replies. I ended up integrating xmsnes into my project (and this works on real hardware), so awesome
