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