delta (256hz ticks) [p] data: if bit7 is set, then this data is 7 bits longer with another length bit (upto 28 bits) delta: [p] in 256hz ticks commands: ***command byte is 6bit + 2bit upper param data (&40h=p1,&80h=p2) 00h:end of track (channel commands) 01h:channel select (0-31) (this may be re-mapped per track) 02h:source - direct pcm8 03h:source - direct pcm16 04h:source - direct adpcm p1 = looped sound [32] source address [16] source loop point (words) [16] source length (words) 06h:source - psg 07h:source - from table [16] source table index 08h:period [16] 16-bit period 09h:envelope p1=enable [8] attack (0->1 = x/y seconds) [8] decay (1->0 = x/y seconds) [8] sustain level (0=disabled) [8] sustain decay rate (1->0 = x/y seconds) [8] release rate (1->0 = x/y seconds) p1=0 (fixed max volume) 0Ah:volume [16] 11-bit volume 0Bh:panning [8] 7-bit panning 0Ch:cue [8] cue data 0Dh:keyon 0Eh:keyoff (global commands) 10h:key-on [32] keyon bits (1/channel) 11h:key-off [32] keyoff bits (1/channel) 12h:end of block channels: 0-7: first 8 hardware channels 8-15: psg-capable hardware channels 16-31: software channels special use: 1,3 used for reverb (left,right) 4,5 used for audio stream 6,7 used for software mixer ***************************************************************** stream format: [1 byte] : [delta] bits 0-7: 8-bit delta value (in 256hz [1 byte] : [selection] [channel] bits 0-4: channel selection bit5: