Recently I wanted to use a set of sprites from one of my most loved demos of all time – Camel Park / Camelot. Released about 20 years ago, I watched it a lot over the years and still return to it for some nice classic effects and some great tracks. One of the parts has a nice plasma with a cool font used for the sprite scroller. I wanted to use this font in a few things I’m trying out (saves me having to design up a large font set for a sprite scroller (plus I love the font. How can I use it I wondered.. I decided to look at how to extract the font from the demo and get it into a format I could use.
First step was to grab a .d64 image of the demo disk. CSDb has everything and this was no exception. I’m not surprised to see it rated to highly. You can download the image here: Link
I fired up VICE, ran the disk and advanced the demo to the part I wanted (see first photo above). At this point I used the “Save Snapshot Image” feature within VICE to dump the C64 memory to a file.
Next step was to open up my copy of SpritePad (also available as CSDb – Link). Within the tools menu there is an option titled “VICE snapshot ripper”. This opens a small screen where you can select the snapshot and which bank to import.
Once a snapshot is selected, you can then cycle through the banks (0 to 3). The results are shown in the main window behind. In this case I was able to find the font sprites located in bank 2 ($8000 – $BFFF).
Something looked a little off about the sprites. SpritePad has an option to “overlay next sprite”. This option is set on a per sprite basis. So I clicked through each sprite and unselected “Overlay next sprite”. Some sprites also had “Multi-colour mode” enabled too. This was also disabled. Once done, the font set now looked like what I expected.
The final step in SpritePad is to export the data. In this case I only wanted the letters A-Z and numbers 0-9. I lowered the quantity field to suit and then selected export from the file menu. I exported a .prg file in the spritepad byte format.
So now I have a binary file containing the sprites. The file had a two byte load address header (low/high format). The file size is quite large – enough to store an 8 char high bitmap logo in. I wondered if I could compress it any with some simple RLE compression.
I cloned the amica paint exporter script I wrote and made a generic rle compression script. It managed to shave off only 100 odd bytes. But it’s better than nothing. Using a cruncher / packer it should yield better results. For now though, I am able to import these sprites into my own builds and play around with them.
A small assembly routine can then be used to unpack the rle compressed sprite data into memory:
The exporter script can be downloaded here: Link