Welll, I finished my FPGA SPC player and needed some way to play SPC files. Therein was the problem: The current SPC collection format is .RSN, which is a RAR set containing multiple SPC files.
The problem with this is that nothing short of a powerful computer (i.e. PC) can decompress them to play them. The SNES cannot unrar, my FPGA cannot do it either, so I decided to come up with a new format for storing multiple SPCs to make playing the SPC sets on real hardware a reality.
My method is to take all the SPCs of a collection, extract the 64K RAM portion, break it up into 256 256 byte pieces and remove redundant pieces from the SPCs, then store a header for each included SPC which contains a map of the parts used to assemble its RAM area, the register values, song name, etc. Then finally the RAM data, which has all redundant blocks removed.
A real SNES and my FPGA (or other hardware players like CaitSith2's) can now easily play the complete SPC set!
As a bonus, this new format wrangles the multiple SPC sub-formats into a single uniform format that is easier to process and 100% nonambiguous.
The specification is located here:
http://blog.kevtris.org/blogfiles/spc2_ ... ion_v1.txt
Edit: here's the link to CaitSith2's packer:
http://dl.dropbox.com/u/20737085/spc2_pack.zip
marshallh was nice enough to make a converter program for this new specification, and then CaitSith2 took this code and added all of the SPC field reading and massaging voodoo to round out the format, and helped greatly with defining the specification.
Much thanks to them for making this a reality!
I will leave it up to them to post their converter code, or if they want I can host it and post it too.
Now, onto some details and numbers:
Using the conversion program, all 1458 RSN sets from snesmusic.org were converted into SPC2 files.
* The uncompressed SPCs took up 2.04GB in 34689 files.
* The original RSNs occupied 152MB.
* The SPC2's take up 578MB.
SPC2 doesn't compress the data as much as RAR does, but compressing as good or better than RAR is a pretty tall order, especially when a host system like SNES has to decompress it.
Also, storage space is so stupidly cheap these days that a little more space isn't going to hurt. I was shopping at Fry's last week and 2GB SD cards are the smallest you can buy, and even these were being phased out. 4GB cards were stupidly cheap (under 10 bucks).
I believe this is a decent tradeoff between space and convenience.
I honestly don't see everyone jumping to use this new format, but it exists now and works excellent for our purposes, and a SNES player could be made that can turn SPC sets into a single ROM file that can be played easier. The only downside on SNES is you'd have to hit the reset button to start the next song, but by keeping a signature and song count in RAM, it'd be easy to jump to the next song every time the reset button is pressed.
The problem with this is that nothing short of a powerful computer (i.e. PC) can decompress them to play them. The SNES cannot unrar, my FPGA cannot do it either, so I decided to come up with a new format for storing multiple SPCs to make playing the SPC sets on real hardware a reality.
My method is to take all the SPCs of a collection, extract the 64K RAM portion, break it up into 256 256 byte pieces and remove redundant pieces from the SPCs, then store a header for each included SPC which contains a map of the parts used to assemble its RAM area, the register values, song name, etc. Then finally the RAM data, which has all redundant blocks removed.
A real SNES and my FPGA (or other hardware players like CaitSith2's) can now easily play the complete SPC set!
As a bonus, this new format wrangles the multiple SPC sub-formats into a single uniform format that is easier to process and 100% nonambiguous.
The specification is located here:
http://blog.kevtris.org/blogfiles/spc2_ ... ion_v1.txt
Edit: here's the link to CaitSith2's packer:
http://dl.dropbox.com/u/20737085/spc2_pack.zip
marshallh was nice enough to make a converter program for this new specification, and then CaitSith2 took this code and added all of the SPC field reading and massaging voodoo to round out the format, and helped greatly with defining the specification.
Much thanks to them for making this a reality!
I will leave it up to them to post their converter code, or if they want I can host it and post it too.
Now, onto some details and numbers:
Using the conversion program, all 1458 RSN sets from snesmusic.org were converted into SPC2 files.
* The uncompressed SPCs took up 2.04GB in 34689 files.
* The original RSNs occupied 152MB.
* The SPC2's take up 578MB.
SPC2 doesn't compress the data as much as RAR does, but compressing as good or better than RAR is a pretty tall order, especially when a host system like SNES has to decompress it.
Also, storage space is so stupidly cheap these days that a little more space isn't going to hurt. I was shopping at Fry's last week and 2GB SD cards are the smallest you can buy, and even these were being phased out. 4GB cards were stupidly cheap (under 10 bucks).
I believe this is a decent tradeoff between space and convenience.
I honestly don't see everyone jumping to use this new format, but it exists now and works excellent for our purposes, and a SNES player could be made that can turn SPC sets into a single ROM file that can be played easier. The only downside on SNES is you'd have to hit the reset button to start the next song, but by keeping a signature and song count in RAM, it'd be easy to jump to the next song every time the reset button is pressed.