The start-up words
A cartridge starts with two 16-bit little-endian addresses at the start of its ROM (these are the 6510's own byte order, unlike the file's header):
| Address | Name | Meaning |
|---|---|---|
$8000 | Cold start | where the machine jumps to start the cartridge at reset |
$8002 | Warm start | where it jumps when RUN/STOP and RESTORE are pressed (the NMI), as the ROM it replaces does |
$8004 | Signature | the five bytes C3 C2 CD 38 30: see below |
The same two words sit at $A000 and $A002 in the BASIC ROM: its cold start vector ($E394 in the original) and warm start vector ($E37B). A cartridge that replaces BASIC puts its own there. The KERNAL looks for the
signature at $8004 only, so a chip at $A000 does not start itself: the explorer shows its two words and says so, and marks the cold start as the entry point of the disassembly.
In Ultimax mode the cartridge's ROMH takes the place of the KERNAL at $E000-$FFFF, so the 6510 reads its three hardware vectors from the cartridge: NMI at $FFFA, RESET at $FFFC, IRQ and BRK at $FFFE. When a chip ends at $FFFF the explorer reads them from its last six bytes
and takes RESET as the entry point.
The CBM80 signature
At reset the C64's KERNAL checks whether the five bytes at $8004 are C3 C2 CD 38 30: the letters CBM in PETSCII (shifted) and the digits 80. If they are, it jumps through the cold start vector at $8000 instead of
starting BASIC. The explorer shows the five bytes and says whether they are the signature; a chip loaded at $8000 without it is not started by the C64 by itself (some cartridges are started by their own hardware, and the explorer cannot tell).
The disassembly
The explorer disassembles one chip at a time, the one chosen in the options bar: by default the first chip loaded at $8000. It uses the 6510 (an NMOS 6502 decode with the undocumented opcodes marked) and the C64's named addresses, the ones of the
.PRG pages: the KERNAL jump table, the VIC-II, SID and CIA registers. It adds cold_start, warm_start, reset, nmi and irq labels where the vectors point into the chip.
Every byte is decoded as code, since nothing in the file says which are data.
Not described
Known, not yet covered
- Viewer: following the code from the entry point to separate it from data.
- Viewer: the memory the cartridge sees after a bank switch (see Hardware types).
Unknown
- Reference: the description of the start-up of this page is from general knowledge of the C64 and the VICE tool's text; it was not run on a C64 or emulator, and no real cartridge image was available.