*BSD News Article 9902


Return to BSD News archive

Received: by minnie.vk1xwt.ampr.org with NNTP
	id AA6775 ; Fri, 15 Jan 93 10:31:21 EST
Xref: sserve comp.unix.bsd:9959 alt.sources:4983
Path: sserve!manuel.anu.edu.au!munnari.oz.au!spool.mu.edu!umn.edu!lynx.unm.edu!fmsrl7!destroyer!gumby!yale!yale.edu!ira.uka.de!Germany.EU.net!hcshh!hm
From: hm@hcshh.hcs.de (Hellmuth Michaelis)
Newsgroups: comp.unix.bsd,alt.sources
Subject: [386BSD] pcvt 2.00 - VT220 console driver (part 01/11)
Summary: 386BSD 0.1 VT220 console device driver source code
Keywords: 386BSD console driver VT220
Message-ID: <1617@hcshh.hcs.de>
Date: 15 Jan 93 13:01:54 GMT
Followup-To: comp.unix.bsd
Organization: HCS GmbH, Hamburg, Europe
Lines: 2237

Submitted-by: hm@hcshh.hcs.de (Hellmuth Michaelis)
Archive-name: pcvt-2.00/part01


This is release 2.0 of pcvt, a replacement for the 386BSD 0.1 'pccons' console
driver.

The first release was posted to alt.sources under the name 'pccons_vga' - the
name changed because it does no longer support only VGA's but now MDA's, CGA's
and EGA's as well.

First, it's now a nearly full VT220 emulation with the addition of having a
ISO-Latin 1 and a DEC Technical characterset.

Second, some bugs in the dark corners of the VT-emulation were fixed.

Third, many features were added regarding EGA and VGA boards, such as 
loadable fonts support, screen sizes of 25x80 - 50x80 and much more.

It still has 4 switchable virtual screens and no X-support at all, sorry !

All standard VT220 charactersets are supported as well as VT220 downloadable
charactersets (on one virtual screen) and VT220 user defined function keys.

The keyboard is remappable for full support of national keyboards.

Several utility programs are provided to control and (re-) configure the
driver, man-pages are provided for the driver and all utilities.

For more information, have a look at the file "README.FIRST" in the base
directory and the file "INSTALLATION" in the Doc directory.
 
The driver went through a long beta test phase - it is very stable now.
If you add things or hack the code to make it run on your hardware, please
send diffs ! If you can't get it up and running, get in contact with me !

This driver contains some sections of experimental code (enclosed in ifdefs
to be not compiled in by default) mainly for the keyboard section. Expect a
new release of this driver when the new keyboard code (and other things) is
ready and fully tested.

I would like to thank Brian Dunford-Shore, who wrote large portions of the
code and who was a reliable partner in debugging and finetuning the driver,
Joerg Wunsch, who added many features to the driver during the (rather long)
beta test phase and Scott Turner, Peter Galbavy and Michael Havemester for
being responsive and patient beta testers and suppliers of ideas and code.

Hellmuth


---- Cut Here and unpack ----
#!/bin/sh
# This is pcvt-2.00, a shell archive (shar 3.24)
# made 01/15/1993 11:27 UTC by hm@hcshh.hcs.de (Hellmuth Michaelis)
# Source directory /users/hm/src/pcvt/rel20
#
# existing files will NOT be overwritten
#
# This shar contains:
# length  mode       name
# ------ ---------- ------------------------------------------
#   1682 -rw-rw---- Doc/Acknowledgements
#   2371 -rw-rw---- Doc/Bibliography
#   3835 -rw-rw---- Doc/Charsets
#   5476 -rw-rw---- Doc/EscapeSequences
#   6848 -rw-rw---- Doc/Keyboard.HP
#   6730 -rw-rw---- Doc/Keyboard.VT
#     37 -rw-rw---- Doc/Makefile
#   4015 -rw-rw---- Doc/Termcap
#  16662 -rw-rw---- Doc/pcvt.4
#    215 -rwxrwx--- Doc/MAKEDEV.pcvt
#   7334 -rw-rw---- Doc/INSTALLATION
#  10000 -rw-rw---- README.FIRST
#    101 -rw-rw---- Support/Makefile
#     72 -rw-rw---- Support/fontedit/Makefile
#   1482 -rw-r----- Support/fontedit/README
#   1927 -rw-r----- Support/fontedit/fontedit.1
#  18519 -rw-r----- Support/fontedit/fontedit.c
#     71 -rw-rw---- Support/userkeys/Makefile
#   3818 -rw-r----- Support/userkeys/vt220keys.1
#   9348 -rw-r----- Support/userkeys/vt220keys.c
#    141 -rw-rw---- Support/demo/README
#   3544 -rw-rw---- Support/demo/colors.vt.uu
#    219 -rw-rw---- Support/demo/Makefile
#   9886 -rw-rw---- Support/demo/chardemo.vt.uu
#     92 -rw-rw---- Support/vttest/Makefile
#   2484 -rw-r----- Support/vttest/README
#   8060 -rw-r----- Support/vttest/esc.c
#   1397 -rw-r----- Support/vttest/header.h
#  57952 -rw-r----- Support/vttest/main.c
#    351 -rw-r----- Support/vttest/vttest.1
#   9469 -rw-r----- Support/uemacs/dot-emacsrc
#   8365 -rw-r----- Support/uemacs/emacs.hlp
#  38978 -rw-r----- Support/uemacs/unix.c-3.11a
#   4968 -rw-r----- Support/fonts/vt100pc.814.uu
#   4968 -rw-r----- Support/fonts/vt100sg.814.uu
#    502 -rw-rw---- Support/fonts/Makefile
#   2851 -rw-r----- Support/fonts/vt220h.808.uu
#   3557 -rw-r----- Support/fonts/vt220l.810.uu
#   3557 -rw-r----- Support/fonts/vt220h.810.uu
#   2851 -rw-r----- Support/fonts/vt220l.808.uu
#   4967 -rw-r----- Support/fonts/vt220l.814.uu
#   4967 -rw-r----- Support/fonts/vt220h.814.uu
#   5675 -rw-r----- Support/fonts/vt220l.816.uu
#   5675 -rw-r----- Support/fonts/vt220h.816.uu
#   1965 -rw-rw---- Support/fonts/COPYRIGHT
#    495 -rw-rw---- Support/keycap/Makefile
#   3568 -rw-r----- Support/keycap/keycap.3
#  10218 -rw-r----- Support/keycap/keycap.c
#   2267 -rw-r----- Support/keycap/keycap.h
#   2558 -rw-r----- Support/keycap/keycap.src
#   4426 -rw-r----- Support/keycap/keycap-file.5
#    120 -rw-rw---- Support/Makefile.inc
#   3759 -rw-r----- Support/loadfont/loadfont.1
#   8382 -rw-r----- Support/loadfont/loadfont.c
#    173 -rw-rw---- Support/loadfont/Makefile
#   5863 -rw-r----- Support/scon/scon.1
#  15668 -rw-r----- Support/scon/scon.c
#    165 -rw-rw---- Support/scon/Makefile
#   4522 -rw-r----- Support/kcon/kcon.1
#  15057 -rw-r----- Support/kcon/kcon.c
#    381 -rw-rw---- Support/kcon/Makefile
#   3059 -rw-r----- Support/cursor/cursor.1
#   3231 -rw-r----- Support/cursor/cursor.c
#    169 -rw-rw---- Support/cursor/Makefile
#  12263 -rw-rw---- pcvt_drv.c
#  29799 -rw-rw---- pcvt_hdr.h
#  12192 -rw-rw---- pcvt_ioctl.h
#  74085 -rw-rw---- pcvt_kbd.c
#  88687 -rw-rw---- pcvt_out.c
#  40075 -rw-rw---- pcvt_sup.c
#  21369 -rw-rw---- pcvt_tbl.h
#
if touch 2>&1 | fgrep '[-amc]' > /dev/null
 then TOUCH=touch
 else TOUCH=true
fi
# ============= Doc/Acknowledgements ==============
if test ! -d 'Doc'; then
    echo "x - creating directory Doc"
    mkdir 'Doc'
fi
if test X"$1" != X"-c" -a -f 'Doc/Acknowledgements'; then
	echo "File already exists: skipping 'Doc/Acknowledgements'"
else
echo "x - extracting Doc/Acknowledgements (Text)"
sed 's/^X//' << 'SHAR_EOF' > Doc/Acknowledgements &&
XThank You,					    (in the order of appearence)
X
X
X	Lynne and Bill Jolitz
X
X		for your work on 386BSD and making all this possible !
X
X
X	Holger Veit		(veit@du9ds3.uni-duisburg.de)
X
X		for the permission to use a modified version of his keyboard
X		driver and utilities for keyboard remapping / multinational
X		keyboard support.
X
X
X	Per Lindberg
X
X		for the extremly helpful vt100 terminal testprogram found
X		in the directory vttest.
X
X
X	John Birchfield	
X
X		for the ncsa telnet package, which contains a vt100 emulation
X		and which was very helpful in studying some concepts.
X
X
X	Ralf Friedl		(friedl@informatik.uni-kl.de)
X
X		for making his implementation of multi-sceens for the net-2
X		distribution available.	i looked at this and took some ideas
X		and lines from his code.
X
X
X	Bruce Evans		(bde@runx.oz.au)
X
X		for contributing some bugfixes and a complete termcap entry
X
X
X	Brian H. Dunford-Shore  (brian@morpheus.wustl.edu)
X
X		for contributing most of the EGA/VGA screen switching code
X		and being a fast, reliable and responsive co-author. This
X		driver would not be what it is without Brian, Thank You !
X
X
X	Frank da Cruz		(fdc@columbia.edu)
X
X		for my famous datacomm program and for giving the permission
X		to redistribute files from the msdos kermit distribution
X		located in the directory support/demo.
X
X
X	Joerg Wunsch		(joerg_wunsch@uriah.sax.de)
X
X		for contributing precise bugreports and -fixes, the 8x10
X		EGA/VGA fonts and the color palette ioctls and for being
X		a very reponsive contributor of various ideas.
X
X
X	Scott Turner		(scotty@gagetalker.com)
X
X		for contributing code to change the winsize structure, many
X		discussions on the keyboard code and fine-tuning the driver
X		
SHAR_EOF
$TOUCH -am 0114130593 Doc/Acknowledgements &&
chmod 0660 Doc/Acknowledgements ||
echo "restore of Doc/Acknowledgements failed"
set `wc -c Doc/Acknowledgements`;Wc_c=$1
if test "$Wc_c" != "1682"; then
	echo original size 1682, current size $Wc_c
fi
fi
# ============= Doc/Bibliography ==============
if test X"$1" != X"-c" -a -f 'Doc/Bibliography'; then
	echo "File already exists: skipping 'Doc/Bibliography'"
else
echo "x - extracting Doc/Bibliography (Text)"
sed 's/^X//' << 'SHAR_EOF' > Doc/Bibliography &&
XA list of books and papers i found useful to look at while writing the driver:
X
X
X	Richard Wilton, "Programmers Guide to PC & PS/2 Video Systems",
X		Microsoft Press 1987
X
X
X	Richard F. Ferraro, "Programmers Guide to the EGA and VGA Cards",
X		Second Edition, Addison-Wesley 1990
X
X
X	Matthias Uphoff, "Die Programmierung der EGA/VGA Grafikkarte",
X		Addison Wesley 1992
X
X
X	George Pajari, "Writing Unix Device Drivers"
X		Addison Wesley 1992
X
X
X	Janet I. Egan and Thomas J. Teixeira, "Writing a UNIX Device Driver"
X		John Wiley & Sons 1988
X
X
X	Leffler, McKusick, Karels, Quarterman, "The Design and Implementation
X		of the 4.3BSD UNIX Operating System"
X		Addison Wesley 1988, corrected Reprint 1989
X
X
X	Leffler, McKusick, "The Design and Implementation of the 4.3BSD UNIX
X		Operating System, Answer Book"
X		Addison Wesley 1991
X
X
X	Digital Equipment, VT100 Users Manual, 2nd ed. 1979
X	Digital Equipment, VT132 Users Manual
X	Digital Equipment, VT220 Programmers Reference Manual, 2nd ed. 1984
X		Digital Equipment Corporation
X
X
X	Hewlett Packard, 700/92 Technical Reference Manual (ANSI Operation)
X	Hewlett Packard, 2392a Users Manual (ANSI Operation)
X		Hewlett-Packard Company
X
X	
X	Thom Hogan, "The Programmers PC Sourcebook", 2nd Edition
X		Microsoft Press, 1991
X
X
X	John Strang, Linda Mui and Tim O'Reilly, "Termcap and Terminfo",
X		O'Reilly & Associates, Inc. , April 1991
X
X
X	Richard M. Stallman, "Termcap - The Termcap Library and Data Base",
X		Free Software Foundation, Second Edition November 1988
X
X
X	Walker Richer & Quinn, Inc., "Reflection 2 and Reflection 4 Technical
X		Reference Manual", Version 4.2
X		Walker, Richer & Quinn, Seattle, August 1992
X
X
X	Phoenix Technologies Ltd., "System BIOS for IBM PC/XT/AT Computers
X		and Compatibles", Addison Wesley, Fourth Printing June 1990
X
X
X	Intel Corporation, "Microsystem Components Handbook Volume II",
X		Intel Corporation, 1984
X
X
X	Intel Corporation, "Peripheral Design Handbook",
X		Intel Corporation, 1980
X
X
X	Sun Microsystems Inc., "Writing Device Drivers"
X		Part No. 800-3851-10, Revision A of 27 March 1990
X
X	
X	Hewlett-Packard Company, "HP-UX Driver Development Guide",
X		Part No. 98577-90013, First Edition 07/91
X
X
X	W. Richard Stevens, "Advanced Programming in the UNIX Environment",
X		Addison Wesley 1992
X
X
X	IBM Corporation, "Technical Reference Personal Computer AT",
X		Part No. 6280070, Form No. S229-9611-00, First Edition 1985
SHAR_EOF
$TOUCH -am 0114130593 Doc/Bibliography &&
chmod 0660 Doc/Bibliography ||
echo "restore of Doc/Bibliography failed"
set `wc -c Doc/Bibliography`;Wc_c=$1
if test "$Wc_c" != "2371"; then
	echo original size 2371, current size $Wc_c
fi
fi
# ============= Doc/Charsets ==============
if test X"$1" != X"-c" -a -f 'Doc/Charsets'; then
	echo "File already exists: skipping 'Doc/Charsets'"
else
echo "x - extracting Doc/Charsets (Text)"
sed 's/^X//' << 'SHAR_EOF' > Doc/Charsets &&
X
XI.	Character Set Selection on VT220 Terminals
X==================================================
X
X
Xname	 C0            GL            C1            GR
X	+---+ +-------------------+ +---+ +-------------------+
X	|00h| |                   | |80h| |                   |
Xrange	| | | |    20h .. 7fh     | | | | |    a0h .. ffh     |
X	|1fh| |                   | |9fh| |                   |
X	+---+ +-------------------+ +---+ +-------------------+
Xlength	 32            96            32            96		
X
X           /\
XSECOND    /||\	"lock"- or "single"-shift one set of G0, G1, G2 or
XSTEP	   ||	G3 into one of the "displayable" charactersets GL
X           ||	or GR. (escape) sequences are: SI, SO, ESC ~, ESC n,
X           ||	ESC }, ESC o, ESC |, ESC N and ESC O.		
X
X	+----+         +----+          +----+            +----+    
Xname    | G0 |         | G1 |          | G2 |            | G3 |
Xlength  |(96)|         |(96)|          |(96)|            |(96)|
X	+----+         +----+          +----+            +----+    
X
X           /\
X          /||\	designate a hard or a soft character set as 
X	   ||	one of G0, G1, G2 or G3, used escape sequences
XFIRST      ||	are, ESC ( X, ESC ) X, ESC * X and ESC + X - where X is
XSTEP       ||	B for ascii, < for supplemental, 0 for special, A for
X           ||	british, 4 for dutch, C and 5 for finnish etc. etc. ...
X           ||
X
X	+-----+ +------------+ +--------+ +-----------+ +------------+
Xname	|ascii| |supplemental| |special | | national  | |downloadable|
X	|     | |  graphics  | |graphics| |replacement| |characterset|
Xlength  | (96)| |        (96)| |    (96)| |       (96)| |        (96)|
X	+-----+ +------------+ +--------+ +-----------+ +------------+
X
X        \-------\ /----------/             norway/danish
X                 |                         dutch
X        together, this is also             finnish
X        referred to as the                 french
X        multinational character            french canada
X        set (power on default              german
X        on a dec vt220)                    italian
X                                           spanish
X                                           swedish
X                                           swiss
X
X
XII.	Emulating Character Set Selection
X=========================================
X
XMDA/HCG/CGA:
X
X	just a partial emulation is done, because these boards don't allow
X	downloadable charactersets. some characters simply don't display
X	because they are not in the characterset roms on the video board.
X
X	if you want to change the mapping, have a look at the default tables
X	in pcvt_tbl.h.
X
XEGA/VGA:
X
X	these cards have provisions for downloadable charactersets and so
X	many vt220/vt320 charctersets are fully supported:
X
X		- US Ascii
X		- DEC Supplemental
X		- DEC Special Graphic
X		- DEC Technical
X		- ISO Latin-1
X		- Downloadable
X
X	when the emulator is started, it behaves initially similar to
X	the MDA/CGA/HCG method described above.
X
X	when a second (special) characterset for a given screen resolution
X	is loaded via the "loadfont" utility, the emulator detects this fact
X	and uses from then on extended tables to access the second charset
X	as an upper half 512 characterset in terms of ega/vga speak.
X
X	from this time on, vt220 downloadable fonts are usable.
X
X	the organization of this extended characterset is as follows:
X
X		0x00 ... 0x1f	C0 display function fonts
X		0x20 ... 0x3f	C1 display function fonts
X		0x40 ... 0x9f	fonts for DEC Supplemental, DEC Special
X				Graphic, DEC Technical and ISO Latin-1
X		0xa0 ... 0xff	VT220 Downloadable Font
X	
X	the mapping between vt220 charactersets and the charctersets inside
X	the ega/vga is done by tables found in the file pcvt_tbl.h.
X	
X	there is a MSDOS fonteditor called "EVAFONT" available on the
X	SIMTEL-20 archive, which i used to edit the character sets in the
X	distribution.
X
SHAR_EOF
$TOUCH -am 0114130593 Doc/Charsets &&
chmod 0660 Doc/Charsets ||
echo "restore of Doc/Charsets failed"
set `wc -c Doc/Charsets`;Wc_c=$1
if test "$Wc_c" != "3835"; then
	echo original size 3835, current size $Wc_c
fi
fi
# ============= Doc/EscapeSequences ==============
if test X"$1" != X"-c" -a -f 'Doc/EscapeSequences'; then
	echo "File already exists: skipping 'Doc/EscapeSequences'"
else
echo "x - extracting Doc/EscapeSequences (Text)"
sed 's/^X//' << 'SHAR_EOF' > Doc/EscapeSequences &&
X  Control Codes and Escape Sequences supported by the pcvt-driver Release 2.0
X===============================================================================
X
XCONTROL CODES
X-------------------------------------------------------------------------------
X
X	NUL (0x00)	ignored
X	SOH (0x01)	ignored
X	STX (0x02)	ignored
X	ETX (0x03)	ignored
X	EOT (0x04)	ignored
X	ENQ (0x05)	ignored
X	ACK (0x06)	ignored
X
X	BEL (0x07)	beep
X
X	BS  (0x08)	move one caracter position to the left
X			until at left margin
X
X	HT  (0x09)	move to next tab stop
X
X	LF  (0x0a)	move to next line, same column
X	VT  (0x0b)	move to next line, same column
X	FF  (0x0c)	move to next line, same column
X	
X	CR  (0x0d)	move to left margin on current column
X	
X	SO  (0x0e)	invoke character set G1 into GL
X	SI  (0x0f)	invoke character set G0 into GL
X
X	DLE (0x10)	ignored
X	DC1 (0x11)	ignored
X	DC2 (0x12)	ignored
X	DC3 (0x13)	ignored
X	DC4 (0x14)	ignored
X	NAK (0x15)	ignored
X	SYN (0x16)	ignored
X	ETB (0x17)	ignored
X
X  	CAN (0x18)	abort current escape sequence
X
X	EM  (0x19)	ignored
X
X	SUB (0x1a)	abort current escape sequence
X	
X	ESC (0x1b)	start of escape sequence
X
X	FS  (0x1c)	ignored
X	GS  (0x1d)	ignored
X	RS  (0x1e)	ignored
X	US  (0x1f)	ignored
X
X	VT220 control codes in the range 0x80 .. 0x9f are completely ignored,
X	but displayed as C1 display controls.
X
X
XESCAPE SEQUENCES                                              DIGITAL EQUIPMENT
X-------------------------------------------------------------------------------
X
X(ni) = not implemented yet, all hooks available inside emulator!
X<p>  = numeric parameter
X
X	ESC # 3		double height top half		(ni)
X	ESC # 4		double height bottom half	(ni)
X	ESC # 5		single width single height	(ni)
X	ESC # 6		double width single height	(ni)
X
X	ESC # 8		fill screen with 'E's
X
X	ESC 7		save cursor
X
X	ESC 8		restore cursor
X
X	ESC =		keypad application mode
X
X	ESC >		keypad numeric mode
X
X	ESC D		index
X
X	ESC E		next line
X
X	ESC H		set tab at cur col
X
X	ESC M		reverse index
X
X	ESC N		single shift G2
X
X	ESC O		single shift G3
X
X	ESC Z		who are you
X
X	ESC c		power up reset
X
X	ESC n		Lock Shift G2 -> GL
X
X	ESC o		Lock Shift G3 -> GL
X
X	ESC }		Lock Shift G2 -> GR
X
X	ESC |		Lock Shift G3 -> GR
X
X	ESC ~		Lock Shift G1 -> GR
X
X	ESC [ ? <p> h	set dec private modes 	
X	ESC [ ? <p> l	reset dec private modes 	
X		 1	CKM - cursor key mode
X		 6	OM - origin mode
X		 7	AWM - auto wrap mode
X
X	ESC [ ? n	Terminal Reports
X
X	ESC [ ? K	selective erase in line
X
X	ESC [ ? J	selective erase in display
X
X	ESC [ <p> @	insert char(s)
X
X	ESC [ <p> A	cursor up
X
X	ESC [ <p> B	cursor down
X
X	ESC [ <p> C	cursor forward
X
X	ESC [ <p> D	cursor backward
X
X	ESC [ <p> H	cursor direct cursor addressing
X
X	ESC [ <p> J	erase screen
X
X	ESC [ <p> K	erase line
X
X	ESC [ <p> L	insert line
X
X	ESC [ <p> M	delete line
X
X	ESC [ <p> P	delete char
X
X	ESC [ <p> S	scroll up
X
X	ESC [ <p> T	scroll down
X
X	ESC [ <p> X	erase character
X
X	ESC [ <p> c	device attributes
X
X	ESC [ <p> f	direct cursor addressing
X
X	ESC [ <p> g	clear tabs
X
X	ESC [ <p> h	set mode
X	ESC [ <p> l	reset mode
X	       4	IRM - insert replacement mode
X	      20	LNM - line feed / newline mode
X
X	ESC [ <p> i	media copy (ni)
X
X	ESC [ <p> m	select graphic rendition
X	       0      	reset to normal attributes
X	       1	bold
X	       4	underline
X	       5	blinking
X	       7	reverse
X	       22	bold off
X	       24	underline off
X	       25	blinking off
X	       27	reverse off
X	       30-37	foreground colors	(on color display)
X	       40-47	background colors	(on color display)
X
X	ESC [ <p> n	device status report
X
X	ESC [ <p> r	set scrolling region
X
X	ESC [ <p> x	request / report terminal parameters
X
X	ESC [ <p> y	invoke selftests (ni)
X
X
X	ESC [ x		request/report parameters
X	ESC [ y		invoke seftest(s)
X
X	ESC [ "	q	SCA
X	ESC [ !	p	SCA
X
X	ESC ( <p>	designate G0
X	ESC ) <p>	designate G1
X	ESC * <p>	designate G2
X	ESC + <p>	designate G3
X	ESC - <p>	designate G1 (96)
X	ESC . <p>	designate G2 (96)
X	ESC / <p>	designate G3 (96)
X	       A	British or ISO-Latin-1
X	       B	USASCII
X	       C	Finnish
X	       5	Finnish
X	       E	Norwegian/Danish
X	       6	Norwegian/Danish
X	       H	Swedish
X	       7	Swedish
X	       K	German
X	       Q	French Canadien
X	       R	French
X	       Y	Italian
X	       Z	Spanish
X	       0	special graphics
X	       1	alternate ROM
X	       2	alt ROM, spec graphics
X	       3	HP Roman 8, upper 128 chars*/
X	       4	Dutch
X	       <	DEC Supplemental
X	       =	Swiss
X	       >	DEC Technical
X
X
XESCAPE SEQUENCES                                                HEWLETT-PACKARD
X-------------------------------------------------------------------------------
X
XESC&f<attr>a<key>k<llen>d<slen>L<label><string>		set function key label
X
X	attr = attribute, 	0 - normal		(not implemented)
X				1 - local only		(not implemented)
X				2 - transmit only	(not implemented)
X
X	key = function key number, range 1 .. 8
X
X	llen = label string length
X
X	slen = string string length
X
X	label = label data (up to 16 chars per label)
X
X	string = string to send data (up to 80 chars per label)
X							(not implemented)
X
XEXAMPLE:
X========
X	
X	ESC&f0a1k16d1LFUNCTION  KEY   0
X
X	sets function key label 1 to "FUNCTION  KEY   ".
X	should program fkey 1 to emit "0" on keypress
X
X
XESC&j<parm>	function key operations
X
X	parm = '@'	remove the function key labels from screen
X
X	parm = 'A'	display the modes set of function key labels
X
X	parm = 'B'	enable & display user function key labels
X
X	parm = 'C'	clear message & restore the current key labels
X
X	parm = 'R'	enable usr/sys and menu and label modes
X
X	parm = 'S'	disable usr/sys and menu and label modes
X
SHAR_EOF
$TOUCH -am 0114130593 Doc/EscapeSequences &&
chmod 0660 Doc/EscapeSequences ||
echo "restore of Doc/EscapeSequences failed"
set `wc -c Doc/EscapeSequences`;Wc_c=$1
if test "$Wc_c" != "5476"; then
	echo original size 5476, current size $Wc_c
fi
fi
# ============= Doc/Keyboard.HP ==============
if test X"$1" != X"-c" -a -f 'Doc/Keyboard.HP'; then
	echo "File already exists: skipping 'Doc/Keyboard.HP'"
else
echo "x - extracting Doc/Keyboard.HP (Text)"
sed 's/^X//' << 'SHAR_EOF' > Doc/Keyboard.HP &&
X================================================================================
X#                                                                              #
X#	Function key mapping for the "more HP" - like layout                   #
X#                                                                              #
X================================================================================
X
X
XI.	Special Keys Used To Change The General Runtime Functionality
X=====================================================================
X
X	F9	switches to screen 0
X	--------------------------
X
X	F10	switches to screen 1
X	--------------------------
X
X	F11	switches to screen 2
X	--------------------------
X
X	F12	switches to screen 3
X	--------------------------
X
X	ALT-F9	Function key labels ON / OFF
X	------------------------------------
X
X		this key is only operational, when in HP/VT mode, see F11
X
X		ALT-F9 toggles between function key labels displayed or not.
X
X		ON:  screen has either 25-3 = 22, 28-3 = 25 or 50-3 = 47 lines
X			2 lines fkey labels displayed
X			row/col display enabled
X			1 line status/load avg line
X
X		OFF: screen has either 25-3 = 22, 28-3 = 25 or 50-3 = 47 lines
X			no function key labels displayed
X			no row/col display
X			no status/load avg line
X
X		applicable escape sequences:
X
X			switch OFF:
X			ESC & j @	remove labels from screen
X
X			switch ON:			
X			ESC & j A	display system fkey labels
X			ESC & j B	display user fkey labels
X			ESC & j C	display current fkey labels
X
X		
X	ALT-F10	User / System Function key labels
X	-----------------------------------------
X
X		this key is only operational, when in HP/VT mode, see ALT-F11
X
X		ALT-F10 toggles between the display of user or system
X		function key labels
X
X		this key is only active if labels are toggled on via
X		the ALT-F9 function key
X		
X		screen has either 25-3 = 22, 28-3 = 25 or 50-3 = 47 lines
X			2 lines fkey labels displayed
X			row/col display enabled
X			1 line status/load avg line
X
X		
X		applicable escape sequences: (see above)
X		
X			ESC & j A	display system fkey labels
X			ESC & j B	display user fkey labels
X			ESC & j C	display current fkey labels
X
X
X	ALT-F11	Toggle between pure VT and HP-VT Emulation
X	--------------------------------------------------
X
X		This key switches between pure vt100/vt220 mode and
X		vt100/vt220 with hp-fkey-labels mode of operation.
X		this is not dependent of any screen resolution the
X		virtual consoles are in.
X
X		initially, after power on, all virtual screens are in
X		the pure vt-mode:
X
X		- the emulator does not execute any hp escape sequences
X		- the function key label lines are switched off
X		- no load average or status line is displayed
X		- no row / column counter is displayed
X		- no window number is displayed
X		- the full screen 25x80, 28x80 or 50x80 is usable
X		- ALT-F9 and ALT-F10 have no function
X
X		when toggled to the vt/hp mix of operation, the following
X		changes take place:
X
X		- the emulator executes the supported hp-esc sequences
X		- the function key labels are displayable depending
X		  on the state of ALT-F9/F10
X		- the load average is displayed
X		- the row / column counters are displayed
X		- the window number is displayed in the lower right corner
X		- in any screen resolution, the last 3 lines are lost,
X		  so one has a 22x80, 25x80 and 47x80 resolution
X		- F9 and F10 are operational.
X
X		when switching modes by means of ALT-F11, the following
X		changes to the current environment, the emulator may
X		be in, apply:
X
X		- the screen is cleared
X		- the cursor moves to the home position
X		- the scrolling region is reset to default
X
X		(this functionality is available via an ioctl)
X
X	ALT-F12	Cycle current screen
X	----------------------------
X
X		This key cycles through the display of the video
X		screens. on startup, screen 0 is displayed; with every
X		keypress of F12, the next screen is displayed, wrapping
X		from the maximum screen number back to screen 0.
X
X		(this functionality is available via an ioctl)	
X
X
XII.	Special Keys used to change the Runtime Functionality of a Page
X=======================================================================
X
X	when in mixed HP/VT mode, one has two types of function key labels
X	on screen, user function keys and system function keys.
X
X	this functionality is NOT available in pure VT220 mode !
X
X	the user function keys emit the below mentioned VT220 function-
X	key sequences. the labels can be reprogrammed by use of escape
X	sequences.
X
X	in system function key mode, several pre-programmed functions inside
X	the emulator can be toggled, currently implemented are:
X
X	- F5, toggle the audible beep generation
X	- F6, toggle 7/8 bit char width 
X	- F7, toggle display functions. this means that control codes 
X	      in the range 0x00 to 0x1f are not EXECUTED by the emulator
X	      any longer, but displayed on the screen
X	- F8, toggle automatic cursor wraparound at end of line
X
X	these functions operate just for the selected screen
X
X
XIII.	Keyboard VT220 compatibility
X====================================
X
X	The following keys behave different as probably expected.
X
X	They were mapped to provide more VT220 compatibility.
X
X	To have F1-F8 emit something in HP-mode, you have to switch
X	to user function key labels by using ALT-F10 (see ALT-F10 above) !
X
X	PC Keyboard	VT220 Keyboard
X	-------------	--------------------------------------------------
X	F1		F6	(ESC [ 17 ~)
X	F2		F7	(ESC [ 18 ~)
X	F3		F8	(ESC [ 19 ~)
X	F4		F9	(ESC [ 20 ~)
X	F5		F10	(ESC [ 21 ~)
X	F6		F11	(ESC [ 23 ~)
X	F7		F12	(ESC [ 24 ~)
X	F8		F13	(ESC [ 25 ~)
X	ALT-F1		F14	(ESC [ 26 ~)
X	ALT-F2		HELP	(ESC [ 28 ~)
X	ALT-F3		DO	(ESC [ 29 ~)
X	ALT-F4		F17	(ESC [ 31 ~)
X	ALT-F5		F18	(ESC [ 32 ~)
X	ALT-F6		F19	(ESC [ 33 ~)
X	ALT-F7		F20	(ESC [ 34 ~)
X	ALT-F8		F21	(ESC [ 35 ~)	(i know !!!!)
X
X	SHIFT-F1 ... SHIFT-F8
X			User Defined Keys for F6 - F13
X
X	ALT-SHIFT-F1 ... ALT-SHIFT-F8
X			User Defined Keys for F14 - F20
X	 
X	Insert		Insert Here (ESC [ 2 ~)
X
X	Delete		Remove (ESC [ 3 ~)
X
X	Home		Find (ESC [ 1 ~)
X
X	End		Select (ESC [ 4 ~)
X
X	PgUp		Prev Screen (ESC [ 5 ~)
X
X	PgDn		Next Screen (ESC [ 6 ~)
X
X	PrtSc		(ignored)
X
X	Pause		(ignored)
X
X	Break		(ignored)
X
X	Cursor Keys	dependent upon state of cursor key mode either
X			ESC [ A ... ESC [ D or ESC O A ... ESC O D
X
X	NumLock		toggles Numeric Keypad for Keypad Numeric Mode
X			and Keypad Application Mode
X
X	ALT-Keypad-0	can be used to generate any keycode in the
X	ALT-Keypad-1	rage 0-255.
X	ALT-Keypad-2	this was modeled with the behaviour of a 	
X	ALT-Keypad-3	popular boot loader in mind
X	ALT-Keypad-4
X	ALT-Keypad-5
X	ALT-Keypad-6
X	ALT-Keypad-7
X	ALT-Keypad-8
X	ALT-Keypad-9
X
X	Numeric Keypad	dependent upon state of keypad numeric/application
X			mode either 0 ... 9 or ESC O p ... ESC O y
X
X	ALT-NumLock	emits PF1 sequence (ESC O P)
X
X	ALT-Keypad-/	emits PF2 sequence (ESC O Q)
X
X	ALT-Keypad-*	emits PF3 sequence (ESC O R)
X
X	ALT-Keypad--	emits PF4 sequence (ESC O S)
X
X
X/* EOF */
SHAR_EOF
$TOUCH -am 0114130593 Doc/Keyboard.HP &&
chmod 0660 Doc/Keyboard.HP ||
echo "restore of Doc/Keyboard.HP failed"
set `wc -c Doc/Keyboard.HP`;Wc_c=$1
if test "$Wc_c" != "6848"; then
	echo original size 6848, current size $Wc_c
fi
fi
# ============= Doc/Keyboard.VT ==============
if test X"$1" != X"-c" -a -f 'Doc/Keyboard.VT'; then
	echo "File already exists: skipping 'Doc/Keyboard.VT'"
else
echo "x - extracting Doc/Keyboard.VT (Text)"
sed 's/^X//' << 'SHAR_EOF' > Doc/Keyboard.VT &&
X================================================================================
X#                                                                              #
X#	Function key mapping for the "more VT220" - like layout                #
X#                                                                              #
X================================================================================
X
X
XI.	Special Keys Used To Change The General Runtime Functionality
X=====================================================================
X
X
X	CTRL-F9	Function key labels ON / OFF
X	------------------------------------
X
X		this key is only operational, when in HP/VT mode, see CTRL-F11
X
X		CTRL-F9 toggles between function key labels displayed or not.
X
X		ON:  screen has either 25-3 = 22, 28-3 = 25 or 50-3 = 47 lines
X			2 lines fkey labels displayed
X			row/col display enabled
X			1 line status/load avg line
X
X		OFF: screen has either 25-3 = 22, 28-3 = 25 or 50-3 = 47 lines
X			no function key labels displayed
X			no row/col display
X			no status/load avg line
X
X		applicable escape sequences:
X
X			switch OFF:
X			ESC & j @	remove labels from screen
X
X			switch ON:			
X			ESC & j A	display system fkey labels
X			ESC & j B	display user fkey labels
X			ESC & j C	display current fkey labels
X
X		
X	CTRL-F10	User / System Function key labels
X	-------------------------------------------------
X
X		this key is only operational, when in HP/VT mode, see CTRL-F11
X
X		CTRL-F10 toggles between the display of user or system
X		function key labels
X
X		this key is only active if labels are toggled on via
X		the CTRL-F9 function key
X		
X		screen has either 25-3 = 22, 28-3 = 25 or 50-3 = 47 lines
X			2 lines fkey labels displayed
X			row/col display enabled
X			1 line status/load avg line
X
X		
X		applicable escape sequences: (see above)
X		
X			ESC & j A	display system fkey labels
X			ESC & j B	display user fkey labels
X			ESC & j C	display current fkey labels
X
X
X	CTRL-F11	Toggle between pure VT and HP-VT Emulation
X	----------------------------------------------------------
X
X		This key switches between pure vt100/vt220 mode and
X		vt100/vt220 with hp-fkey-labels mode of operation.
X		this is not dependent of any screen resolution the
X		virtual consoles are in.
X
X		initially, after power on, all virtual screens are in
X		the pure vt-mode:
X
X		- the emulator does not execute any hp escape sequences
X		- the function key label lines are switched off
X		- no load average or status line is displayed
X		- no row / column counter is displayed
X		- the full screen 25x80, 28x80 or 50x80 is usable
X		- CTRL-F9 and CTRL-F10 have no function
X
X		when toggled to the vt/hp mix of operation, the following
X		changes take place:
X
X		- the emulator executes the supported hp-esc sequences
X		- the function key labels are displayable depending
X		  on the state of CTRL-F9/CTRL-F10
X		- the load average is displayed
X		- the row / column counters are displayed
X		- in any screen resolution, the last 3 lines are lost,
X		  so one has a 22x80, 25x80 and 47x80 resolution
X		- CTRL-F9 and CTRL-F10 are operational.
X
X		when switching modes by means of CTRL-F11, the following
X		changes to the current environment, the emulator may
X		be in, apply:
X
X		- the screen is cleared
X		- the cursor moves to the home position
X		- the scrolling region is reset to default
X
X		(this functionality is available via an ioctl)
X
X	F5	Cycle current page
X	--------------------------
X
X		This key cycles through the display of the video
X		pages. on startup, page 0 is displayed; with every
X		keypress of F5, the next page is displayed, wrapping
X		from the maximum page number back to page 0.
X
X		F1	switches to page 0
X		F2	switches to page 1
X		F3	switches to page 2
X		F4	switches to page 3
X
X		(this functionality is available via an ioctl)	
X
X
XII.	Special Keys used to change the Runtime Functionality of a Page
X=======================================================================
X
X	when in mixed HP/VT mode, one has two types of function key labels
X	on screen, user function keys and system function keys.  they are
X	accessed by using the CTRL key while pressing a function key.
X
X	the function key labels are NOT available in pure VT220 mode--although
X	the function keys are still active
X
X	the user function keys and their labels can be reprogrammed by use of
X	escape sequences.
X
X	in system function key mode, several pre-programmed functions inside
X	the emulator can be toggled, currently implemented are:
X
X	- CTRL-F5, toggle the audible beep generation
X	- CTRL-F6, toggle 7/8 bit char width 
X	- CTRL-F7, toggle display functions. this means that control codes 
X	      	   in the range 0x00 to 0x1f are not EXECUTED by the emulator
X	      	   any longer, but displayed on the screen
X	- CTRL-F8, toggle automatic cursor wraparound at end of line
X
X	these functions operate just for the selected page
X
X
XIII.	Keyboard VT220 compatibility
X====================================
X
X	The following keys behave different as probably expected.
X
X	They were mapped to provide more VT220 compatibility.
X
X
X	PC Keyboard	VT220 Keyboard
X	-------------	--------------------------------------------------
X	F6 - F12	emit the sequences for VT220 F6 - F12 keys
X			(ESC [ 17 ~ .... ESC [ 24 ~)
X
X	ALT F1 - F10	emit the sequences for VT220 F11 - F14, HELP, DO, 
X			F17 - F20 keys
X			(ESC [ 23 ~ .... ESC [ 34 ~)
X
X	SHIFT F6 - F12	emit the User Definable Key sequences for VT220
X	                F6 - F12 keys or
X	                (ESC [ 17 ~ .... ESC [ 24 ~) for cleared sequences
X
X	ALTSHIFT F1-F10	emit the User Definable Key sequences for VT220
X	                F11 - F14, HELP, DO, F17 - F20 keys or
X			(ESC [ 23 ~ .... ESC [ 34 ~) for cleared sequences
X
X	Insert		Insert Here (ESC [ 2 ~)
X
X	Delete		Remove (ESC [ 3 ~)
X
X	Home		Find (ESC [ 1 ~)
X
X	End		Select (ESC [ 4 ~)
X
X	PgUp		Prev Screen (ESC [ 5 ~)
X
X	PgDn		Next Screen (ESC [ 6 ~)
X
X	PrtSc		(ignored)
X
X	Pause		(ignored)
X
X	Break		(ignored)
X
X	Cursor Keys	dependent upon state of cursor key mode either
X			ESC [ A ... ESC [ D or ESC O A ... ESC O D
X
X	NumLock		toggles Numeric Keypad for Keypad Numeric Mode
X			and Keypad Application Mode
X
X	ALT-Keypad-0	can be used to generate any keycode in the
X	ALT-Keypad-1	rage 0-255.
X	ALT-Keypad-2	this was modeled with the behaviour of a 	
X	ALT-Keypad-3	popular boot loader in mind
X	ALT-Keypad-4
X	ALT-Keypad-5
X	ALT-Keypad-6
X	ALT-Keypad-7
X	ALT-Keypad-8
X	ALT-Keypad-9
X
X	Numeric Keypad	dependent upon state of keypad numeric/application
X			mode either 0 ... 9 or ESC O p ... ESC O y
X
X	ALT-NumLock	emits PF1 sequence (ESC O P)
X
X	ALT-Keypad-/	emits PF2 sequence (ESC O Q)
X
X	ALT-Keypad-*	emits PF3 sequence (ESC O R)
X
X	ALT-Keypad--	emits PF4 sequence (ESC O S)
X
X	ALT-F11		emits PF1 sequence (ESC O P)
X
X	ALT-F12		emits PF2 sequence (ESC O Q)
X
X/* EOF */
SHAR_EOF
$TOUCH -am 0114130593 Doc/Keyboard.VT &&
chmod 0660 Doc/Keyboard.VT ||
echo "restore of Doc/Keyboard.VT failed"
set `wc -c Doc/Keyboard.VT`;Wc_c=$1
if test "$Wc_c" != "6730"; then
	echo original size 6730, current size $Wc_c
fi
fi
# ============= Doc/Makefile ==============
if test X"$1" != X"-c" -a -f 'Doc/Makefile'; then
	echo "File already exists: skipping 'Doc/Makefile'"
else
echo "x - extracting Doc/Makefile (Text)"
sed 's/^X//' << 'SHAR_EOF' > Doc/Makefile &&
XMAN4=	pcvt.0
X
X.include <bsd.prog.mk>
SHAR_EOF
$TOUCH -am 0114130593 Doc/Makefile &&
chmod 0660 Doc/Makefile ||
echo "restore of Doc/Makefile failed"
set `wc -c Doc/Makefile`;Wc_c=$1
if test "$Wc_c" != "37"; then
	echo original size 37, current size $Wc_c
fi
fi
# ============= Doc/Termcap ==============
if test X"$1" != X"-c" -a -f 'Doc/Termcap'; then
	echo "File already exists: skipping 'Doc/Termcap'"
else
echo "x - extracting Doc/Termcap (Text)"
sed 's/^X//' << 'SHAR_EOF' > Doc/Termcap &&
X#---------------------------------------------------------------------------
X#	386bsd vt220 terminal emulator console (pc keyboard & monitor)
X#	termcap entries for pure VT220-Emulation and 25, 28, 35, 40, 43 and
X#	50 lines entries.
X#---------------------------------------------------------------------------
Xpcvt25|pcvt25|dec vt220 with 25 lines:\
X	:li#25:\
X	:is=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;25r\E[25;1H:\
X	:tc=pcvtXX:
X
Xpcvt28|pcvt28|dec vt220 with 28 lines:\
X	:li#28:\
X	:is=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;28r\E[28;1H:\
X	:tc=pcvtXX:
X
Xpcvt35|pcvt35|dec vt220 with 35 lines:\
X	:li#35:\
X	:is=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;35r\E[35;1H:\
X	:tc=pcvtXX:
X
Xpcvt40|pcvt40|dec vt220 with 40 lines:\
X	:li#40:\
X	:is=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;40r\E[40;1H:\
X	:tc=pcvtXX:
X
Xpcvt43|pcvt43|dec vt220 with 43 lines:\
X	:li#43:\
X	:is=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;43r\E[43;1H:\
X	:tc=pcvtXX:
X
Xpcvt50|pcvt50|dec vt220 with 50 lines:\
X	:li#50:\
X	:is=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;50r\E[50;1H:\
X	:tc=pcvtXX:
X
X#---------------------------------------------------------------------------
X#	386bsd vt220 terminal emulator console (pc keyboard & monitor)
X#	termcap entries for HP-Emulation and 25, 28, 35, 40, 43 and 50
X#	lines entries. note that the HP-Emulation uses the bottom 3 lines
X#	for status and function key labels, so we get always 3 lines less.
X#	"Xs" is a nonstandard, private flag indicating HP-like fkey labels
X#---------------------------------------------------------------------------
Xpcvt22h|pcvt22h|dec vt220 with HP-fkey labels and 22 lines:\
X	:li#22:\
X	:Xs:\
X	:is=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;22r\E[22;1H:\
X	:tc=pcvtXX:
X
Xpcvt25h|pcvt25h|dec vt220 with HP-fkey labels and 25 lines:\
X	:li#25:\
X	:Xs:\
X	:is=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;25r\E[25;1H:\
X	:tc=pcvtXX:
X
Xpcvt32h|pcvt32h|dec vt220 with HP-fkey labels and 32 lines:\
X	:li#32:\
X	:Xs:\
X	:is=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;32r\E[32;1H:\
X	:tc=pcvtXX:
X
Xpcvt37h|pcvt37h|dec vt220 with HP-fkey labels and 37 lines:\
X	:li#37:\
X	:Xs:\
X	:is=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;37r\E[37;1H:\
X	:tc=pcvtXX:
X
Xpcvt40h|pcvt40h|dec vt220 with HP-fkey labels and 40 lines:\
X	:li#40:\
X	:Xs:\
X	:is=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;40r\E[40;1H:\
X	:tc=pcvtXX:
X
Xpcvt47h|pcvt47h|dec vt220 with HP-fkey labels and 47 lines:\
X	:li#47:\
X	:Xs:\
X	:is=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;47r\E[47;1H:\
X	:tc=pcvtXX:
X
X#---------------------------------------------------------------------------
X#	main entry, without "is" and "li" capabilities
X#
X#	NOTE: because the 386BSD "vi"/"elvis" seems to have a bug if
X#		both "ic" and "im" are specified (an original VT220 
X#		shows the same buggy behaviour!), "ic" has been taken
X#		out of this entry. for reference, it should be "ic=\E[@".
X#
X#---------------------------------------------------------------------------
XpcvtXX|pcvtXX|pcvt 2.0 emulator (DEC VT220) with 25 lines:\
X	:AL=\E[%dL:\
X	:DC=\E[%dP:\
X	:DL=\E[%dM:\
X	:DO=\E[%dB:\
X	:IC=\E[%d@:\
X	:LE=\E[%dD:\
X	:RI=\E[%dC:\
X	:SF=\E%dD:\
X	:SR=\E%dM:\
X	:UP=\E[%dA:\
X	:ae=^O:\
X	:al=\E[L:\
X	:am:\
X	:as=^N:\
X	:bl=^G:\
X	:bs:\
X	:cb=\E[1K:\
X	:cd=\E[J:\
X	:ce=\E[K:\
X	:cl=\E[H\E[J:\
X	:cm=\E[%i%d;%dH:\
X	:co#80:\
X	:cr=^M:\
X	:cs=\E[%i%d;%dr:\
X	:ct=\E[3g:\
X	:dc=\E[P:\
X	:dl=\E[M:\
X	:do=^J:\
X	:ei=\E[4l:\
X	:ho=\E[H:\
X	:im=\E[4h:\
X	:it#8:\
X	:k1=\E[17~:\
X	:k2=\E[18~:\
X	:k3=\E[19~:\
X	:k4=\E[20~:\
X	:k5=\E[21~:\
X	:k6=\E[23~:\
X	:k7=\E[24~:\
X	:k8=\E[25~:\
X	:kD=\E[3~:\
X	:kH=\E[4~:\
X	:kI=\E[2~:\
X	:kN=\E[6~:\
X	:kP=\E[5~:\
X	:kb=\177:\
X	:kd=\EOB:\
X	:ke=\E[?1l\E>:\
X	:kh=\E[1~:\
X	:kl=\EOD:\
X	:km:\
X	:kr=\EOC:\
X	:ks=\E[?1h\E=:\
X	:ku=\EOA:\
X	:le=^H:\
X	:mb=\E[5m:\
X	:md=\E[1m:\
X	:me=\E[m:\
X	:mi:\
X	:mr=\E[7m:\
X	:ms:\
X	:nd=\E[C:\
X	:pb#16000000:\
X	:pt:\
X	:rc=\E8:\
X	:rf=/usr/share/tabset/vt100:\
X	:rs=\Ec\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:\
X	:sc=\E7:\
X	:se=\E[27m:\
X	:sf=\ED:\
X	:so=\E[7m:\
X	:sr=\EM:\
X	:st=\EH:\
X	:ue=\E[24m:\
X	:up=\E[A:\
X	:us=\E[4m:\
X	:vt#3:\
X	:xn:
X
X#---------------------------- E O F -------------------------------------------
SHAR_EOF
$TOUCH -am 0114130593 Doc/Termcap &&
chmod 0660 Doc/Termcap ||
echo "restore of Doc/Termcap failed"
set `wc -c Doc/Termcap`;Wc_c=$1
if test "$Wc_c" != "4015"; then
	echo original size 4015, current size $Wc_c
fi
fi
# ============= Doc/pcvt.4 ==============
if test X"$1" != X"-c" -a -f 'Doc/pcvt.4'; then
	echo "File already exists: skipping 'Doc/pcvt.4'"
else
echo "x - extracting Doc/pcvt.4 (Text)"
sed 's/^X//' << 'SHAR_EOF' > Doc/pcvt.4 &&
X.\" 
X.\"  Copyright (c) 1992, 1993 Hellmuth Michaelis, Brian Dunford-Shore,
X.\"  Joerg Wunsch and Holger Veit.
X.\" 
X.\"  All rights reserved.
X.\" 
X.\"  This code is derived from software contributed to Berkeley by
X.\"  William Jolitz and Don Ahn.
X.\" 
X.\"  This code is based in part on software contributed to 386BSD by
X.\"  Holger Veit 
X.\" 
X.\"  This driver is contributed to the 386BSD operating system.
X.\" 
X.\"  Redistribution and use in source and binary forms, with or without
X.\"  modification, are permitted provided that the following conditions
X.\"  are met:
X.\"  1. Redistributions of source code must retain the above copyright
X.\"     notice, this list of conditions and the following disclaimer.
X.\"  2. Redistributions in binary form must reproduce the above copyright
X.\"     notice, this list of conditions and the following disclaimer in the
X.\"     documentation and/or other materials provided with the distribution.
X.\"  3. All advertising materials mentioning features or use of this software
X.\"     must display the following acknowledgement:
X.\"     This product includes software contributed to 386BSD and developed
X.\"       by Hellmuth Michaelis, Brian Dunford-Shore, Joerg Wunsch
X.\"          and Holger Veit.
X.\"  4. Neither the name of the developers nor the names "386BSD" and "pcvt"
X.\"     may be used to endorse or promote products derived from this software
X.\"     without specific prior written permission.
X.\" 
X.\"  THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
X.\"  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
X.\"  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
X.\"  IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
X.\"  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
X.\"  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
X.\"  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
X.\"  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
X.\"  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
X.\"  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
X.\"
X.\" 
X.\" 
X.\"     @(#)ioctl_pcvt.h        2.00               (contributed to 386BSD)
X.\"                             Last Edit-Date: [Fri Jan 15 13:34:41 1993]
X.\"
X.\"
X.\" Man page pcvt(4) created after pcvt_ioctl.h on 13-Jan-93
X.\" by Joerg Wunsch
X.\"
X.Dd January 14, 1993
X.Dt PCVT 4
X.Os 386BSD
X.Sh NAME
X.Nm pcvt
X.Nd PC console virtual screen system
X.Sh DESCRIPTION
X.Ss Overview
XThe
X.Nm pcvt
Xdriver provides a virtual screen system with several additional
Xfeatures not available in
X.Xr pc 4
Xstandard console device driver. Besides the ability of handling
Xmultiple virtual screens,
Xthe probably most important is an emulation of a wide range
Xof DEC VT-220
X.if t \(tm
X.if n (TM)
Xfunctionality. See
X.Sx Features
Xfor a detailed description.
X
X.Ss Features
X.Bl -bullet
X.It
XAlmost full DEC VT220
X.if t \(tm
X.if n (TM)
Xfunctionality
X.Po
Xmoving towards VT320
X.if t \(tm
X.if n (TM)
X.Pc
X.It
X4 completely independent virtual terminals for CGA's/EGA's/VGA's
X.It
X25, 28, 35, 40, 43 or 50x80 screen resolution for each virtual screen
X.It
XFully remappable keyboard to support national keyboards
X.It
XAll VT220 character sets plus ISO Latin-1 and DEC technical supported 
X.It
XVT220 downloadable character set supported when run on EGA/VGA
X.It
XVT220 user defined keys for each virtual terminal
X.It
XOptional function key label support
X.if t \('a
X.if n 'a
Xla Hewlett-Packard
X.It
XDisplay function codes functionality
X.It
XSupport for MDA, CGA, EGA and VGA display adaptors
X.El
X
XWhat it cannot:
X.Bl -bullet
X.It
XIt doesn't even know what X11 is
X.It
XNo 132 columns support
X.Pq yet
X.It
XNo double wide/high characters
X.It
XNo softscroll
X.It
XNo inverse background
X.It
XNo VT220 printer output support
X.It
XNo VT52/VT100 support at all
X.It
XNo 8-bit controls
X.It
XOnly limited AT-keyboard
X.Pq 84 keys
Xsupport
X.Pq yet
X.It
XHelp you to make money...
X.El
X
X.Ss Internal Functions
XThe functionality described below may be accessed via
X.Xr ioctl 2
Xsystem calls with a file descriptor opened on a device node
Xrelated to the
X.Nm pcvt
Xdriver.
XTo make use of them, a program should contain the following line:
X
X
X.Dl #include <sys/pcvt_ioctl.h>
X
XAny parameter definitions cited below can be found in that file.
X
X
X.Em Keyboard related functions
X
XThree functions are related to basic keyboard hardware:
X
X.Bl -tag -width 20n -offset indent -compact
X.It KBDRESET
Xreset keyboard, set defaults;
X.It KBDGTPMAT
Xget current typematic value, parameter is a pointer to int where
Xthe values is stored to;
X.It KBDSTPMAT
Xset current typematic value, similiar to above command.
X.El
X
XSymbolic values are available for the appropriate constants.
XTo specify the initial typematic delay time, they are
XKBD_TPD250 for 250 ms through
XKBD_TPD1000 for 1000 ms, in steps of 250 ms. The typematic repeat
Xrates are
XKBD_TPM300, specifying 30.0 characters per second through
XKBD_TPM20 for 2.0 characters per second. The intermediate values
Xare: 30.0, 26.7, 24.0, 21.8, 20.0, 18.5, 17.1, 16.0, 15.0, 13.3,
X12.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,
X4.0, 3.7, 3.3, 3.0, 2.7, 2.5, 2.3, 2.1, 2.0 characters per second.
X
X
X.Bl -tag -width 20n -offset indent -compact
X.It KBDGREPSW
Xget key repetition switch, and
X.It KBDSREPSW
Xset key repetition switch
X.El
X
Xagain take a pointer to int as argument. They manipulate the
Xdriver's internal keyboard repetition flag, possible values are:
XKBD_REPEATOFF or KBD_REPEATON.
X
X
X.Bl -tag -width 20n -offset indent -compact
X.It KBDGLEDS
Xget LED state, and
X.It KBDSLEDS
Xset LED state manipulate the keyboard indicators, but do not influence
Xthe driver's idea of lock key state.
X.El
X
XThe int where the argument points to
Xmay have the values
XKBD_SCROLLLOCK, KBD_NUMLOCK, KBD_CAPSLOCK, which may be used in any
Xconjunction.
X
X.Bl -tag -width 20n -offset indent -compact
X.It KBDGLOCK
Xgets state of SCROLL,NUM,CAPS, and
X.It KBDSLOCK
Xsets state of SCROLL,NUM,CAPS + LEDs
X.El
X
Xshould be used in a same manner to get/set the driver's internal
XLED flags.
X
X
X.Em Keyboard remapping
X
XOne important feature of the
X.Nm pcvt
Xdriver is its ability to overload the built in key definition.
X
X.Bl -tag -width 20n -offset indent -compact
X.It KBDGCKEY
Xget current key values,
X.It KBDSCKEY
Xset new key assignment values, and
X.It KBDGOKEY
Xget original key assignment values
X.El
X
Xarrange those functions. The take a pointer to a
X.Em struct kbd_ovlkey
Xas argument as described below. In addition,
X
X.Bl -tag -width 20n -offset indent -compact
X.It KBDRMKEY
Xremoves a key assignment, taking a pointer to an int as argument which
Xcontains the affected key number;
X.It KBDDEFAULT
Xremoves all key assignments.
X.El
X.Bd -literal
Xstruct kbd_ovlkey                /* complete definition of a key */
X{
X    u_short keynum;                      /* the key itself */
X    u_short type;                        /* type of key, see below */
X    u_char  subu;                        /* subtype, ignored on write */
X    char    unshift[KBDMAXOVLKEYSIZE+1]; /* emitted string, unshifted */
X    u_char  subs;                        /* subtype, ignored on write */
X    char    shift[KBDMAXOVLKEYSIZE+1];   /* emitted string, shifted */
X    u_char  subc;                        /* subtype, ignored on write */
X    char    ctrl[KBDMAXOVLKEYSIZE+1];    /* emitted string, control */
X    u_char  suba;                        /* subtype, ignored on write */
X    char    altgr[KBDMAXOVLKEYSIZE+1];   /* emitted string, altgr */
X};
X.Ed
X
XThe appropriate values for the
X.Em type
Xfield are:
X
X.Bl -tag -width 20n -offset indent -compact
X.It KBD_NONE
Xno function, key is disabled,
X.It KBD_SHIFT
Xkeyboard shift,
X.It KBD_META
Xalternate shift, sets bit8 to ASCII code,
X.It KBD_NUM
Xnumeric shift, keypad numeric / application mode,
X.It KBD_CTL
Xcontrol code generation,
X.It KBD_CAPS
Xcaps shift - swaps case of letter,
X.It KBD_ASCII
XASCII code generating key,
X.It KBD_SCROLL
Xstop output,
X.It KBD_FUNC    
Xfunction key,
X.It KBD_KP
Xkeypad keys,
X.It KBD_BREAK
Xignored,
X.It KBD_ALTGR
XAltGr translation feature,
X.It KBD_SHFTLOCK
Xshift lock,
X.It KBD_CURSOR
Xcursor keys, and
X.It KBD_RETURN
X.Dq Return
Xor
X.Dq Enter
Xkeys.
X.El
X
XThe
X.Em subtype
Xfield contains one of the values
X
X.Bl -tag -width 20n -offset indent -compact
X.It KBD_SUBT_STR
Xkey is bound to a string, or
X.It KBD_SUBT_FNC
Xkey is bound to a function.
X.El
X
X
X.Em Downloadable character set interface
X
XEGA and VGA video adaptors provide the capability of downloadable
Xsoftware fonts. Since the
X.Sq native character set
Xof any IBM-compatible PC video board does not allow the full interpretation
Xof DEC multinational character set or ISO Latin-1
X.Pq ISO 8859-1 ,
Xthis might be very useful for a U**X environment.
X
X.Bl -tag -width 20n -offset indent -compact
X.It VGASETFONTATTR
Xset font attr, and
X.It VGAGETFONTATTR
Xget font attr
X.El
X
Xare used to manipulate the driver's information about a downloaded
Xfont. The take a pointer to a
X.Em struct vgafontattr
Xas argument:
X.Bd -literal
Xstruct vgafontattr {
X    int character_set;          /* VGA character set */
X    int font_loaded;            /* Mark font loaded or unloaded */
X    int screen_size;            /* Character rows per screen */
X    int character_scanlines;    /* Scanlines per character - 1 */
X    int screen_scanlines;       /* Scanlines per screen - 1 byte */
X};
X.Ed
X
XEach character of each font is to be downloaded with
X
X.Bl -tag -width 20n -offset indent -compact
X.It VGALOADCHAR
Xload vga char,
X.El
X
Xtaking a pointer to
X.Em struct vgaloadchar
Xas its argument:
X.Bd -literal
Xstruct vgaloadchar {
X    int character_set;       /* VGA character set to load into */
X    int character;           /* Character to load */
X    int character_scanlines; /* Scanlines per character */
X    u_char char_table[16];   /* VGA character shape table */
X};
X.Ed
X
XThe field
X.Em character_set
Xtakes the values
XCH_SET0, CH_SET1, CH_SET2, CH_SET3 on EGA's or VGA's. Since VGA's
Xmight have up to eight simultaneously loaded fonts, they can take
XCH_SET4, CH_SET5, CH_SET6, or CH_SET7, too.
X
XNote that there's a dependance between the font size
Xand a possible screen height
X.Pq in character rows ,
Xdepending on the video adaptor used:
X.Bd -literal
XScreen size (rows) on:          EGA             VGA
XFont size
X
X8 x 8                           43              50
X8 x 10                          35              40
X8 x 14                          25              28
X8 x 16                          not             25
X                                applicable
X.Ed
X
X
X.Em General screen manipulation commands
X
X.Bl -tag -width 20n -offset indent -compact
X.It VGACURSOR
Xsets cursor shape,
X.El
X
Xtaking a pointer to the following structure as argument:
X.Bd -literal
Xstruct cursorshape {
X    int screen_no; /* screen number for which to set,               */
X                   /*  or -1 to set on current active screen        */
X    int start;     /* top scanline, range 0... Character Height - 1 */
X    int end;       /* end scanline, range 0... Character Height - 1 */
X};
X.Ed
X
X.Bl -tag -width 20n -offset indent -compact
X.It VGASETSCREEN
Xset screen info, and
X.It VGAGETSCREEN
Xget screen info,
X.El
X
Xprovide an interface to some general driver internal variables
Xwhich might modify the behaviour of the screens,
Xor which might simply be used to force the driver to switch
Xto one certain screen. Their argument is a pointer to the structure:
X.Bd -literal
Xstruct screeninfo {
X    int adaptor_type;   /* type of video adaptor installed     */
X                        /* read only, ignored on write (yet!)  */
X    int totalfonts;     /* no of downloadable fonts            */
X                        /* read only, ignored on write         */
X    int totalscreens;   /* no of virtual screens               */
X                        /* read only, ignored on write         */
X    int screen_no;      /* screen number, this was got from    */
X                        /* on write, if -1, apply pure_vt_mode */
X                        /* and/or screen_size to current screen*/
X                        /* else to screen_no supplied          */
X    int current_screen; /* screen number, which is displayed.  */
X                        /* on write, if -1, make this screen   */
X                        /* the current screen, else set current*/
X                        /* displayed screen to parameter       */
X    int pure_vt_mode;   /* flag, pure VT mode or HP/VT mode    */
X                        /* on write, if -1, no change          */
X    int screen_size;    /* screen size                         */
X                        /* on write, if -1, no change          */    
X};
X.Ed
X
XIts field
X.Em pure_vt_mode
Xmay take the values M_HPVT for a mixed VTxxx and HP Mode, with function
Xkey labels and a status line, or M_PUREVT for only VTxxx sequences
Xrecognized, with no labels.
X
X
X.Em VGA color palette interface
X
XOnly on VGA adptors, there's a color palette register at the output.
XIt is responsible for the red, green and blue output voltage provided
Xfor each of the 256 internal color codes, each lying in the range of
X0 through 63 (with 63 representing the brightest value for a base color).
XThus, these adaptors map each color code to a color of a
X.Dq palette
Xout of 262144 colors. The commands
X
X.Bl -tag -width 20n -offset indent -compact
X.It VGAREADPEL
Xread VGA palette entry, and
X.It VGAWRITEPEL
Xwrite VGA palette entry
X.El
X
Xestablish an interface to these palette registers. Their argument is
Xa pointer to:
X.Bd -literal
Xstruct vgapel {
X    unsigned idx;      /* index into palette, 0 .. 255 valid   */
X    unsigned r, g, b;  /* RGB values, masked by VGA_PMASK (63) */
X};
X.Ed
X
X
X.Em Screen saver
X
XDepending on the configuration of a
X.Nm pcvt
Xdriver, their might be a simple screen saver available. It is controlled
Xby the command
X
X.Bl -tag -width 20n -offset indent -compact
X.It VGASCREENSAVER
Xset timeout for screen saver in seconds; 0 turns it off,
X.El
X
Xtaking a pointer to an integer as argument. Despite of its command name,
Xthis is available on
X.Em any
Xkind of adaptor if configured in by the
X.Xr config 8
Xoption
X.Dq PCVT_SCREENSAVER
X.Sh FILES
X.Bl -tag -width /usr/include/sys/pcvt_ioctl.h
X.It Pa /usr/include/sys/pcvt_ioctl.h
XDefinitions for
X.Xr ioctl 2
Xfunction calls
X.It Pa /dev/pc?
X.It Pa /dev/console
XDevice nodes to access the
X.Nm pcvt
Xdriver
X.Sh HISTORY
XThe
X.Nm pcvt
Xdriver has been developed for and contributed to 386BSD release 0.1.
X.Sh AUTHORS
X.Bl -tag -width 30n -offset indent
X.It Written by :
XHellmuth Michaelis
X.Pq hm@hcshh.hcs.de
X.It With much help from :
XBrian Dunford-Shore
X.Pq brian@morpheus.wustl.edu
X.It Thanks for beta-testing, bugfixes and code from :
X.\" my name doesn't fit into simple ASCII :-)
X.if n Joerg Wunsch
X.if t J\(:org Wunsch
X.Pq joerg_wunsch@uriah.sax.de
X.br
XScott Turner
X.Pq scotty@gagetalker.com
X.br
XPeter Galbavy
X.Pq peter.galbavy@micromuse.co.uk
X.br
XMichael Havemester
X.Pq tik@abqhh.hanse.de
X.It This driver is based on several people's previous
X.It work, notably by :
XWilliam Jolitz' and Don Ahn's
X.Xr pc 4
Ximplementation
X.Pq ljolitz@cardio.ucsf.edu
X.br
XHolger Veit
X.Pq veit@du9ds3.uni-duisburg.de
X.Sh SEE ALSO
X.Xr pc 4 ,
X.Xr config 8 ,
X.Xr ioctl 2 .
X.Sh BUGS
XCertainly existent.
X
X.Ss Tested Video Boards
X.Bd -literal
XManufacturer                    Chipset                 Monitor
X
X2theMax (?)                     ET4000                  VGA Color
XVideo7 Inc.                     Video 7                 VGA Color
XDiamond Stealth VRAM            S3                      NEC 3FGx
XTrident                         TVGA 8800CS             NEC 3D
XData General                    C&T P82C604             VGA Color
XNoName Hercules                 W86855AF                Mono
XKyocera (Mainboard)		WD90C11			Sony Color
X.Ed
X
X.Ss Tested Keyboards
X.Bd -literal
XManufacturer                    Type                    Layout
X
XCherry                          MF II                   US
XCherry/Tandon                   MF II                   German
XHewlett-Packard                 MF II                   US
XHewlett-Packard                 MF II                   German
XTatung                          AT                      German
X.Ed
X
XThere is absolutely NO support for the ancient PC-keyboards
X.Pq they had 83 keys .
X
XThere is only limited support for AT-keyboards
X.Bo
Xthey have 84 keys, and a separate numeric keypad,
Xthey don't have F11/F12 keys
X.Bc
Xbecause the emulator needs F9 through F12 for control functions, and due to
Xthe current design of the keyboard driver there is no
X.Pq full
Xsupport for national keyboards because
Xof the lack of an ALtGr key.
X
XMF-keyboards are fully supported, 101- and 102-key versions.
SHAR_EOF
$TOUCH -am 0114130593 Doc/pcvt.4 &&
chmod 0660 Doc/pcvt.4 ||
echo "restore of Doc/pcvt.4 failed"
set `wc -c Doc/pcvt.4`;Wc_c=$1
if test "$Wc_c" != "16662"; then
	echo original size 16662, current size $Wc_c
fi
fi
# ============= Doc/MAKEDEV.pcvt ==============
if test X"$1" != X"-c" -a -f 'Doc/MAKEDEV.pcvt'; then
	echo "File already exists: skipping 'Doc/MAKEDEV.pcvt'"
else
echo "x - extracting Doc/MAKEDEV.pcvt (Text)"
sed 's/^X//' << 'SHAR_EOF' > Doc/MAKEDEV.pcvt &&
X#!/bin/sh -
X#
XPATH=/sbin:/bin/:/usr/bin:/usr/sbin:
Xumask 77
Xrm -f /dev/pc0
Xmknod /dev/pc0 c 12 0
Xrm -f /dev/pc1
Xmknod /dev/pc1 c 12 1
Xrm -f /dev/pc2
Xmknod /dev/pc2 c 12 2
Xrm -f /dev/pc3
Xmknod /dev/pc3 c 12 3
Xexit 0
SHAR_EOF
$TOUCH -am 0114130693 Doc/MAKEDEV.pcvt &&
chmod 0770 Doc/MAKEDEV.pcvt ||
echo "restore of Doc/MAKEDEV.pcvt failed"
set `wc -c Doc/MAKEDEV.pcvt`;Wc_c=$1
if test "$Wc_c" != "215"; then
	echo original size 215, current size $Wc_c
fi
fi
# ============= Doc/INSTALLATION ==============
if test X"$1" != X"-c" -a -f 'Doc/INSTALLATION'; then
	echo "File already exists: skipping 'Doc/INSTALLATION'"
else
echo "x - extracting Doc/INSTALLATION (Text)"
sed 's/^X//' << 'SHAR_EOF' > Doc/INSTALLATION &&
XHow to install the pcvt driver on a 386BSD 0.1 machine		(pcvt rel. 2.00)
X--------------------------------------------------------------------------------
X                                      last edit-date: [Thu Jan 14 15:43:12 1993]
X
X(1) copy the driver distributiuon files into appropriate directories:
X
X	(1a) make a fresh directory
X	
X		mkdir /usr/src/sys.386bsd/i386/isa/pcvt
X		cd /usr/src/sys.386bsd/i386/isa/pcvt
X
X	(1b) copy the pcvt distribution (or unshar it) into this newly
X 	     created directory (/usr/src/sys.386bsd/i386/isa/pcvt)
X
X	(1c) copy the ioctl-header file into it's destination directory
X
X		cp pcvt_ioctl.h /sys/sys
X
X(2) make a backup copy of /sys/i386/conf/files.i386
X
X	cp /sys/i386/conf/files.i386 /sys/i386/conf/files.i386.ORIGINAL
X	
X(3) delete the following line from /sys/i386/conf/files.i386
X
X	i386/isa/pccons.c	optional pc device-driver
X
X(4) add the following lines to /sys/i386/conf/files.i386
X
X	i386/isa/pcvt/pcvt_drv.c	optional pc device-driver
X	i386/isa/pcvt/pcvt_out.c	optional pc device-driver
X	i386/isa/pcvt/pcvt_kbd.c	optional pc device-driver
X	i386/isa/pcvt/pcvt_sup.c	optional pc device-driver
X
X(5) there are escape sequences hard-coded into the 0.1 kernel in the file
X    /sys/kern/init_main.c in line 113, where the copyright message in
X    copyright1[] is displayed, change the line:
X
X	printf("\033[3;15x%s\033[0x [0.1.%s]\n", copyright1, version+9);
X
X    to
X
X	printf("\n%s [0.1.%s]\n", copyright1, version+9);
X
X(6) there are escape sequences coded into the init file /etc/rc. the escape-
X    sequences to change the color do now conform to the ansi-standard, change
X    them! look for the lines:
X
X	# yellow characters with blue background
X	echo -n "[3;30x"
X
X    and
X
X	# reset to normal (no colors)
X	echo -n "[0x"
X
X    place a comment character ("#") in front of the "echo -n" - lines or
X    change them, mine looks like:
X
X	# red with blue background
X	echo -n "[31;44m"
X
X    and
X
X	# reset to normal (no colors)
X	echo -n "[0m"
X
X(7) you have the choice of two keyboard layouts regarding the placement of
X    the vt220 function keys and the HELP and DO keys.
X
X    both configurations are documented in the files Keyboard.HP and Keyboard.VT
X    respectively.
X
X    decide which one to use and set the "#define" of VT220_KEYBOARDLAYOUT to 
X    compile the one you choosed.          (see also pcvt_hdr.h and pcvt_kbd.c)
X
X(8) there are several other configuration "#define"-able options located at
X    the beginning of pcvt_hdr.h. Please (!!!) read the comments for them in
X    the header file !
X
X(9) configure a new kernel using config(8).
X
X(10) run "make depend" for the new kernel !!!!
X
X(11) compile the new kernel
X
X(12) test the new kernel (i.e. on a floppy) and check whether it still works
X     with your keyboard and your videoboard.
X
X     if the kernel works, install it, and reboot.
X
X(13) change into the distribution subdirectory "Support" and edit Makefile.inc
X     to suit your needs, especially have a look at "MANDIR" and "BINDIR".
X     then execute "make". this makes all the utilities in their directories.
X     when you are satisfied with the results, execute "make install". this
X     installs all programs in all subdirs in "BINDIR" and all manual pages
X     in "MANDIR", all fonts in "FONTDIR" and the keycap database in "CAPDIR".
X
X     change into the distribution subdirectory "Doc" and edit Makefile
X     to suit your needs. then execute "make" to prepare the manpage for
X     the driver.
X
X(14) if necessary, edit /usr/share/misc/keycap to match your keyboard.
X     keycap uses special codes which are in support/kcon/keycap.3 and
X     support/kcon/keycap.5. also have a look at support/kcon/kcon.1.
X
X(15) there are example termcap entries for the various screen resolutions
X     in the file "Doc/Termcap". integrate them into your termcap file.
X     a "normal" vt220 termcap entry should work too with no modifications.
X	
X(16) to use the virtual terminals, one must "mknod" this devices, they have major
X     number 12 and minor numbers 0 to 3:
X
X	mknod /dev/pc0 c 12 0 	this uses the same video page as /dev/console
X				be careful - i do not use this one.
X	mknod /dev/pc1 c 12 1
X	mknod /dev/pc2 c 12 2
X	mknod /dev/pc3 c 12 3
X
X     There is a shell-script available (Doc/MAKEDEV.pcvt) for this purpose.
X
X     ls -l in my /dev directory looks like this:
X
X	crw-------    1 root       0,   0 Nov 12 15:55 /dev/console
X	crw-rw----    1 root      12,   0 Aug 12 21:13 /dev/pc0
X	crw-------    1 root      12,   1 Nov 12 14:11 /dev/pc1
X	crw-------    1 root      12,   2 Nov 12 14:11 /dev/pc2
X	crw-------    1 root      12,   3 Nov 12 14:11 /dev/pc3
X
X(17) edit /etc/ttys to enable login on the 4 virtual consoles, mine looks like
X     this:
X	
X	console	"/usr/libexec/getty console"	pcvt25h	on secure
X	pc1	"/usr/libexec/getty console"	pcvt25h	on secure
X	pc2	"/usr/libexec/getty console"	pcvt25h	on secure
X	pc3	"/usr/libexec/getty console"	pcvt25h	on secure
X	
X
X(18) edit /etc/rc.local to download fonts and establish emulation modes, mine
X     looks like this:
X	
X	# loading fonts into vga
X	if [ -f /usr/local/bin/loadfont ]
X	then
X		echo 'loading 25 lines base font into character set 0'
X		/usr/local/bin/loadfont -c0 -f/usr/share/misc/vgafonts/vt220l.816
X		echo 'loading 25 lines extension font into character set 1'
X		/usr/local/bin/loadfont -c1 -f/usr/share/misc/vgafonts/vt220h.816
X		echo 'loading 28 lines base font into character set 2'
X		/usr/local/bin/loadfont -c2 -f/usr/share/misc/vgafonts/vt220l.814
X		echo 'loading 28 lines extension font into character set 3'
X		/usr/local/bin/loadfont -c3 -f/usr/share/misc/vgafonts/vt220h.814
X		echo 'loading 40 lines base font into character set 4'
X		/usr/local/bin/loadfont -c4 -f/usr/share/misc/vgafonts/vt220l.810
X		echo 'loading 28 lines extension font into character set 5'
X		/usr/local/bin/loadfont -c5 -f/usr/share/misc/vgafonts/vt220h.810
X		echo 'loading 50 lines base font into character set 6'
X		/usr/local/bin/loadfont -c6 -f/usr/share/misc/vgafonts/vt220l.808
X		echo 'loading 50 lines extension font into character set 7'
X		/usr/local/bin/loadfont -c7 -f/usr/share/misc/vgafonts/vt220h.808
X		if [ -f /usr/local/bin/scon ]
X		then
X			echo 'switching to 28 lines and VT/HP-emulation'
X			/usr/local/bin/scon -d/dev/console -s28 -H
X			/usr/local/bin/scon -d/dev/pc1 -s28 -H
X			/usr/local/bin/scon -d/dev/pc2 -s28 -H
X			/usr/local/bin/scon -d/dev/pc3 -s28 -H
X			/usr/local/bin/scon -c0
X		fi
X	fi
X
X(19) to change the color palette on VGA cards, try the following:
X	
X	echo -n '.'
X	/usr/local/bin/scon -d/dev/console -pblack:0,0,0 -pblue:20,20,40
X	/usr/local/bin/scon -d/dev/console -pbrown:55,55,15 -plightgray:0,42,0
X	echo -n '.'
X	/usr/local/bin/scon -d/dev/pc1 -pblack:42,42,42 -pblue:60,60,60
X	/usr/local/bin/scon -d/dev/pc1 -pbrown:60,60,30 -plightgray:30,10,0
X	echo -n '.'
X	/usr/local/bin/scon -d/dev/pc2 -pblack:42,42,42 -pblue:63,63,63
X	/usr/local/bin/scon -d/dev/pc2 -pbrown:60,60,20 -plightgray:0,22,0
X	echo -n '.'
X	/usr/local/bin/scon -d/dev/pc3 -pblack:38,38,38 -pblue:63,63,63
X	/usr/local/bin/scon -d/dev/pc3 -pbrown:60,40,0 -plightgray:0,0,20
X
X(20) got two hints for setting the "LINES"-Environment variable for sh and
X     csh users,
X     first for the csh:
X
X	alias linesw scon -s \!^ \; setenv LINES \!^
X
X     now for the bash/ash/sh/bash users:
X
X	linesw()
X	{
X		scon -s $1
X		LINES=$1; export LINES
X	}
X
X	
Xgood luck !
SHAR_EOF
$TOUCH -am 0114154393 Doc/INSTALLATION &&
chmod 0660 Doc/INSTALLATION ||
echo "restore of Doc/INSTALLATION failed"
set `wc -c Doc/INSTALLATION`;Wc_c=$1
if test "$Wc_c" != "7334"; then
	echo original size 7334, current size $Wc_c
fi
fi
echo "End of part 1, continue with part 2"
exit 0
-- 
hellmuth michaelis    HCS Hanseatischer Computerservice GmbH   hamburg, europe
hm@hcshh.hcs.de              tel: +49/40/55903-170         fax: +49/40/5591486