Graphic Device Interface Version 2


This document describes the patches to the QDOS console driver and extended environment.

Author Tony Tebby
Most Recent Revision
Revised by Tony Tebby
ID GD2
Total number of pages 15





Graphic Device Interface Version 2 1

1General 2

1.1Limitations. 2

2Extended colour SBASIC procedures. 3

2.1Wallpaper 3

2.2Palette maps 3

2.3SBASIC colour definition selection 4

3Extended colour operating system calls 5

3.1Extended colours 5

3.2Wallpaper 5

3.3Extended colour definition calls 5

3.4Extended colour block calls 6

3.5Extended colour palette calls 6

4Blobs and Patterns 7

1General

The GD2 screen driver is a hybrid of the QDOS/SMSQ EE screen driver which maintains a high level of compatibility with existing QDOS/SMSQ software and very few modifications to the internal data structures.

1.1Limitations.

2Extended colour SBASIC procedures.

All the normal SBASIC procedures that set or use colours can work with any of the three "standard" SBASIC colour definitions.

  1. QL colour: a value from 0 to 7.

  2. Palette mapped colour: a value from 0 to 255.

  3. True colour: red (0-255) * 65536 + green (0-255) * 256 + blue (0-255).

They can also work with the "native" colour definition.

Note that, for ease of programming, the true colour definition used in SBASIC is not the same as used for the device driver interface.

NB The BGOLOUR_xx, BGIMAGE, COLOUR_xx and PALETTE_xx procedures described below all require a valid window channel ID. The default is the same as PRINT: #1 or #0 for mini SBASICs that have only #0 open.

2.1Wallpaper

A plain or stippled background can be defined using either QL colours or true colours.

BGCOLOUR_QL QL colour sets the background to the QL colour (0-255).

BGCOLOUR_24 full colour sets the background colour to the plain true colour.

100 BGCOLOUR_QL 255 : REMark set background to black / white check
110 BGCOLOUR_QL 0,7 : REMark set background to black / white check
120 BGCOLOUR_QL 0,7,3 : REMark set background to black / white check
130 BGCOLOUR_24 40 : REMark set the background to deep blue

You can get stippled extended colours by cheating. Set two of the QL palette entries (see below) to the colours you require before calling BGCOLOUR_QL.

BGIMAGE filename loads a background image from file.

150 BGIMAGE win1_wallpaper : REMark load my wallpaper

Background images must be in the form of a screen snapshot. It is relatively simple to create background images.

500 WINDOW SCR_XLIM, SCR_YLIM, 0, 0 : REMark whole screen window
510 …… draw the wallpaper on the screen
520 SBYTES_0 win1_wallpaper, SCR_BASE, SCR_LLEN * SCR_YSIZE

2.2Palette maps

The colours used to display the QL colours 0 to 7 are not necessarily the boring old black, blue, red, magenta, green, cyan, yellow and white. They can be set to other colours if you wish. The palette mapped colours can also be changed although they have been pre-defined to put the most useful colours first.

PALETTE_QL start, true colour 1, true colour 2, … sets QL palette entries starting with the start entry.

PALETTE_8 start, true colour 1, true colour 2, … sets 256 colour (8 bit) palette entries starting with the start entry.

On hardware that does not have a true palette map, palette map changes do not affect the information already drawn on screen.

There is a practical reason for changing the QL palette map entries. Many programs define some of the colours displayed as "white-colour" on a 4 colour QL display, white-red appears as green. White-red, however, is really cyan, not green. As a result, many QL mode 4 programs take on rainbow hues when displayed on a 256, 65536 or full colour display.

This can be "fixed" by redefining the colours so that colour 2 is a bright crimson and colour 4 is a bright sea green. This will ensure that colour 2 + colour 4 = colour 7. We also need to ensure that colour 0 = colour 1, colour 2 = colour 3, etc.

600 crimson = 255 * 65536 + 100 : REMark crimson is red + a bit of blue
610 sea = 255 * 256 + 155 : REMark: sea green is green + the rest of blue
620 white = crimson + sea
630 PALETTE_QL 0, 0, 0, crimson, crimson, sea, sea, white, white : REMark set 8 colours

The following program can be used to display the current 256 colour palette using the up and down arrow keys. The table of standard colours is given at the end of this document. If new colours are required, they should replace colours towards the top of the table so that the low colours remain unchanged. You change palette entry 0 at your own risk.

100 OPEN #0,con: out = 0

110 WINDOW #out, 16*10+2,16*10+2,50,50

120 COLOUR_PAL: BORDER #out,1,0,1

130 bottom=-16

140 FOR i = 1 TO 16: up

150 REPeat

160 BGET #0,a

170 IF a=$D0: IF bottom < 255-16: up

180 IF a=$D8: IF bottom > 0: down

190 END REPeat

210 DEFine PROCedure up

220 bottom = bottom+1

230 PAPER bottom+15 : SCROLL -10

250 l = bottom+1015 : l$ = l

270 PAPER #out, l&&1 : INK #out, (l+1)&&1

280 AT #out, 15,0 : PRINT #out; l$(2 TO 4);

300 END DEFine

320 DEFine PROCedure down

330 bottom = bottom-1

340 PAPER bottom : SCROLL 10

360 l = bottom+1000 : l$ = l

380 PAPER #out, l&&1 : INK #out, (l+1)&&1

390 AT #out, 0,0 : PRINT #out; l$(2 TO 4);

410 END DEFine

2.3SBASIC colour definition selection

SBASIC has a new set of procedures for selecting colour definition used by INK, PAPER, STRIP, BORDER, BLOCK.

COLOUR_QL selects the standard QL colour definitions (the QL colours can be mapped to colours other than the standard black, blue, red, magenta, green, cyan, yellow and white).

COLOUR_PAL selects the 256 colour palette mapped definition.

COLOUR_24 selects the true colour (24 bit) definition.

COLOUR_NATIVE selects the native colour definition - the significance of the colour numbers specified by INK, PAPER, etc. depends on the hardware.

200 COLOUR_24 : REMark select true colour mode
210 BORDER 2, 128*65536 + 128*256 +128 : REMark grey border
220 BORDER 2,$808080 : REMark grey border for hexadecimal hackers

The commands have no effect on any other programs executing. When an SBASIC program starts executing, it is set to QL colour definition.

3Extended colour operating system calls

All the extended colour operating system calls are standard window output calls, with the conventional values for D3 (timeout) and A0 (channel ID).

3.1Extended colours

The standard calls recognise three different "standard" colour definitions.

  1. QL colour: a value from 0 to 7.

  2. Palette mapped colour: a value from 0 to 255.

  3. True colour: 8 bit red, 8 bit green, 8 bit blue, 8 bit 0 in a long word.

They also recognise the "native" colour definition, which may be one of the above, or it may be different.

3.2Wallpaper

There is one call to set the colour of the background or a background picture or both.

iop.wpap $6b define screen wallpaper

D1 is -1, if the background colour is not to be changed.

D1 is 0 for a black background.

D1 is 1-255 for a stippled QL colour background.

D1 is n*256 for a 24 bit true colour background.

D2 is -1 for no background image.

D2 is 0 for a background image that is a snapshot of the screen in the current mode and resolution.

A1 points to the background image if there is one.

3.3Extended colour definition calls

The calls to define extended colours are kept separate from the QL colour definitions.

The new calls for ink, paper, strip and border are in 3 blocks of 4 calls.

iow.papp $50 define paper colour using palette

iow.strp $51 define strip colour using palette

iow.inkp $52 define ink colour using palette

iow.borp $53 define border using palette

iow.papt $54 define true paper colour

iow.strt $55 define true strip colour

iow.inkt $56 define true ink colour

iow.bort $57 define true colour border

iow.papn $58 define paper colour using native colours

iow.strn $59 define strip colour using native colours

iow.inkn $5a define ink colour using native colours

iow.born $5b define border using native colours

For all of these calls, D1 is the colour (right justified in a long word, except for true colour which is left justified) and D2 is the stipple key or border width.

Solid colours are defined in a single call, while stipples require two calls.

For the paper, strip and ink colours, if D2 is -1, then D1 is used as a solid colour. If D2 is 0, 1, 2 or 3, then D1 is the stipple colour applied to the existing solid colour.

For borders the operation is more complex as the original QL border call not only sets the colours but also draws the border.

3.4Extended colour block calls

There are three new calls for drawing a block of colour.

iow.blkp $5c draw block using palette

iow.blkt $5d draw block using true colour

iow.blkn $5e draw block using native colour

For all of these calls, A1 points to the block definition and A2 to three long words defining the stipple (colour 1, colour 2, stipple (-1 to 3).

3.5Extended colour palette calls

The GD2 driver has two palette maps.

The first is used to convert QL colours. This means that old programs can be displayed in new colours.

The second palette map is used with the new operating system calls that use an 8 bit (256 colour) palette definition.

Unlike GD3, GD2 has a single the palette map for all windows. A valid window channel ID must still be given.

iow.palq $60 define palette for QL definitions

iow.pal8 $61 define 8 bit palette

A1 points to the palette, D1 is the first element to set and D2 is number of elements to set.

The QL palette is defined by a table of 24 bit colours (long word), 8 entries long.

The normal 8 bit palette is defined by a table of 24 bit colours (long word), 256 entries long.

There are no additional calls for defining windows. If an extended colour definition border is required, this should be added as a second call. (The define window call is treated as two calls internally if the border width is non zero.)

4Blobs and Patterns

The header of a blob, a pattern or a sprite starts with a word identifying the colour scheme used.

For the calls to draw these objects directly, the old QDOS pointer interface tended to ignore this format word: for objects with multiple definitions, therefore, the first definition should be QL mode 4.

The second word was originally defined to be the “adaption rule” (which defined how the sprite was modified for different resolutions. This has never been used, but the least significant byte has been borrowed for dynamic sprite version numbers.

For QL modes 4 and 8, the first byte is 0 and the second byte is 0 for 4 colour and 1 for 8 colour.

For extended colour modes, the first byte is 1 and the second byte has the colour mode number as defined for the GD3 drivers.


Mode
number

Colour
resolution

Number
of bits

Colour
definition

Organisation
in long word

0

2 colour

1

1 bit set for white

-------- -------- -------- -------w

4

4 colour

2

1 bit green, 1 bit red/magenta

-------- -------- -------- ------gr

7

4 colour

2

palette mapped

-------- -------- -------- ------cc

8

16 colour

4

1 bit RGB + 1 bit intensity

-------- -------- -------- ----irgb

15

16 colour

4

palette mapped

-------- -------- -------- ----cccc

16

256 colour

8

3G, 2R, 2B + 1 bit red/blue

-------- -------- -------- grbgrbgx

31

256 colour

8

palette mapped

-------- -------- -------- cccccccc

32

64k colour

16

6 bit green, 5 bit red, 5 bit blue

-------- -------- rrrrrggg gggbbbbb

33

64k colour

16

5 bit green, 5 bit red, 5 bit blue

-------- -------- gggggrrr rrbbbbbw

64

16m colour

24

8 bit RGB

rrrrrrrr gggggggg bbbbbbbb --------

In principle all drivers should support QL mode 4 (0,0), 256 real colour (1,16), 256 colour palette mapped (1,31) and the native colour mode.

Each row in a QL mode pattern or blob occupies one or more and complete 16 bit words. Each row in any extended colour definition pattern or blob occupies one or more complete long words.

For sprites, the mask defines which bits or which pixels will be written into the screen and which bits or which pixels will XORed into the screen.

For each PIXEL in a palette mapped sprite, if the colour in the mask is not 0, then the pattern colour is written into the screen. If the colour in the mask is 0, then the pattern colour is XORed into the screen.

For each BIT in a pixel in a direct colour sprite, if the corresponding bit in the mask is not zero, then the bit from the pattern is written into the screen. If the corresponding bit in the mask is 0, then the bit from the pattern is XORed into the screen.

Note that this was always true! In QL mode drivers, however, the QL colours were not palette mapped, whereas in extended colour drivers, the colours are palette mapped.

Standard palette map - colours $00 to $3f


Colour

Colour

Colour value

VGA DAC

8 bit

16 bit

24 bit

number

name

R

G

B

R

G

B

colour

colour

R

G

B

0

00

Black

0.00

0.00

0.00

00

00

00

00

0000

00

00

00

1

01

White

1.00

1.00

1.00

3F

3F

3F

FF

FFFF

FF

FF

FF

2

02

Red

1.00

0.00

0.00

3F

00

00

49

F800

FF

00

00

3

03

Green

0.00

1.00

0.00

00

3F

00

92

07E0

00

FF

00

4

04

Blue

0.00

0.00

1.00

00

00

3F

24

001F

00

00

FF

5

05

Magenta

1.00

0.00

1.00

3F

00

3F

6D

F81F

FF

00

FF

6

06

Yellow

1.00

1.00

0.00

3F

3F

00

DB

FFE0

FF

FF

00

7

07

Cyan

0.00

1.00

1.00

00

3F

3F

B6

07FF

00

FF

FF

8

08

Dark slate

0,14

0,14

0,14

09

09

09

03

2124

24

24

24

9

09

Slate grey

0,29

0,29

0,29

12

12

12

1C

4A49

49

49

49

10

0A

Dark grey

0,43

0,43

0,43

1B

1B

1B

1F

6B6D

6D

6D

6D

11

0B

Grey

0,57

0,57

0,57

24

24

24

E0

9492

92

92

92

12

0C

Light grey

0,71

0,71

0,71

2D

2D

2D

E3

B5B6

B6

B6

B6

13

0D

Ash grey

0,86

0,86

0,86

36

36

36

FC

DEDB

DB

DB

DB

14

0E

Dark red

0,57

0,00

0,00

24

00

00

40

9000

92

00

00

15

0F

Light green

0,71

1,00

0,71

2D

3F

2D

F3

B7F6

B6

FF

B6

16

10

Mustard

0,57

0,57

0,00

24

24

00

C0

9480

92

92

00

17

11

Dark green

0,00

0,57

0,00

00

24

00

80

0480

00

92

00

18

12

Sea blue

0,00

0,57

0,57

00

24

24

A0

0492

00

92

92

19

13

Dark blue

0,00

0,00

0,57

00

00

24

20

0012

00

00

92

20

14

Purple

0,57

0,00

0,57

24

00

24

60

9012

92

00

92

21

15

Shocking pink

1,00

0,00

0,57

3F

00

24

69

F812

FF

00

92

22

16

Orange

1,00

0,57

0,00

3F

24

00

C9

FC80

FF

92

00

23

17

Lime green

0,57

1,00

0,00

24

3F

00

D2

97E0

92

FF

00

24

18

Apple green

0,00

1,00

0,57

00

3F

24

B2

07F2

00

FF

92

25

19

Bright blue

0,00

0,57

1,00

00

24

3F

A4

049F

00

92

FF

26

1A

Mauve

0,57

0,00

1,00

24

00

3F

64

901F

92

00

FF

27

1B

Peach

1,00

0,71

0,71

3F

2D

2D

EB

FDB6

FF

B6

B6

28

1C

Light yellow

1,00

1,00

0,71

3F

3F

2D

FB

FFF6

FF

FF

B6

29

1D

Light blue

0,71

1,00

1,00

2D

3F

3F

F7

B7FF

B6

FF

FF

30

1E

Sky blue

0,71

0,71

1,00

2D

2D

3F

E7

B5BF

B6

B6

FF

31

1F

Rose pink

1,00

0,71

1,00

3F

2D

3F

EF

FDBF

FF

B6

FF

32

20

Pink

1,00

0,71

0,86

3F

2D

36

(EF)

FDBB

FF

B6

DB

33

21

Beige

1,00

0,86

0,71

3F

36

2D

F9

FED6

FF

DB

B6

34

22

Pastel pink

1,00

0,86

0,86

3F

36

36

(F9)

FEDB

FF

DB

DB

35

23

Pastel yellow

1,00

1,00

0,86

3F

3F

36

(FE)

FFFB

FF

FF

DB

36

24

Pastel green

0,86

1,00

0,86

36

3F

36

FE

DFFB

DB

FF

DB

37

25

Pastel cyan

0,86

1,00

1,00

36

3F

3F

(FC)

DFFF

DB

FF

FF

38

26

Pastel blue

0,86

0,86

1,00

36

36

3F

(FC)

DEDF

DB

DB

FF

39

27

Pastel rose

1,00

0,86

1,00

3F

36

3F

FD

FEDF

FF

DB

FF

40

28

Brick

0,71

0,43

0,43

2D

1B

1B

57

B36D

B6

6D

6D

41

29

Light khaki

0,71

0,71

0,43

2D

2D

1B

C7

B5AD

B6

B6

6D

42

2A

Dull green

0,43

0,71

0,43

1B

2D

1B

8F

6DAD

6D

B6

6D

43

2B

Dull cyan

0,43

0,71

0,71

1B

2D

2D

AB

6DB6

6D

B6

B6

44

2C

Steel blue

0,43

0,43

0,71

1B

1B

2D

3B

6B76

6D

6D

B6

45

2D

Dull pink

0,71

0,43

0,71

2D

1B

2D

73

B376

B6

6D

B6

46

2E

Brown

0,43

0,14

0,14

1B

09

09

0B

6924

6D

24

24

47

2F

Khaki

0,43

0,43

0,14

1B

1B

09

1B

6B64

6D

6D

24

48

30

Dusky green

0,14

0,43

0,14

09

1B

09

13

2364

24

6D

24

49

31

Dusky blue

0,14

0,43

0,43

09

1B

1B

17

236D

24

6D

6D

50

32

Midnight blue

0,14

0,14

0,43

09

09

1B

07

212D

24

24

6D

51

33

Plum

0,43

0,14

0,43

1B

09

1B

0F

692D

6D

24

6D

52

34

Dusky pink

0,71

0,29

0,57

2D

12

24

71

B252

B6

49

92

53

35

Buff

0,71

0,57

0,29

2D

24

12

C5

B489

B6

92

49

54

36

Avocado

0,57

0,71

0,29

24

2D

12

C6

95A9

92

B6

49

55

37

Dull turquoise

0,29

0,71

0,57

12

2D

24

AA

4DB2

49

B6

92

56

38

Dull blue

0,29

0,57

0,71

12

24

2D

A8

4C96

49

92

B6

57

39

Faded purple

0,57

0,29

0,71

24

12

2D

70

9256

92

49

B6

58

3A

Cerise

0,57

0,00

0,29

24

00

12

44

9009

92

00

49

59

3B

Tan

0,57

0,29

0,00

24

12

00

50

9240

92

49

00

60

3C

Grass green

0,29

0,57

0,00

12

24

00

88

4C80

49

92

00

61

3D

Sea green

0,00

0,57

0,29

00

24

12

84

0489

00

92

49

62

3E

Ultramarine

0,00

0,29

0,57

00

12

24

30

0252

00

49

92

63

3F

Deep purple

0,29

0,00

0,57

12

00

24

28

4812

49

00

92

Standard palette map - colours $40 to $7f

Colour

Colour

Colour value

VGA DAC

8 bit

16 bit

24 bit

number

name

R

G

B

R

G

B

colour

colour

R

G

B

64

40


0,00

0,00

0,29

00

00

12

04

0009

00

00

49

65

41


0,14

0,00

0,14

09

00

09

01

2004

24

00

24

66

42


0,14

0,00

0,43

09

00

1B

05

200D

24

00

6D

67

43


0,14

0,00

0,71

09

00

2D

21

2016

24

00

B6

68

44


0,14

0,00

1,00

09

00

3F

25

201F

24

00

FF

69

45


0,29

0,00

0,00

12

00

00

08

4800

49

00

00

70

46


0,29

0,00

0,29

12

00

12

0C

4809

49

00

49

71

47


0,29

0,00

0,86

12

00

36

2C

481B

49

00

DB

72

48


0,43

0,00

0,14

1B

00

09

09

6804

6D

00

24

73

49


0,43

0,00

0,43

1B

00

1B

0D

680D

6D

00

6D

74

4A


0,43

0,00

0,71

1B

00

2D

29

6816

6D

00

B6

75

4B


0,43

0,00

1,00

1B

00

3F

2D

681F

6D

00

FF

76

4C


0,71

0,00

0,14

2D

00

09

41

B004

B6

00

24

77

4D


0,71

0,00

0,43

2D

00

1B

45

B00D

B6

00

6D

78

4E


0,71

0,00

0,71

2D

00

2D

61

B016

B6

00

B6

79

4F


0,71

0,00

1,00

2D

00

3F

65

B01F

B6

00

FF

80

50


0,86

0,00

0,00

36

00

00

48

D800

DB

00

00

81

51


0,86

0,00

0,29

36

00

12

4C

D809

DB

00

49

82

52


0,86

0,00

0,57

36

00

24

68

D812

DB

00

92

83

53


0,86

0,00

0,86

36

00

36

6C

D81B

DB

00

DB

84

54


1,00

0,00

0,43

3F

00

1B

4D

F80D

FF

00

6D

85

55


0,00

0,14

0,00

00

09

00

02

0120

00

24

00

86

56


0,00

0,14

0,29

00

09

12

06

0129

00

24

49

87

57


0,00

0,14

0,57

00

09

24

22

0132

00

24

92

88

58


0,00

0,14

0,86

00

09

36

26

013B

00

24

DB

89

59


0,14

0,14

0,71

09

09

2D

23

2136

24

24

B6

90

5A


0,14

0,14

1,00

09

09

3F

27

213F

24

24

FF

91

5B


0,29

0,14

0,00

12

09

00

0A

4920

49

24

00

92

5C


0,29

0,14

0,29

12

09

12

0E

4929

49

24

49

93

5D


0,29

0,14

0,57

12

09

24

2A

4932

49

24

92

94

5E


0,29

0,14

0,86

12

09

36

2E

493B

49

24

DB

95

5F


0,43

0,14

0,71

1B

09

2D

2B

6936

6D

24

B6

96

60


0,43

0,14

1,00

1B

09

3F

2F

693F

6D

24

FF

97

61


0,57

0,14

0,00

24

09

00

42

9120

92

24

00

98

62


0,57

0,14

0,29

24

09

12

46

9129

92

24

49

99

63


0,57

0,14

0,57

24

09

24

62

9132

92

24

92

100

64


0,57

0,14

0,86

24

09

36

66

913B

92

24

DB

101

65


0,71

0,14

0,14

2D

09

09

43

B124

B6

24

24

102

66


0,71

0,14

0,43

2D

09

1B

47

B12D

B6

24

6D

103

67


0,71

0,14

0,71

2D

09

2D

63

B136

B6

24

B6

104

68


0,71

0,14

1,00

2D

09

3F

67

B13F

B6

24

FF

105

69


0,86

0,14

0,00

36

09

00

4A

D920

DB

24

00

106

6A


0,86

0,14

0,29

36

09

12

4E

D929

DB

24

49

107

6B


0,86

0,14

0,57

36

09

24

6A

D932

DB

24

92

108

6C


0,86

0,14

0,86

36

09

36

6E

D93B

DB

24

DB

109

6D


1,00

0,14

0,14

3F

09

09

4B

F924

FF

24

24

110

6E


1,00

0,14

0,43

3F

09

1B

4F

F92D

FF

24

6D

111

6F


1,00

0,14

0,71

3F

09

2D

6B

F936

FF

24

B6

112

70


1,00

0,14

1,00

3F

09

3F

6F

F93F

FF

24

FF

113

71


0,00

0,29

0,00

00

12

00

10

0240

00

49

00

114

72


0,00

0,29

0,29

00

12

12

14

0249

00

49

49

115

73


0,00

0,29

0,86

00

12

36

34

025B

00

49

DB

116

74


0,14

0,29

0,14

09

12

09

11

2244

24

49

24

117

75


0,14

0,29

0,43

09

12

1B

15

224D

24

49

6D

118

76


0,14

0,29

0,71

09

12

2D

31

2256

24

49

B6

119

77


0,14

0,29

1,00

09

12

3F

35

225F

24

49

FF

120

78


0,29

0,29

0,00

12

12

00

18

4A40

49

49

00

121

79


0,29

0,29

0,57

12

12

24

38

4A52

49

49

92

122

7A


0,29

0,29

0,86

12

12

36

3C

4A5B

49

49

DB

123

7B


0,43

0,29

0,14

1B

12

09

19

6A44

6D

49

24

124

7C


0,43

0,29

0,43

1B

12

1B

1D

6A4D

6D

49

6D

125

7D


0,43

0,29

0,71

1B

12

2D

39

6A56

6D

49

B6

126

7E


0,43

0,29

1,00

1B

12

3F

3D

6A5F

6D

49

FF

127

7F


0,57

0,29

0,29

24

12

12

54

9249

92

49

49

Standard palette map - colours $80 to $bf

Colour

Colour

Colour value

VGA DAC

8 bit

16 bit

24 bit

number

name

R

G

B

R

G

B

colour

colour

R

G

B

128

80


0,57

0,29

0,86

24

12

36

74

925B

92

49

DB

129

81


0,71

0,29

0,14

2D

12

09

51

B244

B6

49

24

130

82


0,71

0,29

0,43

2D

12

1B

55

B24D

B6

49

6D

131

83


0,71

0,29

1,00

2D

12

3F

75

B25F

B6

49

FF

132

84


0,86

0,29

0,00

36

12

00

58

DA40

DB

49

00

133

85


0,86

0,29

0,29

36

12

12

5C

DA49

DB

49

49

134

86


0,86

0,29

0,57

36

12

24

78

DA52

DB

49

92

135

87


0,86

0,29

0,86

36

12

36

7C

DA5B

DB

49

DB

136

88


1,00

0,29

0,14

3F

12

09

59

FA44

FF

49

24

137

89


1,00

0,29

0,43

3F

12

1B

5D

FA4D

FF

49

6D

138

8A


1,00

0,29

0,71

3F

12

2D

79

FA56

FF

49

B6

139

8B


1,00

0,29

1,00

3F

12

3F

7D

FA5F

FF

49

FF

140

8C


0,00

0,43

0,00

00

1B

00

12

0360

00

6D

00

141

8D


0,00

0,43

0,29

00

1B

12

16

0369

00

6D

49

142

8E


0,00

0,43

0,57

00

1B

24

32

0372

00

6D

92

143

8F


0,00

0,43

0,86

00

1B

36

36

037B

00

6D

DB

144

90


0,14

0,43

0,71

09

1B

2D

33

2376

24

6D

B6

145

91


0,14

0,43

1,00

09

1B

3F

37

237F

24

6D

FF

146

92


0,29

0,43

0,00

12

1B

00

1A

4B60

49

6D

00

147

93


0,29

0,43

0,29

12

1B

12

1E

4B69

49

6D

49

148

94


0,29

0,43

0,57

12

1B

24

3A

4B72

49

6D

92

149

95


0,29

0,43

0,86

12

1B

36

3E

4B7B

49

6D

DB

150

96


0,43

0,43

1,00

1B

1B

3F

3F

6B7F

6D

6D

FF

151

97


0,57

0,43

0,00

24

1B

00

52

9360

92

6D

00

152

98


0,57

0,43

0,29

24

1B

12

56

9369

92

6D

49

153

99


0,57

0,43

0,57

24

1B

24

72

9372

92

6D

92

154

9A


0,57

0,43

0,86

24

1B

36

76

937B

92

6D

DB

155

9B


0,71

0,43

0,14

2D

1B

09

53

B364

B6

6D

24

156

9C


0,71

0,43

1,00

2D

1B

3F

77

B37F

B6

6D

FF

157

9D


0,86

0,43

0,00

36

1B

00

5A

DB60

DB

6D

00

158

9E


0,86

0,43

0,29

36

1B

12

5E

DB69

DB

6D

49

159

9F


0,86

0,43

0,57

36

1B

24

7A

DB72

DB

6D

92

160

A0


0,86

0,43

0,86

36

1B

36

7E

DB7B

DB

6D

DB

161

A1


1,00

0,43

0,14

3F

1B

09

5B

FB64

FF

6D

24

162

A2


1,00

0,43

0,43

3F

1B

1B

5F

FB6D

FF

6D

6D

163

A3


1,00

0,43

0,71

3F

1B

2D

7B

FB76

FF

6D

B6

164

A4


1,00

0,43

1,00

3F

1B

3F

7F

FB7F

FF

6D

FF

165

A5


0,14

0,57

0,14

09

24

09

81

2484

24

92

24

166

A6


0,14

0,57

0,43

09

24

1B

85

248D

24

92

6D

167

A7


0,14

0,57

0,71

09

24

2D

A1

2496

24

92

B6

168

A8


0,14

0,57

1,00

09

24

3F

A5

249F

24

92

FF

169

A9


0,29

0,57

0,29

12

24

12

8C

4C89

49

92

49

170

AA


0,29

0,57

0,86

12

24

36

AC

4C9B

49

92

DB

171

AB


0,43

0,57

0,14

1B

24

09

89

6C84

6D

92

24

172

AC


0,43

0,57

0,43

1B

24

1B

8D

6C8D

6D

92

6D

173

AD


0,43

0,57

0,71

1B

24

2D

A9

6C96

6D

92

B6

174

AE


0,43

0,57

1,00

1B

24

3F

AD

6C9F

6D

92

FF

175

AF


0,57

0,57

0,29

24

24

12

C4

9489

92

92

49

176

B0


0,57

0,57

0,86

24

24

36

E4

949B

92

92

DB

177

B1


0,71

0,57

0,14

2D

24

09

C1

B484

B6

92

24

178

B2


0,71

0,57

0,71

2D

24

2D

E1

B496

B6

92

B6

179

B3


0,71

0,57

1,00

2D

24

3F

E5

B49F

B6

92

FF

180

B4


0,86

0,57

0,00

36

24

00

C8

DC80

DB

92

00

181

B5


0,86

0,57

0,29

36

24

12

CC

DC89

DB

92

49

182

B6


0,86

0,57

0,57

36

24

24

E8

DC92

DB

92

92

183

B7


0,86

0,57

0,86

36

24

36

EC

DC9B

DB

92

DB

184

B8


1,00

0,57

0,43

3F

24

1B

CD

FC8D

FF

92

6D

185

B9


1,00

0,57

0,71

3F

24

2D

E9

FC96

FF

92

B6

186

BA


1,00

0,57

1,00

3F

24

3F

ED

FC9F

FF

92

FF

187

BB


0,00

0,71

0,00

00

2D

00

82

05A0

00

B6

00

188

BC


0,00

0,71

0,29

00

2D

12

86

05A9

00

B6

49

189

BD


0,00

0,71

0,57

00

2D

24

A2

05B2

00

B6

92

190

BE


0,00

0,71

0,86

00

2D

36

A6

05BB

00

B6

DB

191

BF


0,14

0,71

0,14

09

2D

09

83

25A4

24

B6

24

Standard palette map - colours $c0 to $ff

Colour

Colour

Colour value

VGA DAC

8 bit

16 bit

24 bit

number

name

R

G

B

R

G

B

colour

colour

R

G

B

192

C0


0,14

0,71

0,43

09

2D

1B

87

25AD

24

B6

6D

193

C1


0,14

0,71

0,71

09

2D

2D

A3

25B6

24

B6

B6

194

C2


0,14

0,71

1,00

09

2D

3F

A7

25BF

24

B6

FF

195

C3


0,29

0,71

0,00

12

2D

00

8A

4DA0

49

B6

00

196

C4


0,29

0,71

0,29

12

2D

12

8E

4DA9

49

B6

49

197

C5


0,29

0,71

0,86

12

2D

36

AE

4DBB

49

B6

DB

198

C6


0,43

0,71

0,14

1B

2D

09

8B

6DA4

6D

B6

24

199

C7


0,43

0,71

1,00

1B

2D

3F

AF

6DBF

6D

B6

FF

200

C8


0,57

0,71

0,00

24

2D

00

C2

95A0

92

B6

00

201

C9


0,57

0,71

0,57

24

2D

24

E2

95B2

92

B6

92

202

CA


0,57

0,71

0,86

24

2D

36

E6

95BB

92

B6

DB

203

CB


0,71

0,71

0,14

2D

2D

09

C3

B5A4

B6

B6

24

204

CC


0,86

0,71

0,00

36

2D

00

CA

DDA0

DB

B6

00

205

CD


0,86

0,71

0,29

36

2D

12

CE

DDA9

DB

B6

49

206

CE


0,86

0,71

0,57

36

2D

24

EA

DDB2

DB

B6

92

207

CF


0,86

0,71

0,86

36

2D

36

EE

DDBB

DB

B6

DB

208

D0


1,00

0,71

0,14

3F

2D

09

CB

FDA4

FF

B6

24

209

D1


1,00

0,71

0,43

3F

2D

1B

CF

FDAD

FF

B6

6D

210

D2


0,00

0,86

0,00

00

36

00

90

06C0

00

DB

00

211

D3


0,00

0,86

0,29

00

36

12

94

06C9

00

DB

49

212

D4


0,00

0,86

0,57

00

36

24

B0

06D2

00

DB

92

213

D5


0,00

0,86

0,86

00

36

36

B4

06DB

00

DB

DB

214

D6


0,14

0,86

0,14

09

36

09

91

26C4

24

DB

24

215

D7


0,14

0,86

0,43

09

36

1B

95

26CD

24

DB

6D

216

D8


0,14

0,86

0,71

09

36

2D

B1

26D6

24

DB

B6

217

D9


0,14

0,86

1,00

09

36

3F

B5

26DF

24

DB

FF

218

DA


0,29

0,86

0,00

12

36

00

98

4EC0

49

DB

00

219

DB


0,29

0,86

0,29

12

36

12

9C

4EC9

49

DB

49

220

DC


0,29

0,86

0,57

12

36

24

B8

4ED2

49

DB

92

221

DD


0,29

0,86

0,86

12

36

36

BC

4EDB

49

DB

DB

222

DE


0,43

0,86

0,14

1B

36

09

99

6EC4

6D

DB

24

223

DF


0,43

0,86

0,43

1B

36

1B

9D

6ECD

6D

DB

6D

224

E0


0,43

0,86

0,71

1B

36

2D

B9

6ED6

6D

DB

B6

225

E1


0,43

0,86

1,00

1B

36

3F

BD

6EDF

6D

DB

FF

226

E2


0,57

0,86

0,00

24

36

00

D0

96C0

92

DB

00

227

E3


0,57

0,86

0,29

24

36

12

D4

96C9

92

DB

49

228

E4


0,57

0,86

0,57

24

36

24

F0

96D2

92

DB

92

229

E5


0,57

0,86

0,86

24

36

36

F4

96DB

92

DB

DB

230

E6


0,71

0,86

0,14

2D

36

09

D1

B6C4

B6

DB

24

231

E7


0,71

0,86

0,43

2D

36

1B

D5

B6CD

B6

DB

6D

232

E8


0,71

0,86

0,71

2D

36

2D

F1

B6D6

B6

DB

B6

233

E9


0,71

0,86

1,00

2D

36

3F

F5

B6DF

B6

DB

FF

234

EA


0,86

0,86

0,29

36

36

12

DC

DEC9

DB

DB

49

235

EB


0,86

0,86

0,57

36

36

24

F8

DED2

DB

DB

92

236

EC


1,00

0,86

0,43

3F

36

1B

DD

FECD

FF

DB

6D

237

ED


0,00

1,00

0,29

00

3F

12

96

07E9

00

FF

49

238

EE


0,14

1,00

0,43

09

3F

1B

97

27ED

24

FF

6D

239

EF


0,14

1,00

0,71

09

3F

2D

B3

27F6

24

FF

B6

240

F0


0,29

1,00

0,00

12

3F

00

9A

4FE0

49

FF

00

241

F1


0,29

1,00

0,29

12

3F

12

9E

4FE9

49

FF

49

242

F2


0,29

1,00

0,57

12

3F

24

BA

4FF2

49

FF

92

243

F3


0,29

1,00

0,86

12

3F

36

BE

4FFB

49

FF

DB

244

F4


0,43

1,00

0,14

1B

3F

09

9B

6FE4

6D

FF

24

245

F5


0,43

1,00

0,43

1B

3F

1B

9F

6FED

6D

FF

6D

246

F6


0,43

1,00

0,71

1B

3F

2D

BB

6FF6

6D

FF

B6

247

F7


0,43

1,00

1,00

1B

3F

3F

BF

6FFF

6D

FF

FF

248

F8


0,57

1,00

0,29

24

3F

12

D6

97E9

92

FF

49

249

F9


0,57

1,00

0,57

24

3F

24

F2

97F2

92

FF

92

250

FA


0,57

1,00

0,86

24

3F

36

F6

97FB

92

FF

DB

251

FB


0,71

1,00

0,14

2D

3F

09

D3

B7E4

B6

FF

24

252

FC


0,71

1,00

0,43

2D

3F

1B

D7

B7ED

B6

FF

6D

253

FD


0,86

1,00

0,29

36

3F

12

DE

DFE9

DB

FF

49

254

FE


0,86

1,00

0,57

36

3F

24

FA

DFF2

DB

FF

92

255

FF


1,00

1,00

0,43

3F

3F

1B

DF

FFED

FF

FF

6D