Skip to navigation


Drawing pixels: orange

[BBC Master version]

Name: orange [Show more] Type: Variable Category: Drawing pixels Summary: Lookup table for 2-pixel mode 1 orange pixels for the sun
Context: See this variable in context in the source code References: This variable is used as follows: * HLOIN uses orange

Blocks of orange (as used when drawing the sun) have alternate red and yellow pixels in a cross-hatch pattern. The cross-hatch pattern is made up of offset rows that are 2 pixels high, and it is made up of red and yellow rectangles, each of which is 2 pixels high and 1 pixel wide. The result looks like this: ...ryryryryryryryry... ...ryryryryryryryry... ...yryryryryryryryr... ...yryryryryryryryr... ...ryryryryryryryry... ...ryryryryryryryry... and so on, repeating every four pixel rows. This is implemented with the following lookup table, where bits 0-1 of the pixel y-coordinate are used as the index, to fetch the correct pattern to use. Rows with y-coordinates ending in %00 or %01 fetch the red/yellow pattern from the table, while rows with y-coordinates ending in %10 or %11 fetch the yellow/red pattern, so the pattern repeats every four pixel rows.
.orange EQUB %10100101 \ Four mode 1 pixels of colour 2, 1, 2, 1 (red/yellow) EQUB %10100101 EQUB %01011010 \ Four mode 1 pixels of colour 1, 2, 1, 2 (yellow/red) EQUB %01011010