MODE 6

From BeebWiki
Jump to: navigation, search
Help screen from Opus EDOS (Alan Williams, 1984), plus red background

MODE 6 is a medium-resolution screen MODE, introduced on the BBC Micro Model A and supported by the entire BBC series including the Archimedes. It provides a 40 × 25 monochrome character display for terminal applications, such as viewdata. It also uses slightly less memory than MODE 4.

Whereas Teletext MODE 7 provides colour and other features for a fraction of the memory cost, MODE 6 is bitmapped and so supports user defined characters, essential for scientific and foreign-language applications. Interlace can also be turned off for a steadier display.

To make the display roughly as tall as other MODEs (=256 scanlines), MODE 6 allocates 10 scanlines per text row, making 250 scanlines in all. Since the VDU routines and the hardware are designed for 8 scanlines per row, the bottom two lines are left blank, not mapped to any part of memory. As the display area is no longer contiguous, the MOS disables graphics functions (all PLOT commands, CLG, GCOL, cursor coupling, the graphics origin and graphics window.) All other functions including screen editing operate as normal.

The two blank scanlines per text row are generated by the 6845 CRTC under MOS programming. DISEN is lowered within these rows and so they appear black, regardless of the selected background colour. However the cursor is made to overlap the bottom line of the character and the two blank lines. The cursor simply inverts the RGB value of whatever is under it, and is therefore white in the bottom two lines. The zebra stripes can be closed by reprogramming the CRTC with: VDU 23;9,7;0;0;0, 23;7,22;0;0;0 which sets the number of pixel lines to 8 (ie 7+1) and moves the display down to re-centre it.

Although 192 bytes of display memory are off screen at any one time, these are not available to programs. If used unofficially they are prone to corruption, unless the program guarantees that no hardware scrolling will occur. When hardware scrolling moves the start of display memory, the mapped area will extend right up to &7FFF and wrap around to &6000.

Due to the monochrome display and odd configuration MODE 6 has proved unattractive on the BBC Micro. There the most typical use is for dual format BBC/Electron text adventures; the Electron has no Teletext hardware and so the MOS substitutes MODE 6 with no Teletext emulation. There is also a listing to remove the blank lines from MODE 6, although it does not re-enable graphics: please see The Micro User, August 1987, p.107.

MODE 6
Type Bitmapped, text only ('ASCII')
Resolution Text 40 × 25 characters
Graphics n/a
Character size 8 × 10 pixels, top 8 lines user definable
Pixel aspect 1:1 (square)
Bits per pixel 1
Default palette Logical colour Actual colour
0 0 (black)
1 7 (white)
Memory allocated 8192 bytes
on screen 8000 bytes
Address range Model B etc. &6000..&7FFF
Configuration Video ULA control register &88
Video ULA palette register file &07 &17 &27 &37 &47 &57 &67 &77
&80 &90 &A0 &B0 &C0 &D0 &E0 &F0
CRTC register file &3F &28 &31 &24 &1E &02
&19 &1B &01 &09 &67 &09
(from table in MOS 1.20 at &C492..&C49D)
Screen display MODEs

MODE 0 | MODE 1 | MODE 2 | MODE 3 | MODE 4 | MODE 5 | MODE 6 | MODE 7
MODE 8 | MODE 9 | MODE 10 | MODE 11 | MODE 12 | MODE 13 | MODE 14
MODE &60 | MODE &61 | MODE &63 | MODE &64 | MODE &66
MODE &68 | MODE &69 | MODE &6B | MODE &6C | MODE &6E
MODE | VDU 22

-- beardo 14:14, 16 September 2006 (BST)