Skip to content

ByteBoozer

A C64 cruncher with a small machine at the receiving end

ByteBoozer is HCL’s compression tool for C64 programs and data. Its later B2 format and host-side implementations let authors prepare packed material elsewhere, while a C64 routine restores the bytes when needed.

ByteBoozer compresses programs and data for the Commodore 64. It was written by HCL of Booze Design, the group behind Edge of Disgrace. A small decompressor, or decruncher, restores the packed bytes on the C64.

The preserved assembly routine dates the original ByteBoozer decruncher to May 2003 and its later B2 form to December 2014. Those names identify related formats; a programmer needs the routine that matches the packed data.

Copy new bytes, reuse old ones

B2 alternates between literal runs and matches. A literal run supplies bytes directly. A match gives a length and a position from which to copy bytes already produced. Repeated pictures, instructions or other sequences can therefore take fewer bytes to describe. This is the central idea behind LZ-style compression.

The assembly source makes the practical cost visible. It needs zero-page working storage and changes addresses inside its own instructions as it reads the stream. A programmer integrating it must reserve that storage and place the routine in writable memory. A short routine still has requirements.

Put compression into the build

The separately developed KickAss Cruncher Plugins provide a Java implementation of ByteBoozer and support for B2 inside Kick Assembler. Several memory blocks can be gathered into one packed region, with gaps filled with zeroes. The plug-in’s B2exe variant adds a decruncher and BASIC startup code.

That separates two jobs: a host computer prepares the compressed file; the C64 restores it. Whether that is a useful saving depends on the packed bytes, the routine added to them, the memory available and the time allowed for unpacking. Exomizer and Pucrunch offer other choices within the same constraints.

Sources

  • HCL, B2 decruncher: Preserved HCL routine; header dates, Literal/Match paths, zero-page state and self-modifying input addresses.
  • KickAss Cruncher Plugins, README: Independent integration manual; ByteBoozer, B2 and B2exe sections, including host-side packing and merged memory regions.

Checked. Verified against primary sources and signed off by a person.