/********************************************************************* * file: h/scrn/dispi.h * part #: * internal sequence #: * * ************************************************************ * * " c Copyright Hewlett-Packard Company, 1984.* All * * * rights are reserved. Copying or other reproduction * * * of this program except for archival purposes is * * * prohibited without the prior written consent of * * * Hewlett-Packard Company." * * ************************************************************ * * * The file contains the defines and externals relating to the display * driver. These defines are internal to the display driver. * Must have sys/map.h, sys/inode.h and scrn/disp.h included in * front of this file. * * Pisces Q-DOS project * Karen Helt PCD * ---------------------------------------------------- * initial 2/24/83 * add font changing 3/11/83 * add comments 6/15/83 * changed stat_data and * changed to short and * byte_t to save space 9/1/83 * break into two files 10/21/83 * change to new font * stratagy 3/14/84 * */ #define NOP 0 /* gpu commands */ #define CONF 2 #define DISVID 3 #define ENVID 4 #define WRMEM 7 #define RDMEM 8 #define WRSAD 9 #define WRORG 10 #define WRDAD 11 #define WRRR 12 #define MOVEP 13 #define IMOVEP 14 #define DRAWP 15 #define IDRAWP 16 #define RDP 17 #define WRUDL 18 #define WRWINSIZ 19 #define WRWINORG 20 #define COPY 21 #define FILL 22 #define FRAME 23 #define SCROLUP 24 #define SCROLDN 25 #define SCROLLF 26 #define SCROLRT 27 #define RDWIN 28 #define WRWIN 29 #define RDWINPARM 30 #define CR 31 #define CRLF 32 #define LABEL 36 #define ENSP 38 #define DISSP 39 #define MOVESP 40 #define IMOVESP 41 #define RDSP 42 #define DRAWPX 43 #define WRFAD 44 #define ENCURS 45 #define DISCURS 46 #define ID 63 #define CONF_COUNT 22 /* # of bytes of config const */ #define MAX_FONT_SIZE 256 /* gpu memory addresses (in words) */ #define SCREENAD 0 /* start of screen */ #define PATAD32 16320 /* start of patterns space, words */ #define PATAD128 65472 /* start of patterns space, words */ #define STARTAD32 255 /* start of rasters and font space bytes/64 */ #define STARTAD128 256 /* start of rasters and font space bytes/64 */ #define MEMSIZE32 255 /* size of raster and font space bytes/64 */ #define MEMSIZE128 1790 /* size of raster and font space bytes/64 */ #define TESTAD1 15360 /* test address in lower 32K */ #define TESTAD2 48128 /* test address + 64K bytes */ #define TESTNUM1 0x55 /* test number 1 */ #define TESTNUM2 0xAA /* test number 2 */ #define MAX_FONTS 20 /* max. num. of fonts in pool */ #define MAX_RASTERS 10 /* max. num. of rasters in pool */ #define MAX_RAS_ID 255 /* max raster id number */ #define NUM_CURS 6 /* number of cursors stored per block */ #define TIMEOUT_COUNT 15 /* number of numbers to wait before turning off display */ #define CURSOR_PAT 0 /* cursor pattern is fill 0 */ #define SPRITE_PAT 1 /* sprite pattern is fill 1 */ #define FILL_PAT 2 /* fill pattern is fill 2 */ #define BCKGND_PAT 3 /* background pattern is fill 3 */ #define SCR_WIDTH 512 /* screen dimensions */ #define SCR_HI32 255 #define SCR_HI128 256 #define GPU_BUSY ((*(char *)0x620001) & 1) /* gpu is busy */ #define DRDY ((*(char *)0x620001) & 2) /* data is ready */ #define VBLANK ((*(char *)0x620001) & 8) /* vert blank time */ #define OW ((*(char *)0x620001) & 128) /* out of window */ #define GPU_CMD (*(char *)0x620001) /* command address */ #define GPU_DATA (*(char *)0x620005) /* data address */ #define FF_WIDTH 82 #define FF_CELLSIZE 88 #define FF_LASTCELL 92 #define FF_CURSVAL 93 #define FF_INDEX_TBL 96 #define FF_HEADER 352 #define IMAGE_OFFSET 4 struct raster_list { /* elements of raster list */ char id; unsigned short addr; short width; short height; unsigned char * stored_addr; }; struct font_idata { /* data for getting font id */ int count; /* use count for font */ int esc_num; /* number used in escape sequence for font */ unsigned char esc_char; /* character used in escape sequence for font */ unsigned char width; /* width of character */ unsigned char height; /* height of character */ unsigned short cell_size; /* number of bytes per cell in font file */ unsigned short last_cell; /* number of cells defined - 1 */ unsigned char cursval; /* cursor value */ unsigned char curs_top; /* top of cursor */ unsigned char curs_bot; /* bottom of cursor */ long id; /* unique id associated with this font */ }; struct font_disp { long id; unsigned short addr; unsigned short size; unsigned char * offset; }; struct font_store { struct font_idata font_data; unsigned char * stored_addr; }; struct flags { unsigned sprite; /* sprite on/off */ unsigned cursor; /* cursor on/off */ unsigned zerowin; /* zero window width or height */ }; struct store_curs { /* stored cursor pattern */ char used; int offset; char pattern[PATTERNSIZE]; }; struct curs_blk { /* storage area for cursors */ struct store_curs cursors[NUM_CURS]; struct curs_blk *next; }; struct disp_data { /* display data structure */ int rule; /* current replacement rule */ int background; /* current background color */ int fast; /* >0 in fast mode- curs & sprite off */ struct flags flag; /* status flags */ unsigned short udline; /* current user defined line */ struct store_curs *curs_pat; /* pointer to cursor data */ struct curs_blk *curs_store; /* pointer to cursor storage area */ short pat_ad; /* start of pattern space */ short screen_height; /* screen height */ struct font_disp * act_font; /* active font location in display list */ unsigned char * act_font_offset; /* ptr to active font offset table */ long act_font_id; /* active font id */ char act_font_width; /* active font width */ char act_font_height; /* active font height */ struct font_disp disp_font[MAX_FONTS]; /* list of fonts in gpu memory */ struct font_store stored_font[MAX_FONTS]; /* list of font in pool */ struct raster_list * act_raster; /* location of active raster in display list */ struct raster_list disp_raster[MAX_RASTERS];/* list of rasters in gpu */ struct raster_list stored_raster[MAX_RASTERS]; /* list rasters in sys */ }; extern struct map dispram[]; extern struct disp_data dd; extern char sendbuf[]; extern char ffile_buf[]; extern char timeoutset; extern char *conf_var; extern char conf_var255[]; extern char conf_var256[]; extern char conf_crt[]; extern char *turnoff_var; extern char turnoff_var255[]; extern char *turnoff_var256; extern char turnoff_crt[]; extern struct inode * get_font();