test utilities - eatmem.c - Change size parameter from int to size_t
[dragonfly.git] / usr.bin / doscmd / vparams.h
blob43c5ac0a50f770b89d990d38fe374a1eb95a71b8
1 /*
2 * Copyright (c) 1992, 1993, 1996
3 * Berkeley Software Design, Inc. All rights reserved.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. All advertising materials mentioning features or use of this software
14 * must display the following acknowledgement:
15 * This product includes software developed by Berkeley Software
16 * Design, Inc.
18 * THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``AS IS'' AND
19 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED. IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE
22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 * SUCH DAMAGE.
30 * BSDI vparams.h,v 2.2 1996/04/08 19:33:13 bostic Exp
32 * $FreeBSD: src/usr.bin/doscmd/vparams.h,v 1.1.6.1 2002/04/25 11:04:51 tg Exp $
33 * $DragonFly: src/usr.bin/doscmd/vparams.h,v 1.2 2003/06/17 04:29:26 dillon Exp $
36 /* Collect some default parameters for the VGA emulator in this file. This is
37 supposed to be included only from 'video.c' and needs some type definitions
38 from 'video.h'. */
40 u_int8_t videoparams[][64] = {
41 /* Mode 0: Text, 40x25, CGA (200 lines) */
42 { 0x28, 0x18, 0x08, 0x00, 0x08, 0x09, 0x03, 0x00,
43 0x02, 0x63, 0x2d, 0x27, 0x28, 0x90, 0x2b, 0xa0,
44 0xbf, 0x1f, 0x00, 0xc7, 0x06, 0x07, 0x00, 0x00,
45 0x00, 0x00, 0x9c, 0x8e, 0x8f, 0x14, 0x1f, 0x96,
46 0xb9, 0xa3, 0xff, 0x00, 0x01, 0x02, 0x03, 0x04,
47 0x05, 0x14, 0x07, 0x38, 0x39, 0x3a, 0x3b, 0x3c,
48 0x3d, 0x3e, 0x3f, 0x08, 0x00, 0x0f, 0x00, 0x00,
49 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x00, 0xff
51 /* Mode 1: Text, 40x25, CGA (200 lines) */
52 { 0x28, 0x18, 0x08, 0x00, 0x08, 0x09, 0x03, 0x00,
53 0x02, 0x63, 0x2d, 0x27, 0x28, 0x90, 0x2b, 0xa0,
54 0xbf, 0x1f, 0x00, 0xc7, 0x06, 0x07, 0x00, 0x00,
55 0x00, 0x00, 0x9c, 0x8e, 0x8f, 0x14, 0x1f, 0x96,
56 0xb9, 0xa3, 0xff, 0x00, 0x01, 0x02, 0x03, 0x04,
57 0x05, 0x14, 0x07, 0x38, 0x39, 0x3a, 0x3b, 0x3c,
58 0x3d, 0x3e, 0x3f, 0x08, 0x00, 0x0f, 0x00, 0x00,
59 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x00, 0xff,
61 /* Mode 2: Text, 80x25, CGA (200 lines) */
62 { 0x50, 0x18, 0x08, 0x00, 0x10, 0x01, 0x03, 0x00,
63 0x02, 0x63, 0x5f, 0x4f, 0x50, 0x82, 0x55, 0x81,
64 0xbf, 0x1f, 0x00, 0xc7, 0x06, 0x07, 0x00, 0x00,
65 0x00, 0x00, 0x9c, 0x8e, 0x8f, 0x28, 0x1f, 0x96,
66 0xb9, 0xa3, 0xff, 0x00, 0x01, 0x02, 0x03, 0x04,
67 0x05, 0x14, 0x07, 0x38, 0x39, 0x3a, 0x3b, 0x3c,
68 0x3d, 0x3e, 0x3f, 0x08, 0x00, 0x0f, 0x00, 0x00,
69 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x00, 0xff,
71 /* Mode 3: Text, 80x25, CGA (200 lines) */
72 { 0x50, 0x18, 0x08, 0x00, 0x10, 0x01, 0x03, 0x00,
73 0x02, 0x63, 0x5f, 0x4f, 0x50, 0x82, 0x55, 0x81,
74 0xbf, 0x1f, 0x00, 0xc7, 0x06, 0x07, 0x00, 0x00,
75 0x00, 0x00, 0x9c, 0x8e, 0x8f, 0x28, 0x1f, 0x96,
76 0xb9, 0xa3, 0xff, 0x00, 0x01, 0x02, 0x03, 0x04,
77 0x05, 0x14, 0x07, 0x38, 0x39, 0x3a, 0x3b, 0x3c,
78 0x3d, 0x3e, 0x3f, 0x08, 0x00, 0x0f, 0x00, 0x00,
79 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x00, 0xff,
81 /* Mode 4: Graphics, 320x200, 4 colors */
82 { 0x28, 0x18, 0x08, 0x00, 0x40, 0x09, 0x03, 0x00,
83 0x02, 0x63, 0x2d, 0x27, 0x28, 0x90, 0x2b, 0x80,
84 0xbf, 0x1f, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x00,
85 0x00, 0x00, 0x9c, 0x8e, 0x8f, 0x14, 0x00, 0x96,
86 0xb9, 0xa2, 0xff, 0x00, 0x13, 0x15, 0x17, 0x02,
87 0x04, 0x06, 0x07, 0x10, 0x11, 0x12, 0x13, 0x14,
88 0x15, 0x16, 0x17, 0x01, 0x00, 0x03, 0x00, 0x00,
89 0x00, 0x00, 0x00, 0x00, 0x30, 0x0f, 0x00, 0xff,
91 /* Mode 5: Graphics, 320x200, 4 colors */
92 { 0x28, 0x18, 0x08, 0x00, 0x40, 0x09, 0x03, 0x00,
93 0x02, 0x63, 0x2d, 0x27, 0x28, 0x90, 0x2b, 0x80,
94 0xbf, 0x1f, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x00,
95 0x00, 0x00, 0x9c, 0x8e, 0x8f, 0x14, 0x00, 0x96,
96 0xb9, 0xa2, 0xff, 0x00, 0x13, 0x15, 0x17, 0x02,
97 0x04, 0x06, 0x07, 0x10, 0x11, 0x12, 0x13, 0x14,
98 0x15, 0x16, 0x17, 0x01, 0x00, 0x03, 0x00, 0x00,
99 0x00, 0x00, 0x00, 0x00, 0x30, 0x0f, 0x00, 0xff,
101 /* Mode 6: Graphics, 640x200, 2 colors */
102 { 0x50, 0x18, 0x08, 0x00, 0x40, 0x01, 0x01, 0x00,
103 0x06, 0x63, 0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80,
104 0xbf, 0x1f, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x00,
105 0x00, 0x00, 0x9c, 0x8e, 0x8f, 0x28, 0x00, 0x96,
106 0xb9, 0xc2, 0xff, 0x00, 0x17, 0x17, 0x17, 0x17,
107 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17,
108 0x17, 0x17, 0x17, 0x01, 0x00, 0x01, 0x00, 0x00,
109 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0xff,
111 /* Mode 7: Text, 80x25, mono, MDA (350 lines) */
112 { 0x50, 0x18, 0x0e, 0x00, 0x10, 0x00, 0x03, 0x00,
113 0x03, 0xa6, 0x5f, 0x4f, 0x50, 0x82, 0x55, 0x81,
114 0xbf, 0x1f, 0x00, 0x4d, 0x0b, 0x0c, 0x00, 0x00,
115 0x00, 0x00, 0x83, 0x85, 0x5d, 0x28, 0x0d, 0x63,
116 0xba, 0xa3, 0xff, 0x00, 0x08, 0x08, 0x08, 0x08,
117 0x08, 0x08, 0x08, 0x10, 0x18, 0x18, 0x18, 0x18,
118 0x18, 0x18, 0x18, 0x0e, 0x00, 0x0f, 0x08, 0x00,
119 0x00, 0x00, 0x00, 0x00, 0x10, 0x0a, 0x00, 0xff,
121 /* Mode 8: reserved */
122 { 0x50, 0x18, 0x10, 0x00, 0x10, 0x01, 0x03, 0x00,
123 0x02, 0x62, 0x5f, 0x4f, 0x50, 0x82, 0x55, 0x81,
124 0xbf, 0x1f, 0x00, 0x4f, 0x0d, 0x0e, 0x00, 0x00,
125 0x00, 0x00, 0x9c, 0x8e, 0x8f, 0x28, 0x0f, 0x96,
126 0xb9, 0xa3, 0xff, 0x00, 0x08, 0x08, 0x08, 0x08,
127 0x08, 0x08, 0x08, 0x10, 0x18, 0x18, 0x18, 0x18,
128 0x18, 0x18, 0x18, 0x0a, 0x00, 0x0f, 0x00, 0x00,
129 0x00, 0x00, 0x00, 0x00, 0x10, 0x0a, 0x00, 0xff,
131 /* Mode 9: reserved */
132 { 0x28, 0x18, 0x10, 0x00, 0x08, 0x09, 0x03, 0x00,
133 0x02, 0x63, 0x2d, 0x27, 0x28, 0x90, 0x2b, 0xa0,
134 0xbf, 0x1f, 0x00, 0x4f, 0x0d, 0x0e, 0x00, 0x00,
135 0x00, 0x00, 0x9c, 0x8e, 0x8f, 0x14, 0x1f, 0x96,
136 0xb9, 0xa3, 0xff, 0x00, 0x01, 0x02, 0x03, 0x04,
137 0x05, 0x14, 0x07, 0x38, 0x39, 0x3a, 0x3b, 0x3c,
138 0x3d, 0x3e, 0x3f, 0x08, 0x00, 0x0f, 0x00, 0x00,
139 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x00, 0xff,
141 /* Mode a: reserved */
142 { 0x50, 0x18, 0x10, 0x00, 0x10, 0x01, 0x03, 0x00,
143 0x02, 0x63, 0x60, 0x4f, 0x50, 0x82, 0x56, 0x82,
144 0xbf, 0x1f, 0x00, 0x4f, 0x0d, 0x0e, 0x00, 0x00,
145 0x00, 0x00, 0x9c, 0x8e, 0x8f, 0x28, 0x1f, 0x96,
146 0xb9, 0xa3, 0xff, 0x00, 0x01, 0x02, 0x03, 0x04,
147 0x05, 0x14, 0x07, 0x38, 0x39, 0x3a, 0x3b, 0x3c,
148 0x3d, 0x3e, 0x3f, 0x08, 0x00, 0x0f, 0x00, 0x00,
149 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x00, 0xff,
151 /* Mode b: reserved */
152 { 0x50, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0f, 0x00,
153 0x06, 0x62, 0x5f, 0x4f, 0x50, 0x82, 0x55, 0x81,
154 0xbf, 0x1f, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
155 0x00, 0x00, 0x9c, 0x8e, 0x8f, 0x28, 0x1f, 0x96,
156 0xb9, 0xe3, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
157 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
158 0x00, 0x00, 0x3f, 0x01, 0x00, 0x0f, 0x00, 0x00,
159 0x00, 0x0f, 0x00, 0x00, 0x08, 0x05, 0x0f, 0xff,
161 /* Mode c: reserved */
162 { 0x50, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0f, 0x00,
163 0x06, 0x63, 0x5f, 0x4f, 0x50, 0x82, 0x55, 0x81,
164 0xbf, 0x1f, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
165 0x00, 0x00, 0x9c, 0x8e, 0x8f, 0x28, 0x1f, 0x96,
166 0xb9, 0xe3, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
167 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
168 0x00, 0x00, 0x3f, 0x01, 0x00, 0x0f, 0x00, 0x00,
169 0x00, 0x0f, 0x00, 0x00, 0x08, 0x05, 0x0f, 0xff,
171 /* Mode d: Graphics, 320x200, 16 colors */
172 { 0x28, 0x18, 0x08, 0x00, 0x20, 0x09, 0x0f, 0x00,
173 0x06, 0x63, 0x2d, 0x27, 0x28, 0x90, 0x2b, 0x80,
174 0xbf, 0x1f, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00,
175 0x00, 0x00, 0x9c, 0x8e, 0x8f, 0x14, 0x00, 0x96,
176 0xb9, 0xe3, 0xff, 0x00, 0x01, 0x02, 0x03, 0x04,
177 0x05, 0x06, 0x07, 0x10, 0x11, 0x12, 0x13, 0x14,
178 0x15, 0x16, 0x17, 0x01, 0x00, 0x0f, 0x00, 0x00,
179 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff,
181 /* Mode e: Graphics, 640x200, 16 colors */
182 { 0x50, 0x18, 0x08, 0x00, 0x40, 0x01, 0x0f, 0x00,
183 0x06, 0x63, 0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80,
184 0xbf, 0x1f, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00,
185 0x00, 0x00, 0x9c, 0x8e, 0x8f, 0x28, 0x00, 0x96,
186 0xb9, 0xe3, 0xff, 0x00, 0x01, 0x02, 0x03, 0x04,
187 0x05, 0x06, 0x07, 0x10, 0x11, 0x12, 0x13, 0x14,
188 0x15, 0x16, 0x17, 0x01, 0x00, 0x0f, 0x00, 0x00,
189 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff,
191 /* Mode f: Graphics, 640x350, mono (EGA with 64K) */
192 { 0x50, 0x18, 0x0e, 0x00, 0x80, 0x01, 0x0f, 0x00,
193 0x06, 0xa2, 0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80,
194 0xbf, 0x1f, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
195 0x00, 0x00, 0x83, 0x85, 0x5d, 0x28, 0x0f, 0x63,
196 0xba, 0xe3, 0xff, 0x00, 0x08, 0x00, 0x00, 0x18,
197 0x18, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
198 0x18, 0x00, 0x00, 0x0b, 0x00, 0x05, 0x00, 0x00,
199 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x05, 0xff,
201 /* Mode 10: Graphics, 640x350, 4 colors (EGA with 64K) */
202 { 0x50, 0x18, 0x0e, 0x00, 0x80, 0x01, 0x0f, 0x00,
203 0x06, 0xa3, 0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80,
204 0xbf, 0x1f, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
205 0x00, 0x00, 0x83, 0x85, 0x5d, 0x28, 0x0f, 0x63,
206 0xba, 0xe3, 0xff, 0x00, 0x01, 0x02, 0x03, 0x04,
207 0x05, 0x14, 0x07, 0x38, 0x39, 0x3a, 0x3b, 0x3c,
208 0x3d, 0x3e, 0x3f, 0x01, 0x00, 0x0f, 0x00, 0x00,
209 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff,
211 /* Mode f: Graphics, 640x350, mono (EGA with >64K) */
212 { 0x50, 0x18, 0x0e, 0x00, 0x80, 0x01, 0x0f, 0x00,
213 0x06, 0xa2, 0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80,
214 0xbf, 0x1f, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
215 0x00, 0x00, 0x83, 0x85, 0x5d, 0x28, 0x0f, 0x63,
216 0xba, 0xe3, 0xff, 0x00, 0x08, 0x00, 0x00, 0x18,
217 0x18, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
218 0x18, 0x00, 0x00, 0x0b, 0x00, 0x05, 0x00, 0x00,
219 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x05, 0xff,
221 /* Mode 10: Graphics, 640x350, 16 colors (EGA with >64K) */
222 { 0x50, 0x18, 0x0e, 0x00, 0x80, 0x01, 0x0f, 0x00,
223 0x06, 0xa3, 0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80,
224 0xbf, 0x1f, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
225 0x00, 0x00, 0x83, 0x85, 0x5d, 0x28, 0x0f, 0x63,
226 0xba, 0xe3, 0xff, 0x00, 0x01, 0x02, 0x03, 0x04,
227 0x05, 0x14, 0x07, 0x38, 0x39, 0x3a, 0x3b, 0x3c,
228 0x3d, 0x3e, 0x3f, 0x01, 0x00, 0x0f, 0x00, 0x00,
229 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff,
231 /* Mode 0: Text, 40x25, EGA (350 lines) */
232 { 0x28, 0x18, 0x0e, 0x00, 0x08, 0x09, 0x03, 0x00,
233 0x02, 0xa3, 0x2d, 0x27, 0x28, 0x90, 0x2b, 0xa0,
234 0xbf, 0x1f, 0x00, 0x4d, 0x0b, 0x0c, 0x00, 0x00,
235 0x00, 0x00, 0x83, 0x85, 0x5d, 0x14, 0x1f, 0x63,
236 0xba, 0xa3, 0xff, 0x00, 0x01, 0x02, 0x03, 0x04,
237 0x05, 0x14, 0x07, 0x38, 0x39, 0x3a, 0x3b, 0x3c,
238 0x3d, 0x3e, 0x3f, 0x08, 0x00, 0x0f, 0x00, 0x00,
239 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x00, 0xff,
241 /* Mode 1: Text, 40x25, EGA (350 lines) */
242 { 0x28, 0x18, 0x0e, 0x00, 0x08, 0x09, 0x03, 0x00,
243 0x02, 0xa3, 0x2d, 0x27, 0x28, 0x90, 0x2b, 0xa0,
244 0xbf, 0x1f, 0x00, 0x4d, 0x0b, 0x0c, 0x00, 0x00,
245 0x00, 0x00, 0x83, 0x85, 0x5d, 0x14, 0x1f, 0x63,
246 0xba, 0xa3, 0xff, 0x00, 0x01, 0x02, 0x03, 0x04,
247 0x05, 0x14, 0x07, 0x38, 0x39, 0x3a, 0x3b, 0x3c,
248 0x3d, 0x3e, 0x3f, 0x08, 0x00, 0x0f, 0x00, 0x00,
249 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x00, 0xff,
251 /* Mode 2: Text, 80x25, EGA (350 lines) */
252 { 0x50, 0x18, 0x0e, 0x00, 0x10, 0x01, 0x03, 0x00,
253 0x02, 0xa3, 0x5f, 0x4f, 0x50, 0x82, 0x55, 0x81,
254 0xbf, 0x1f, 0x00, 0x4d, 0x0b, 0x0c, 0x00, 0x00,
255 0x00, 0x00, 0x83, 0x85, 0x5d, 0x28, 0x1f, 0x63,
256 0xba, 0xa3, 0xff, 0x00, 0x01, 0x02, 0x03, 0x04,
257 0x05, 0x14, 0x07, 0x38, 0x39, 0x3a, 0x3b, 0x3c,
258 0x3d, 0x3e, 0x3f, 0x08, 0x00, 0x0f, 0x00, 0x00,
259 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x00, 0xff,
261 /* Mode 3: Text, 80x25, EGA (350 lines) */
262 { 0x50, 0x18, 0x0e, 0x00, 0x10, 0x01, 0x03, 0x00,
263 0x02, 0xa3, 0x5f, 0x4f, 0x50, 0x82, 0x55, 0x81,
264 0xbf, 0x1f, 0x00, 0x4d, 0x0b, 0x0c, 0x00, 0x00,
265 0x00, 0x00, 0x83, 0x85, 0x5d, 0x28, 0x1f, 0x63,
266 0xba, 0xa3, 0xff, 0x00, 0x01, 0x02, 0x03, 0x04,
267 0x05, 0x14, 0x07, 0x38, 0x39, 0x3a, 0x3b, 0x3c,
268 0x3d, 0x3e, 0x3f, 0x08, 0x00, 0x0f, 0x00, 0x00,
269 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x00, 0xff,
271 /* Modes 0, 1: Text, 40x25, VGA (400 lines) */
272 { 0x28, 0x18, 0x10, 0x00, 0x08, 0x08, 0x03, 0x00,
273 0x02, 0x67, 0x2d, 0x27, 0x28, 0x90, 0x2b, 0xa0,
274 0xbf, 0x1f, 0x00, 0x4f, 0x0d, 0x0e, 0x00, 0x00,
275 0x00, 0x00, 0x9c, 0x8e, 0x8f, 0x14, 0x1f, 0x96,
276 0xb9, 0xa3, 0xff, 0x00, 0x01, 0x02, 0x03, 0x04,
277 0x05, 0x14, 0x07, 0x38, 0x39, 0x3a, 0x3b, 0x3c,
278 0x3d, 0x3e, 0x3f, 0x0c, 0x00, 0x0f, 0x08, 0x00,
279 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x00, 0xff,
281 /* Modes 2, 3: Text, 80x25, VGA (400 lines) */
282 { 0x50, 0x18, 0x10, 0x00, 0x10, 0x00, 0x03, 0x00,
283 0x02, 0x67, 0x5f, 0x4f, 0x50, 0x82, 0x55, 0x81,
284 0xbf, 0x1f, 0x00, 0x4f, 0x0d, 0x0e, 0x00, 0x00,
285 0x00, 0x00, 0x9c, 0x8e, 0x8f, 0x28, 0x1f, 0x96,
286 0xb9, 0xa3, 0xff, 0x00, 0x01, 0x02, 0x03, 0x04,
287 0x05, 0x14, 0x07, 0x38, 0x39, 0x3a, 0x3b, 0x3c,
288 0x3d, 0x3e, 0x3f, 0x0c, 0x00, 0x0f, 0x08, 0x00,
289 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x00, 0xff,
291 /* Mode 7: Text, 80x25, mono, VGA (400 lines) */
292 { 0x50, 0x18, 0x10, 0x00, 0x10, 0x00, 0x03, 0x00,
293 0x02, 0x66, 0x5f, 0x4f, 0x50, 0x82, 0x55, 0x81,
294 0xbf, 0x1f, 0x00, 0x4f, 0x0d, 0x0e, 0x00, 0x00,
295 0x00, 0x00, 0x9c, 0x8e, 0x8f, 0x28, 0x0f, 0x96,
296 0xb9, 0xa3, 0xff, 0x00, 0x08, 0x08, 0x08, 0x08,
297 0x08, 0x08, 0x08, 0x10, 0x18, 0x18, 0x18, 0x18,
298 0x18, 0x18, 0x18, 0x0e, 0x00, 0x0f, 0x08, 0x00,
299 0x00, 0x00, 0x00, 0x00, 0x10, 0x0a, 0x00, 0xff,
301 /* Mode 11: Graphics, 640x480, 2 colors */
302 { 0x50, 0x1d, 0x10, 0x00, 0xa0, 0x01, 0x0f, 0x00,
303 0x06, 0xe3, 0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80,
304 0x0b, 0x3e, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
305 0x00, 0x00, 0xea, 0x8c, 0xdf, 0x28, 0x00, 0xe7,
306 0x04, 0xc3, 0xff, 0x00, 0x3f, 0x3f, 0x3f, 0x3f,
307 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
308 0x3f, 0x3f, 0x3f, 0x01, 0x00, 0x0f, 0x00, 0x00,
309 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x01, 0xff,
311 /* Mode 12: Graphics, 640x480, 16 colors */
312 { 0x50, 0x1d, 0x10, 0x00, 0xa0, 0x01, 0x0f, 0x00,
313 0x06, 0xe3, 0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80,
314 0x0b, 0x3e, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
315 0x00, 0x00, 0xea, 0x8c, 0xdf, 0x28, 0x00, 0xe7,
316 0x04, 0xe3, 0xff, 0x00, 0x01, 0x02, 0x03, 0x04,
317 0x05, 0x14, 0x07, 0x38, 0x39, 0x3a, 0x3b, 0x3c,
318 0x3d, 0x3e, 0x3f, 0x01, 0x00, 0x0f, 0x00, 0x00,
319 0x80, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff,
321 /* Mode 13: Graphics, 320x200, 256 colors */
322 { 0x28, 0x18, 0x08, 0x00, 0x20, 0x01, 0x0f, 0x00,
323 0x0e, 0x63, 0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80,
324 0xbf, 0x1f, 0x00, 0x41, 0x00, 0x00, 0x00, 0x00,
325 0x00, 0x00, 0x9c, 0x8e, 0x8f, 0x28, 0x40, 0x96,
326 0xb9, 0xa3, 0xff, 0x00, 0x01, 0x02, 0x03, 0x04,
327 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c,
328 0x0d, 0x0e, 0x0f, 0x41, 0x00, 0x0f, 0x00, 0x00,
329 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0x0f, 0xff,
331 { 0x50, 0x1d, 0x10, 0x00, 0x20, 0x01, 0x03, 0x00,
332 0x02, 0xe3, 0x5f, 0x4f, 0x50, 0x82, 0x57, 0x82,
333 0x08, 0x3e, 0x00, 0x4f, 0x0d, 0x0e, 0x00, 0x00,
334 0x00, 0x00, 0xea, 0x8f, 0xdf, 0x28, 0x00, 0xe7,
335 0x04, 0xa3, 0xff, 0x00, 0x01, 0x02, 0x03, 0x04,
336 0x05, 0x14, 0x07, 0x38, 0x39, 0x3a, 0x3b, 0x3c,
337 0x3d, 0x3e, 0x3f, 0x08, 0x00, 0x0f, 0x00, 0x00,
338 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x00, 0xff,
340 { 0x84, 0x18, 0x10, 0x00, 0x20, 0x01, 0x03, 0x00,
341 0x42, 0x62, 0x9b, 0x83, 0x86, 0x9e, 0x8a, 0x1b,
342 0xbf, 0x1f, 0x00, 0x4f, 0x0d, 0x0e, 0x00, 0x00,
343 0x00, 0x00, 0x9c, 0x8e, 0x8f, 0x42, 0x0f, 0x96,
344 0xb9, 0xa3, 0xff, 0x00, 0x08, 0x08, 0x08, 0x08,
345 0x08, 0x08, 0x08, 0x10, 0x18, 0x18, 0x18, 0x18,
346 0x18, 0x18, 0x18, 0x0a, 0x00, 0x0f, 0x00, 0x00,
347 0x00, 0x00, 0x00, 0x00, 0x10, 0x0a, 0x00, 0xff,
349 { 0x84, 0x18, 0x10, 0x00, 0x20, 0x01, 0x03, 0x00,
350 0x42, 0x63, 0x9b, 0x83, 0x86, 0x9e, 0x8a, 0x1b,
351 0xbf, 0x1f, 0x00, 0x4f, 0x0d, 0x0e, 0x00, 0x00,
352 0x00, 0x00, 0x9c, 0x8e, 0x8f, 0x42, 0x0f, 0x96,
353 0xb9, 0xa3, 0xff, 0x00, 0x01, 0x02, 0x03, 0x04,
354 0x05, 0x14, 0x07, 0x38, 0x39, 0x3a, 0x3b, 0x3c,
355 0x3d, 0x3e, 0x3f, 0x08, 0x00, 0x0f, 0x00, 0x00,
356 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x00, 0xff,
360 /* The default DAC table for the EGA and VGA 16 color modes. This table is
361 installed on startup. The values are taken from the output of 'scon -p
362 list'. */
363 struct dac_colors dac_default64[] = {
364 {0, 0, 0}, {0, 0, 42}, {0, 42, 0}, {0, 42, 42},
365 {42, 0, 0}, {42, 0, 42}, {42, 42, 0}, {42, 42, 42},
366 {0, 0, 21}, {0, 0, 63}, {0, 42, 21}, {0, 42, 63},
367 {42, 0, 21}, {42, 0, 63}, {42, 42, 21}, {42, 42, 63},
368 {0, 21, 0}, {0, 21, 42}, {0, 63, 0}, {0, 63, 42},
369 {42, 21, 0}, {42, 21, 42}, {42, 63, 0}, {42, 63, 42},
370 {0, 21, 21}, {0, 21, 63}, {0, 63, 21}, {0, 63, 63},
371 {42, 21, 21}, {42, 21, 63}, {42, 63, 21}, {42, 63, 63},
372 {21, 0, 0}, {21, 0, 42}, {21, 42, 0}, {21, 42, 42},
373 {63, 0, 0}, {63, 0, 42}, {63, 42, 0}, {63, 42, 42},
374 {21, 0, 21}, {21, 0, 63}, {21, 42, 21}, {21, 42, 63},
375 {63, 0, 21}, {63, 0, 63}, {63, 42, 21}, {63, 42, 63},
376 {21, 21, 0}, {21, 21, 42}, {21, 63, 0}, {21, 63, 42},
377 {63, 21, 0}, {63, 21, 42}, {63, 63, 0}, {63, 63, 42},
378 {21, 21, 21}, {21, 21, 63}, {21, 63, 21}, {21, 63, 63},
379 {63, 21, 21}, {63, 21, 63}, {63, 63, 21}, {63, 63, 63}
382 /* The default DAC table for the 256 color mode. The values are taken from the
383 output of 'vdacc.exe', from Michael Tischler's book ``PC intern 4''. */
384 struct dac_colors dac_default256[] = {
385 /* 16 CGA colors */
386 {0, 0, 0}, {0, 0, 42}, {0, 42, 0}, {0, 42, 42},
387 {42, 0, 0}, {42, 0, 42}, {42, 21, 0}, {42, 42, 42},
388 {21, 21, 21}, {21, 21, 63}, {21, 63, 21}, {21, 63, 63},
389 {63, 21, 21}, {63, 21, 63}, {63, 63, 21}, {63, 63, 63},
390 /* grayscale */
391 {0, 0, 0}, {5, 5, 5}, {8, 8, 8}, {11, 11, 11},
392 {14, 14, 14}, {17, 17, 17}, {20, 20, 20}, {24, 24, 24},
393 {28, 28, 28}, {32, 32, 32}, {36, 36, 36}, {40, 40, 40},
394 {45, 45, 45}, {50, 50, 50}, {56, 56, 56}, {63, 63, 63},
395 /* high intensity, high saturation */
396 {0, 0, 63}, {16, 0, 63}, {31, 0, 63}, {47, 0, 63},
397 {63, 0, 63}, {63, 0, 47}, {63, 0, 31}, {63, 0, 16},
398 {63, 63, 0}, {63, 16, 0}, {63, 31, 0}, {63, 47, 0},
399 {63, 63, 0}, {47, 63, 0}, {31, 63, 0}, {16, 63, 0},
400 {0, 63, 0}, {0, 63, 16}, {0, 63, 31}, {0, 63, 47},
401 {0, 63, 63}, {0, 47, 63}, {0, 31, 63}, {0, 16, 63},
402 /* high intensity, medium saturation */
403 {31, 31, 63}, {39, 31, 63}, {47, 31, 63}, {55, 31, 63},
404 {63, 31, 63}, {63, 31, 55}, {63, 31, 47}, {63, 31, 39},
405 {63, 31, 31}, {63, 39, 31}, {63, 47, 31}, {63, 55, 31},
406 {63, 63, 31}, {55, 63, 31}, {47, 63, 31}, {39, 63, 31},
407 {31, 63, 31}, {31, 63, 39}, {31, 63, 47}, {31, 63, 55},
408 {31, 63, 63}, {31, 55, 63}, {31, 47, 63}, {31, 39, 63},
409 /* high intensity, low saturation */
410 {45, 45, 63}, {49, 45, 63}, {54, 45, 63}, {58, 45, 63},
411 {63, 45, 63}, {63, 45, 58}, {63, 45, 54}, {63, 45, 49},
412 {63, 45, 45}, {63, 49, 45}, {63, 54, 45}, {63, 58, 45},
413 {63, 63, 45}, {58, 63, 45}, {54, 63, 45}, {49, 63, 45},
414 {45, 63, 45}, {45, 63, 49}, {45, 63, 54}, {45, 63, 58},
415 {45, 63, 63}, {45, 58, 63}, {45, 54, 63}, {45, 49, 63},
416 /* medium intensity, high saturation */
417 {0, 0, 28}, {7, 0, 28}, {14, 0, 28}, {21, 0, 28},
418 {28, 0, 28}, {28, 0, 21}, {28, 0, 14}, {28, 0, 7},
419 {28, 0, 0}, {28, 7, 0}, {28, 14, 0}, {28, 21, 0},
420 {28, 28, 0}, {21, 28, 0}, {14, 28, 0}, {7, 28, 0},
421 {0, 28, 0}, {0, 28, 7}, {0, 28, 14}, {0, 28, 21},
422 {0, 28, 28}, {0, 21, 28}, {0, 14, 28}, {0, 7, 28},
423 /* medium intensity, medium saturation */
424 {14, 14, 28}, {17, 14, 28}, {21, 14, 28}, {24, 14, 28},
425 {28, 14, 28}, {28, 14, 24}, {28, 14, 21}, {28, 14, 17},
426 {28, 14, 14}, {28, 17, 14}, {28, 21, 14}, {28, 24, 14},
427 {28, 28, 14}, {24, 28, 14}, {21, 28, 14}, {17, 28, 14},
428 {14, 28, 14}, {14, 28, 17}, {14, 28, 21}, {14, 28, 24},
429 {14, 28, 28}, {14, 24, 28}, {14, 21, 28}, {14, 17, 28},
430 /* medium intensity, low saturation */
431 {20, 20, 28}, {22, 20, 28}, {24, 20, 28}, {26, 20, 28},
432 {28, 20, 28}, {28, 20, 26}, {28, 20, 24}, {28, 20, 22},
433 {28, 20, 20}, {28, 22, 20}, {28, 24, 20}, {28, 26, 20},
434 {28, 28, 20}, {26, 28, 20}, {24, 28, 20}, {22, 28, 20},
435 {20, 28, 20}, {20, 28, 22}, {20, 28, 24}, {20, 28, 26},
436 {20, 28, 28}, {20, 26, 28}, {20, 24, 28}, {20, 22, 28},
437 /* low intensity, high saturation */
438 {0, 0, 16}, {4, 0, 16}, {8, 0, 16}, {12, 0, 16},
439 {16, 0, 16}, {16, 0, 12}, {16, 0, 8}, {16, 0, 4},
440 {16, 0, 0}, {16, 4, 0}, {16, 8, 0}, {16, 12, 0},
441 {16, 16, 0}, {12, 16, 0}, {8, 16, 0}, {4, 16, 0},
442 {0, 16, 0}, {0, 16, 4}, {0, 16, 8}, {0, 16, 12},
443 {0, 16, 16}, {0, 12, 16}, {0, 8, 16}, {0, 4, 16},
444 /* low intensity, medium saturation */
445 {8, 8, 16}, {10, 8, 16}, {12, 8, 16}, {14, 8, 16},
446 {16, 8, 16}, {16, 8, 14}, {16, 8, 12}, {16, 8, 10},
447 {16, 8, 8}, {16, 10, 8}, {16, 12, 8}, {16, 14, 8},
448 {16, 16, 8}, {14, 16, 8}, {12, 16, 8}, {10, 16, 8},
449 {8, 16, 8}, {8, 16, 10}, {8, 16, 12}, {8, 16, 14},
450 {8, 16, 16}, {8, 14, 16}, {8, 12, 16}, {8, 10, 16},
451 /* low intensity, low saturation */
452 {11, 11, 16}, {12, 11, 16}, {13, 11, 16}, {15, 11, 16},
453 {16, 11, 16}, {16, 11, 15}, {16, 11, 13}, {16, 11, 12},
454 {16, 11, 11}, {16, 12, 11}, {16, 13, 11}, {16, 15, 11},
455 {16, 16, 11}, {15, 16, 11}, {13, 16, 11}, {12, 16, 11},
456 {11, 16, 11}, {11, 16, 12}, {11, 16, 13}, {11, 16, 15},
457 {11, 16, 16}, {11, 15, 16}, {11, 13, 16}, {11, 12, 16},
458 /* black */
459 {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
460 {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}
463 /* The Static Functionality Table, a collection of mode-independent status
464 info. */
465 u_int8_t static_functionality_table[] = {
466 0x0c, /* Video modes 0 - 7 */
467 0, /* Video modes 8 - 15 */
468 0, /* Video modes 16 - 23 */
469 0, 0, 0, 0, /* reserved */
470 4, /* 400 lines */
471 1, /* Charset memory blocks available */
472 1, /* Charset memory blocks in use */
473 0x79, /* Bit 0: all modes on all displays
474 1: grayscale equivalents
475 2: user-definable charsets
476 3: user-definable palette
477 4: CGA cursor emulation
478 5: EGA palette
479 6: VGA color registers
480 7: color pages */
481 0x8, /* Bit 0: lightpen interface
482 1: save/load video status
483 2: toggle intensity/blink
484 3: DCC
485 4-7: reserved */
486 0, /* reserved */
487 0, /* Save Pointer functions available
488 Bit 0: 2 charsets
489 1: Palette Save Area
490 2: user-defined charset (text)
491 3: user-defined charset (graphics)
492 4: user-defined palette
493 5: DCC
494 6, 7: reserved */
495 0 /* reserved */