Introduction
A .crt file of this kind is a Commodore 64 cartridge in the format of the VICE emulator: the contents of the ROM, RAM, Flash or EEPROM chips of a cartridge, with the
name of the hardware it is for and the state of the two cartridge-port lines (EXROM and GAME) that make the C64 map the cartridge into memory. A simple game cartridge is one chip of 8 or 16 KiB;
an EasyFlash or Magic Desk cartridge is many chips, one for each bank.
The extension .crt is also the one of X.509 certificates (PEM and DER). The explorer never goes by the extension for this format: a file is a C64 cartridge only
if it starts with the 16 bytes C64 CARTRIDGE and three spaces. A certificate never does, so it is not claimed: it is left to its own page.
The explorer shows the header, the cartridge's hardware type and start-up mode, every CHIP packet as a bank with its load address, the start-up vectors and the CBM80 signature of the chip it shows, and disassembles that
chip with the 6510 and the C64's named addresses. The chip is a choice in the options bar: it lists every chip as bank number, type and address range.
Structure
0x0000Header:C64 CARTRIDGE, header length, version, hardware type, EXROM, GAME, sub-type, name64 bytes0x0040CHIP packet:CHIP, packet length, chip type, bank, load address, size, then the data16 bytes + the data- more CHIP packets, one for each chip or bankto the end of the file
What the explorer decodes, and what it does not
- The hardware types are named for the C64 (0 to 87), C128, VIC-20, Plus/4 and CBM-II (Hardware types). Each has the bank-switching rule the VICE manual gives, marked sourced or not sourced; 77 of 88 C64 types have a sourced rule.
- Every CHIP packet is shown at its own load address, whatever the hardware does. No bank switching is modelled: the explorer does not work out which bank the C64 would see after a write to a bank register, it lets you pick any chip.
- For a generic cartridge (type 0) the EXROM and GAME lines are checked against the chips' addresses, as VICE's conversion tool does.
Not described
Known, not yet covered
- Reference: the bank-switching rule of the 11 C64 types the VICE manual gives none for (2, 6, 14, 44, 49, 61, 75, 78, 81, 86, 87) and of three types of the other machines. The rules that are sourced are the manual's, not checked against the VICE source of each cartridge or hardware. See Hardware types.
- Viewer: the memory map a cartridge makes after start-up and after each bank switch; every chip is shown on its own.
- Reference: a CBM-II image was not made by any tool here (cartconv 3.8 has no CBM-II type): its signature comes from the manual; the C128, VIC-20 and Plus/4 images were made by cartconv 3.8 and are read.
- Viewer: the .PRG-style loading of a cartridge by a start-up program; and code and data are not told apart (every byte is decoded as code).
Unknown
- Reference and viewer: no real
.crtcartridge image of a commercial cartridge was found on this machine (the.crtfiles here are certificates). The viewer was compared, file by file, with VICE 3.8's owncartconv -fand-con 87 files that cartconv wrote (6502/fixtures/crt), 83 of them for the C64. A real image from a dumping tool may show a case not covered. - Reference: what the sub-type byte means for most types (the manual names it for Comal-80, Retro Replay and RGCD only), and whether any real file has a header length above
$40. - Reference: what version
$0101changed: the manual lists the versions 1.0, 1.1 (adds the sub-type byte) and 2.0 (used for the other machines) and says no more.
Also used for
- DER certificate – Certificates and keys in binary ASN.1: tag, length and value fields.
- PEM certificate – Keys and certificates as base64 text between BEGIN and END lines.
Links
Software
- VICE – Commodore emulator that defined the .crt format; its
cartconvtool converts between .crt and raw ROMs (Windows, macOS, Linux)
Reference
- VICE manual, chapter 17 (file formats) – 17.14 is the CRT image format: header, CHIP packets, and a paragraph on every hardware type; the source of the sourced rows on Hardware types
- VICE source, cartridge.h – the hardware type numbers of every machine