# The Video ULA (VIDPROC) An Acorn custom chip (a Ferranti uncommitted logic array; IC6 on the Model B per SM85-1 3.1, IC53 on the B+ per SMBP 5.2, IC42 "VIDPROC" on the Master per MRM ch. 2). **No data sheet exists in hand**; everything here comes from Acorn's manuals (tier 2) and is about what the chip does, not how. Citations as in [start-here.md](start-here.md). ## Jobs 1. **Clock divider**: 16 MHz in; 8, 4, 2 and 1 MHz out, the clocks for the CPU, RAM timing, the 6845 and the SAA5050 (DOC: SM85-1 3.1; SMBP 5.2, "pins 4, 5, 6, and 7 of the video processor provide 1MHz, 2MHz, 4MHz, and 8MHz outputs"). 2. **The 6845's character clock**: 2 MHz or 1 MHz by control bit 4 (DOC: AUG 19.1.4). 3. **Serialiser and palette**: each byte the 6845 fetches is shifted out as 1, 2 or 4 bits per pixel through a 16-entry palette into R, G, B (DOC: AUG 19.1-19.2). 4. **Teletext select**: control bit 1 routes the SAA5050's RGB to the output instead (DOC: AUG 19.1.2). 5. **Cursor**: widens the 6845's CUDISP to 1, 2 or 4 bytes (bits 5-6), large or small (bit 7) (DOC: AUG 19.1.5-19.1.6). 6. **Flash**: control bit 0 picks which colour of the eight flashing pairs is shown; the MOS toggles it (DOC: AUG 19.1.1, 19.2.3). ## Registers (write-only; DOC: AUG 19) - **&FE20 control**: bit 7 large cursor, bits 6-5 cursor width in bytes, bit 4 6845 clock (1 = 2 MHz), bits 3-2 characters per line (80/40/20/10), bit 1 teletext select, bit 0 flash select. The MOS's values per mode: &9C, &D8, &F4, &9C, &88, &C4, &88, &4B (DOC: AUG 19.1.7; mode 7's &4B was also seen written by OS 1.20 in the MAME trace: OBSERVED). - **&FE21 palette**: bits 7-4 logical colour (the index), bits 3-0 physical colour. The physical field is stored **inverted** in the sense that *FX155 "will automatically EOR the physical colour with 7" (DOC: AUG 19.2); bit 3 is the flash bit; physical colours 8-15 are the flashing pairs (DOC: AUG 19.2.3). - **Index bits per mode**: in 2-colour modes the logical colour is bit 7 of the index; in 4-colour modes bits 7 and 5; in 16-colour modes bits 7-4; so the serialiser feeds the palette index by shifting the byte left and taking bits 7, 5, 3, 1 (DOC: AUG 19.2.1-19.2.2 and the mode 2 byte layout of AUG 18.12.1). The exact shift order per mode is to be written from these tables and checked against the MOS's own palette writes. ## Timing questions nothing in hand answers - **U6**: the delay from a register write to its effect on the output (a palette change in mid-line lands on which pixel?). Raster-split programs depend on it. - **U7**: what the serialiser does when the 6845 clock (bit 4) and characters-per-line (bits 3-2) disagree (the "10 characters per line" mode of AUG 19 is a legal case; others are not). - **U8**: power-on contents of the palette and control register. Tom Seddon's b2 test volume has a "VIDEO ULA TESTS" drive (drive 5) whose wanted images are of unknown provenance (emulator or real machine: to ask the author); and Video NuLA (an aftermarket replacement ULA) tests on the same drive belong to an add-on, not to the board. ## Chip rule Used by the BBC Micro only (the Electron's ULA is a different chip). Stays in the board. ## B+ and Master Same register map. The B+'s and Master's VIDPROC writes inhibit RAM CAS during a Video ULA write ("RAM is disabled when the VIDPROC is written to, by holding notCAS at logic 1", DOC: SMBP 5.4.4): **does a Video ULA write on the Model B also disturb the video fetch?** (U6 again, row-specific).