Problems with AY sound. Experts needed. :-)
I need to play some AY sound effects, so I've been experimenting with Shiru's AYFX Editor package (and his player code) as that seems simple and suitable, but there's a couple of things I don't understand.
This is what I'm working with btw: https://dl.dropboxusercontent.com/u/2697142/aytest.zip (1.5kb)
I've taken the player and stripped all non-essential code away and made some changes to not use interrupt or have self-modifying code. Compile the file "compilethis.asm" and it will then import the two other files. You can then press space to play a sound. Simple enough.
But to use it I need to understand it...and I don't.
Look at the first 3 lines of the source code. The label musInitAd (currently) points to $9000 but can be changed to anything really.
...but there is nothing there! Yet, it still it works. If I place a RET on that address nothing happens and if I place a RST 0 there it resets, so it does go there (obviously). If I omit the call to that address it doesn't work at all - it resets.
I've disabled the calls to the two other addresses with EQU statements and that doesn't seem to have any effect, but the first one needs to be there...but those two other calls has to be there for a reason. But I'm stumped.
...so what exactly happens and how can I get it under control?
Suggestions on how to fix/understand this would be appreciated - even an alternative solution would. ;)
Post edited by Sokurah on