Skip to navigation

Elite on the BBC Micro

Version analysis of CTWOS

This code appears in the following versions (click to see it in the source code):

Code variations between these versions are shown below.

Name: CTWOS Type: Variable Category: Drawing pixels

Code variation 1 of 4Specific to an individual platform

Tap on a version to expand it, and tap it again to show to all variations.

Cassette, Flight, Docked, 6502SP

Electron

Summary: Ready-made single-pixel character row bytes for mode 5 Deep dive: Drawing colour pixels in mode 5
Summary: Ready-made double-pixel character row bytes for the mode 4 dashboard

Code variation 2 of 4A variation in the comments only

Tap on a version to expand it, and tap it again to show to all variations.

Cassette, Flight, Docked

6502SP

Electron

Ready-made bytes for plotting one-pixel points in mode 5 (the bottom part of the split screen). See the dashboard routines SCAN, DIL2 and CPIX2 for details.
This table is not used by the 6502 Second Processor version of Elite. Instead, the CTWOS table in the I/O processor code is used, which contains single-pixel character row bytes for the mode 2 dashboard.
Ready-made bytes for plotting two-pixel points in the mode 4 dashboard (the bottom part of the screen). The layout of the pixels is similar to the layout of four-colour mode 5 pixels, so the byte at position X contains a 2-pixel mode 4 dot at position 2 * X (we do this so the same code can be used to create both the monochrome Electron dashboard and the four-colour mode 5 dashboard in the other versions).

Code variation 3 of 4A variation in the comments only

This variation is blank in the Disc (docked) and Electron versions.

Cassette, Flight, 6502SP

There is one extra row to support the use of CTWOS+1,X indexing in the CPIX2 routine. The extra row is a repeat of the first row, and saves us from having to work out whether CTWOS+1+X needs to be wrapped around when drawing a two-pixel dash that crosses from one character block into another. See CPIX2 for more details.
.CTWOS

Code variation 4 of 4Specific to an individual platform

Tap on a version to expand it, and tap it again to show to all variations.

Cassette, Flight, 6502SP

Docked

Electron

EQUB %10001000 EQUB %01000100 EQUB %00100010 EQUB %00010001 EQUB %10001000
EQUB %10001000 EQUB %01000100 EQUB %00100010 EQUB %00010001
EQUB %11000000 EQUB %00110000 EQUB %00001100 EQUB %00000011
RSS Feed