A8CAS - software for reading/writing Atari 8-bit cassettes

HEX file format - description

HEX is a text-based representation of CAS format - it stores the same information, in the same structure, but in text rather that binary. It is destined to use when debugging tape files which contain some wrong bytes.

A8CAS' HEX format is inspired by the HEX format as used by Ernest R. Schreurs' WAV2CAS, however it is not compatible.

The HEX format should be treated as a debug-only format, and tape dumps in this format should not be released in public - for that puropse the CAS format should be used, as it can store the exact same content. Specification of the HEX format can change without warning - it already happened once.

Here is an example of a file in HEX format: Bang! Bank!


Note: everywhere in this document, "newline" means Unix newline character, 0x10. Only Unix newlines are supported.

The file in HEX format starts with a line containing the file's header. Length of the line is precisely 10 bytes (with the terminating newline).


After the header, each line corresponds to a single CAS chunk. Each line contains 3 parts: a chunk's name, some numeric or textual data, and an optional comment preceded by a ";" character. A comment may contain some additional information, such as chunk length or calculated checksum of a block, useful for verification of correctness.

There are several types of chunks, as in the CAS format. For details on meaning of values stored in each chunk. see description of the CAS format.