PuCrunch

Pucrunch is a C64 compression library written by Pasi Ojala, based on a hybrid LZ77/RLE algorithm. That means it compresses stuff quite well. Jeff Frohwein ported the decompression code to GB-Z80, and I ported it to real Z80. I also did a few optimisations along the way.

I originally did this with the intention of entering the 2004 MiniGame competition but I wasn’t able to finish an entry due to time restrictions. I’ve also since found this Z80 decompressor, which differs from mine because it is self-modifying to reduce its size but cannot be run from ROM.

Features:

  • Proper, strong compression from a well-used algorithm
  • Should be bug-free since it’s been used for years
  • Example code showing how to use it for decompressing data and also as a loader for an entirely compressed program
  • ROM usage: 392 bytes
  • RAM usage: 44 bytes

Download

Pucrunch (67KB)


aPLib

aPLib is a general-purpose compression library written by Jørgen Ibsen, based on his aPACK executable compressor. Dwedit ported the decompression code to Z80 for TI calculators, and I adjusted it for Sega 8-bit systems, targetting the WLA DX assembler.

This is based on my Pucrunch code, but I was pleasantly surprised to find that Z80 aPLib compresses better and uses less RAM and ROM.

Features:

  • Proper, strong compression from a well-used algorithm
  • Should be bug-free since it’s been used for years
  • Example code showing how to use it for decompressing data, video data and also as a loader for an entirely compressed program
  • ROM usage: 233 bytes (RAM decompression) / 294 bytes (VRAM decompression)
  • RAM usage: 5 bytes

Download

aPLib v1.2 (21KB)

Licence

aPLib is free to use even for commercial use, please check the included license on the aPLib website for details.


What’s new

  • 1/12/2008 aPLib v1.2
    Fixed code to decompress directly to VRAM. Updated compressor to support decompression, be very tiny, and have a broken %f handler.
  • 27/5/2006 aPLib v1.1
    Added code to decompress directly to VRAM.
  • 25/3/2006
    I’ve updated aPLib to use WLA DX’s .ramsection syntax, and also optimised a dozen bytes off the ROM size.

Older changes

Links

Pucrunch

aPLib

Other Z80 compressors/decompressors