Display pixel data format

The CPC, CPC+ and KC Compact have 3 official bitmapped graphics modes:

The CPC and CPC+ have one unofficial bitmapped graphics mode:

The display mode is defined using the Gate-Array. If the mode is changed, the result will only be seen at the next HSYNC.

The standard resolutions are:

But, the width and height of the display area can be redefined using the 6845 CRTC, so it is possible to define other resolutions.

Pixel properties:

Mode 0

Properties of this mode:

Order of pixel display:
pixel 0pixel 1

Bit mappings for Pixel 0:
Bit in display byte
bit 31
bit 25
bit 13
bit 07

Bit mappings for Pixel 1:
Bit in display byte
bit 30
bit 24
bit 12
bit 06

e.g. if pixel 0 is 13 and pixel 1 is 6, this is encoded as:

pixel 0: 1101 becomes 0-1-0-0-

pixel 1: 0110 becomes -0-1-1-0

and together becomes: 00110100

Mode 1

Properties of this mode:

Order of pixel display:
pixel 0pixel 1pixel 2pixel 3

Bit mappings for Pixel 0:
Bit in display byte
bit 13
bit 07

Bit mappings for Pixel 1:
Bit in display byte
bit 12
bit 06

Bit mappings for Pixel 2:
Bit in display byte
bit 11
bit 05

Bit mappings for Pixel 3:
Bit in display byte
bit 10
bit 04

Mode 2

Properties of this mode:

Order of pixel display:
pixel 0pixel 1pixel 2pixel 3 pixel 4pixel 5pixel 6pixel 7

Bit mappings for Pixel 0:
Bit in display byte
bit 07

Bit mappings for Pixel 1:
Bit in display byte
bit 06

Bit mappings for Pixel 2:
Bit in display byte
bit 05

Bit mappings for Pixel 3:
Bit in display byte
bit 04

Bit mappings for Pixel 4:
Bit in display byte
bit 03

Bit mappings for Pixel 5:
Bit in display byte
bit 02

Bit mappings for Pixel 6:
Bit in display byte
bit 01

Bit mappings for Pixel 7:
Bit in display byte
bit 00

Mode 3

This mode is not official and exists on the CPC and CPC+ only and does not exist on the KC Compact.

Properties of this mode:

Order of pixel display:
pixel 0pixel 1

Bit mappings for Pixel 0:
Bit in display byte
bit 13
bit 07

Bit mappings for Pixel 1:
Bit in display byte
bit 12
bit 06