aboutsummaryrefslogtreecommitdiff
path: root/misc/VirtualMonitor.txt
diff options
context:
space:
mode:
Diffstat (limited to 'misc/VirtualMonitor.txt')
-rw-r--r--misc/VirtualMonitor.txt86
1 files changed, 86 insertions, 0 deletions
diff --git a/misc/VirtualMonitor.txt b/misc/VirtualMonitor.txt
new file mode 100644
index 0000000..b26add2
--- /dev/null
+++ b/misc/VirtualMonitor.txt
@@ -0,0 +1,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.