-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpixel-modes.txt
62 lines (43 loc) · 1 KB
/
pixel-modes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Memory Map
0000-7FFF - ROM / Video
8000-FFFF - RAM
# Video Memory
0000-779F - Video memory
??A0 - ??FF not visible on screen
7800 - 7FFF not visible on screen
0-159 (00-9F) x-coord
0-119 (00-77) y coord
# Pixel modes
8 bits per pixel
1. 64 colour mode
Sets a pixel to one of 64 colours
00 rr gg bb
e.g. 00 11 11 00 = 3C - Yellow
2. 64 colour background
Sets a background colour register on the VGA board to
one of 64 colours, as above
01 rr gg bb
e.g. 01 00 11 11 = 4F - Cyan
3. Text mode
Sets a patern of 4 sub-pixels to either the forground colour
or the background colour set by the background colour register.
The forground colour is one of 8 colours and set in the
pixel data.
1 rgb ABCD
CD
AB
e.g Red diagonal:
O is set, . is unset
.O
O.
1 100 1001 = C9
100 = Red (r=1, g=0, b=0)
e.g Yellow diagonal: (other way)
O.
.O
1 110 0110 = E6
110 = Yellow (r=1, g=1, b=0)
00110000 = red square
01110000 = red square (background)
11001111 = red square
1100???? = red square (if background = red)