|
|
1.1 root 1: /* (-lgl
2: * COHERENT 386 Device Driver Kit release 2.0
3: * Copyright (c) 1982, 1992 by Mark Williams Company.
4: * All rights reserved. May not be copied without permission.
5: -lgl) */
6: #ifndef __SYS_VT_H__
7: #define __SYS_VT_H__
8:
9: /*
10: * Type definitions
11: */
12:
13: /*
14: * Virtual terminal structure VTDATA
15: */
16: #ifdef _I386
17: typedef struct {
18: unsigned int off;
19: unsigned /*short*/ seg;
20: } faddr_t;
21: #endif
22:
23: typedef struct _VTDATA {
24: /*
25: * Elements dealing with the graphic adaptor
26: * - equivalent to the assembler definitions above.
27: */
28: void (*vmm_func)();
29: unsigned vmm_port, vmm_seg, vmm_off;
30: unsigned vmm_rowl, vmm_col, vmm_pos, vmm_attr;
31: unsigned vmm_n1, vmm_n2, vmm_brow;
32: unsigned vmm_erow, vmm_lrow, vmm_srow;
33: unsigned vmm_scol, vmm_ibrow, vmm_ierow;
34: unsigned vmm_invis;
35: unsigned vmm_slow, vmm_wrap, vmm_visible, vmm_esc;
36: unsigned vmm_mseg, vmm_moff, vmm_vseg, vmm_voff;
37:
38: /*
39: * Elements dealing with both the graphic adaptor & keyboard
40: * - equivalent to the assembler definitions above.
41: */
42: dev_t vt_ind;
43: #ifdef _I386
44: KBTBL vt_kb[MAX_KEYS];
45: char *vt_buffer;
46: #else
47: SEG *vt_buffer;
48: #endif
49: /*
50: * Elements dealing with the keyboard
51: *
52: * The keyboard mapping table is too large to fit into kernel data space,
53: * so we need to allocate a segment to it.
54: * The function keys tend to be small and tend to change substantially
55: * more often than the mapping table, so we keep them in the kernel data space.
56: */
57: int vnkb_lastc; /* state info */
58: unsigned vnkb_shift; /* Overall shift state */
59: unsigned char **vnkb_funkeyp; /* Pointer to array of func. key ptrs */
60: FNKEY *vnkb_fnkeys; /* Pointer to structure of values */
61: unsigned vnkb_fklength; /* length of k_fnval field in fnkeys */
62: unsigned vnkb_sh_index; /* shift/lock state index */
63: char vnkb_fk_loaded; /* true == function keys resident */
64: } VTDATA;
65:
66: typedef struct _HWentry {
67: unsigned char count, found;
68: short port;
69: faddr_t vidmemory;
70: struct {
71: unsigned char row;
72: unsigned char col;
73: #define TEXTBLOCK 4000 /* 25 x 80 x 2 */
74: } screen;
75: short start;
76: } HWentry;
77:
78: #ifndef KB_MAJOR
79: #include <sys/devices.h> /* KB_MAJOR defined in here */
80: #endif
81:
82: #ifndef VT_MAJOR
83: #define VT_MAJOR KB_MAJOR
84: #endif
85:
86: #define VT_PHYSICAL 0x40
87: #define VT_HW 0x30
88: #define VT_HW_COLOR 0x00
89: #define VT_HW_MONO 0x10
90:
91: #define VT_INDEX(dev) (dev&0x3F)
92:
93: #define NO_DEVICE 0xFF /* to signify that the minor does not exist */
94:
95: #define PRINTV if(vt_verbose)printf
96: #define PUTC if(vt_verbose)putc
97:
98: /*
99: * patchable params for non-standard keyboards
100: */
101: extern int KBDATA; /* Keyboard data */
102: extern int KBCTRL; /* Keyboard control */
103: extern int KBSTS_CMD; /* Keyboard status/command */
104: extern int KBFLAG; /* Keyboard reset flag */
105: extern int KBBOOT; /* 0: disallow reboot from keyboard */
106: extern int KBTIMEOUT; /* shouldn't need this much */
107: extern int KBCMDBYTE; /* no translation */
108:
109: /*
110: * globals
111: */
112: extern int vtmax, vtcount, vtactive;
113: extern int vt_verbose, vt_opened, vtloaded;
114: extern VTDATA *vtconsole, **vtdata;
115: extern char kb_table_loaded;
116: extern HWentry *vtHWtable[];
117:
118: #endif /* VT_H */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.