Hey chip,
afaik it is quite a manual task as it is like ripping code from a game.
To gain understanding of the structure of these music modules it's quite interesting to a look at the sid files and especially it's headers.
These .sid files are our non standardized code blocks playing music, but - and thats the big difference - with a header which tells the sid player what to do. And tells us whats happening (and where in this linear $0000..$FFFF 64k adress space).
Now we can take a closer look at the .sid header to see how the music module contained works.
For example let's take a look at thanatos.sid:
The header tells us
- it's a psid file type
- offset is $007c (header ends and module begins), see byte $0006
- load adress of the "module" is $c000
- init call is $c009, see byte $000a
- play routine is at $c00f (just call it every vblank), see byte $000c
(which causes most sids to being played a little faster on ntsc machines IIRC
)
As much as I remember
- the sids are based in completely different memory locations (c64 is non multitasking. all routine/data/module adresses are absolute and just have to give space to each other).
For example: cauldron1 sid loads to $3a76, Frantic Freddie loads to $a000 and Nexus (one of my favourites) loads to $4a00.
Have fun!
[ Show youtube player ]