Thanks guys, all good info
Managed to knock a quick tune in Vortex together with a bit of help from
this thread
My first attempt at implement it within the game however was... not good
But I'm using bank switching a lot, so used DI before working in other banks and only EI again once copying the data was finished... leading to lots of missed interrupts. Fixed this with a CALL to set the current page variable and do the paging - a bit slower, but not crippling.
Worse though, my screen blitter routine uses the stack to read a LUT ( POP DE / LDI x 24 / DEC A / JP NZ, loop ) making the music sound very slow, beyond drunk... so I quickly replaced this with another version, using the same lookup table, but it was sloooow... noticeably slow enough for me to hate it, in fact. Figured I could do it quicker by breaking the code up into 3 loops (block x3, vertical cell x8, vertical pixel x8) which seems less slugginsh and noticeably better.
On the plus side, I no longer need that 384 byte LUT, so got a bit of space... may be time to replace some JRs with JPs again and see if leads to a noticeable speed gain.
I've had to disable my sound effects in the meantime, as they aren't handled by the interrupt routine yet, and were messing things up when they fired. If I just run the sound effect code immediately after the music code finished, effectively overwriting what the music player did, will that be adequate? The sound FX all occupy channel C, and I'm writing the tunes with this in mind (so the "important" stuff is in channels A+B... I'm aware the noise generator is shared, too). In my head it seems fine, but am I about to walk into a typical newbie trap?
Also wondering about...
How long does it take to decompress a track? Ideally I'd like different music to play in each car (like in GTA) but can't have the game hanging for several seconds while waiting for this to happen. If it's almost instantaneous though (i.e. a handful of frames, tops) I can probably live with it.