# Machines, mainboards and the memory map Short names: SCH-2001 (zimmers GIF scans of drawing 320026, "PET computer main logic", sheets 2-3, for board assembly 320008), SCH-320349 (logic diagram, dynamic PET, rev A, 9 sheets, archive.org scan), SCH-8032029 (logic diagram, 80-column CPU, dynamic PET, rev F, 11 sheets, zimmers GIFs; drawn 2-5-80, "used on PET 8032"), BOARD (zimmers `firmware/computers/pet/PET-board.txt`, community notes), UM2001 (PET 2001-8 User Manual, October 1978), ROMNOTES (zimmers `firmware/computers/pet/README`, community notes). ## The four mainboards (DOC: BOARD; checked where a schematic is pinned) The label on a PET does not say which board is inside: newer boards were used to repair older machines (BOARD). A row in `machine.py` is therefore a **board plus a ROM set plus a RAM size plus a keyboard**, not a model name. | Board | Used in | RAM | Video | ROM sockets | Pinned schematic | | --- | --- | --- | --- | --- | --- | | static (320008; variants 320081, 320132, 320137: "all locations are the same on all boards; only the specific components will differ", SCH-2001 sheet notes) | PET 2001 | 4K or 8K of 6550 (1K x 4) static RAM, jumper "for 8K only" (SCH-2001 sheet 2: sixteen 6550s, I1-I8 and J1-J8, the starred half fitted on 8K machines) | discrete TTL, 40 x 25, 1K of screen RAM in two 6550s (SCH-2001 sheet 3) | seven 6540 2K mask ROMs at $C000, $C800, $D000, $D800, $E000, $F000, $F800 (SCH-2001 sheet 2; BOARD's 6540 column), or 2316B ROMs in the later variant (BOARD) | sheets 2 (memory) and 3 (video) only; **sheet 1 (CPU, PIAs, VIA) is not pinned** (zimmers has it only as PDF: U1) | | dynamic (320349) | 2001-N, 2001-B, 3000, 4000 (9") | 4K, 8K, 16K or 32K of 4116-class DRAM by jumper (BOARD; SCH-320349 sheet 6 "ROW SELECT" jumpers 8K/16K on BA13/BA14) | discrete TTL, 40 x 25 | UD3-UD9 at $9000, $A000, $B000, $C000, $D000, $E000 (2K), $F000; UF10 character ROM (BOARD) | all 9 sheets | | 80-column (8032029) | 8032 | 16K or 32K (BOARD) | 6545 CRTC, 80 x 25, two characters per microsecond | UA3 character ROM (2K or 4K), UD6-UD12 at $F000 down to $9000 (BOARD) | all 11 sheets | | universal | late 4000 (12" "fat 40"), 8000, 8096, SuperPET | 16K or 32K | CRTC, 40 or 80 columns by jumper | as the 80-column board (BOARD) | none pinned (U3) | The 8296 has its own board (MAME `cbm8296`: two 82S100 PLAs `ue5`, `ue6` and a 16K BASIC ROM `324746-01`): a later row. ## The memory map (40-column dynamic board; DOC: UM2001 figure 2.3, BOARD, SCH-320349) | Range | What | Evidence | | --- | --- | --- | | $0000-$7FFF | RAM, 4K to 32K fitted; the rest is open bus | BOARD; open bus: TEST ROM (VICE `PET/unconnected`, "results on a 3016") | | $8000-$83FF | screen RAM, 1K (40 x 25 = 1000 bytes used); 80-column boards 2K to $87FF | UM2001 chapter 2, the text after figure 2.3 ("the hardware starts with the least address ($8000)"); BOARD | | $8400-$8FFF | mirrors of screen RAM on some boards (HYPOTHESIS: to check on SCH-320349 sheet 8 decode) | U4 | | $9000-$AFFF | option ROM sockets (dynamic and later boards) | BOARD | | $B000-$DFFF | BASIC (4.0 from $B000; 1.0 and 2.0 from $C000) | ROMNOTES, MAME ROM regions (OBSERVED) | | $E000-$E7FF | the screen editor | ROMNOTES | | $E800-$E8FF | I/O: PIA1 $E810, PIA2 $E820, VIA $E840, CRTC $E880 (CRTC boards) | SCH-320349 sheets 2-3 (chip selects: below); UM2001 tables 7.7, 7.25 | | $E900-$EFFF | unused on the 2001-N (BOARD's socket list ends at UD8 $E000-$E7FF); the SuperPET decodes its registers at $EFF0-$EFFF (SPTM: "EFFC-EFFE", "EFFB" legible in the OCR) | HYPOTHESIS for the 2001-N's behaviour there | | $F000-$FFFF | the KERNAL | ROMNOTES | ### The I/O page's chip selects (DOC: SCH-320349 sheets 2-3) Each chip is selected by **one address line** within the I/O page (`X8XX` and `I/O`): PIA1 (C7) by BA4 on CS1, PIA2 (C6) by BA5, the VIA (C5) by BA6 (gated with X8XX through F1, a 74LS08). The PIAs take RS0/RS1 from BA0/BA1 (four registers, repeating every 4 bytes); the VIA takes RS0-RS3 from BA0-BA3 (sixteen registers). So **$E830 selects both PIAs at once**, and $E850, $E860, $E870 a PIA and the VIA together: what such a read returns (two drivers on one bus) is unknown (U5, HYPOTHESIS "wired-AND" as vic20-python's U6 chose). The CRTC on the 80-column board sits at $E880 (register select) and $E881 (data) (UM2001 is too early to say; OBSERVED: MAME's watch on $E880-$E881 caught the editor's 36 writes, mame-oracle.md); its decode on SCH-8032029 is to be read (U6). ## RAM, open bus and power-on - RAM sizes are rows (`ram=4096..32768`); MAME's defaults (OBSERVED): `pet2001` 4K ("3071 BYTES FREE"), `pet2001n` 8K ("7167"), `cbm8032` 32K ("31743"). - Open bus returns the last byte on the data bus, usually the high byte of the address just read (TEST ROM: VICE `PET/unconnected` readme, with results "on a 3016", including the 6502's dummy read on an indexed page crossing). 6502-python exposes every bus cycle, so the board keeps the last value. - Power-on RAM contents: unknown (U7); selectable, zeros by default (provisional). ## The 8096, 8296 and SuperPET (later rows) - **8096**: an 8032 with a 64K expansion board banked into $8000-$FFFF through a control register at $FFF0 (community knowledge, HYPOTHESIS until the 64K board's document is pinned: zimmers has `manuals/pet/CBM_8032_Expansison_Memory_Board_64K_Users_Guide.pdf` only as PDF; archive.org copy not searched yet). MAME: `pet_64k` device (OBSERVED). - **SuperPET SP9000**: a second board in the 8032 with a **Motorola 6809** (MAME `exp:superpet:u4`, MC6809E at 1 MHz), 64K of bank-switched RAM, a 6551 ACIA (U40) and a 6702 "security" chip (U41) (DOC: SPTM parts list, OCR). Needs `m6809-python`, which today has Phase 0 documents only. - **8296**: its own board with PLAs (MAME `ue5`, `ue6`, 64K images each: these are the PLA contents as dumped, firmware-like, SHA-1 only).