Introduction
PC64, a Commodore 64 emulator for the PC, keeps each file of a C64 disk as a file of its own on the PC's disk. A C64 file name can hold characters a PC file name cannot, so the real name goes in a
26-byte header and the PC file gets a name made of the letters and digits of it. The extension is the file's C64 type and a counter: .p00 is a PRG, .s00 a SEQ,
.u00 a USR, .r00 a REL, .d00 a DEL; when two C64 names reduce to the same DOS name the next free number is used: .p01, .p02 and so on up to .p99 (and the same for S, U, R and D). The explorer opens all of them.
The explorer recognises the file by its header, which starts with C64File and a zero byte, and not by the extension. It shows the header and the data; the data of a P00 is a whole .PRG file
with its load address, and opens in the .PRG viewer. A S00 opens as text converted from PETSCII; the others open as bytes. The type letter is taken from the extension; a file whose extension has no type letter (a renamed file) is read as a PRG. The numbered extensions (.p01 to .p99, and the same for S, U, R and D) open like the 00 ones.
Structure
0x0000SignatureC64Fileand a zero byte8 bytes0x0008Name: the C64 file name, PETSCII, padded with zero bytes16 bytes0x0018Zero, then the record size of a REL file2 bytes0x001AData: the file; for a P00 the whole PRG including its two-byte load addressto the end of the file
The five extensions
| Extension | C64 file type | Opens as |
|---|---|---|
.p00 | PRG | the .PRG viewer |
.s00 | SEQ | text converted from PETSCII |
.u00 | USR | bytes |
.r00 | REL | bytes (the record size is in the header); see the R00 page, which also tells it from a RAR volume |
.d00 | DEL | bytes |
A folder of PC64 files. When several files, or a folder, are dropped together, the explorer opens one of them and lists every PC64 file of the folder in a Folder table, like a disk directory: the file name, the C64 name from each header, the type, the record size, the length and the load address, with a note for numbered files (.p01 to .p99). Each row opens by itself. A REL file also shows how many records of its record size the data holds (arithmetic only).
Not described
Known, not yet covered
- Viewer: a numbered file (
.p01to.p99, and the same for S, U, R, D) is read by its content: only .d64 keeps its own meaning (a disk image). A .r00 to .r99 name is also the name of a RAR archive volume, so the explorer looks at the first bytes: RAR is shown as a RAR multi-volume part,C64Fileas a PC64 REL file (R00 page). - Reference: the layout of the data of a REL file: both sources give only the record length in byte
$19and say the format needs no side sectors; the explorer shows the number of records of that size (plain arithmetic) and the bytes.
Unknown
- Reference and viewer: no real PC64 file was available. The layout follows Schepers' PC64.TXT and VICE's reader (src/fileio/p00.c), and it was also compared with the masswerk PET emulator; it was tested on built files only.
- Reference: whether PC64 files from other versions of the program differ (the name padding, the bytes after the name). VICE's writer pads with zero bytes, as Schepers says.
Links
Software
- VICE – Commodore emulator that reads and writes PC64 files (Windows, macOS, Linux)
- PC64 – the emulator for the PC that made the format (DOS, Windows)
Reference
- PC64.TXT – Peter Schepers' PC64 document (version 1.4, 2004): the 26-byte header, the extension letters and the 00 to 99 counter, REL files
- VICE source, src/fileio/p00.c – how VICE reads and writes P00 files: the header, the extension check, the numbering, the record size of a REL file