Skip to navigation

Elite on the BBC Micro and NES

Version analysis of CPIX4

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

Code variations between these versions are shown below.

Name: CPIX4 Type: Subroutine Category: Drawing pixels Summary: Draw a double-height dot on the dashboard

Code variation 1 of 2A variation in the comments only

Tap on a block to expand it, and tap it again to revert.

Draw a double-height mode 5 dot (2 pixels high, 2 pixels wide).
Draw a double-height mode 2 dot (2 pixels high, 2 pixels wide).
Draw a double-height mode 4 dot (2 pixels high, 4 pixels wide).

Arguments: X1 The screen pixel x-coordinate of the bottom-left corner of the dot Y1 The screen pixel y-coordinate of the bottom-left corner of the dot

Code variation 2 of 2A variation in the comments only

This variation is blank in the Electron version.

Tap on a block to expand it, and tap it again to revert.

COL The colour of the dot as a mode 5 character row byte
COL The colour of the dot as a mode 2 character row byte
.CPIX4 JSR CPIX2 \ Call CPIX2 to draw a single-height dash at (X1, Y1) DEC Y1 \ Decrement Y1 \ Fall through into CPIX2 to draw a second single-height \ dash on the pixel row above the first one, to create a \ double-height dot