Skip to content

Sav2Cart

Nikita Zimin edited this page Apr 25, 2020 · 2 revisions

Sav2Cart is a command line utility used to convert RT-11 executable .SAV file into UKNC cartridge image format.

UKNC cartridge is ROM limited to 24 KB = 24576 bytes. That makes a "natural" limit for a file able to convert into a cartridge.

If the input .SAV file is too large for the cartridge, the utility tries to compress the file using the RLE algorithm. If it is not possible to sufficiently compress the file using RLE, then the utility tries to compress the file using the LZSS algorithm. If LZSS compressed file also does not fit, then LZ4 compression is applied.

Command line usage:

Sav2Cart [options] <inputfile.SAV> <outputfile.BIN>
Options:
    /none  - try to fit non-compressed
    /rle   - try RLE compression
    /lzss  - try LZSS compression
    /lz4   - try LZ4 compression
    /lzsa1 - try LZSA1 compression
    /lzsa2 - try LZSA2 compression

    (no compression options) - try all on-by-one until fit

For example:

> Sav2Cart.exe HWYENC.SAV HWYENC.BIN
Input file: HWYENC.SAV
Input file size 47616. bytes
SAV Start       001000  0200    512
SAV Stack       134674  b9bc  47548
SAV Top         134672  b9ba  47546
SAV image size  133674  b7bc  47036
Input file is too big for cartridge: 47616. bytes, max 24576. bytes
RLE input size 47036. bytes
RLE output size 33070. bytes (70.31 %)
RLE encoded size too big: 33070. bytes, max 24064. bytes
LZSS input size 47036. bytes
LZSS output size 23507. bytes (49.98 %)
LZSS decode check done, decoded size 47036. bytes
Output file: HWYENC.BIN
Done.
Clone this wiki locally