# Start here: the Commodore 64 as a board The C64 (1982) is one main bus shared by two masters: the **6510** CPU and the **VIC-II** video chip, which takes the bus in the first half of every cycle and steals whole cycles from the CPU when it needs more (bad lines, sprites). Around them: the **SID** sound chip, two **6526 CIAs** (keyboard, joysticks, timers, time-of-day clocks, the serial bus, the VIC's bank bits), a **PLA** that decodes the memory map, 64 KB of DRAM, a 1K x 4 **colour RAM**, three ROMs (BASIC, KERNAL, character generator), the **cartridge port**, the **user port**, the **datasette port** and the **IEC serial bus** to the **1541** disk drive, which is a second computer with its own 6502. Evidence tags as in the family methodology: MEASURED, DIE, TEST ROM, DOC, OBSERVED, FITTED, HYPOTHESIS. Source keys (VIC, PRG, PLA, ...) are listed in [sources.md](sources.md). ## Clocks (the whole machine is one clock domain) The VIC-II makes the system clock: it divides its pixel clock by eight and feeds the result to the 6510 as phi0; everything else on the main board (SID, CIAs, cartridge port, colour RAM) runs from the 6510's phi2 (DOC: VIC 2.2, 2.3). | | NTSC (6567R8) | NTSC early (6567R56A) | PAL (6569) | | --- | --- | --- | --- | | colour crystal (phiCOLOR) | 14.31818 MHz | 14.31818 MHz | 17.734475 MHz | | pixel clock (phiIN) | 8.18 MHz | 8.18 MHz | 7.88 MHz | | system clock phi2 | 1,022,727 Hz | same | 985,248 Hz | | cycles per line | 65 | 64 | 63 | | lines per frame | 263 | 262 | 312 | | cycles per frame | 17,095 | 16,768 | 19,656 | | frame rate (computed) | 59.826 Hz | 60.99 Hz | 50.125 Hz | Sources: VIC 2.2, 2.3 and the table in 3.4 (DOC, tier 3: Bauer's article is built from tests on real C64s). The figures fit phiIN = phiCOLOR x 4/7 (NTSC) and x 4/9 (PAL), then / 8 (computed here: 14.31818 x 4/7 / 8 = 1.022727 MHz, 17.734475 x 4/9 / 8 = 0.985248 MHz); the divider circuit itself is U1 in the handoff brief until a schematic page confirms it. MAME 0.285 lists the 6510 at 1.02 MHz and the 1541's 6502 at 1.00 MHz (OBSERVED, `mame -listdevices c64`). The **1541** runs from its own 16 MHz crystal (the 6502 at 1 MHz): **a second clock domain**, meeting the C64 only at the three IEC lines (ATN, CLK, DATA) and RESET ([drive-1541.md](drive-1541.md), [domains-and-speed.md](domains-and-speed.md)). ## The machines (rows of one board) | Row | VIC-II | SID | ROMs (SHA-1 in [census.md](census.md)) | Notes | | --- | --- | --- | --- | --- | | `c64` (first) | 6567R8 (NTSC) | 6581 | BASIC 901226-01, KERNAL 901227-03, char 901225-01 | the reference row | | `c64-pal` | 6569 (PAL) | 6581 | the same three ROMs | Europe | | `c64-r56a` | 6567R56A | 6581 | KERNAL 901227-01 or -02 | early NTSC: 64 cycles, 262 lines (VIC 3.4) | | `c64c` | 8562 / 8565 | 8580 | 251913-01 (BASIC + KERNAL, 16K), char 901225-01 | HMOS-II chips; "functionally equivalent" VIC (VIC 2.3); different SID | | `sx64` | 6567/6569 | 6581 | KERNAL 251104-04 | portable, built-in drive, no datasette port | | `c64gs` | 8565 | 8580 | 390852-01 | games console: cartridge only | | `c64-jp` | 6567 | 6581 | KERNAL 906145-02, char 906143-02 | Japanese keyboard and characters (MAME `c64_jp`) | | `max` | 6566 (static RAM) | 6581 | none on board | the Ultimax: cartridge only, 2K RAM (VIC 2.3); later | Board revisions (SM 314001-02 covers assemblies 326298, 250407 and 250425; the C64C's later boards are not in it) differ in the PLA's form (82S100 or a later gate array), the colour RAM's chip, and the analogue path; the row records the chips, not the board, until a difference visible to software is found (U-list). ## Reading order 1. [cpu-6510.md](cpu-6510.md): the CPU, its port, RDY/AEC, the undocumented opcodes; the proposal to add `MOS6510` to 6502-python. 2. [memory-pla.md](memory-pla.md): the PLA, banking, the VIC's view, colour RAM, open bus. 3. [vic-ii.md](vic-ii.md): the hard chip. 4. [sid.md](sid.md), [cia.md](cia.md), [cartridges.md](cartridges.md), [drive-1541.md](drive-1541.md). 5. [domains-and-speed.md](domains-and-speed.md), [sources.md](sources.md), [validation.md](validation.md), [mame-oracle.md](mame-oracle.md), [census.md](census.md), [provenance.md](provenance.md). 6. [handoff-brief.md](handoff-brief.md): what to build, in what order, and the open decisions.