As you might know I am working on a project that might enhance the way music is implemented in calculator games. I'm talking about an external soundchip. I can write registers via the linkport at 420 Bytes per second. Now I want to make a general purpose interrupt driven music player which can be inserted in any AXE source code with ease. I also need to figure out what the best file format looks like. I came up with this concept:
00aaaaaa dd - Write dd to register aa
01tttttt -- - Wait tt before executing the next instruction
10xxxxxx xx - Not implemented yet. (set speed?)
11xxxxxx - End of song marker.
I get transfer rates of 420bytes per second and a register write takes two bytes, so that's 210 register writes per second. This is without additional code for fetching commands. I want to use interrupt speed 4 or 6 (preferably 6 since it's similar to the TI83+ interrupt frequency)
What do you think? Any suggestions?
Edit: Now here is a more complex format for comparisson:
[Header] Name, Size, speed, etc.
[Instrument dumps] Timed register writes for each instrument
[Sequence] Order of patterns in the song
[Patterns] Pattern of notes, register writes, delays etc.