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.
78 Completely independent virtual terminals for MDA/HGC/CGA/EGA and VGA
80 25, 28, 35, 40, 43 or 50x80 screen resolution for each virtual screen
82 Fully remappable keyboard to support national keyboards
84 All VT220 character sets plus ISO Latin-1 and DEC technical supported
86 VT220 downloadable character set supported when run on EGA/VGA
88 VT220 user defined keys for each virtual terminal
90 Optional function key label support
91 \('a la Hewlett-Packard terminals
93 Display function codes functionality
95 Support for MDA, CGA, EGA and VGA display adaptors
97 Support for 132 column operation on some VGA chipsets
99 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 way for those configurations is to
148 lines within the config file, possibly overriding the built-in default
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 the Boolean options.
158 If an option is given with no value, a value of 1
161 If an option value is given as 0, this options is
163 Any other value is substituted by 1, too.
165 is omitted, a built-in default is assumed.
166 .Bl -tag -width indent
168 Defines the number of virtual screens.
171 .It Em PCVT_VT220KEYB
172 If activated, a keyboard layout resembling a DEC VT200 (TM) is generated.
173 If deactivated, a mixture between VT220 and HP is used.
180 documentation directory for a full description.
183 .It Em PCVT_SCREENSAVER
184 Enables the builtin screensaver feature.
187 .It Em PCVT_PRETTYSCRNS
188 If enabled, a blinking-star screensaver is used.
189 If disabled, the screen
191 .Pq which might be useful for energy-saving monitors .
194 .It Em PCVT_CTRL_ALT_DEL
195 If enabled, the key combination
202 .It Em PCVT_USEKBDSEC
203 Do NOT override a security lock for the keyboard.
206 .It Em PCVT_24LINESDEF
207 If enabled, the 25-line modi
209 VT emulation with 25 lines, and HP emulation with 28 lines
211 default to 24 lines only to provide a better compatibility to the
212 original DEV VT220 (TM). Thus it should be possible to use the
213 terminal information for those terminals without further changes.
214 Note that this is a startup option; it is possible to toggle between
215 the 24- and 25-lines' display by the
221 If enabled, a sequence composed of
223 followed by the normal key code is emitted if a key is pressed with the
226 If disabled, then normal key code with the value
233 Note that there are further options available which are mainly used for
234 debugging purposes or as a workaround for hardware problems.
236 .Pa i386/isa/pcvt/pcvt_conf.h
237 along with their documentation.
238 .Ss Internal Functions
239 The functionality described below may be accessed via
241 system calls with a file descriptor opened on a device node
245 To make use of them, a program should contain the following line:
247 .Dl #include <machine/pcvt_ioctl.h>
249 Any parameter definitions cited below can be found in that file.
251 .Em Keyboard related functions
253 Three functions are related to basic keyboard hardware:
255 .Bl -tag -width 20n -offset indent -compact
257 reset keyboard, set defaults;
259 get current typematic value, parameter is a pointer to int where
260 the values is stored to;
262 set current typematic value, similar to above command.
265 Symbolic values are available for the appropriate constants.
266 To specify the initial typematic delay time, they are
267 KBD_TPD250 for 250 ms through
268 KBD_TPD1000 for 1000 ms, in steps of 250 ms.
271 KBD_TPM300, specifying 30.0 characters per second through
272 KBD_TPM20 for 2.0 characters per second.
273 The intermediate values
274 are: 30.0, 26.7, 24.0, 21.8, 20.0, 18.5, 17.1, 16.0, 15.0, 13.3,
275 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,
276 4.0, 3.7, 3.3, 3.0, 2.7, 2.5, 2.3, 2.1, 2.0 characters per second.
278 .Bl -tag -width 20n -offset indent -compact
280 get key repetition switch, and
282 set key repetition switch
285 again take a pointer to int as argument.
287 drivers internal keyboard repetition flag, possible values are:
288 KBD_REPEATOFF or KBD_REPEATON.
290 .Bl -tag -width 20n -offset indent -compact
294 set LED state manipulate the keyboard indicators, but do not influence
295 the drivers idea of lock key state.
298 The int where the argument points to
300 KBD_SCROLLLOCK, KBD_NUMLOCK, KBD_CAPSLOCK, which may be used in any
303 .Bl -tag -width 20n -offset indent -compact
305 gets state of SCROLL,NUM,CAPS, and
307 sets state of SCROLL,NUM,CAPS + LEDs
310 should be used in a same manner to get/set the drivers internal
313 .Em Keyboard remapping
315 One important feature of the
317 driver is its ability to overload the built in key definition.
319 .Bl -tag -width 20n -offset indent -compact
321 get current key values,
323 set new key assignment values, and
325 get original key assignment values
328 arrange those functions.
329 The take a pointer to a
330 .Em struct kbd_ovlkey
331 as argument as described below.
334 .Bl -tag -width 20n -offset indent -compact
336 removes a key assignment, taking a pointer to an int as argument which
337 contains the affected key number;
339 removes all key assignments.
342 struct kbd_ovlkey /* complete definition of a key */
344 u_short keynum; /* the key itself */
345 u_short type; /* type of key, see below */
346 u_char subu; /* subtype, ignored on write */
347 char unshift[KBDMAXOVLKEYSIZE+1]; /* emitted string, unshifted */
348 u_char subs; /* subtype, ignored on write */
349 char shift[KBDMAXOVLKEYSIZE+1]; /* emitted string, shifted */
350 u_char subc; /* subtype, ignored on write */
351 char ctrl[KBDMAXOVLKEYSIZE+1]; /* emitted string, control */
352 u_char suba; /* subtype, ignored on write */
353 char altgr[KBDMAXOVLKEYSIZE+1]; /* emitted string, altgr */
357 The appropriate values for the
361 .Bl -tag -width 20n -offset indent -compact
363 no function, key is disabled,
367 alternate shift, sets bit8 to ASCII code,
369 numeric shift, keypad numeric / application mode,
371 control code generation,
373 caps shift - swaps case of letter,
375 ASCII code generating key,
385 AltGr translation feature,
399 field contains one of the values
401 .Bl -tag -width 20n -offset indent -compact
403 key is bound to a string, or
405 key is bound to a function.
408 .Em Downloadable character set interface
410 EGA and VGA video adaptors provide the capability of downloadable
413 .Sq native character set
414 of any IBM-compatible PC video board does not allow the full interpretation
415 of DEC multinational character set or ISO Latin-1
417 this might be very useful for a U**X environment.
419 .Bl -tag -width 20n -offset indent -compact
426 are used to manipulate the drivers information about a downloaded
428 The take a pointer to a
429 .Em struct vgafontattr
433 int character_set; /* VGA character set */
434 int font_loaded; /* Mark font loaded or unloaded */
435 int screen_size; /* Character rows per screen */
436 int character_scanlines; /* Scanlines per character - 1 */
437 int screen_scanlines; /* Scanlines per screen - 1 byte */
441 Each character of each font is to be downloaded with
443 .Bl -tag -width 20n -offset indent -compact
449 .Em struct vgaloadchar
453 int character_set; /* VGA character set to load into */
454 int character; /* Character to load */
455 int character_scanlines; /* Scanlines per character */
456 u_char char_table[32]; /* VGA character shape table */
463 CH_SET0, CH_SET1, CH_SET2, CH_SET3 on EGA's or VGA's. Since VGA's
464 might have up to eight simultaneously loaded fonts, they can take
465 CH_SET4, CH_SET5, CH_SET6, or CH_SET7, too.
467 Note that there's a dependence between the font size
468 and a possible screen height
469 .Pq in character rows ,
470 depending on the video adaptor used:
472 Screen size (rows) on: EGA VGA
482 .Em General screen manipulation commands
484 .Bl -tag -width 20n -offset indent -compact
489 taking a pointer to the following structure as argument:
492 int screen_no; /* screen number for which to set, */
493 /* or -1 to set on current active screen */
494 int start; /* top scanline, range 0... Character Height - 1 */
495 int end; /* end scanline, range 0... Character Height - 1 */
499 .Bl -tag -width 20n -offset indent -compact
506 provide an interface to some general driver internal variables
507 which might modify the behaviour of the screens,
508 or which might simply be used to force the driver to switch
509 to one certain screen.
510 Their argument is a pointer to the structure:
513 int adaptor_type; /* type of video adaptor installed */
514 /* read only, ignored on write (yet!) */
515 int totalfonts; /* no of downloadable fonts */
516 /* read only, ignored on write */
517 int totalscreens; /* no of virtual screens */
518 /* read only, ignored on write */
519 int screen_no; /* screen number, this was got from */
520 /* on write, if -1, apply pure_vt_mode */
521 /* and/or screen_size to current screen*/
522 /* else to screen_no supplied */
523 int current_screen; /* screen number, which is displayed. */
524 /* on write, if -1, make this screen */
525 /* the current screen, else set current*/
526 /* displayed screen to parameter */
527 int pure_vt_mode; /* flag, pure VT mode or HP/VT mode */
528 /* on write, if -1, no change */
529 int screen_size; /* screen size */
530 /* on write, if -1, no change */
531 int force_24lines; /* force 24 lines if 25 lines VT mode */
532 /* or 28 lines HP mode to get pure */
533 /* VT220 screen size */
534 /* on write, if -1, no change */
535 int vga_family; /* if adaptor_type = VGA, this reflects*/
536 /* the chipset family after a read */
537 /* nothing happenes on write ... */
538 int vga_type; /* if adaptor_type = VGA, this reflects*/
539 /* the chipset after a read */
540 /* nothing happenes on write ... */
541 int vga_132; /* set to 1 if driver has support for */
542 /* 132 column operation for chipset */
543 /* currently ignored on write */
549 may take the values M_HPVT for a mixed VTxxx and HP Mode, with function
550 key labels and a status line, or M_PUREVT for only VTxxx sequences
551 recognized, with no labels.
553 .Bl -tag -width 20n -offset indent -compact
555 sets the number of columns for the current screen,
558 its parameter is a pointer to an integer containing either a value of 80,
560 Note that setting the number of columns to 132 is only supported on
562 Any unsupported numbers cause the ioctl to fail with
568 .Em VGA color palette interface
570 Only on VGA adaptors, there's a color palette register at the output.
571 It is responsible for the red, green and blue output voltage provided
572 for each of the 256 internal color codes, each lying in the range of
573 0 through 63 (with 63 representing the brightest value for a base color).
574 Thus, these adaptors map each color code to a color of a
576 out of 262144 colors.
579 .Bl -tag -width 20n -offset indent -compact
581 read VGA palette entry, and
583 write VGA palette entry
586 establish an interface to these palette registers.
591 unsigned idx; /* index into palette, 0 .. 255 valid */
592 unsigned r, g, b; /* RGB values, masked by VGA_PMASK (63) */
596 .Em Driver identification
598 .Bl -tag -width 20n -offset indent -compact
600 returns information if the current compiled in driver is pcvt and it's
601 major and minor revision numbers. the call is taking a pointer to the
602 following structure as argument:
606 #define PCVTIDNAMELN 16 /* driver id - string length */
607 char name[PCVTIDNAMELN]; /* driver name, == PCVTIDSTR */
608 #define PCVTIDNAME "pcvt" /* driver id - string */
609 int rmajor; /* revision number, major */
610 #define PCVTIDMAJOR 3
611 int rminor; /* revision number, minor */
612 #define PCVTIDMINOR 00
616 .Bl -tag -width 20n -offset indent -compact
618 returns information if the current compiled in driver is pcvt and it's
619 compile time options. the call is taking a pointer to the following
620 structure as argument:
624 u_int opsys; /* PCVT_xxx(x)BSD */
625 #define CONF_UNKNOWNOPSYS 0
626 #define CONF_386BSD 1 /* unsupported !!! */
627 #define CONF_NETBSD 2
628 #define CONF_FREEBSD 3
629 u_int opsysrel; /* Release for NetBSD/FreeBSD */
630 u_int nscreens; /* PCVT_NSCREENS */
631 u_int scanset; /* PCVT_SCANSET */
632 u_int updatefast; /* PCVT_UPDATEFAST */
633 u_int updateslow; /* PCVT_UPDATESLOW */
634 u_int sysbeepf; /* PCVT_SYSBEEPF */
635 u_int pcburst; /* PCVT_PCBURST */
636 u_int kbd_fifo_sz; /* PCVT_KBD_FIFO_SZ */
638 /* config booleans */
640 u_long compile_opts; /* PCVT_xxxxxxxxxxxxxxx */
646 Depending on the configuration of a
648 driver, their might be a simple screen saver available.
652 .Bl -tag -width 20n -offset indent -compact
654 set timeout for screen saver in seconds; 0 turns it off,
657 taking a pointer to an integer as argument.
658 Despite of its command name,
661 kind of adaptor if configured in by the
666 .Em Compatibility commands for USL-style VT's
669 supports a subset of the USL-style commands used to control
670 the virtual terminal interface.
671 This feature is mainly intended to allow
673 to switch between virtual screens even when
675 They are ugly with respect to the implied semantics
676 (i.e., they break Berkeley semantics).
678 .Pa i386/include/pcvt_ioctl.h
679 for their documentation.
681 .Bl -tag -width /usr/include/machine/pcvt_ioctl.h
682 .It Pa /usr/include/machine/pcvt_ioctl.h
688 Device nodes to access the
691 .It Pa i386/isa/pcvt/pcvt_conf.h
692 .Pq relative to the kernel source tree
693 Documents the various compile-time options to tailor
699 driver has been developed for and contributed to 386BSD 0.1.
702 has become a standard part of
712 specific with support for
717 ease further maintenance.
721 .An Hellmuth Michaelis Aq hm@FreeBSD.org
723 .An Brian Dunford-Shore Aq brian@morpheus.wustl.edu
725 .An J\(:org Wunsch Aq joerg@FreeBSD.org .
727 This driver is based on several people's previous work, notably
731 .An William Jolitz Aq ljolitz@cardio.ucsf.edu
734 and the keyboard mapping code from
735 .An Holger Veit Aq veit@first.gmd.de .