2 .\" Copyright (c) 1992, 2000 Hellmuth Michaelis, Brian Dunford-Shore,
3 .\" Joerg Wunsch and Holger Veit.
5 .\" All rights reserved.
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
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.
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.
33 .\" Last Edit-Date: [Sun Mar 26 14:39:08 2000]
37 .\" Man page pcvt(4) created after pcvt_ioctl.h on 13-Jan-93
46 .Nd VT220 virtual screen system console
51 .Pa /boot/device.hints :
52 .Cd hint.vt.0.at="isa"
57 driver provides a virtual screen handling system.
58 Probably most important is an emulation of a wide range
64 for a detailed description.
68 driver requires the keyboard driver
70 to be also configured in the kernel.
80 Completely independent virtual terminals for MDA/HGC/CGA/EGA and VGA
82 25, 28, 35, 40, 43 or 50x80 screen resolution for each virtual screen
84 Fully remappable keyboard to support national keyboards
86 All VT220 character sets plus ISO Latin-1 and DEC technical supported
88 VT220 downloadable character set supported when run on EGA/VGA
90 VT220 user defined keys for each virtual terminal
92 Optional function key label support
93 \('a la Hewlett-Packard terminals
95 Display function codes functionality
97 Support for MDA, CGA, EGA and VGA display adaptors
99 Support for 132 column operation on some VGA chipsets
101 X Window Support for XFree86
111 No double wide/high characters
115 No inverse background
117 No VT220 printer output support
119 No VT52 support at all
123 Only limited AT-keyboard
130 virtual terminal has 8 pages of memory attached which are used as a
136 it is possible to scroll the screen back and forward.
140 console driver is available for the Intel-based
143 It has been designed to be highly configurable in order to satisfy
145 The preferred configuration method is to
148 lines within the kernel configuration file,
149 possibly overriding the built-in defaults.
151 The following list gives a short overview of the available configuration
154 .Pa i386/isa/pcvt/pcvt_conf.h
155 in the kernel source tree for detailed documentation.
157 Note: The following conventions apply to all Boolean options.
158 If an option value is given as 0, the option is deactivated.
159 With any other value, or no value, the option is activated.
161 is omitted, a built-in default is assumed.
162 .Bl -tag -width indent
164 Defines the number of virtual screens.
167 .It Em PCVT_VT220KEYB
168 If activated, a keyboard layout resembling a DEC VT200 (TM) is generated.
169 If deactivated, a mixture between VT220 and HP is used.
176 documentation directory for a full description.
179 .It Em PCVT_SCREENSAVER
180 Enables the builtin screensaver feature.
183 .It Em PCVT_PRETTYSCRNS
184 If enabled, a blinking-star screensaver is used.
185 If disabled, the screen
187 (which might be useful for energy-saving monitors).
190 .It Em PCVT_CTRL_ALT_DEL
191 If enabled, the key combination
198 .It Em PCVT_USEKBDSEC
199 Do NOT override a security lock for the keyboard.
202 .It Em PCVT_24LINESDEF
203 If enabled, the 25-line modi
204 (VT emulation with 25 lines, and HP emulation with 28 lines)
205 default to 24 lines only to provide a better compatibility to the
206 original DEV VT220 (TM).
207 Thus it should be possible to use the
208 terminal information for those terminals without further changes.
209 Note that this is a startup option; it is possible to toggle between
210 the 24- and 25-lines' display by the
216 If enabled, a sequence composed of
218 followed by the normal key code is emitted if a key is pressed with the
221 If disabled, then normal key code with the value
228 Note that there are further options available which are mainly used for
229 debugging purposes or as a workaround for hardware problems.
231 .Pa i386/isa/pcvt/pcvt_conf.h
232 along with their documentation.
233 .Ss Internal Functions
234 The functionality described below may be accessed via
236 system calls with a file descriptor opened on a device node
240 To make use of them, a program should contain the following line:
242 .Dl #include <machine/pcvt_ioctl.h>
244 Any parameter definitions cited below can be found in that file.
246 .Em Keyboard related functions
248 Three functions are related to basic keyboard hardware:
250 .Bl -tag -width 20n -offset indent -compact
252 reset keyboard, set defaults;
254 get current typematic value, parameter is a pointer to int where
255 the values is stored to;
257 set current typematic value, similar to above command.
260 Symbolic values are available for the appropriate constants.
261 To specify the initial typematic delay time, they are
262 KBD_TPD250 for 250 ms through
263 KBD_TPD1000 for 1000 ms, in steps of 250 ms.
266 KBD_TPM300, specifying 30.0 characters per second through
267 KBD_TPM20 for 2.0 characters per second.
268 The intermediate values
269 are: 30.0, 26.7, 24.0, 21.8, 20.0, 18.5, 17.1, 16.0, 15.0, 13.3,
270 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,
271 4.0, 3.7, 3.3, 3.0, 2.7, 2.5, 2.3, 2.1, 2.0 characters per second.
273 .Bl -tag -width 20n -offset indent -compact
275 get key repetition switch, and
277 set key repetition switch
280 again take a pointer to int as argument.
282 drivers internal keyboard repetition flag, possible values are:
283 KBD_REPEATOFF or KBD_REPEATON.
285 .Bl -tag -width 20n -offset indent -compact
289 set LED state manipulate the keyboard indicators, but do not influence
290 the drivers idea of lock key state.
293 The int where the argument points to
295 KBD_SCROLLLOCK, KBD_NUMLOCK, KBD_CAPSLOCK, which may be used in any
298 .Bl -tag -width 20n -offset indent -compact
300 gets state of SCROLL,NUM,CAPS, and
302 sets state of SCROLL,NUM,CAPS + LEDs
305 should be used in a same manner to get/set the drivers internal
308 .Em Keyboard remapping
310 One important feature of the
312 driver is its ability to overload the built in key definition.
314 .Bl -tag -width 20n -offset indent -compact
316 get current key values,
318 set new key assignment values, and
320 get original key assignment values
323 arrange those functions.
324 The take a pointer to a
325 .Em struct kbd_ovlkey
326 as argument as described below.
329 .Bl -tag -width 20n -offset indent -compact
331 removes a key assignment, taking a pointer to an int as argument which
332 contains the affected key number;
334 removes all key assignments.
337 struct kbd_ovlkey /* complete definition of a key */
339 u_short keynum; /* the key itself */
340 u_short type; /* type of key, see below */
341 u_char subu; /* subtype, ignored on write */
342 char unshift[KBDMAXOVLKEYSIZE+1]; /* emitted string, unshifted */
343 u_char subs; /* subtype, ignored on write */
344 char shift[KBDMAXOVLKEYSIZE+1]; /* emitted string, shifted */
345 u_char subc; /* subtype, ignored on write */
346 char ctrl[KBDMAXOVLKEYSIZE+1]; /* emitted string, control */
347 u_char suba; /* subtype, ignored on write */
348 char altgr[KBDMAXOVLKEYSIZE+1]; /* emitted string, altgr */
352 The appropriate values for the
356 .Bl -tag -width 20n -offset indent -compact
358 no function, key is disabled,
362 alternate shift, sets bit8 to ASCII code,
364 numeric shift, keypad numeric / application mode,
366 control code generation,
368 caps shift - swaps case of letter,
370 ASCII code generating key,
380 AltGr translation feature,
394 field contains one of the values
396 .Bl -tag -width 20n -offset indent -compact
398 key is bound to a string, or
400 key is bound to a function.
403 .Em Downloadable character set interface
405 EGA and VGA video adaptors provide the capability of downloadable
408 .Sq native character set
409 of any IBM-compatible PC video board does not allow the full interpretation
410 of DEC multinational character set or ISO Latin-1
412 this might be very useful for a U**X environment.
414 .Bl -tag -width 20n -offset indent -compact
421 are used to manipulate the drivers information about a downloaded
423 The take a pointer to a
424 .Em struct vgafontattr
428 int character_set; /* VGA character set */
429 int font_loaded; /* Mark font loaded or unloaded */
430 int screen_size; /* Character rows per screen */
431 int character_scanlines; /* Scanlines per character - 1 */
432 int screen_scanlines; /* Scanlines per screen - 1 byte */
436 Each character of each font is to be downloaded with
438 .Bl -tag -width 20n -offset indent -compact
444 .Em struct vgaloadchar
448 int character_set; /* VGA character set to load into */
449 int character; /* Character to load */
450 int character_scanlines; /* Scanlines per character */
451 u_char char_table[32]; /* VGA character shape table */
458 CH_SET0, CH_SET1, CH_SET2, CH_SET3 on EGA's or VGA's.
460 might have up to eight simultaneously loaded fonts, they can take
461 CH_SET4, CH_SET5, CH_SET6, or CH_SET7, too.
463 Note that there is a dependence between the font size
464 and a possible screen height
466 depending on the video adaptor used:
468 Screen size (rows) on: EGA VGA
478 .Em General screen manipulation commands
480 .Bl -tag -width 20n -offset indent -compact
485 taking a pointer to the following structure as argument:
488 int screen_no; /* screen number for which to set, */
489 /* or -1 to set on current active screen */
490 int start; /* top scanline, range 0... Character Height - 1 */
491 int end; /* end scanline, range 0... Character Height - 1 */
495 .Bl -tag -width 20n -offset indent -compact
502 provide an interface to some general driver internal variables
503 which might modify the behaviour of the screens,
504 or which might simply be used to force the driver to switch
505 to one certain screen.
506 Their argument is a pointer to the structure:
509 int adaptor_type; /* type of video adaptor installed */
510 /* read only, ignored on write (yet!) */
511 int totalfonts; /* no of downloadable fonts */
512 /* read only, ignored on write */
513 int totalscreens; /* no of virtual screens */
514 /* read only, ignored on write */
515 int screen_no; /* screen number, this was got from */
516 /* on write, if -1, apply pure_vt_mode */
517 /* and/or screen_size to current screen*/
518 /* else to screen_no supplied */
519 int current_screen; /* screen number, which is displayed. */
520 /* on write, if -1, make this screen */
521 /* the current screen, else set current*/
522 /* displayed screen to parameter */
523 int pure_vt_mode; /* flag, pure VT mode or HP/VT mode */
524 /* on write, if -1, no change */
525 int screen_size; /* screen size */
526 /* on write, if -1, no change */
527 int force_24lines; /* force 24 lines if 25 lines VT mode */
528 /* or 28 lines HP mode to get pure */
529 /* VT220 screen size */
530 /* on write, if -1, no change */
531 int vga_family; /* if adaptor_type = VGA, this reflects*/
532 /* the chipset family after a read */
533 /* nothing happens on write ... */
534 int vga_type; /* if adaptor_type = VGA, this reflects*/
535 /* the chipset after a read */
536 /* nothing happens on write ... */
537 int vga_132; /* set to 1 if driver has support for */
538 /* 132 column operation for chipset */
539 /* currently ignored on write */
545 may take the values M_HPVT for a mixed VTxxx and HP Mode, with function
546 key labels and a status line, or M_PUREVT for only VTxxx sequences
547 recognized, with no labels.
549 .Bl -tag -width 20n -offset indent -compact
551 sets the number of columns for the current screen,
554 its parameter is a pointer to an integer containing either a value of 80,
556 Note that setting the number of columns to 132 is only supported on
558 Any unsupported numbers cause the ioctl to fail with
565 .Em VGA color palette interface
567 Only on VGA adaptors, there is a color palette register at the output.
568 It is responsible for the red, green and blue output voltage provided
569 for each of the 256 internal color codes, each lying in the range of
570 0 through 63 (with 63 representing the brightest value for a base color).
571 Thus, these adaptors map each color code to a color of a
573 out of 262144 colors.
576 .Bl -tag -width 20n -offset indent -compact
578 read VGA palette entry, and
580 write VGA palette entry
583 establish an interface to these palette registers.
588 unsigned idx; /* index into palette, 0 .. 255 valid */
589 unsigned r, g, b; /* RGB values, masked by VGA_PMASK (63) */
593 .Em Driver identification
595 .Bl -tag -width 20n -offset indent -compact
597 returns information if the current compiled in driver is pcvt and its
598 major and minor revision numbers.
599 the call is taking a pointer to the
600 following structure as argument:
604 #define PCVTIDNAMELN 16 /* driver id - string length */
605 char name[PCVTIDNAMELN]; /* driver name, == PCVTIDSTR */
606 #define PCVTIDNAME "pcvt" /* driver id - string */
607 int rmajor; /* revision number, major */
608 #define PCVTIDMAJOR 3
609 int rminor; /* revision number, minor */
610 #define PCVTIDMINOR 00
614 .Bl -tag -width 20n -offset indent -compact
616 returns information if the current compiled in driver is pcvt and its
617 compile time options.
618 the call is taking a pointer to the following
619 structure as argument:
623 u_int opsys; /* PCVT_xxx(x)BSD */
624 #define CONF_UNKNOWNOPSYS 0
625 #define CONF_386BSD 1 /* unsupported !!! */
626 #define CONF_NETBSD 2
627 #define CONF_FREEBSD 3
628 u_int opsysrel; /* Release for NetBSD/FreeBSD */
629 u_int nscreens; /* PCVT_NSCREENS */
630 u_int scanset; /* PCVT_SCANSET */
631 u_int updatefast; /* PCVT_UPDATEFAST */
632 u_int updateslow; /* PCVT_UPDATESLOW */
633 u_int sysbeepf; /* PCVT_SYSBEEPF */
634 u_int pcburst; /* PCVT_PCBURST */
635 u_int kbd_fifo_sz; /* PCVT_KBD_FIFO_SZ */
637 /* config booleans */
639 u_long compile_opts; /* PCVT_xxxxxxxxxxxxxxx */
645 Depending on the configuration of a
647 driver, there might be a simple screen saver available.
651 .Bl -tag -width 20n -offset indent -compact
653 set timeout for screen saver in seconds; 0 turns it off,
656 taking a pointer to an integer as argument.
657 Despite its command name,
660 kind of adaptor if configured in by the
665 .Em Compatibility commands for USL-style VT's
668 supports a subset of the USL-style commands used to control
669 the virtual terminal interface.
670 This feature is mainly intended to allow
672 to switch between virtual screens even when
674 They are ugly with respect to the implied semantics
675 (i.e., they break Berkeley semantics).
677 .Pa i386/include/pcvt_ioctl.h
678 for their documentation.
680 .Bl -tag -width /usr/include/machine/pcvt_ioctl.h
681 .It Pa /usr/include/machine/pcvt_ioctl.h
687 Device nodes to access the
690 .It Pa i386/isa/pcvt/pcvt_conf.h
691 (relative to the kernel source tree)
692 Documents the various compile-time options to tailor
708 driver has been developed for and contributed to
712 has become a standard part of
722 specific with support for
727 ease further maintenance.
731 .An Hellmuth Michaelis Aq hm@FreeBSD.org
733 .An Brian Dunford-Shore Aq brian@morpheus.wustl.edu
735 .An J\(:org Wunsch Aq joerg@FreeBSD.org .
737 This driver is based on several people's previous work, notably
741 .An William Jolitz Aq ljolitz@cardio.ucsf.edu
744 and the keyboard mapping code from
745 .An Holger Veit Aq veit@first.gmd.de .