Format:Commodore CRT cartridge image
| Platforms | Platform:Commodore 64 |
|---|---|
| Magic | C64 CARTRIDGE at 0 (16 bytes, three trailing spaces) |
| Extensions | .crt |
| Endianness | big |
| On this wiki | Facts · Code · Notes · Topics |
CRT is the VICE cartridge container: a header starting "C64 CARTRIDGE " (16 bytes) with big-endian header length, version, hardware type, EXROM and GAME line levels and a 32-byte name, followed by CHIP packets, each holding one ROM/RAM bank.
Header
All multi-byte fields are big-endian. The 16-byte signature is one of "C64 CARTRIDGE ", "C128 CARTRIDGE ", "CBM2 CARTRIDGE ", "VIC20 CARTRIDGE " or "PLUS4 CARTRIDGE " (space padded). Then: +0x10 u32 header length (VICE rejects values below 0x40 and skips any extra bytes), +0x14 u16 version (VICE's crt.h names a classic v1.0 header, a v1.1 header with the sub type and a 2.0 header; the numeric encoding such as 0x0100 is Unverified), +0x16 u16 hardware type, +0x18 EXROM line, +0x19 GAME line, +0x1A subtype/revision, +0x20 32-byte name. VICE accepts the C64 signature only on C64, C64SC, C128 and SCPU64 machines.
CHIP packets
After the header come packets of 0x10 bytes plus data: "CHIP", u32 total packet length (header + data), u16 chip type, u16 bank, u16 load address, u16 ROM size. VICE rejects a packet whose total length is below 0x10, whose ROM size exceeds the payload, or whose address plus size passes 0x10000; extra bytes after the ROM are skipped. Chip type values are not enumerated here. Unverified: the meaning of type 0 (ROM), 1 (RAM), 2 (flash) comes from the CRT specification, which was not read for this page.
Hardware type
The hardware type indexes the cartridge mapper (0 is a normal cartridge; 1 Action Replay, 2 KCS Power, ... see the enum fact). The mapper decides how banks are switched, which is the main thing to know when reversing a cartridge ROM.
Sources
VICE vice/src/crt.c and crt.h and vice/src/cartridge.h, commit 22cf0cc8eee4dae54f55ff7a738cf0cb7eaa258f (GPL-2.0-or-later). See Platform:Commodore 64.
Code & repositories
- https://github.com/VICE-Team/svn-mirror @
22cf0cc8eee4dae54f55ff7a738cf0cb7eaa258f· license: GPL-2.0-or-later (declared by the contributor; GitHub's detector did not recognize a license file)
VICE emulator source: src/tape/t64.c, tap.c, src/crt.c, cartridge.h, diskimage/fsimage-probe.c
Tested on: source read, not run · checked 2026-10-19; last activity 2026-10-19; Note: the latest release ships binaries; the wiki links only the source, never the binaries