Introduction
A .t64 file is a container of Commodore 64 files that carries the name of a tape. It was made for the C64S emulator by Miha Peternel and used by the tools and
emulators that followed. It is not a recording of a tape: that is a .TAP file, a list of pulse lengths. A T64 holds the programs themselves,
as a 64-byte header, a directory of 32-byte entries and then the bytes of each file, so a whole tape's worth of games fits in one file that any emulator can list.
The explorer shows the header and the directory, checks every file's end address against the room the container gives it, and opens each normal tape file in the .PRG viewer (BASIC listing, the SYS entry and the 6510 disassembly). The end address is the weak point of the format: see Directory.
Structure
0x0000Header: signature text, version, entry counts, the tape's name64 bytes0x0040Directory: the maximum number of entries, each one 32 bytes32 × maximum entries- File contents: at the offsets the entries giveto the end of the file
A file is recognised by its signature text: the first three bytes are C64 and the first 32 bytes contain the word tape, under any file name.
What the explorer does with it
- It reads every directory entry, free ones too, and counts the ones whose type is not zero; it says when the header's count of entries in use disagrees.
- For each normal tape file it compares the declared length (end address minus start address) with the room the container gives the file, up to the next file's contents or the end of the file, and names the case: exact, broken (too long, below the start, empty) or more room than declared.
- The options bar chooses which length opens a file: the declared one when it fits (the default), only the declared one, or all the room.
- A normal tape file opens as a
.prg: the start address from the directory is put in front of the bytes, as a PRG file stores it. Other entry types open as bytes.
Not described
Known, not yet covered
- Viewer: the data of entry types 2, 4 and 5 and the inside of a type-3 memory snapshot (C64S "FRZ") have no description in any source found; they open as bytes. See Directory.
- Viewer: the PETSCII graphics characters in names are mostly shown as the replacement character (as on the D64 pages).
Unknown
- Reference and viewer: no real
.t64file was available on this machine. The pages and the viewer follow the VICE manual, Schepers' T64.TXT and the reader of VICE (src/tape/t64.c), checked on built files only, so a real file may show a case that is not described here. - Reference: which tools besides conv64 (end address
$C3C6) wrote wrong end addresses. The viewer finds a wrong one by comparison and does not rely on particular values except that one. - Reference: what the four unused bytes at offset 12 of an entry hold in files from the tools other than C64S.
Links
Software
- VICE – Commodore emulator that attaches T64 files as tapes (Windows, macOS, Linux)
- PET 2001 emulator – browser emulator by Norbert Landsteiner whose T64 reader was used to check these pages (browser)
Reference
- T64.TXT – Peter Schepers' T64 format document (revision 1.5, from Miha Peternel's C64S description): header, directory entry, entry types 0, 1 and 3, the FRZ snapshot marker, the $C3C6 quirk
- VICE manual, chapter 17.2 – the T64 tables: all entry types 0 to 5, versions 1.0, 1.1 and 2.0, the conv64 end address
- VICE source, src/tape/t64.c – the reader: accepted signatures, the end-address correction