Remove NOSECURE which no longer serves a purpose. Note: FreeBSD also removed
[dragonfly.git] / share / man / man4 / pcvt.4
1 .\"
2 .\"  Copyright (c) 1992, 2000 Hellmuth Michaelis, Brian Dunford-Shore,
3 .\"                           Joerg Wunsch and Holger Veit.
4 .\"
5 .\"  All rights reserved.
6 .\"
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
9 .\" are met:
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\"    notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\"    notice, this list of conditions and the following disclaimer in the
14 .\"    documentation and/or other materials provided with the distribution.
15 .\" 3. All advertising materials mentioning features or use of this software
16 .\"    must display the following acknowledgement:
17 .\"     This product includes software developed by Hellmuth Michaelis,
18 .\"     Brian Dunford-Shore, Joerg Wunsch and Holger Veit.
19 .\" 4. The name authors may not be used to endorse or promote products
20 .\"    derived from this software without specific prior written permission.
21 .\"
22 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
23 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
24 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25 .\" IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
27 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
31 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 .\"
33 .\" Last Edit-Date: [Sun Jan  9 09:43:04 2000]
34 .\"
35 .\" $FreeBSD: src/share/man/man4/pcvt.4,v 1.22.2.5 2002/03/19 18:24:07 schweikh Exp $
36 .\" $DragonFly: src/share/man/man4/Attic/pcvt.4,v 1.2 2003/06/17 04:36:59 dillon Exp $
37 .\"
38 .\" Man page pcvt(4) created after pcvt_ioctl.h on 13-Jan-93
39 .\" by Joerg Wunsch
40 .\"
41 .Dd January 9, 2000
42 .Dt PCVT 4
43 .Os FreeBSD
44 .Sh NAME
45 .Nm pcvt ,
46 .Nm vt
47 .Nd PC console virtual screen system
48 .Sh SYNOPSIS
49 .Cd "options ""PCVT_FREEBSD=version" | "PCVT_NETBSD=version"""
50 .Cd "options ""PCVT_NSCREENS=number"""
51 .Cd "options PCVT_XXXX" No ( see Sx Configuration No below )
52 .Pp
53 .Cd "device vt0 at isa?"
54 .Sh DESCRIPTION
55 .Ss Overview
56 The
57 .Nm
58 driver provides a virtual screen system with several additional
59 features not available in historic console drivers.
60 Besides the ability of handling
61 multiple virtual screens,
62 the probably most important is an emulation of a wide range
63 of DEC
64 .Tn VT-220
65 functionality.
66 See
67 .Sx Features
68 for a detailed description.
69 .Pp
70 The
71 .Nm
72 driver requires the keyboard driver
73 .Nm atkbd
74 to be also configured in the kernel.
75 .Ss Features
76 .Bl -bullet -compact
77 .It
78 Almost full DEC
79 .Tn VT220
80 functionality
81 .Po
82 moving towards
83 .Tn VT320
84 .Pc
85 .It
86 Completely independent virtual terminals for MDA/HGC/CGA/EGA and VGA
87 .It
88 25, 28, 35, 40, 43 or 50x80 screen resolution for each virtual screen
89 .It
90 Fully remappable keyboard to support national keyboards
91 .It
92 All VT220 character sets plus ISO Latin-1 and DEC technical supported
93 .It
94 VT220 downloadable character set supported when run on EGA/VGA
95 .It
96 VT220 user defined keys for each virtual terminal
97 .It
98 Optional function key label support
99 \('a la Hewlett-Packard
100 .It
101 Display function codes functionality
102 .It
103 Support for MDA, CGA, EGA and VGA display adaptors
104 .It
105 Support for 132 column operation on VGA chipsets
106 .It
107 X Window Support for XFree86 >= 1.2 using the pccons model, or
108 for XFree86 >= 2.0 using the syscons model
109 .Po
110 requires
111 .Em PCVT_USL_VT_COMPAT
112 to be configured
113 .Pc
114 .El
115 .Pp
116 What it cannot:
117 .Pp
118 .Bl -bullet -compact
119 .It
120 No double wide/high characters
121 .It
122 No softscroll
123 .It
124 No inverse background
125 .It
126 No VT220 printer output support
127 .It
128 No VT52 support at all
129 .It
130 No 8-bit controls
131 .It
132 Only limited AT-keyboard
133 .Pq 84 keys
134 support
135 .Pq yet
136 .It
137 Help you to make money...
138 .El
139 .Ss Scrollback
140 Each virtual
141 .Nm
142 virtual terminal now has 8 pages of memory attached which are used as a
143 scrollback buffer (definition of SCROLLBACK_PAGES).
144 .Pp
145 By using
146 .Em SHIFT-PageUp
147 and
148 .Em SHIFT-PageDown
149 it is possible to scroll the screen back and forward.
150 .Ss Configuration
151 The
152 .Nm
153 console driver is currently available for the Intel-based BSD operating
154 systems
155 .Tn NetBSD/i386
156 (release 0.9 or higher),
157 and
158 .Fx
159 (release 1.0-GAMMA or higher) .
160 In order to get the appropriate system support, one of the options
161 .Em PCVT_NETBSD ,
162 or
163 .Em PCVT_FREEBSD
164 must be defined in the system's config file
165 .Pq see Xr config 8 .
166 In addition, for the
167 .Fx
168 and
169 .Nx
170 operating systems, it is necessary to set this option to the operating
171 system's version number.
172 For
173 .Fx
174 this version number must be expressed as a 3-digit number.
175 E.\& g., if you are running the 1.0 release
176 .Pq which is actually version 1.0.2 ,
177 you should define
178 .Pp
179 .Em PCVT_FREEBSD = 102
180 .Pp
181 For
182 .Nx
183 this version number must be expressed as 9 if you are running
184 .Nx 0.9
185 and anything greater than 9 for NetBSD-current (pre 1.0). It is recommended
186 to use (as with
187 .Fx )
188 100 for
189 .Nx 1.0
190 and 999 for
191 .Tn NetBSD-current.
192 E.g., if you are running the
193 .Nx 1.0
194 release, you should define
195 .Pp
196 .Em PCVT_NETBSD = 100
197 .Pp
198 The
199 .Nm
200 driver has been designed to be highly configurable in order to satisfy
201 everyone's needs.
202 The preferred way for those configurations is to
203 provide appropriate
204 .Em options
205 lines within the config file, possibly overriding the built-in default
206 values.
207 Therefore it is possible to compile several distinct kernels
208 with different driver behaviour on a single machine.
209 .Pp
210 The following list gives a short overview of the available configuration
211 options.
212 Refer to the file
213 .Pa i386/isa/pcvt/pcvt_hdr.h
214 in the kernel source tree for detailed documentation.
215 .Pp
216 Note: the following conventions apply to all the Boolean options.
217 If an option is given with no value, a value of 1
218 .Pq activated
219 is substituted.
220 If an option value is given as 0, this options is
221 deactivated.
222 Any other value is substituted by 1, too.
223 If an option
224 is omitted, a built-in default is assumed.
225 .Bl -tag -width indent
226 .It Em PCVT_NSCREENS
227 Defines the number of virtual screens.
228 .Pp
229 Default: 8
230 .It Em PCVT_VT220KEYB
231 If activated, a keyboard layout resembling a DEC VT200 (TM) is generated.
232 If deactivated, a mixture between VT220 and HP is used.
233 See the files
234 .Pa Keyboard.VT
235 and
236 .Pa Keyboard.HP
237 in the
238 .Nm
239 documentation directory for a full description.
240 .Pp
241 Default: off
242 .It Em PCVT_SCREENSAVER
243 Enables the builtin screensaver feature.
244 .Pp
245 Default: on
246 .It Em PCVT_PRETTYSCRNS
247 If enabled, a blinking-star screensaver is used.
248 If disabled, the screen
249 is simply blanked
250 .Pq which might be useful for energy-saving monitors .
251 .Pp
252 Default: on
253 .It Em PCVT_CTRL_ALT_DEL
254 If enabled, the key combination
255 .Aq Em Ctrl
256 .Aq Em Alt
257 .Aq Em Del
258 invokes a CPU reset.
259 .Pp
260 Default: off
261 .It Em PCVT_USEKBDSEC
262 Do NOT override a security lock for the keyboard.
263 .Pp
264 Default: on
265 .It Em PCVT_24LINESDEF
266 If enabled, the 25-line modi
267 .Po
268 VT emulation with 25 lines, and HP emulation with 28 lines
269 .Pc
270 default to 24 lines only to provide a better compatibility to the
271 original DEV VT220 (TM). Thus it should be possible to use the
272 terminal information for those terminals without further changes.
273 Note that this is a startup option; it is possible to toggle between
274 the 24- and 25-lines' display by the
275 .Xr scon 1
276 utility.
277 .Pp
278 Default: off
279 .It Em PCVT_EMU_MOUSE
280 Emulate a three-button mouse via the keypad.
281 Useful for notebooks when
282 running XFree86.
283 See
284 .Sx Mouse emulation
285 below.
286 .Pp
287 Default: off
288 .It Em PCVT_META_ESC
289 If enabled, a sequence composed of
290 .Aq Em esc ,
291 followed by the normal key code is emitted if a key is pressed with the
292 .Aq Em Alt
293 key modifier.
294 If disabled, then normal key code with the value
295 .Em 0x80
296 added is sent.
297 .Pp
298 Default: off
299 .El
300 .Pp
301 Note that there are further options available which are mainly used for
302 debugging purposes or as a workaround for hardware problems.
303 They are
304 found in
305 .Pa i386/isa/pcvt/pcvt_hdr.h
306 along with their documentation.
307 .Ss Internal Functions
308 The functionality described below may be accessed via
309 .Xr ioctl 2
310 system calls with a file descriptor opened on a device node
311 related to the
312 .Nm
313 driver.
314 To make use of them, a program should contain the following line:
315 .Pp
316 .Dl #include <machine/pcvt_ioctl.h>
317 .Pp
318 Any parameter definitions cited below can be found in that file.
319 .Pp
320 .Em Keyboard related functions
321 .Pp
322 Three functions are related to basic keyboard hardware:
323 .Pp
324 .Bl -tag -width 20n -offset indent -compact
325 .It KBDRESET
326 reset keyboard, set defaults;
327 .It KBDGTPMAT
328 get current typematic value, parameter is a pointer to int where
329 the values is stored to;
330 .It KBDSTPMAT
331 set current typematic value, similar to above command.
332 .El
333 .Pp
334 Symbolic values are available for the appropriate constants.
335 To specify the initial typematic delay time, they are
336 KBD_TPD250 for 250 ms through
337 KBD_TPD1000 for 1000 ms, in steps of 250 ms.
338 The typematic repeat
339 rates are
340 KBD_TPM300, specifying 30.0 characters per second through
341 KBD_TPM20 for 2.0 characters per second.
342 The intermediate values
343 are: 30.0, 26.7, 24.0, 21.8, 20.0, 18.5, 17.1, 16.0, 15.0, 13.3,
344 12.0, 10.9, 10.0, 9.2, 8.6, 8.0, 7.5, 6.7, 6.0, 5.5, 5.0, 4.6, 4.3,
345 4.0, 3.7, 3.3, 3.0, 2.7, 2.5, 2.3, 2.1, 2.0 characters per second.
346 .Pp
347 .Bl -tag -width 20n -offset indent -compact
348 .It KBDGREPSW
349 get key repetition switch, and
350 .It KBDSREPSW
351 set key repetition switch
352 .El
353 .Pp
354 again take a pointer to int as argument.
355 They manipulate the
356 drivers internal keyboard repetition flag, possible values are:
357 KBD_REPEATOFF or KBD_REPEATON.
358 .Pp
359 .Bl -tag -width 20n -offset indent -compact
360 .It KBDGLEDS
361 get LED state, and
362 .It KBDSLEDS
363 set LED state manipulate the keyboard indicators, but do not influence
364 the drivers idea of lock key state.
365 .El
366 .Pp
367 The int where the argument points to
368 may have the values
369 KBD_SCROLLLOCK, KBD_NUMLOCK, KBD_CAPSLOCK, which may be used in any
370 conjunction.
371 .Pp
372 .Bl -tag -width 20n -offset indent -compact
373 .It KBDGLOCK
374 gets state of SCROLL,NUM,CAPS, and
375 .It KBDSLOCK
376 sets state of SCROLL,NUM,CAPS + LEDs
377 .El
378 .Pp
379 should be used in a same manner to get/set the drivers internal
380 LED flags.
381 .Pp
382 .Em Keyboard remapping
383 .Pp
384 One important feature of the
385 .Nm
386 driver is its ability to overload the built in key definition.
387 .Pp
388 .Bl -tag -width 20n -offset indent -compact
389 .It KBDGCKEY
390 get current key values,
391 .It KBDSCKEY
392 set new key assignment values, and
393 .It KBDGOKEY
394 get original key assignment values
395 .El
396 .Pp
397 arrange those functions.
398 The take a pointer to a
399 .Em struct kbd_ovlkey
400 as argument as described below.
401 In addition,
402 .Pp
403 .Bl -tag -width 20n -offset indent -compact
404 .It KBDRMKEY
405 removes a key assignment, taking a pointer to an int as argument which
406 contains the affected key number;
407 .It KBDDEFAULT
408 removes all key assignments.
409 .El
410 .Bd -literal
411 struct kbd_ovlkey                /* complete definition of a key */
412 {
413     u_short keynum;                      /* the key itself */
414     u_short type;                        /* type of key, see below */
415     u_char  subu;                        /* subtype, ignored on write */
416     char    unshift[KBDMAXOVLKEYSIZE+1]; /* emitted string, unshifted */
417     u_char  subs;                        /* subtype, ignored on write */
418     char    shift[KBDMAXOVLKEYSIZE+1];   /* emitted string, shifted */
419     u_char  subc;                        /* subtype, ignored on write */
420     char    ctrl[KBDMAXOVLKEYSIZE+1];    /* emitted string, control */
421     u_char  suba;                        /* subtype, ignored on write */
422     char    altgr[KBDMAXOVLKEYSIZE+1];   /* emitted string, altgr */
423 };
424 .Ed
425 .Pp
426 The appropriate values for the
427 .Em type
428 field are:
429 .Pp
430 .Bl -tag -width 20n -offset indent -compact
431 .It KBD_NONE
432 no function, key is disabled,
433 .It KBD_SHIFT
434 keyboard shift,
435 .It KBD_META
436 alternate shift, sets bit8 to ASCII code,
437 .It KBD_NUM
438 numeric shift, keypad numeric / application mode,
439 .It KBD_CTL
440 control code generation,
441 .It KBD_CAPS
442 caps shift - swaps case of letter,
443 .It KBD_ASCII
444 ASCII code generating key,
445 .It KBD_SCROLL
446 stop output,
447 .It KBD_FUNC
448 function key,
449 .It KBD_KP
450 keypad keys,
451 .It KBD_BREAK
452 ignored,
453 .It KBD_ALTGR
454 AltGr translation feature,
455 .It KBD_SHFTLOCK
456 shift lock,
457 .It KBD_CURSOR
458 cursor keys, and
459 .It KBD_RETURN
460 .Dq Return
461 or
462 .Dq Enter
463 keys.
464 .El
465 .Pp
466 The
467 .Em subtype
468 field contains one of the values
469 .Pp
470 .Bl -tag -width 20n -offset indent -compact
471 .It KBD_SUBT_STR
472 key is bound to a string, or
473 .It KBD_SUBT_FNC
474 key is bound to a function.
475 .El
476 .Pp
477 .Em Mouse emulation
478 .Pp
479 The mouse emulator
480 .Pq if configured in
481 fakes a three-button mouse using the Mouse Systems protocol.
482 The first
483 .Nm
484 device node not used by a virtual screen is the mouse device.
485 I.\& e.,
486 for the default value of 8 virtual screens,
487 .Pa /dev/ttyv0
488 through
489 .Pa /dev/ttyv7
490 would refer to the virtual screens, and
491 .Pa /dev/ttyv8
492 were the mouse emulator device.
493 The mouse emulation is turned on by
494 pressing the
495 .Aq Em NumLock
496 key.
497 The pointer is moved by the numerical keypad keys, into the
498 obvious directions.
499 The pointer is initially moved in single steps,
500 and is accelerated after an adjustable time
501 .Pq default: 500 ms
502 by about 6 times.
503 The mouse buttons are emulated by three normal
504 keys, by default the function keys
505 .Aq Em \&F1 ,
506 .Aq Em \&F2 ,
507 and
508 .Aq Em \&F3 .
509 There are two selectable flavors available: normal and
510 .Dq sticky
511 buttons.
512 Normal buttons behave as expected.
513 .Dq Sticky
514 buttons are notified as button-press on the first keypress.
515 They
516 .Dq stick
517 until the key is pressed again
518 .Pq or another button-emulating key instead .
519 Button presses and releases are notified to the user by a simple
520 .Dq pling ,
521 or
522 .Dq plong ,
523 respectively, generated from the PC's built-in speaker.
524 .Pp
525 The following commands control the emulation.
526 .Pp
527 .Bl -tag -width 20n -offset indent -compact
528 .It KBDMOUSEGET
529 get the current definitions, and
530 .It KBDMOUSESET
531 set new definitions.
532 .El
533 .Pp
534 Both accept a
535 .Li struct mousedefs *
536 as the third argument to the ioctl call:
537 .Bd -literal
538 struct mousedefs {
539     int leftbutton;     /* (PC) scan code for "left button" key     */
540     int middlebutton;   /* (PC) scan code for "mid button" key      */
541     int rightbutton;    /* (PC) scan code for "right button" key    */
542     int stickybuttons;  /* if true, the buttons are "sticky"        */
543     int acceltime;      /* timeout in microseconds to start pointer */
544                         /* movement acceleration                    */
545     /* defaults to: scan(F1), scan(F2), scan(F3), false, 500000     */
546 };
547 .Ed
548 .Pp
549 .Em Downloadable character set interface
550 .Pp
551 EGA and VGA video adaptors provide the capability of downloadable
552 software fonts.
553 Since the
554 .Sq native character set
555 of any IBM-compatible PC video board does not allow the full interpretation
556 of DEC multinational character set or ISO Latin-1
557 .Pq ISO 8859-1 ,
558 this might be very useful for a U**X environment.
559 .Pp
560 .Bl -tag -width 20n -offset indent -compact
561 .It VGASETFONTATTR
562 set font attr, and
563 .It VGAGETFONTATTR
564 get font attr
565 .El
566 .Pp
567 are used to manipulate the drivers information about a downloaded
568 font.
569 The take a pointer to a
570 .Em struct vgafontattr
571 as argument:
572 .Bd -literal
573 struct vgafontattr {
574     int character_set;          /* VGA character set */
575     int font_loaded;            /* Mark font loaded or unloaded */
576     int screen_size;            /* Character rows per screen */
577     int character_scanlines;    /* Scanlines per character - 1 */
578     int screen_scanlines;       /* Scanlines per screen - 1 byte */
579 };
580 .Ed
581 .Pp
582 Each character of each font is to be downloaded with
583 .Pp
584 .Bl -tag -width 20n -offset indent -compact
585 .It VGALOADCHAR
586 load vga char,
587 .El
588 .Pp
589 taking a pointer to
590 .Em struct vgaloadchar
591 as its argument:
592 .Bd -literal
593 struct vgaloadchar {
594     int character_set;       /* VGA character set to load into */
595     int character;           /* Character to load */
596     int character_scanlines; /* Scanlines per character */
597     u_char char_table[32];   /* VGA character shape table */
598 };
599 .Ed
600 .Pp
601 The field
602 .Em character_set
603 takes the values
604 CH_SET0, CH_SET1, CH_SET2, CH_SET3 on EGA's or VGA's. Since VGA's
605 might have up to eight simultaneously loaded fonts, they can take
606 CH_SET4, CH_SET5, CH_SET6, or CH_SET7, too.
607 .Pp
608 Note that there's a dependence between the font size
609 and a possible screen height
610 .Pq in character rows ,
611 depending on the video adaptor used:
612 .Bd -literal
613 Screen size (rows) on:          EGA             VGA
614 Font size
615
616 8 x 8                           43              50
617 8 x 10                          35              40
618 8 x 14                          25              28
619 8 x 16                          not             25
620                                 applicable
621 .Ed
622 .Pp
623 .Em General screen manipulation commands
624 .Pp
625 .Bl -tag -width 20n -offset indent -compact
626 .It VGACURSOR
627 sets cursor shape,
628 .El
629 .Pp
630 taking a pointer to the following structure as argument:
631 .Bd -literal
632 struct cursorshape {
633     int screen_no; /* screen number for which to set,               */
634                    /*  or -1 to set on current active screen        */
635     int start;     /* top scanline, range 0... Character Height - 1 */
636     int end;       /* end scanline, range 0... Character Height - 1 */
637 };
638 .Ed
639 .Pp
640 .Bl -tag -width 20n -offset indent -compact
641 .It VGASETSCREEN
642 set screen info, and
643 .It VGAGETSCREEN
644 get screen info,
645 .El
646 .Pp
647 provide an interface to some general driver internal variables
648 which might modify the behaviour of the screens,
649 or which might simply be used to force the driver to switch
650 to one certain screen.
651 Their argument is a pointer to the structure:
652 .Bd -literal
653 struct screeninfo {
654     int adaptor_type;   /* type of video adaptor installed     */
655                         /* read only, ignored on write (yet!)  */
656     int totalfonts;     /* no of downloadable fonts            */
657                         /* read only, ignored on write         */
658     int totalscreens;   /* no of virtual screens               */
659                         /* read only, ignored on write         */
660     int screen_no;      /* screen number, this was got from    */
661                         /* on write, if -1, apply pure_vt_mode */
662                         /* and/or screen_size to current screen*/
663                         /* else to screen_no supplied          */
664     int current_screen; /* screen number, which is displayed.  */
665                         /* on write, if -1, make this screen   */
666                         /* the current screen, else set current*/
667                         /* displayed screen to parameter       */
668     int pure_vt_mode;   /* flag, pure VT mode or HP/VT mode    */
669                         /* on write, if -1, no change          */
670     int screen_size;    /* screen size                         */
671                         /* on write, if -1, no change          */
672     int force_24lines;  /* force 24 lines if 25 lines VT mode  */
673                         /* or 28 lines HP mode to get pure     */
674                         /* VT220 screen size                   */
675                         /* on write, if -1, no change          */
676     int vga_family;     /* if adaptor_type = VGA, this reflects*/
677                         /* the chipset family after a read     */
678                         /* nothing happens on write ...        */
679     int vga_type;       /* if adaptor_type = VGA, this reflects*/
680                         /* the chipset after a read            */
681                         /* nothing happenes on write ...       */
682     int vga_132;        /* set to 1 if driver has support for  */
683                         /* 132 column operation for chipset    */
684                         /* currently ignored on write          */
685 };
686 .Ed
687 .Pp
688 Its field
689 .Em pure_vt_mode
690 may take the values M_HPVT for a mixed VTxxx and HP Mode, with function
691 key labels and a status line, or M_PUREVT for only VTxxx sequences
692 recognized, with no labels.
693 .Pp
694 .Bl -tag -width 20n -offset indent -compact
695 .It VGASETCOLMS
696 sets the number of columns for the current screen,
697 .El
698 .Pp
699 its parameter is a pointer to an integer containing either a value of 80,
700 or a value of 132.
701 Note that setting the number of columns to 132 is
702 only supported on VGA adaptors.
703 Any unsupported numbers cause the ioctl
704 to fail with
705 .Em errno
706 .Pq see Xr intro 2
707 being set to
708 .Em EINVAL .
709 .Pp
710 .Em VGA color palette interface
711 .Pp
712 Only on VGA adaptors, there's a color palette register at the output.
713 It is responsible for the red, green and blue output voltage provided
714 for each of the 256 internal color codes, each lying in the range of
715 0 through 63 (with 63 representing the brightest value for a base color).
716 Thus, these adaptors map each color code to a color of a
717 .Dq palette
718 out of 262144 colors.
719 The commands
720 .Pp
721 .Bl -tag -width 20n -offset indent -compact
722 .It VGAREADPEL
723 read VGA palette entry, and
724 .It VGAWRITEPEL
725 write VGA palette entry
726 .El
727 .Pp
728 establish an interface to these palette registers.
729 Their argument is
730 a pointer to:
731 .Bd -literal
732 struct vgapel {
733     unsigned idx;      /* index into palette, 0 .. 255 valid   */
734     unsigned r, g, b;  /* RGB values, masked by VGA_PMASK (63) */
735 };
736 .Ed
737 .Pp
738 .Em Driver identification
739 .Pp
740 .Bl -tag -width 20n -offset indent -compact
741 .It VGAPCVTID
742 returns information if the current compiled in driver is pcvt and it's
743 major and minor revision numbers. the call is taking a pointer to the
744 following structure as argument:
745 .El
746 .Bd -literal
747 struct pcvtid {
748 #define PCVTIDNAMELN  16                /* driver id - string length */
749         char name[PCVTIDNAMELN];        /* driver name, == PCVTIDSTR    */
750 #define PCVTIDNAME    "pcvt"            /* driver id - string */
751         int rmajor;                     /* revision number, major       */
752 #define PCVTIDMAJOR   3
753         int rminor;                     /* revision number, minor       */
754 #define PCVTIDMINOR   00
755 };
756 .Ed
757 .Pp
758 .Bl -tag -width 20n -offset indent -compact
759 .It VGAPCVTINFO
760 returns information if the current compiled in driver is pcvt and it's
761 compile time options. the call is taking a pointer to the following
762 structure as argument:
763 .El
764 .Bd -literal
765 struct pcvtinfo {
766         u_int opsys;                    /* PCVT_xxx(x)BSD */
767 #define CONF_UNKNOWNOPSYS       0
768 #define CONF_386BSD             1       /* unsupported !!! */
769 #define CONF_NETBSD             2
770 #define CONF_FREEBSD            3
771         u_int opsysrel;                 /* Release for NetBSD/FreeBSD */
772         u_int nscreens;                 /* PCVT_NSCREENS */
773         u_int scanset;                  /* PCVT_SCANSET */
774         u_int updatefast;               /* PCVT_UPDATEFAST */
775         u_int updateslow;               /* PCVT_UPDATESLOW */
776         u_int sysbeepf;                 /* PCVT_SYSBEEPF */
777         u_int pcburst;                  /* PCVT_PCBURST */
778         u_int kbd_fifo_sz;              /* PCVT_KBD_FIFO_SZ */
779
780 /* config booleans */
781
782         u_long compile_opts;            /* PCVT_xxxxxxxxxxxxxxx */
783 };
784 .Ed
785 .Pp
786 .Em Screen saver
787 .Pp
788 Depending on the configuration of a
789 .Nm
790 driver, their might be a simple screen saver available.
791 It is controlled
792 by the command
793 .Pp
794 .Bl -tag -width 20n -offset indent -compact
795 .It VGASCREENSAVER
796 set timeout for screen saver in seconds; 0 turns it off,
797 .El
798 .Pp
799 taking a pointer to an integer as argument.
800 Despite of its command name,
801 this is available on
802 .Em any
803 kind of adaptor if configured in by the
804 .Xr config 8
805 option
806 .Dq PCVT_SCREENSAVER
807 .Pp
808 .Em Compatibility commands for USL-style VT's
809 .Pp
810 Release 3.00 of this
811 .Nm
812 driver supports a subset of the USL-style commands used to control
813 the virtual terminal interface.
814 This feature is mainly intended to
815 allow
816 .Em XFree86 ,
817 release 2.0 or higher, to switch between virtual screens even when
818 running an X server.
819 They are ugly with respect to the implied semantics
820 (i.e., they break Berkeley semantics)
821 and are therefore not recommended for common use.
822 See the file
823 .Pa i386/include/pcvt_ioctl.h
824 for their documentation.
825 .Sh FILES
826 .Bl -tag -width /usr/include/machine/pcvt_ioctl.h
827 .It Pa /usr/include/machine/pcvt_ioctl.h
828 Definitions for
829 .Xr ioctl 2
830 function calls
831 .It Pa /dev/ttyv?
832 .It Pa /dev/console
833 Device nodes to access the
834 .Nm
835 driver
836 .It Pa i386/isa/pcvt/pcvt_hdr.h
837 .Pq relative to the kernel source tree
838 Documents the various compile-time options to tailor
839 .Nm .
840 .El
841 .Sh HISTORY
842 The
843 .Nm
844 driver has been developed for and contributed to 386BSD release 0.1. Since
845 release 3.00 explicit support is provided for NetBSD 0.9. It is expected
846 that no further development on pcvt is done for 386BSD 0.1 after release 3.00,
847 in fact, 386BSD support was dropped with release 3.20.
848 .Sh AUTHORS
849 .An -nosplit
850 Written by
851 .An Hellmuth Michaelis Aq hm@hcs.de
852 with much help from
853 .An Brian Dunford-Shore Aq brian@morpheus.wustl.edu
854 and
855 .An J\(:org Wunsch Aq joerg_wunsch@uriah.sax.de .
856 .Pp
857 This driver is based on several people's previous
858 work, notably by
859 .An William Jolitz' Aq ljolitz@cardio.ucsf.edu
860 and
861 .An Don Ahn's
862 historic
863 .Xr pccons 4
864 implementation.
865 .Pp
866 .An Holger Veit Aq veit@first.gmd.de
867 .Sh SEE ALSO
868 .Xr cursor 1 ,
869 .Xr loadfont 1 ,
870 .Xr scon 1 ,
871 .Xr intro 2 ,
872 .Xr ioctl 2 ,
873 .Xr atkbd 4 ,
874 .Xr keyboard 4 ,
875 .Xr screen 4 ,
876 .Xr config 8 ,
877 .Xr ispcvt 8
878 .Sh BUGS
879 Certainly existent.
880 See the file
881 .Pa BugList
882 in the Documentation directory for an up-to-date list.
883 .Ss Tested Video Boards
884 .Bd -literal
885 Manufacturer                    Chipset                 Monitor
886
887 2theMax (?)                     ET4000                  VGA Color
888 Video7 Inc.                     Video 7                 VGA Color
889 Diamond Stealth VRAM            S3                      NEC 3FGx
890 Trident                         TVGA 8800CS             NEC 3D
891 Data General                    C&T P82C604             VGA Color
892 NoName Hercules                 W86855AF                Mono
893 Kyocera (Mainboard)             WD90C11                 Sony Color
894 unknown                         ET3000                  NEC 3D
895 .Ed
896 .Ss Tested Keyboards
897 .Bd -literal
898 Manufacturer                    Type                    Layout
899
900 Cherry                          MF II                   US
901 Cherry/Tandon                   MF II                   German
902 Hewlett-Packard                 MF II                   US
903 Hewlett-Packard                 MF II                   German
904 Tatung                          AT                      German
905 .Ed
906 .Pp
907 There is absolutely NO support for the ancient PC-keyboards
908 .Pq they had 83 keys .
909 .Pp
910 There is only limited support for AT-keyboards
911 .Bo
912 they have 84 keys, and a separate numeric keypad,
913 they don't have F11/F12 keys
914 .Bc
915 because the emulator needs F9 through F12 for control functions, and due to
916 the current design of the keyboard driver there is no
917 .Pq full
918 support for national keyboards because
919 of the lack of an ALtGr key.
920 .Pp
921 MF-keyboards are fully supported, 101- and 102-key versions.