This file gives a brief description of the progcom monitor.
the monitor has two modes, a tileset-graphics text mode (Mode A) and
a pixel graphics monochrome mode (Mode B).
Mode A is the default mode


Mode A:

colors:		16
resolution:	32*32 8x8 tiles
data size:	512 words screen data + 512 words tileset

Data format:
each word in the data secion is interpreted as two characters
each character uses 8 bit ascii code and two four-bit fields for choosing color
for example, a 2 in color field A will set the character itself to color two, as defined in the color vector
a 2 in color field B will set the background of the character to color 2.

illustration of the data layout:
		      col. a
|XXXXXXXXXXXXXXXX|BBBB|AAAA|CCCCCCCC|
second char	 col. b	   ascii code


Mode B:

colors:		2
resolution	256*256 pixels
data size:	2048 words screen data

Data format:
each bit represents a pixel, 0 makes the pixel use color 0, while 1 makes it use color 1.
the first word will set the first 32 pixels from the upper left corner, wile successive entries will set pixels right and downwards.


locations of interest:

label			address		size		contents

GLOBAL_SCREEN		61440		see above	screen data
GLOBAL_SCREEN_FONT	60928		512		font map
GLOBAL_SCREEN_COLOR	60912		16		color map
GLOBAL_SCREEN_MODE	60911		1		screen mode register
GLOBAL_SCREEN_SCROLL	60910		1		screen memory offset, used for scrolling or double buffering

detailed explaination:

GLOBAL_SCREEN:

this label points to the first address for storing screen data

GLOBAL_SCREEN_COLOR:

this label points to a vector containing 16 colors in XRGB format, 8 bits per component.
the default colors stored at this location are these:

ID  Value	Color
0:  0x00000000	black
1:  0x00ffffff	white
2:  0x0068372b	red
3:  0x0070a4b2	cyan
4:  0x006f3d86	violet
5:  0x00588d43	green
6:  0x00352879	blue
7:  0x00b8c76f	yellow
8:  0x006f4f25	orange
9:  0x00433900	brown
10: 0x009a6759	light red
11: 0x00444444	grey 1
12: 0x006c6c6c	grey 2
13: 0x009ad284	light green
14: 0x006c5eb5	light blue
15: 0x00959595	grey 3

GLOBAL_SCREEN_FONT:

this label points to the tileset used when in mode A.
the tileset uses 512 words of data to store all tiles.
each tile takes two words in memory, so there is a total of 256 tiles.
each tile uses 8x8 pixels, each row being one byte.
the rows are stored so that the first row is stored as the first 8 bits in a word

for example, the code for this character:

00000000	
00000000 
00100100 
00000000 
00111100
00011000
00000000
00000000

is:
0x00240000
0x0000183c

GLOBAL_SCREEN_MODE

Bit:	name:				Shorthand:		Function:
0:	bitmap toggle bit		BTB			Toggles bitmap or character set
1: 	High-color toggle bit		HCTB			Increases color depth
2:	Enable Monochrome		EM			Monochrome/2-color output
3:	Increased Color Depth Bitmaps	ICDB			Increases color depth of bitmaps further
4:	Double Data Set			DDS			Doubles the data set that is used
5:	Double Transmission		DT			Makes sure each pixel is sent twice to the screen
6-15:	--				--			--
16-17:	Resolution			R			toggles resolution between:	00: 256x256, 01: 128x256, 10:128x128, 11: 64x64
18-19:	--				--			--
20-21:	Color Depth Expected		CDE			Toggles how the monitor will treat pixel data that is sent to it: 00: 4-bit CLUT, 01: 1-bit CLUT, 10: 8-bit monochrome, 11: 16-bit RGB

when BTB is set to 0, the monitor will be set to mode A, text mode
when BTB is set to 1, the monitor will be set to mode B, monochrome

Enabling:
BTB, HCTB, CDE=0	gives 4-bit bitmap
BTB, HCTB, ICDB, CDE=3 	gives 16-bit bitmap
BTB, EM, CDE=2		gives 8-bit monochrome bitmap
HCTB, CDE=0		gives 4-color characters


For more info, see the source.