ZX Spectrum Memory Compressors: Packmaker, Imploder and Tompacker

ZX Land #06

Compressors, Part 2

In the previous part of the article, I compared several of the more popular memory compressors. Now I’ll describe what these programs can do.

Packmaker (v2.2)

Load it to the screen and run it with USR 16384. It has no built-in block loader. To compress anything, first load the block you’re interested in into memory, then load Packmaker (to the screen) and run it.

FIRST — the address where the block to be compressed is located in memory. The default is 24200, so if your block starts at that address, just press ENTER.

START — the address where you want to decompress the block; this is also the address from which decompression is started (USR). Press ENTER to use the same address as FIRST.

LENGTH — the length of the block to be compressed. Press ENTER to use the remainder of memory, that is, 65536 - FIRST.

2nd PASS — answer Yes or No. Should compression be performed in two passes? If so, the program will pack the block a little more efficiently. ENTER = Yes.

2nd SCRN — Y/N: may the decompressor use screen memory? ENTER = No.

PART OF SCREEN FOR REPACK (1–3)

Which part of the screen should the decompressor use: 1 — top, 2 — middle, 3 — bottom.

General notes

The program compresses very quickly compared with its rivals. Its decompression, however, is the slowest. Once compression is complete, the program displays the new length in parentheses and asks whether to save the block. ENTER = yes. The program saves to tape only. To save a block to disk, exit the packer and save it from BASIC, using the data in the information window. After saving to tape, it also asks whether to verify the saved block, load the monitor, and so on. After returning to BASIC, you can run Packmaker again with USR 16384, provided the screen contents have not changed.

Imploder

A block can only be loaded using the program’s own controls. First, the program asks which compression method to use:

  1. Search for a byte sequence 4 to 255 bytes long, looking up to 255 bytes ahead.
  2. Search for a byte sequence 4 to 19 characters long within a 4096-byte forward range.
  3. Search the entire memory for a sequence 5 to 255 bytes long.

The program notes that after using method 3, it is advisable to use method 2 as well.

Next, enter the block length (LENGTH), which must not exceed 41036.

DESTINY ADDRESS — the address at which to decompress the block.

During compression, the following values are displayed in hexadecimal as the process runs:

  • the current memory address in the block being compressed;
  • the number of bytes compressed;
  • the number of markers inserted for the decompressor.

After compression, the program displays:

  • AFTER — the size of the compressed block in bytes;
  • USR nn — the address from which to start decompression;
  • MINUS — how many bytes the block has been shortened by.

The decompressor destroys the contents of the screen! Of the compressors described here, this program handles blocks the slowest (with option 3, it can sometimes take a few hours). Even so, it is the best choice for compressing tables or animations.

For best results, I recommend compressing a block with Imploder first, then compressing it further with, for example, TOMPACKER.

Tompacker (charpress)

At the start, the program asks—quite unnecessarily—whether you want normal or bold characters. Press ENTER to skip this. Copyright information appears next; press ENTER again.

The program then asks whether you want to load a block or simply compress the current contents of memory. If you choose to load a block, these fields appear:

  • IX — the address where the block should be loaded;
  • DE — the block length;
  • A — the block type.

Press ENTER to let the program take the values from the header.

After the block has loaded:

  • PORT — the port to which data will be sent during decompression. Skip this by pressing ENTER.
  • VALUE — the value to be sent to the port. Press ENTER here too.
  • FIRST — the starting address of the block to compress.
  • LENGTH — the block length. Press ENTER to use everything from FIRST to the end of memory.
  • JUMP — the address to run automatically after decompression, for example, a USR address that starts the program. Press ENTER to return (RET) after decompression.
  • DEPAC — the address where the decompressor should reside (about 80 bytes). Press ENTER to use the printer buffer (23480).
  • ARE YOU SURE? — are you sure? Y = yes; any other key restarts the selection process.

Compression can sometimes take as long as 15 minutes. The number of bytes still to be compressed is displayed as the program works. When the counter reaches 0, NEW LENGTH appears, showing the length of the compressed file.

  • MOVE BLOCK? — do you want to move the block to another address? If you answer Y, MOVE TO asks which address.
  • MODIFY DEPACKER? — do you want to change anything in the depacker? For example, you can keep a compressed block somewhere in memory and unpack it to another address whenever you like, without destroying the compressed block.
  • LOAD AT: — it’s best to press ENTER.
  • SAVE? — should the block be saved?
  • NAME: — the block name.
  • AGAIN? — do you want to use the program again?
  • LOAD MONITOR? — press ENTER.
  • BASIC — exit the program to BASIC.
  • CLEAR — set RAMTOP. After pressing ENTER, it is set to 24990.

This is the most versatile of the compressors described here. This article was also packed with TOMPACKER.

— Pyza

Share your thoughts about the article