Skip to navigation

Revs on the BBC Micro

Screen buffer: backgroundColour

Name: backgroundColour [Show more] Type: Variable Category: Screen buffer Summary: The background colour for each track line Deep dive: Drawing the track view
This table contains colour information for each of the 80 track lines. It stores the colour, the verge type and details of the routine in which the colour data was written, as follows: * Bits 0-1: background colour of track line (this value is a logical colour and the physical colour is looked up from the colourPalette table) %00 = logical colour 0 %01 = logical colour 1 %10 = logical colour 2 %11 = logical colour 3 * Bit 2: records which routine set this colour, along with bits 5-7 %0 = not set by SetVergeBackground %1 = set by SetVergeBackground * Bits 3-4: the verge type that was being drawn when this colour was set (taken from vergeType) %00 = leftVergeStart %01 = leftTrackStart %10 = rightVergeStart %11 = rightGrassStart * Bits 5-7: records which routine set this colour, along with bit 2 %000 = colour not set yet %001 = set by SetBackground %010 = set by UpdateBackground to the value in backgroundRight %100 = set by UpdateBackground to the value in backgroundLeft The contents of bits 2-7 are only used by the GetColour routine in the Acornsoft version (though their being non-zero is used to differentiate black from an unset colour by SetBackground). In the Superior Software release, GetColour was recoded to be smaller, and the recoded version only uses bits 0-1, with bits 2-7 being unused.
.backgroundColour SKIP 80