xref: /netbsd-src/share/man/man4/man4.vax/va.4 (revision ce0bb6e8d2e560ecacbe865a848624f94498063b)
1.\" Copyright (c) 1980, 1991 Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\" 3. All advertising materials mentioning features or use of this software
13.\"    must display the following acknowledgement:
14.\"	This product includes software developed by the University of
15.\"	California, Berkeley and its contributors.
16.\" 4. Neither the name of the University nor the names of its contributors
17.\"    may be used to endorse or promote products derived from this software
18.\"    without specific prior written permission.
19.\"
20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\"     from: @(#)va.4	6.3 (Berkeley) 3/27/91
33.\"	$Id: va.4,v 1.2 1993/08/01 07:35:52 mycroft Exp $
34.\"
35.Dd March 27, 1991
36.Dt VA 4 vax
37.Os BSD 4
38.Sh NAME
39.Nm va
40.Nd Benson-Varian interface
41.Sh SYNOPSIS
42.Cd "controller va0 at uba0 csr 0164000 vector vaintr"
43.Cd "disk vz0 at va0 drive 0"
44.Sh DESCRIPTION
45.Bf -symbolic
46(NOTE: the configuration description, while counter-intuitive,
47is actually as shown above.)
48.Ef
49.Pp
50The Benson-Varian printer/plotter in normally used with the line printer
51system.
52This description is designed for those who wish to drive the Benson-Varian
53directly.
54.Pp
55In print mode, the Benson-Varian uses a modified
56.Tn ASCII
57character set.
58Most control characters print various non-
59.Tn ASCII
60graphics such as daggers,
61sigmas, copyright symbols, etc.
62Only
63.Tn LF
64and
65.Tn FF
66are used as format effectors.
67.Tn LF
68acts as a newline,
69advancing to the beginning of the next line, and
70.Tn FF
71advances to the top of
72the next page.
73.Pp
74In plot mode, the Benson-Varian prints one raster line at a time.
75An entire raster line of bits (2112 bits = 264 bytes) is sent, and
76then the Benson-Varian advances to the next raster line.
77.Pp
78.Em Note :
79The Benson-Varian must be sent an even number of bytes.
80If an odd number is sent, the last byte will be lost.
81Nulls can be used in print mode to pad to an even number of bytes.
82.Pp
83To use the Benson-Varian yourself,
84you must realize that you cannot open the device,
85.Pa /dev/va0
86if there is an daemon active.
87You can see if there is an active daemon by doing a
88.Xr lpq 1
89and seeing if there are any files being printed.
90Printing should be turned off using
91.Xr lpc 8 .
92.Pp
93To set the Benson-Varian into plot mode include the file
94.Aq Pa sys/vcmd.h
95and use the following
96.Xr ioctl 2
97call
98.Bd -literal -offset indent
99ioctl(fileno(va), VSETSTATE, plotmd);
100.Ed
101.Pp
102where
103.Ar plotmd
104is defined to be
105.Bd -literal -offset indent
106int plotmd[] = { VPLOT, 0, 0 };
107.Ed
108.Pp
109and
110.Ar va
111is the result of a call to
112.Xr fopen
113on stdio.
114When you finish using the Benson-Varian in plot mode you should advance to
115a new page
116by sending it a
117.Tn FF
118after putting it back into print mode, i.e. by
119.Bd -literal -offset indent
120int prtmd[] = { VPRINT, 0, 0 };
121\&...
122fflush(va);
123ioctl(fileno(va), VSETSTATE, prtmd);
124write(fileno(va), "\ef\e0", 2);
125.Ed
126.Sh FILES
127.Bl -tag -width /dev/va0xx -compact
128.It Pa /dev/va0
129.El
130.Sh DIAGNOSTICS
131The following error numbers are significant at the
132time the device is opened.
133.Bl -tag -width ENXIOxx
134.It Bq Er ENXIO
135The device is already in use.
136.It Bq Er EIO
137The device is offline.
138.El
139.Pp
140The following message may be printed on the console.
141.Pp
142.Bl -diag
143.It va%d: npr timeout.
144The device was not able to get data from
145the
146.Tn UNIBUS
147within the timeout period, most likely because some other
148device was hogging the bus.  (But see
149.Sx BUGS
150below).
151.El
152.Sh SEE ALSO
153.Xr vfont 5 ,
154.Xr lpr 1 ,
155.Xr lpd 8 ,
156.Xr vp 4
157.Sh HISTORY
158The
159.Nm
160driver appeared in
161.Bx 4.0 .
162.Sh BUGS
163The 1's (one's) and l's (lower-case el's) in the Benson-Varian's
164standard character set look very similar; caution is advised.
165.Pp
166The interface hardware is rumored to have problems which can
167play havoc with the
168.Tn UNIBUS .
169We have intermittent minor problems on the
170.Tn UNIBUS
171where our
172.Xr va
173lives, but haven't ever been able to pin them down
174completely.
175