Introduction
A tape file for the Amstrad CPC 464, 664 and 6128: the blocks the CPC’s cassette routines write, one after another, without the pulses. Some CPC emulators read it by trapping the ROM loader. It is a different
file from the CDT tape (the TZX format with CPC timings), which is what most CPC emulators and tools use today. The extension .tap is shared with unrelated tape files and the format has no signature.
Structure
Pairs of a 29-byte header block and a data block: Header and data blocks.
0Header block length 29, flag$2C, name, block number, last-block flag, file type, data length, load address, first-block flag, logical length, entry address31 bytes31Data block length, flag$16, the data3 bytes + the data length- More pairs for the rest of the file, until the block flagged lastrepeated
In the explorer
Drop a CPC tape file on the explorer to see:
- the tree: every block with its length and flag, and the header fields (name, block number, last and first block flags, file type, data length, data location, logical length, entry address);
- a table of the files (name, type, load and entry address, logical length, bytes, blocks), each file to open as bytes (the data blocks of the file joined);
- binary files disassembled as Z80 code at their load address with our decoder, starting at the entry address when it lies inside the file (BASIC, screen and ASCII files are not disassembled);
- the problems found when the viewer is given a damaged tape directly: a block cut short, an unknown flag, a data block with no header or a length the header does not match.
A damaged tape is not recognised by the registry (the structure must fit to the last byte) and shows as the neutral tape image (.tap).
Not described
Known, not yet covered
- Viewer: CPC BASIC programs (protected or not) are not detokenised, no CPC firmware labels appear in the disassembly, and screen images are not drawn.
- Reference: the CPC firmware’s cassette header record (the unused bytes after the 28 the tape file keeps, and the segments and CRCs of the real tape format) and tape files that are not made of header and data pairs (headerless data blocks, tapes with a different block order).
Unknown
- Reference: the CPCWiki page Format:TAP tape image file format is the natural source and refuses (HTTP 403) every fetch tool used here; a search summary of it says each block starts with a flag byte and the header is 28 bytes. The layout on the layout page was derived from six real files and the file type values from memory of the firmware guide, not from the page, so both the field order beyond what the real files show and the file type meanings are unconfirmed by a document.
- Reference: whether other writers produce files that break the “every data block follows its header” rule used for recognition.
Also used for
- Acorn Atom tape file – The programs of an Acorn Atom cassette: ATM files, each a 22-byte header and its data.
- Commodore 64 tape image – The length of every pulse on a C64, VIC-20, C16 or PET tape, after the text C64-TAPE-RAW.
- KC 85 / Z 9001 tape file (KC-TAP) – A tape file of the KC 85 and Z 9001 home computers: a signature, a header block and blocks of 128 bytes.
- Oric tape image – Oric-1 and Atmos tapes: a $16 leader, sync byte $24, a 9-byte header, name and data.
- SIMH tape image – The magnetic tape of the SIMH simulators: records framed by a 32-bit length at both ends, and tape marks.
- ZX Spectrum tape image – Spectrum tape blocks as plain bytes, each after a 2-byte length.
Links
Software
- Tiny 8 bit emulators – an Amstrad CPC emulator in the browser that loads CPC .tap files
- Caprice32 – CPC emulator (Windows, macOS, Linux)
Reference
- Format:TAP tape image file format (CPCWiki) – the format’s page; not readable by the fetch tools used here (see Not described)
- Amstrad CPC firmware guide, the cassette manager – the cassette header record the tape file’s header follows (not re-read for this page)