Newest Hacks

Cookie's Original Sprites Gradius Resurrection Contra jump control Little Samson Restoration

Newest Translations

Samurai Shodown! 2 Crystal Quest Bionic Battler Super Chinese World 2

Newest Utilities

Road Rash (Sega CD) Editor Mario Party Tools ECCRegen Road Rash 1 Bike Editor

Newest Reviews

Unnamed Super Mario Land Graphics Hack Truxton/Tatsujin Arcade colors/sprites/backgrounds Shin Megami Tensei: Nocturne - Hardtype Consistently Consistent Cannon

Featured Hack Images

Final Fantasy III US Bugfix Patch Rockman 5 - Endless Pokemon - Septo Conquest Zelda - The Legend of Link

Featured Translation Images

Wonder Project J2: Koruro no Mori no Josette Shin Bokura no Taiyou: Gyakushuu no Sabata SD Snatcher Karakuri Kengou Den Musashi Lord

Recent Updates


sf_crunch and sf_decrunch are compression and decompression utilities for the graphics data in Star Fox and Star Fox 2. This format was used for most of the background and sprite graphics, as well as the tilemaps (also known as “name tables”). It does not apply to any of the 3D graphics in the game. Star Fox and Star Fox 2 both use the same format, which is a variant of LZW compression.

I was motivated to make this utility after the source code became available via the recent Nintendo source code leak. This utility obviously doesn’t contain any of the leaked code, but I did use the decompression source code to help reverse engineer the format. The decompression subroutine in the ROM runs on the Super FX chip, and its source code is in a file called MDECRU.MC which was apparently written by Krister Wombell. I liked the name “decrunch” that Krister used, so I used it for this utility.

The compressed graphics data was also included in the leak. The files have extension .CCR (compressed graphics) and .PCR (compressed tilemap/name table data). The filenames from the source code are listed in readme.txt along with their location in the U.S. version of the Star Fox ROM.

This compression format is unique in that control sequences are stored _after_ the data sequences that they correspond to, so the decompressor must parse the data backwards, starting at the end of the compressed stream and progressing to the beginning.

Because of this quirk, I added a command-line option for the decompressor to specify the offset of the _end_ of a compressed data segment in a file. The offsets of the compressed data segments in the U.S. version of the Star Fox ROM are listed below. I didn’t include an option to specify an offset for the compressor because it would ostensibly be used to compress an entire file.

The only other utility that I’m aware of which supports this format is FuSoYa’s Lunar Compress library, but since it is closed source and only for Windows, I wanted to make an open source utility that could be compiled on a computer running any operating system.

With that in mind, this archive does not contain any executable files. It only contains the C++ source files for the compressor (sf_crunch.cpp) and decompressor (sf_decrunch.cpp). They are very simple programs, so they should be easy to compile with any C++ compiler. You are also free to use and modify this code if you would like to use it in your own work. I’ve tested both programs pretty thoroughly, but please let me know if you find any problems.


User Review Information
User Reviews
Many Thanks!SpyderTL30 Aug 20201.0Yes