Introduction
SIMH is a family of simulators of historic computers (PDP-1 to PDP-11, VAX, IBM 7090 and 650, CDC 1700 and others). A tape drive of the simulated machine reads and writes a file in the SIMH tape image format: the
records of the tape one after another, each framed by its length, with a special value for a tape mark. The format has no signature and no header, and it is not related to the other files that use the extension .tap.
What is on a tape is up to the simulated machine: a backup, a tar archive, an operating system installation or a program. The viewer shows the records and the tape files (the runs of records between tape marks) and lets you open each tape file as bytes.
Structure
A run of items, each starting with a 32-bit little-endian word. See Records, marks and gaps.
0Data record length word, data, a pad byte when the length is odd, the length word again8 bytes + length- Tape mark the word
$00000000: the end of a tape file4 bytes - Erase gap the word
$FFFFFFFE4 bytes - End of medium the word
$FFFFFFFF4 bytes
In the explorer
Drop a SIMH tape image on the explorer to see:
- the tree: every record (its length word, data, pad byte and the repeated length word), tape mark, erase gap and the end of medium, for the first 3,000 items (a single node stands for the rest of a longer tape);
- the tape (records, marks, gaps, largest record, records with the error flag) and a table of the tape files (records, bytes, smallest and largest record and the start of the first record as text), each tape file to open as the bytes of its records;
- the problems found: a trailer that differs from the length word, a record that runs past the end of the file, a word with bits above the 24-bit length, bytes after the end of medium.
Nothing is decoded inside the records. A tape of a tar archive can be opened as bytes and then read as a tar archive.
Not described
Known, not yet covered
- Reference: the “extended” SIMH format of the 2022 document (record classes in the top bits of the word: tape description records, private markers, bad-data classes and others); the other tape formats of SIMH (E11, TPC, P7B, AWS, TAR, ANSI, fixed and DOS-11 images).
- Viewer: the contents of the records are not interpreted: ANSI tape labels (VOL1, HDR1), the DOS-11 and RT-11 file structures, backup savesets (VMS BACKUP) and tar archives are not recognised inside a tape file.
Unknown
- Reference: that an odd-length record is followed by one pad byte before the repeated length word comes from search summaries of the SIMH Magtape Representation document, which could not be read as text here; it agrees with all six real tapes (every one chains exactly to the end of the file with that rule), so it is treated as right but unconfirmed by the document itself.
- Reference: whether a word with bits 24 to 30 set but no extended-format meaning is always an error is not decided; the viewer reports it as “not a plain record”.
Also used for
- Acorn Atom tape file – The programs of an Acorn Atom cassette: ATM files, each a 22-byte header and its data.
- Amstrad CPC tape file – The blocks an Amstrad CPC writes to cassette: header and data blocks, each with a length and a flag byte.
- 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.
- ZX Spectrum tape image – Spectrum tape blocks as plain bytes, each after a 2-byte length.
Links
Software
Reference
- sim_tape.h (SIMH source) – the constants the layout page follows, read through a summarising fetch tool, so the numbers are “our words”
- SIMH Magtape Representation and Handling (Bob Supnik) – the format’s own document; it could not be read as text here