So starting to get to the point where I want to start compressing some data; our nametables are so non-repetitive, RLE savings don't offer much, and I'm ok with that trade off...however, I definitely want to try to compress the CHR-RAM and see what sort of saving I might get there at least. Likely music, too.
I've been researching a bunch of compression types - I know it definitely depends on the anticipated use for the compression, but I figure there might be a preferred method for something as specific as chr-ram?
Open to thoughts and suggestions.
Why not look into Bregalad's
CompressTools or
LZ4 +
(6502 decoder)?
RLE works great if you have alot of repeated tiles / data.
Tokumaru's tile encoder/decoder. I think this is specifically for compressing chr-rom data if you're using chr-ram.
dougeff - yeah in most cases, that's not the case for our screens...but it's ok, I knew that would be a bit prohibitive going in, we made the sacrifice for the aesthetic and are still ok with scope.
Lidnariq - link is broken...
GG - I'll check that out!
For CHR-RAM or any other large block of data that'll be decompressed to RAM, the best you can do is test the generic compression schemes and see what gives the best results.
For things that are accessed on the fly though, which happens a lot on the NES when you don't use any extra RAM, you should think of formats that better take advantage of the natural redundancy of your data. If it's level maps, it's very common to subdivide them in reusable blocks. Music is also usually broken up into smaller reusable patterns. The advantage these compressions schemes have over traditional generic formats is that they can be accessed without a full decompression, so you can still take advantage of the redundancy without needing a lot of RAM.
tokumaru - noted. Do you recommend your compression tool for CHR-RAM, before I go test it out? I want to sort of start there.
Thanks!
JoeGtake2 wrote:
Lidnariq - link is broken...
Uh, what? I just tested all three links again and they worked for me.
Yes - must've been a glitch in the Matrix. Working fine for me now too. Will check them out.
I definitely recommend the compression scheme used by my tool, it achieves some of the best compression ratios I've ever seen on the NES. It's based on a format used by Codemasters, which I improved a bit. The tool itself isn't the most friendly, and it's not particularly well coded, but it does the job, I think.
In STREEMERZ I used tokumaru's tile compressor for CHR data (except some time-sensitive stuff like the player sprites),
aPLib for general stuff (mostly levels; 6502 decompressors are available at mic's site) and Byte Pair Encoding (implemented in Bregalad's CompressTools) for text dialogue.
thefox wrote:
In STREEMERZ I used tokumaru's tile compressor for CHR data
Cool, I didn't know people were actually using it!