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