aboutsummaryrefslogtreecommitdiff
path: root/misc/VirtualMonitor.txt
blob: b26add265ecca8f9d9410dc99a979e5b105cddef (plain)
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
; This isn't a leaked specification. It's a write-up by Rick
; (in #0x10c-dev) of how the leaked game handles the virtual
; monitor.
; 
; Updated to include differences in the DCPU applet
; available at http://dcpu.com/highnerd/
; 
; 0x8000 - 0x8180 ; Display (32x12)
; 0x8180 - 0x8280 ; Characters
; 0x8280 - 0x8281 ; Misc
; 
; The display is 32x12 (128x96) surrounded by a
; 16 pixel border / background.
; 
; A display cell is a single word:
; 
;   ccccccccbiiiiiii
; 
;   i = Character index.
;   b = Cell should blink.
;   c = Color.
; 
; 
; Color is defined as:
; 
;   ffffbbbb
; 
;   f = Foreground color
;   b = Background color
; 
;   Both are mapped as:
; 
;    hrgb
; 
;    h = Highlight
;    r = Red
;    g = Green
;    b = Blue
; 
;    When a channel is set, its value is 0xAA, when unset
;      it's 0x00.
; 
;    When both red and green are set and highlight is not set,
;      blue is +0x55 (ie, b0110 gives 0xFFAAAA55 assuming
;      0xAARRGGBB, originally was 0xFFAAFF00).
; 
;    When highlight is set, all values are
;      +0x55 (set channel is 0xFF, unset channel is 0x55).
; 
; 
; A character is two words
; 
;   aaaaaaaabbbbbbbb
;   ccccccccdddddddd
; 
;   Where each bit defines if a pixel is visible or not.
;   Each letter in the representation is one column of pixels
;   in the character.
; 
;   a = column 0, b = column 1, c = column 2, d = column 3
; 
;   ie
; 
;   'A' in notch's default font would be 0x7E09, 0x7E00.
; 
;   In this diagram, 0 = MSB, 7 = LSB
;
;    0123
;   +----+ +----+
;  0|0100| | #  |
;  1|1010| |# # |
;  2|1010| |# # |
;  3|1110| |### |
;  4|1010| |# # |
;  5|1010| |# # |
;  6|1010| |# # |
;  7|0000| |    |
;   +----+ |----+
; 
; 
; Misc is defined as:
; 
; (0x8280[0] & 0xF) defines background color of screen,
; as defined by the background color lookup. Since
; the normal display cannot have alpha, this color
; only appears as a border.