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
45 .Nd VT220 virtual screen system console
47 .Cd "device vt0 at isa?"
52 driver provides a virtual screen handling system.
53 Probably most important is an emulation of a wide range
59 for a detailed description.
63 driver requires the keyboard driver
65 to be also configured in the kernel.
77 Completely independent virtual terminals for MDA/HGC/CGA/EGA and VGA
79 25, 28, 35, 40, 43 or 50x80 screen resolution for each virtual screen
81 Fully remappable keyboard to support national keyboards
83 All VT220 character sets plus ISO Latin-1 and DEC technical supported
85 VT220 downloadable character set supported when run on EGA/VGA
87 VT220 user defined keys for each virtual terminal
89 Optional function key label support
90 \('a la Hewlett-Packard terminals
92 Display function codes functionality
94 Support for MDA, CGA, EGA and VGA display adaptors
96 Support for 132 column operation on some VGA chipsets
98 X Window Support for XFree86
110 No double wide/high characters
114 No inverse background
116 No VT220 printer output support
118 No VT52 support at all
122 Only limited AT-keyboard
129 virtual terminal has 8 pages of memory attached which are used as a
135 it is possible to scroll the screen back and forward.
139 console driver is available for the Intel-based
142 It has been designed to be highly configurable in order to satisfy
144 The preferred way for those configurations is to
147 lines within the config file, possibly overriding the built-in default
150 The following list gives a short overview of the available configuration
153 .Pa i386/isa/pcvt/pcvt_conf.h
154 in the kernel source tree for detailed documentation.
156 Note: the following conventions apply to all the Boolean options.
157 If an option is given with no value, a value of 1
160 If an option value is given as 0, this options is
162 Any other value is substituted by 1, too.
164 is omitted, a built-in default is assumed.
166 .Bl -tag -width indent -compact
168 Defines the number of virtual screens.
172 .It Em PCVT_VT220KEYB
173 If activated, a keyboard layout resembling a DEC VT200 (TM) is generated.
174 If deactivated, a mixture between VT220 and HP is used.
181 documentation directory for a full description.
185 .It Em PCVT_SCREENSAVER
186 Enables the builtin screensaver feature.
190 .It Em PCVT_PRETTYSCRNS
191 If enabled, a blinking-star screensaver is used.
192 If disabled, the screen
194 .Pq which might be useful for energy-saving monitors .
198 .It Em PCVT_CTRL_ALT_DEL
199 If enabled, the key combination
207 .It Em PCVT_USEKBDSEC
208 Do NOT override a security lock for the keyboard.
212 .It Em PCVT_24LINESDEF
213 If enabled, the 25-line modi
215 VT emulation with 25 lines, and HP emulation with 28 lines
217 default to 24 lines only to provide a better compatibility to the
218 original DEV VT220 (TM). Thus it should be possible to use the
219 terminal information for those terminals without further changes.
220 Note that this is a startup option; it is possible to toggle between
221 the 24- and 25-lines' display by the
228 If enabled, a sequence composed of
230 followed by the normal key code is emitted if a key is pressed with the
233 If disabled, then normal key code with the value
240 Note that there are further options available which are mainly used for
241 debugging purposes or as a workaround for hardware problems.
243 .Pa i386/isa/pcvt/pcvt_conf.h
244 along with their documentation.
245 .Ss Internal Functions
246 The functionality described below may be accessed via
248 system calls with a file descriptor opened on a device node
252 To make use of them, a program should contain the following line:
254 .Dl #include <machine/pcvt_ioctl.h>
256 Any parameter definitions cited below can be found in that file.
258 .Em Keyboard related functions
260 Three functions are related to basic keyboard hardware:
262 .Bl -tag -width 20n -offset indent -compact
264 reset keyboard, set defaults;
266 get current typematic value, parameter is a pointer to int where
267 the values is stored to;
269 set current typematic value, similar to above command.
272 Symbolic values are available for the appropriate constants.
273 To specify the initial typematic delay time, they are
274 KBD_TPD250 for 250 ms through
275 KBD_TPD1000 for 1000 ms, in steps of 250 ms.
278 KBD_TPM300, specifying 30.0 characters per second through
279 KBD_TPM20 for 2.0 characters per second.
280 The intermediate values
281 are: 30.0, 26.7, 24.0, 21.8, 20.0, 18.5, 17.1, 16.0, 15.0, 13.3,
282 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,
283 4.0, 3.7, 3.3, 3.0, 2.7, 2.5, 2.3, 2.1, 2.0 characters per second.
285 .Bl -tag -width 20n -offset indent -compact
287 get key repetition switch, and
289 set key repetition switch
292 again take a pointer to int as argument.
294 drivers internal keyboard repetition flag, possible values are:
295 KBD_REPEATOFF or KBD_REPEATON.
297 .Bl -tag -width 20n -offset indent -compact
301 set LED state manipulate the keyboard indicators, but do not influence
302 the drivers idea of lock key state.
305 The int where the argument points to
307 KBD_SCROLLLOCK, KBD_NUMLOCK, KBD_CAPSLOCK, which may be used in any
310 .Bl -tag -width 20n -offset indent -compact
312 gets state of SCROLL,NUM,CAPS, and
314 sets state of SCROLL,NUM,CAPS + LEDs
317 should be used in a same manner to get/set the drivers internal
320 .Em Keyboard remapping
322 One important feature of the
324 driver is its ability to overload the built in key definition.
326 .Bl -tag -width 20n -offset indent -compact
328 get current key values,
330 set new key assignment values, and
332 get original key assignment values
335 arrange those functions.
336 The take a pointer to a
337 .Em struct kbd_ovlkey
338 as argument as described below.
341 .Bl -tag -width 20n -offset indent -compact
343 removes a key assignment, taking a pointer to an int as argument which
344 contains the affected key number;
346 removes all key assignments.
349 struct kbd_ovlkey /* complete definition of a key */
351 u_short keynum; /* the key itself */
352 u_short type; /* type of key, see below */
353 u_char subu; /* subtype, ignored on write */
354 char unshift[KBDMAXOVLKEYSIZE+1]; /* emitted string, unshifted */
355 u_char subs; /* subtype, ignored on write */
356 char shift[KBDMAXOVLKEYSIZE+1]; /* emitted string, shifted */
357 u_char subc; /* subtype, ignored on write */
358 char ctrl[KBDMAXOVLKEYSIZE+1]; /* emitted string, control */
359 u_char suba; /* subtype, ignored on write */
360 char altgr[KBDMAXOVLKEYSIZE+1]; /* emitted string, altgr */
364 The appropriate values for the
368 .Bl -tag -width 20n -offset indent -compact
370 no function, key is disabled,
374 alternate shift, sets bit8 to ASCII code,
376 numeric shift, keypad numeric / application mode,
378 control code generation,
380 caps shift - swaps case of letter,
382 ASCII code generating key,
392 AltGr translation feature,
406 field contains one of the values
408 .Bl -tag -width 20n -offset indent -compact
410 key is bound to a string, or
412 key is bound to a function.
415 .Em Downloadable character set interface
417 EGA and VGA video adaptors provide the capability of downloadable
420 .Sq native character set
421 of any IBM-compatible PC video board does not allow the full interpretation
422 of DEC multinational character set or ISO Latin-1
424 this might be very useful for a U**X environment.
426 .Bl -tag -width 20n -offset indent -compact
433 are used to manipulate the drivers information about a downloaded
435 The take a pointer to a
436 .Em struct vgafontattr
440 int character_set; /* VGA character set */
441 int font_loaded; /* Mark font loaded or unloaded */
442 int screen_size; /* Character rows per screen */
443 int character_scanlines; /* Scanlines per character - 1 */
444 int screen_scanlines; /* Scanlines per screen - 1 byte */
448 Each character of each font is to be downloaded with
450 .Bl -tag -width 20n -offset indent -compact
456 .Em struct vgaloadchar
460 int character_set; /* VGA character set to load into */
461 int character; /* Character to load */
462 int character_scanlines; /* Scanlines per character */
463 u_char char_table[32]; /* VGA character shape table */
470 CH_SET0, CH_SET1, CH_SET2, CH_SET3 on EGA's or VGA's. Since VGA's
471 might have up to eight simultaneously loaded fonts, they can take
472 CH_SET4, CH_SET5, CH_SET6, or CH_SET7, too.
474 Note that there's a dependence between the font size
475 and a possible screen height
476 .Pq in character rows ,
477 depending on the video adaptor used:
479 Screen size (rows) on: EGA VGA
489 .Em General screen manipulation commands
491 .Bl -tag -width 20n -offset indent -compact
496 taking a pointer to the following structure as argument:
499 int screen_no; /* screen number for which to set, */
500 /* or -1 to set on current active screen */
501 int start; /* top scanline, range 0... Character Height - 1 */
502 int end; /* end scanline, range 0... Character Height - 1 */
506 .Bl -tag -width 20n -offset indent -compact
513 provide an interface to some general driver internal variables
514 which might modify the behaviour of the screens,
515 or which might simply be used to force the driver to switch
516 to one certain screen.
517 Their argument is a pointer to the structure:
520 int adaptor_type; /* type of video adaptor installed */
521 /* read only, ignored on write (yet!) */
522 int totalfonts; /* no of downloadable fonts */
523 /* read only, ignored on write */
524 int totalscreens; /* no of virtual screens */
525 /* read only, ignored on write */
526 int screen_no; /* screen number, this was got from */
527 /* on write, if -1, apply pure_vt_mode */
528 /* and/or screen_size to current screen*/
529 /* else to screen_no supplied */
530 int current_screen; /* screen number, which is displayed. */
531 /* on write, if -1, make this screen */
532 /* the current screen, else set current*/
533 /* displayed screen to parameter */
534 int pure_vt_mode; /* flag, pure VT mode or HP/VT mode */
535 /* on write, if -1, no change */
536 int screen_size; /* screen size */
537 /* on write, if -1, no change */
538 int force_24lines; /* force 24 lines if 25 lines VT mode */
539 /* or 28 lines HP mode to get pure */
540 /* VT220 screen size */
541 /* on write, if -1, no change */
542 int vga_family; /* if adaptor_type = VGA, this reflects*/
543 /* the chipset family after a read */
544 /* nothing happenes on write ... */
545 int vga_type; /* if adaptor_type = VGA, this reflects*/
546 /* the chipset after a read */
547 /* nothing happenes on write ... */
548 int vga_132; /* set to 1 if driver has support for */
549 /* 132 column operation for chipset */
550 /* currently ignored on write */
556 may take the values M_HPVT for a mixed VTxxx and HP Mode, with function
557 key labels and a status line, or M_PUREVT for only VTxxx sequences
558 recognized, with no labels.
560 .Bl -tag -width 20n -offset indent -compact
562 sets the number of columns for the current screen,
565 its parameter is a pointer to an integer containing either a value of 80,
567 Note that setting the number of columns to 132 is only supported on
569 Any unsupported numbers cause the ioctl to fail with
575 .Em VGA color palette interface
577 Only on VGA adaptors, there's a color palette register at the output.
578 It is responsible for the red, green and blue output voltage provided
579 for each of the 256 internal color codes, each lying in the range of
580 0 through 63 (with 63 representing the brightest value for a base color).
581 Thus, these adaptors map each color code to a color of a
583 out of 262144 colors.
586 .Bl -tag -width 20n -offset indent -compact
588 read VGA palette entry, and
590 write VGA palette entry
593 establish an interface to these palette registers.
598 unsigned idx; /* index into palette, 0 .. 255 valid */
599 unsigned r, g, b; /* RGB values, masked by VGA_PMASK (63) */
603 .Em Driver identification
605 .Bl -tag -width 20n -offset indent -compact
607 returns information if the current compiled in driver is pcvt and it's
608 major and minor revision numbers. the call is taking a pointer to the
609 following structure as argument:
613 #define PCVTIDNAMELN 16 /* driver id - string length */
614 char name[PCVTIDNAMELN]; /* driver name, == PCVTIDSTR */
615 #define PCVTIDNAME "pcvt" /* driver id - string */
616 int rmajor; /* revision number, major */
617 #define PCVTIDMAJOR 3
618 int rminor; /* revision number, minor */
619 #define PCVTIDMINOR 00
623 .Bl -tag -width 20n -offset indent -compact
625 returns information if the current compiled in driver is pcvt and it's
626 compile time options. the call is taking a pointer to the following
627 structure as argument:
631 u_int opsys; /* PCVT_xxx(x)BSD */
632 #define CONF_UNKNOWNOPSYS 0
633 #define CONF_386BSD 1 /* unsupported !!! */
634 #define CONF_NETBSD 2
635 #define CONF_FREEBSD 3
636 u_int opsysrel; /* Release for NetBSD/FreeBSD */
637 u_int nscreens; /* PCVT_NSCREENS */
638 u_int scanset; /* PCVT_SCANSET */
639 u_int updatefast; /* PCVT_UPDATEFAST */
640 u_int updateslow; /* PCVT_UPDATESLOW */
641 u_int sysbeepf; /* PCVT_SYSBEEPF */
642 u_int pcburst; /* PCVT_PCBURST */
643 u_int kbd_fifo_sz; /* PCVT_KBD_FIFO_SZ */
645 /* config booleans */
647 u_long compile_opts; /* PCVT_xxxxxxxxxxxxxxx */
653 Depending on the configuration of a
655 driver, their might be a simple screen saver available.
659 .Bl -tag -width 20n -offset indent -compact
661 set timeout for screen saver in seconds; 0 turns it off,
664 taking a pointer to an integer as argument.
665 Despite of its command name,
668 kind of adaptor if configured in by the
673 .Em Compatibility commands for USL-style VT's
676 supports a subset of the USL-style commands used to control
677 the virtual terminal interface.
678 This feature is mainly intended to allow
680 to switch between virtual screens even when
682 They are ugly with respect to the implied semantics
683 .Pq i.\& e., they break Berkeley semantics.
685 .Pa i386/include/pcvt_ioctl.h
686 for their documentation.
688 .Bl -tag -width /usr/include/machine/pcvt_ioctl.h
689 .It Pa /usr/include/machine/pcvt_ioctl.h
695 Device nodes to access the
698 .It Pa i386/isa/pcvt/pcvt_conf.h
699 .Pq relative to the kernel source tree
700 Documents the various compile-time options to tailor
705 driver has been developed for and contributed to 386BSD 0.1.
708 has become a standard part of
718 specific with support for
723 ease further maintenance.
726 .An Hellmuth Michaelis Aq hm@FreeBSD.org
728 .An Brian Dunford-Shore Aq brian@morpheus.wustl.edu
730 .An J\(:org Wunsch Aq joerg@FreeBSD.org
732 This driver is based on several people's previous work, notably
736 .An William Jolitz Aq ljolitz@cardio.ucsf.edu
739 and the keyboard mapping code from
740 .An Holger Veit Aq veit@first.gmd.de.