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