1.\" $NetBSD: va.4,v 1.17 2024/09/08 09:36:48 rillig 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 February 17, 2017 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 a daemon active. 88You can see if there is an active daemon by doing a 89.Xr vax/lpq 1 90and seeing if there are any files being printed. 91Printing should be turned off using 92.Xr vax/lpc 8 . 93.Pp 94To set the Benson-Varian into plot mode include the file 95.In sys/vcmd.h 96and use the following 97.Xr ioctl 2 98call 99.Bd -literal -offset indent 100ioctl(fileno(va), VSETSTATE, plotmd); 101.Ed 102where 103.Ar plotmd 104is defined to be 105.Bd -literal -offset indent 106int plotmd[] = { VPLOT, 0, 0 }; 107.Ed 108and 109.Ar va 110is the result of a call to 111.Xr fopen 3 112on stdio. 113When you finish using the Benson-Varian in plot mode you should advance to 114a new page 115by sending it a 116.Tn FF 117after putting it back into print mode, i.e. by 118.Bd -literal -offset indent 119int prtmd[] = { VPRINT, 0, 0 }; 120\&... 121fflush(va); 122ioctl(fileno(va), VSETSTATE, prtmd); 123write(fileno(va), "\ef\e0", 2); 124.Ed 125.Sh FILES 126.Bl -tag -width /dev/va0xx -compact 127.It Pa /dev/va0 128.El 129.Sh DIAGNOSTICS 130The following error numbers are significant at the 131time the device is opened. 132.Bl -tag -width ENXIOxx 133.It Bq Er ENXIO 134The device is already in use. 135.It Bq Er EIO 136The device is offline. 137.El 138The following message may be printed on the console. 139.Bl -diag 140.It va%d: npr timeout. 141The device was not able to get data from 142the 143.Tn UNIBUS 144within the timeout period, most likely because some other 145device was hogging the bus. 146(But see 147.Sx BUGS 148below). 149.El 150.Sh SEE ALSO 151.Xr vax/lpr 1 , 152.Xr vax/vp 4 , 153.\".Xr vfont 5 , 154.Xr vax/lpd 8 155.Sh HISTORY 156The 157.Nm 158driver appeared in 159.Bx 4.0 . 160.Sh BUGS 161The 1's (one's) and l's (lower-case el's) in the Benson-Varian's 162standard character set look very similar; caution is advised. 163.Pp 164The interface hardware is rumored to have problems which can 165play havoc with the 166.Tn UNIBUS . 167We have intermittent minor problems on the 168.Tn UNIBUS 169where our 170.Xr vax/va 4 171lives, but haven't ever been able to pin them down 172completely. 173