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: entry types 2 to 5 (file with header, memory snapshot, tape block, stream) are opened as bytes with their length taken from the room in the container; their own structures are not decoded. 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 format as described and as the masswerk PET emulator reads it (checked on built files only), so a real file may show a case that is not described here. - Reference: which tools write which wrong end addresses. The viewer finds a wrong one by comparison and does not rely on particular values.
- 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 format description – in Peter Schepers's collection of Commodore file formats (unusedino.de); not on this machine, so not compared