100% on test Mod!

At last! 100% of the way through my chosen starting module (Theme tune to Alf by Trash).  Although I am a little sick of hearing it now oddly enough it mostly sounds (to me) as it should do.  Other ears have heard some tuning issues, but only in some places and I suspect this may be due to the rather speedy coding of some of the effects.

As the code to read the actual pattern data was so bodged and crufty and incomplete (anything that used more than 15 samples was never going to work), I decided to completely rip it out and rewrite, but adding in hooks for various bits along the way and knowning now what I didn’t know when I 1st wrote it.

Took me longer than I planned originally, but the final result was certainly worth it!  Adding effects to this new build is super simple.  There are 15 primary effects, with a further 15 sub effects.  For now I am concentrating on the primaries.  I therefor have a list of Addresses of the code to produce the desired effect.  To select the correct effect code the effect number is added as an offset to the address of this list, the program counter is then jumped to the address stored there (not before pushing the desired return address on the stack for the RTS at the end of the effect) and thats it.  When I come to write a new chunk of effect code I simply write it and then update the list of pointers.  Jobs done.

I still have around another 21 effects to code, I am quite pleased with the pitch slide effects I have coded tonight despite me being suspicious that these may be the cause of the out of tune behaviour and also being incredibly simple 😀

To further the work on the player I have a more complex effect rich module to work through now, one of my old favourites back in the day.  It has already identified and helped me resolve a few bugs I wasn’t aware of.  Really enjoying this project 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *