# Start here: the BBC Micro on one page Citations: AUG = the Advanced User Guide (Bray, Dickens, Holmes 1983), SM = Acorn's BBC Microcomputer Service Manual (SM85-1 for the October 1985 scan, section 1, Models A/B; SMBP for the B+ manual), MRM = the Master Reference Manual part 1, MSM = the Master service manual. Pins and terms are in [sources.md](sources.md). Evidence tags follow the family's methodology (DOC, TEST ROM, OBSERVED, HYPOTHESIS ...). ## The machine A 6502-family CPU at 2 MHz sharing 32 KB of RAM with the video circuit on alternate phases of the 2 MHz clock (DOC: AUG 18.1; SMBP 5.1 "The RAM is thus being accessed at 4MHz"), 16 KB of MOS ROM at &C000, one 16 KB paged ("sideways") ROM slot at &8000 selected from up to 16 by a latch at &FE30 (DOC: AUG 21; SM85-1 3.2), and all I/O in three pages: FRED (&FC), JIM (&FD), both on the external 1 MHz bus, and SHEILA (&FE), the internal devices (DOC: AUG 17, table in [memory-map.md](memory-map.md)). | Part | Model B (row 1) | B+ (row 2) | Master 128 (row 3) | | --- | --- | --- | --- | | CPU | MOS 6502A, NMOS (DOC: SM85-1 3.1) | 6512A, NMOS (DOC: SMBP 2, 5.1; MAME lists "MOS Technology 6512": OBSERVED) | GTE G65SC12, CMOS (DOC: MRM ch. 2 "a 65SC12"; MAME "GTE G65SC12") | | RAM | 32 KB | 64 KB: 32 KB main + 20 KB shadow screen + 12 KB paged RAM (DOC: SMBP 5.1, 5.4.2) | 128 KB: 32 KB main, 20 KB LYNNE (shadow), 8 KB HAZEL, 4 KB ANDY, 64 KB sideways RAM in slots 4-7 (DOC: MRM "Machine Memory Map") | | Video | HD6845S CRTC + Video ULA + SAA5050 | same | same chips (VIDPROC ULA, IC42: MRM ch. 2) | | Sound | SN76489 through the system VIA's slow bus | same | same | | Disc | Intel 8271 (optional, Acorn DFS) | 8271 or WD1770 (DOC: SMBP 5.5) | WD1770 (MRM; "1770 or 1772": MRM line 4696) | | Other | two 6522 VIAs, MC6850 ACIA + serial ULA (tape, RS423), uPD7002 ADC, 68B54 ADLC (Econet, option), Tube, optional TMS5220 speech | same | + MC146818 CMOS RTC/RAM on the system VIA, two cartridge slots, an internal Tube | ## Clocks (one crystal) A 16 MHz crystal; the Video ULA divides it into 8, 4, 2 and 1 MHz (DOC: SM85-1 3.1; SMBP 5.2). The 6845 runs at 2 MHz (modes 0-3) or 1 MHz (modes 4-7), chosen by Video ULA control bit 4 (DOC: AUG 19.1.4). The SAA5050 takes 1 MHz (F1) and 6 MHz (TR6) (DOC: SAA pin list; SMBP 5.2 "6MHz for the TELETEXT chip"). The CPU runs at 2 MHz except when it addresses a 1 MHz device, when its clock is stretched to meet the 1 MHz phase (DOC: SM85-1 3.1 and figure 1.2; [timing.md](timing.md)). The SN76489 is clocked at 4 MHz (DOC: AUG 23.3.1, "frequency = 4000000/32 x N"). **There is exactly one clock domain** (every clock divides from 16 MHz). The order of record can be one timeline in 16 MHz ticks, or in 2 MHz CPU half-cycles, with every device stepped from it ([domains-and-speed.md](domains-and-speed.md)). ## The family cores it uses | Chip | Family core | What it needs | Doc | | --- | --- | --- | --- | | 6502A / 6512 | `6502-python` (`sixfiveohtwo.MOS6502`) | nothing new expected: the 6512 is the 6502 with a two-phase clock input; the board stretches cycles from outside the core ([timing.md](timing.md)) | [cpu-and-reuse.md](cpu-and-reuse.md) | | G65SC12 | `w65c02-python` (`G65SC02` row: "GTE/CMD G65SC02 and G65SC12", captured on a real BBC Master's G65SC12) | nothing new: the row already exists and is tier-1 judged | [cpu-and-reuse.md](cpu-and-reuse.md) | | SN76489 | `sn76489-python` (`SN76489AN` row, measured on a BBC Micro) | a write strobe as the board drives it (the latch's bit 0) | [sound.md](sound.md) | | 6522 VIA x 2 | none yet: vectrex-python's Phase 0 plans an in-board `VIA6522` to move to `mos6522-python` "when a second machine needs one" | **this is that second machine** (open decision) | [via6522.md](via6522.md) | | HD6845S | none yet: the Amstrad CPC Phase 0 (tonight) also needs one | a shared `crtc6845-python` (open decision) | [crtc6845.md](crtc6845.md) | | Video ULA, SAA5050, serial ULA, addressable latch, paging | board | | [video-ula.md](video-ula.md), [saa5050.md](saa5050.md) | | 8271, WD1770, uPD7002, MC6850, MC146818 | board (see the chip rule per chip) | | [discs.md](discs.md), [adc-serial-tape.md](adc-serial-tape.md) | ## Modelling levels (charter axis B) Everything at **cycle** level: the CPU per bus cycle (with stretching), the 6845 per character clock, the Video ULA per pixel, the SAA5050 per character, the VIAs per 1 MHz cycle, the SN76489 per 16 clocks (its core's rule). The disc controllers at **transaction** level against a timed drive model (bytes and index pulses), not flux, until a protected disc needs more. Firmware (MOS, BASIC, DFS) is never modelled: it is run, the player's own copy identified by SHA-1 ([census.md](census.md)). ## What is unusual about this machine (read before the chips) 1. **Cycle stretching** decides every timing-sensitive program (raster effects, VIA timer loops, tape and disc NMIs): an access to a 1 MHz device costs one or two extra 2 MHz cycles depending on phase (DOC: SM85-1 figure 1.2). MAME 0.285 does not show it in its cycle count (OBSERVED: [mame-oracle.md](mame-oracle.md)), so MAME cannot judge it. 2. **The video address path** is not the 6845's address: the board turns MA0-MA13 and RA0-RA2 into a RAM address, adds a wrap-around offset chosen by two addressable-latch bits, and switches to a teletext address map when MA13 is set (DOC: AUG 18.11, 18.13, 23.2; [crtc6845.md](crtc6845.md)). 3. **The slow data bus**: the keyboard, sound chip and speech chip are reached only through the system VIA's port A and an addressable latch on port B (DOC: AUG 23.1-23.2). 4. **Real-hardware test outputs exist** for the VIAs and interrupt timing (Tom Seddon's b2 test volume, outputs saved from a real BBC Micro), which gives the board a tier-1 judge for exactly the corner (1). See [validation.md](validation.md).