# Start here: the Color Computer and the Dragon on one page Abbreviations for the sources (pins in `scripts/pinned_files.json`, survey in [sources.md](sources.md)): **SAM** = Motorola MC6883/SN74LS783/785 data sheet; **VDG** = MC6847/6847Y data sheet; **VDG-T1** = MC6847T1 data sheet; **PIA** = MC6821 data sheet; **MUX** = MC14529B data sheet; **WD** = FD179X-02 data sheet (May 1980); **TRM** = Tandy's Color Computer Technical Reference Manual; **SM1** = Color Computer 1 service manual (26-3001/3002); **DSM** = Disk Interface service manual (26-3022); **LOM** = Chris Lomont's "Color Computer 1/2/3 Hardware Programming" v0.82 (community, tier 3); **CA** = Ciaran Anscomb's "Dragon hardware details" page (community, tier 3; it holds his own measurements). Page numbers are the documents' printed ones. ## One machine, two makers Motorola published the MC6883 SAM and the MC6847 VDG as a reference design around the MC6809E (SAM figure "Typical system block diagram"; VDG figure 1). Tandy's Color Computer (1980) and Dragon Data's Dragon 32 (1982) are both that design, with the same five chips in the same roles, so one board class with machine rows covers them (CA: "based around a Motorola reference design also used by Tandy"). | Chip | Part | Role | Document | | --- | --- | --- | --- | | CPU | MC6809E (E and Q supplied by the SAM) | `m6809-python` | [reuse.md](reuse.md) | | SAM | MC6883 / SN74LS783 (SN74LS785 on later boards) | crystal, E/Q, DRAM multiplexing and refresh, device selects S0-S2, the VDG's address counter, CPU rate | [sam.md](sam.md) | | VDG | MC6847 (CoCo 2B: MC6847T1) | 32x16 text, semigraphics, eight graphics modes, NTSC timing | [vdg.md](vdg.md) | | PIA0, PIA1 | MC6821 | keyboard, joystick comparator, HS/FS interrupts, DAC, VDG mode lines, cassette motor, cartridge interrupt | [pia-io.md](pia-io.md) | | analogue | MC14529B multiplexer, 6-bit resistor DAC, comparator | joystick axes and sound-source select | [pia-io.md](pia-io.md) | | cartridge port | 40 pins: the CPU bus, CTS (ROM C000-FEFF), SCS (FF40-FF5F), CART interrupt, SND, HALT/NMI | ROM packs, disk controllers | [cartridge-cassette.md](cartridge-cassette.md) | | disk | WD1793 at 1 MHz (Tandy 26-3022); WD2797 (DragonDOS, MAME) | in a cartridge | [disk.md](disk.md) | | Dragon 64 only | 6551 ACIA (FF04-FF07) | serial port | [machines.md](machines.md) | ## Clocks (DOC unless marked) - One crystal on the SAM: 14.31818 MHz, four times the NTSC colour subcarrier (SAM pin table, Oscin; SM1 "the Color Computer timing chain begins with the 14.31818"). - VDG clock = crystal / 4 = 3.579545 MHz (SAM, VClk). - CPU E clock = crystal / 16 = 0.894886 MHz ("SLOW"), or / 8 = 1.79 MHz ("FAST"), or address-dependent (/8 except for RAM at 0000-7FFF and FF00-FF1F) (SAM "Changing the MPU rate"). MAME's `coco` runs its MC6809E at 894,886 Hz (OBSERVED, `-listxml`). - One VDG line = 227.5 VDG clocks = 56.875 E cycles at the slow rate; a field = 262 lines (MC6847) or 262.5 (MC6847Y) (VDG figure 8 notes). So 14,901.25 E cycles a field and 60.05 fields a second. MAME 0.285 uses 228 VDG clocks a line (htotal 456 half clocks, 59.92 Hz, OBSERVED): contradiction C2, and how the SAM keeps a 227.5-clock line in step with its 4-clock E grid is unknown U1 ([sam.md](sam.md)). - Dragon 32/64 (PAL): the same NTSC VDG timing, with 50 extra lines added by stopping the VDG clock (Dragon 64 circuit, CA) to make a 312-line field. CA says the crystal is 14.31818 MHz with some Dragon 64s fitted with 14.218 MHz; MAME 0.285 runs every Dragon at 14.218 MHz (888,625 Hz E clock, 312 lines, 49.97 Hz, OBSERVED): contradiction C1. ## Rows (detail in [machines.md](machines.md)) CoCo 1 (4K/16K/32K, Color BASIC 1.0-1.2, optional Extended BASIC), CoCo 2 (16K/64K), CoCo 2B (MC6847T1, Color BASIC 1.3), Dragon 32, Dragon 64 (+ ACIA, two BASICs), Tano Dragon (NTSC Dragon 64), Dragon 200/200-E; the clones MAME knows (Prológica CP-400, Dynacom MX-1600, LZ Color64, Codimex CD-6809) as optional rows; the CoCo 3 (GIME) as the later row ([gime.md](gime.md)). ## Modelling levels (charter axis B) - CPU: cycle level, every E cycle a bus cycle (m6809-python). - SAM: cycle level. It decides every E cycle's length (rate modes) and owns the VDG's address counter; the "cross modes" (SAM and VDG set to different modes) are defined by the counter's divide-by-X/Y logic (SAM figure 5), so it has to be modelled as a counter, not as a mode table. - VDG: per half VDG clock (the smallest display element, VDG "Operation of the VDG"), its fetches driven by the SAM's counter; output as indices (palette and artifact colours are a host concern with a named default, [vdg.md](vdg.md)). - PIAs, DAC, multiplexer, comparator: cycle level (they are register files with edges). - Cassette and disk: transaction level first (byte and sector streams through the real firmware), bit level later. - Sound: the DAC's six bits sampled at every write, mixed with the single-bit source as the TRM's circuit says; analogue filtering is a host concern. ## Reading order [machines.md](machines.md), [sam.md](sam.md), [vdg.md](vdg.md), [pia-io.md](pia-io.md), [cartridge-cassette.md](cartridge-cassette.md), [disk.md](disk.md), [firmware.md](firmware.md), [gime.md](gime.md), [reuse.md](reuse.md), [sources.md](sources.md), [validation.md](validation.md), [mame-oracle.md](mame-oracle.md), [census.md](census.md), [provenance.md](provenance.md), then [handoff-brief.md](handoff-brief.md).