available SID files come with an own player routine written for 65xx CPUs. Hence all PC based SID players emulate this CPU or even more parts of the C64. This approach is probably not the way to go as it needs too much computing power.
To circumvent the emulation layer I used siddump from coverbitops to dump all SID registers 50 times per second. The output looks like this:
Code: Select all
| Frame | Freq Note/Abs WF ADSR Pul | Freq Note/Abs WF ADSR Pul | Freq Note/Abs WF ADSR Pul | FCut RC Typ V |
+-------+---------------------------+---------------------------+---------------------------+---------------+
| 0 | 0000 ... .. 00 0000 000 | 0000 ... .. 00 0000 000 | 0000 ... .. 00 0000 000 | 0000 00 Off F |
| 1 | 15ED ... .. 01 00AA 700 | 1167 C-4 B0 51 0059 ... | 0459 ... .. 01 00C8 E00 | .... F4 Low . |
| 2 | 15ED E-4 B4 21 .... 730 | .... ... .. .. .... ... | 08B3 C-3 A4 41 .... DC0 | C000 .. ... . |
| 3 | .... ... .. .. .... 760 | .... ... .. 50 .... ... | 0459 (C-2 98) .. .... D80 | A000 .. ... . |
| 4 | .... ... .. 20 .... 790 | .... ... .. .. .... ... | .... ... .. .. .... D40 | 8000 .. ... . |
| 5 | .... ... .. .. .... 7C0 | .... ... .. .. .... ... | .... ... .. .. .... D00 | 6000 .. ... . |
| 6 | 159B (- 0052) .. .... 7F0 | .... ... .. .. .... ... | .... ... .. .. .... CC0 | 4000 .. ... . |
| 7 | 1549 (D#4 B3) .. .... 820 | 15ED E-4 B4 51 .... ... | .... ... .. .. .... C80 | 2000 .. ... . |
| 8 | 159B (E-4 B4) .. .... 850 | .... ... .. .. .... ... | .... ... .. .. .... C40 | .... .. ... . |
| 9 | 15ED (+ 0052) .. .... 880 | .... ... .. 50 .... ... | 0442 (- 0017) .. .... C00 | .... .. ... . |
| 10 | 163F (+ 0052) .. .... 8B0 | .... ... .. .. .... ... | 042B (B-1 97) .. .... BC0 | .... .. ... . |
| 11 | 1691 (+ 0052) .. .... 8E0 | .... ... .. .. .... ... | 0442 (C-2 98) 40 .... B80 | .... .. ... . |
| 12 | .... ... .. .. .... ... | .... ... .. .. .... ... | 0459 (+ 0017) .. .... B40 | .... .. ... . |
| 13 | 1A13 ... .. 01 .... 700 | 1A13 G-4 B7 51 .... ... | 0470 (+ 0017) .. .... B00 | .... .. ... . |
| 14 | 1A13 G-4 B7 21 .... 730 | .... ... .. .. .... ... | 0487 (C#2 99) .. .... AC0 | .... .. ... . |
| 15 | .... ... .. .. .... 760 | .... ... .. 50 .... ... | 0470 (C-2 98) .. .... A80 | .... .. ... . |
To play such a dump the player routine is called 50 times per second (for example via a vertical blank interrupt). Every time it is called the player routine writes the corresponding values into the SID registers. As you can see, there are many registers which doesn't change with every frame ("...." means don't touch this register in this frame).
The dump above is shown in ASCII format. Wenn using binary format all ".." have to be replaced with a byte value which is not used elsewhere in the SID dump. Call it magic byte for example. If the player routine reads this magic byte it just skips it.
All this works, but has some disadvantages. First I have to find a byte value which can be used as magic byte. Second the resulting dump file can be very big - due to repeating values every frame even if there are no changes.
What I would like to have is a better file format. Something which comes compressed and where I don't have to fiddle with magic bytes.
Any ideas?
Simon