BBC Images
The BBC Micro offers eight display MODEs, numbered 0 to 7, set with the MODE command. The 6845 CRT controller and the Video ULA between them decide the resolution, the number of colours and how much memory the screen takes. Most MODEs are true bitmaps; MODE 7 is a separate teletext display driven by a dedicated character chip.
Overview
Two chips share the video work. The 6845 CRTC generates the timing and addresses the screen memory, so its registers set where in RAM the display starts and how it is scanned. The Video ULA turns the bytes it fetches into pixels, deciding how many bits make a pixel and mapping those bits through a small palette to the physical colours sent to the monitor. Changing MODE reprograms both chips and picks a new screen size and colour depth.
| Property | Value |
|---|---|
| Modes | 0 to 7 |
| Bitmap modes | 0, 1, 2, 4, 5 |
| Text modes | 3, 6 (bitmap-based text) |
| Teletext mode | 7 (SAA5050) |
| Physical colours | 8 solid, plus 8 flashing |
The display modes
The eight MODEs trade resolution, colours and memory. The high-resolution MODEs use 20K of RAM; the low-memory MODEs 4 and 5 halve the vertical work to fit in 10K, useful on machines short of memory. MODEs 3 and 6 are text-only variants that leave gaps between character rows. MODE 7 is not a bitmap at all: it stores character codes and lets the teletext chip generate the picture, so it needs only 1K.
| MODE | Resolution | Colours | Type | Memory |
|---|---|---|---|---|
| 0 | 640 × 256 | 2 | Graphics | 20K |
| 1 | 320 × 256 | 4 | Graphics | 20K |
| 2 | 160 × 256 | 16 (8 plus 8 flashing) | Graphics | 20K |
| 3 | 80 × 25 text | 2 | Text | 16K |
| 4 | 320 × 256 | 2 | Graphics | 10K |
| 5 | 160 × 256 | 4 | Graphics | 10K |
| 6 | 40 × 25 text | 2 | Text | 8K |
| 7 | 40 × 25 teletext | 8 | Teletext | 1K |
MODE 0 is the sharpest, 640 pixels wide in two colours. MODE 1 halves the width to 320 for four colours. MODE 2 halves it again to 160 for the full palette of eight solid and eight flashing colours. MODEs 4 and 5 match 4 and 1 in shape but drop to two and four colours respectively so they fit in 10K. MODEs 3 and 6 are the text cousins of 0 and 4, showing 80 and 40 columns of characters with blank scanlines between rows. MODE 7 shows 40 columns of teletext characters, colours and block graphics from just 1K of codes.
Pixel packing
In the bitmap MODEs the display is a run of 8-pixel-tall character cells. Each byte holds one scanline of one cell, and the number of pixels in that byte depends on the colour depth: eight pixels in a 2-colour MODE, four in a 4-colour MODE, two in the 8/16-colour MODE. The bits of a pixel are not laid out contiguously; the Video ULA reads them from spread positions in the byte, which is why direct screen writes need a lookup or a fixed encoding per MODE.
| MODE | Colours | Bits per pixel | Pixels per byte |
|---|---|---|---|
| 0, 4 | 2 | 1 | 8 |
| 1, 5 | 4 | 2 | 4 |
| 2 | 16 | 4 | 2 |
Within a byte the leftmost pixel is drawn first. In a 2-colour MODE each bit is one pixel, the top bit leftmost, a set bit choosing logical colour 1. In a 4-colour MODE a pixel's two bits are taken from bit 7 and bit 3 for the leftmost pixel, then bits 6 and 2, and so on, so the top nibble and bottom nibble are interleaved across the four pixels. The 16-colour MODE spreads a pixel's four bits across the byte in the same interleaved fashion. Vertically, the eight bytes of a cell are consecutive in memory, top scanline first.
Logical and physical colour
Pixels never name a physical colour directly. They store a logical colour number, and a palette maps each logical colour to one of the physical colours. The VDU 19 command, reached in BASIC as VDU 19,logical,physical,0,0,0, sets one entry of that palette. A 4-colour MODE has four logical colours to assign, a 2-colour MODE two, the 16-colour MODE sixteen. This means a picture can be recoloured instantly by changing the palette without touching a single pixel.
| Physical | Colour | Physical | Colour |
|---|---|---|---|
| 0 | Black | 4 | Blue |
| 1 | Red | 5 | Magenta |
| 2 | Green | 6 | Cyan |
| 3 | Yellow | 7 | White |
The eight physical colours are every on/off mix of red, green and blue. Values 8 to 15 select flashing colours, each alternating between a colour and its complement. In the 16-colour MODE 2 all sixteen are available at once; in MODE 1 four logical colours are chosen from them, and in a 2-colour MODE just two.
Screen memory
Screen RAM sits at the top of memory, and its base address depends on the MODE, because a smaller screen starts higher up and leaves more room below for programs. The 6845 is told where the screen begins, so the OS moves the base as the MODE changes. The value HIMEM in BASIC tracks the byte just below the screen.
| MODE | Screen base | Size |
|---|---|---|
| 0, 1, 2 | 0x3000 | 20K |
| 3 | 0x4000 | 16K |
| 4, 5 | 0x5800 | 10K |
| 6 | 0x6000 | 8K |
| 7 | 0x7C00 | 1K |
Because the base varies, code that writes the screen directly reads the current base rather than assuming a fixed address. The 6845 addresses the screen in units that wrap within this block, so scrolling can be done by moving the start address the CRTC uses rather than by copying bytes.