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
48 .Cd "device vt0 at isa?"
53 driver provides a virtual screen handling system.
54 Probably most important is an emulation of a wide range
60 for a detailed description.
64 driver requires the keyboard driver
66 to be also configured in the kernel.
76 Completely independent virtual terminals for MDA/HGC/CGA/EGA and VGA
78 25, 28, 35, 40, 43 or 50x80 screen resolution for each virtual screen
80 Fully remappable keyboard to support national keyboards
82 All VT220 character sets plus ISO Latin-1 and DEC technical supported
84 VT220 downloadable character set supported when run on EGA/VGA
86 VT220 user defined keys for each virtual terminal
88 Optional function key label support
89 \('a la Hewlett-Packard terminals
91 Display function codes functionality
93 Support for MDA, CGA, EGA and VGA display adaptors
95 Support for 132 column operation on some VGA chipsets
97 X Window Support for XFree86
107 No double wide/high characters
111 No inverse background
113 No VT220 printer output support
115 No VT52 support at all
119 Only limited AT-keyboard
126 virtual terminal has 8 pages of memory attached which are used as a
132 it is possible to scroll the screen back and forward.
136 console driver is available for the Intel-based
139 It has been designed to be highly configurable in order to satisfy
141 The preferred way for those configurations is to
144 lines within the config file, possibly overriding the built-in default
147 The following list gives a short overview of the available configuration
150 .Pa i386/isa/pcvt/pcvt_conf.h
151 in the kernel source tree for detailed documentation.
153 Note: the following conventions apply to all the Boolean options.
154 If an option is given with no value, a value of 1
157 If an option value is given as 0, this options is
159 Any other value is substituted by 1, too.
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). Thus it should be possible to use the
207 terminal information for those terminals without further changes.
208 Note that this is a startup option; it is possible to toggle between
209 the 24- and 25-lines' display by the
215 If enabled, a sequence composed of
217 followed by the normal key code is emitted if a key is pressed with the
220 If disabled, then normal key code with the value
227 Note that there are further options available which are mainly used for
228 debugging purposes or as a workaround for hardware problems.
230 .Pa i386/isa/pcvt/pcvt_conf.h
231 along with their documentation.
232 .Ss Internal Functions
233 The functionality described below may be accessed via
235 system calls with a file descriptor opened on a device node
239 To make use of them, a program should contain the following line:
241 .Dl #include <machine/pcvt_ioctl.h>
243 Any parameter definitions cited below can be found in that file.
245 .Em Keyboard related functions
247 Three functions are related to basic keyboard hardware:
249 .Bl -tag -width 20n -offset indent -compact
251 reset keyboard, set defaults;
253 get current typematic value, parameter is a pointer to int where
254 the values is stored to;
256 set current typematic value, similar to above command.
259 Symbolic values are available for the appropriate constants.
260 To specify the initial typematic delay time, they are
261 KBD_TPD250 for 250 ms through
262 KBD_TPD1000 for 1000 ms, in steps of 250 ms.
265 KBD_TPM300, specifying 30.0 characters per second through
266 KBD_TPM20 for 2.0 characters per second.
267 The intermediate values
268 are: 30.0, 26.7, 24.0, 21.8, 20.0, 18.5, 17.1, 16.0, 15.0, 13.3,
269 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,
270 4.0, 3.7, 3.3, 3.0, 2.7, 2.5, 2.3, 2.1, 2.0 characters per second.
272 .Bl -tag -width 20n -offset indent -compact
274 get key repetition switch, and
276 set key repetition switch
279 again take a pointer to int as argument.
281 drivers internal keyboard repetition flag, possible values are:
282 KBD_REPEATOFF or KBD_REPEATON.
284 .Bl -tag -width 20n -offset indent -compact
288 set LED state manipulate the keyboard indicators, but do not influence
289 the drivers idea of lock key state.
292 The int where the argument points to
294 KBD_SCROLLLOCK, KBD_NUMLOCK, KBD_CAPSLOCK, which may be used in any
297 .Bl -tag -width 20n -offset indent -compact
299 gets state of SCROLL,NUM,CAPS, and
301 sets state of SCROLL,NUM,CAPS + LEDs
304 should be used in a same manner to get/set the drivers internal
307 .Em Keyboard remapping
309 One important feature of the
311 driver is its ability to overload the built in key definition.
313 .Bl -tag -width 20n -offset indent -compact
315 get current key values,
317 set new key assignment values, and
319 get original key assignment values
322 arrange those functions.
323 The take a pointer to a
324 .Em struct kbd_ovlkey
325 as argument as described below.
328 .Bl -tag -width 20n -offset indent -compact
330 removes a key assignment, taking a pointer to an int as argument which
331 contains the affected key number;
333 removes all key assignments.
336 struct kbd_ovlkey /* complete definition of a key */
338 u_short keynum; /* the key itself */
339 u_short type; /* type of key, see below */
340 u_char subu; /* subtype, ignored on write */
341 char unshift[KBDMAXOVLKEYSIZE+1]; /* emitted string, unshifted */
342 u_char subs; /* subtype, ignored on write */
343 char shift[KBDMAXOVLKEYSIZE+1]; /* emitted string, shifted */
344 u_char subc; /* subtype, ignored on write */
345 char ctrl[KBDMAXOVLKEYSIZE+1]; /* emitted string, control */
346 u_char suba; /* subtype, ignored on write */
347 char altgr[KBDMAXOVLKEYSIZE+1]; /* emitted string, altgr */
351 The appropriate values for the
355 .Bl -tag -width 20n -offset indent -compact
357 no function, key is disabled,
361 alternate shift, sets bit8 to ASCII code,
363 numeric shift, keypad numeric / application mode,
365 control code generation,
367 caps shift - swaps case of letter,
369 ASCII code generating key,
379 AltGr translation feature,
393 field contains one of the values
395 .Bl -tag -width 20n -offset indent -compact
397 key is bound to a string, or
399 key is bound to a function.
402 .Em Downloadable character set interface
404 EGA and VGA video adaptors provide the capability of downloadable
407 .Sq native character set
408 of any IBM-compatible PC video board does not allow the full interpretation
409 of DEC multinational character set or ISO Latin-1
411 this might be very useful for a U**X environment.
413 .Bl -tag -width 20n -offset indent -compact
420 are used to manipulate the drivers information about a downloaded
422 The take a pointer to a
423 .Em struct vgafontattr
427 int character_set; /* VGA character set */
428 int font_loaded; /* Mark font loaded or unloaded */
429 int screen_size; /* Character rows per screen */
430 int character_scanlines; /* Scanlines per character - 1 */
431 int screen_scanlines; /* Scanlines per screen - 1 byte */
435 Each character of each font is to be downloaded with
437 .Bl -tag -width 20n -offset indent -compact
443 .Em struct vgaloadchar
447 int character_set; /* VGA character set to load into */
448 int character; /* Character to load */
449 int character_scanlines; /* Scanlines per character */
450 u_char char_table[32]; /* VGA character shape table */
457 CH_SET0, CH_SET1, CH_SET2, CH_SET3 on EGA's or VGA's. Since VGA's
458 might have up to eight simultaneously loaded fonts, they can take
459 CH_SET4, CH_SET5, CH_SET6, or CH_SET7, too.
461 Note that there's a dependence between the font size
462 and a possible screen height
464 depending on the video adaptor used:
466 Screen size (rows) on: EGA VGA
476 .Em General screen manipulation commands
478 .Bl -tag -width 20n -offset indent -compact
483 taking a pointer to the following structure as argument:
486 int screen_no; /* screen number for which to set, */
487 /* or -1 to set on current active screen */
488 int start; /* top scanline, range 0... Character Height - 1 */
489 int end; /* end scanline, range 0... Character Height - 1 */
493 .Bl -tag -width 20n -offset indent -compact
500 provide an interface to some general driver internal variables
501 which might modify the behaviour of the screens,
502 or which might simply be used to force the driver to switch
503 to one certain screen.
504 Their argument is a pointer to the structure:
507 int adaptor_type; /* type of video adaptor installed */
508 /* read only, ignored on write (yet!) */
509 int totalfonts; /* no of downloadable fonts */
510 /* read only, ignored on write */
511 int totalscreens; /* no of virtual screens */
512 /* read only, ignored on write */
513 int screen_no; /* screen number, this was got from */
514 /* on write, if -1, apply pure_vt_mode */
515 /* and/or screen_size to current screen*/
516 /* else to screen_no supplied */
517 int current_screen; /* screen number, which is displayed. */
518 /* on write, if -1, make this screen */
519 /* the current screen, else set current*/
520 /* displayed screen to parameter */
521 int pure_vt_mode; /* flag, pure VT mode or HP/VT mode */
522 /* on write, if -1, no change */
523 int screen_size; /* screen size */
524 /* on write, if -1, no change */
525 int force_24lines; /* force 24 lines if 25 lines VT mode */
526 /* or 28 lines HP mode to get pure */
527 /* VT220 screen size */
528 /* on write, if -1, no change */
529 int vga_family; /* if adaptor_type = VGA, this reflects*/
530 /* the chipset family after a read */
531 /* nothing happenes on write ... */
532 int vga_type; /* if adaptor_type = VGA, this reflects*/
533 /* the chipset after a read */
534 /* nothing happenes on write ... */
535 int vga_132; /* set to 1 if driver has support for */
536 /* 132 column operation for chipset */
537 /* currently ignored on write */
543 may take the values M_HPVT for a mixed VTxxx and HP Mode, with function
544 key labels and a status line, or M_PUREVT for only VTxxx sequences
545 recognized, with no labels.
547 .Bl -tag -width 20n -offset indent -compact
549 sets the number of columns for the current screen,
552 its parameter is a pointer to an integer containing either a value of 80,
554 Note that setting the number of columns to 132 is only supported on
556 Any unsupported numbers cause the ioctl to fail with
563 .Em VGA color palette interface
565 Only on VGA adaptors, there's a color palette register at the output.
566 It is responsible for the red, green and blue output voltage provided
567 for each of the 256 internal color codes, each lying in the range of
568 0 through 63 (with 63 representing the brightest value for a base color).
569 Thus, these adaptors map each color code to a color of a
571 out of 262144 colors.
574 .Bl -tag -width 20n -offset indent -compact
576 read VGA palette entry, and
578 write VGA palette entry
581 establish an interface to these palette registers.
586 unsigned idx; /* index into palette, 0 .. 255 valid */
587 unsigned r, g, b; /* RGB values, masked by VGA_PMASK (63) */
591 .Em Driver identification
593 .Bl -tag -width 20n -offset indent -compact
595 returns information if the current compiled in driver is pcvt and it's
596 major and minor revision numbers. the call is taking a pointer to the
597 following structure as argument:
601 #define PCVTIDNAMELN 16 /* driver id - string length */
602 char name[PCVTIDNAMELN]; /* driver name, == PCVTIDSTR */
603 #define PCVTIDNAME "pcvt" /* driver id - string */
604 int rmajor; /* revision number, major */
605 #define PCVTIDMAJOR 3
606 int rminor; /* revision number, minor */
607 #define PCVTIDMINOR 00
611 .Bl -tag -width 20n -offset indent -compact
613 returns information if the current compiled in driver is pcvt and it's
614 compile time options. the call is taking a pointer to the following
615 structure as argument:
619 u_int opsys; /* PCVT_xxx(x)BSD */
620 #define CONF_UNKNOWNOPSYS 0
621 #define CONF_386BSD 1 /* unsupported !!! */
622 #define CONF_NETBSD 2
623 #define CONF_FREEBSD 3
624 u_int opsysrel; /* Release for NetBSD/FreeBSD */
625 u_int nscreens; /* PCVT_NSCREENS */
626 u_int scanset; /* PCVT_SCANSET */
627 u_int updatefast; /* PCVT_UPDATEFAST */
628 u_int updateslow; /* PCVT_UPDATESLOW */
629 u_int sysbeepf; /* PCVT_SYSBEEPF */
630 u_int pcburst; /* PCVT_PCBURST */
631 u_int kbd_fifo_sz; /* PCVT_KBD_FIFO_SZ */
633 /* config booleans */
635 u_long compile_opts; /* PCVT_xxxxxxxxxxxxxxx */
641 Depending on the configuration of a
643 driver, their might be a simple screen saver available.
647 .Bl -tag -width 20n -offset indent -compact
649 set timeout for screen saver in seconds; 0 turns it off,
652 taking a pointer to an integer as argument.
653 Despite of its command name,
656 kind of adaptor if configured in by the
661 .Em Compatibility commands for USL-style VT's
664 supports a subset of the USL-style commands used to control
665 the virtual terminal interface.
666 This feature is mainly intended to allow
668 to switch between virtual screens even when
670 They are ugly with respect to the implied semantics
671 (i.e., they break Berkeley semantics).
673 .Pa i386/include/pcvt_ioctl.h
674 for their documentation.
676 .Bl -tag -width /usr/include/machine/pcvt_ioctl.h
677 .It Pa /usr/include/machine/pcvt_ioctl.h
683 Device nodes to access the
686 .It Pa i386/isa/pcvt/pcvt_conf.h
687 (relative to the kernel source tree)
688 Documents the various compile-time options to tailor
694 driver has been developed for and contributed to 386BSD 0.1.
697 has become a standard part of
707 specific with support for
712 ease further maintenance.
716 .An Hellmuth Michaelis Aq hm@FreeBSD.org
718 .An Brian Dunford-Shore Aq brian@morpheus.wustl.edu
720 .An J\(:org Wunsch Aq joerg@FreeBSD.org .
722 This driver is based on several people's previous work, notably
726 .An William Jolitz Aq ljolitz@cardio.ucsf.edu
729 and the keyboard mapping code from
730 .An Holger Veit Aq veit@first.gmd.de .