tzxtools

tzxcat

Extracts the binary content of TZX data blocks to a file.

This tool is useful to migrate tape computer files to modern computers.

It also brings a set of converters to ZX Spectrum BASIC, assembler, ZX Spectrum screens, plain text and hex dump.

This tool also accepts TAP files. They are converted to TZX format internally.

Usage

tzxcat [-h] [-b NR] [-o TARGET] [-s BYTES] [-l BYTES]
       [-t] [-B] [-A] [-S] [-d] [-O BASE] [file]

A converter can be applied to the output. If no converter is chosen, the output is just the binary content of the selected block. Available converters are:

Additional converter options:

Converters use your system’s encoding as target encoding. If your system does not use Unicode, the presence of some special characters may lead to an error.

Example

tzxcat --block 4 --to screen.scr game.tzx

Reads the game.tzx file and copies the binary contents of the 4th block to screen.scr.

tzxcat --block 4 --screen --to screen.png game.tzx

The same as above, but now the screen is converted to PNG.

tzxcat --block 4 --text sources.tzx

Dumps block 4 in a (more or less) readable plain text format to stdout.

tzxcat --block 4 --dump sources.tzx

The same as above, but dumps block 4 as hex dump to stdout.

tzxcat --block 2 --basic sources.tzx

Shows block 2 as BASIC listing.

tzxcat --block 6 --assembler sources.tzx

Shows block 6 as disassembled machine code. The starting address of the Bytes header in block 5 is used automatically as the base address.

tzxcat --block 6 --assembler --org 32768 sources.tzx

The same as above, but 32768 is used as fixed base address.

Supported Block Types

tzxcat can extract binary data from all block types containing actual data: