[net.unix-wizards] 4.1bsd vs. Versatec V80

sanders@menlo70.UUCP (09/25/83)

 We have a nice little /750 running 4.1bsd with a Versatec V80 and
Versatec DMA controller.  Vtroff does not like this combo, and
vpr isn't completely happy either.  The code seems to be written
for a 36" Versatec or 11" Varian, of which we have neither, so
I figure that's where the problem lies.
  Oh yeah, we rearranged jumpers on the controller board, so at
least the system doesn't barf with millions of console error
messages any more - the problem is with screwed up output
and/or hanging hardware.
  Before I set into some serious digging and hacking,
can anyone save me some work by sending:

   advice | sympathy
   diffs of source (license info on request)
   pointers to areas to change
   magic, undocumented args to vtroff/vpr to make my V80 work

Of course, the last option is preferred.

(4.1bsd hacking is getting more like playing adventure every day)

(Your are in a dark, musty source code directory, with many
mysteriously named files around you...)

-- Rex	ucbvax!menlo70!sanders	RSanders.Pascalx@Denver

chris@umcp-cs.UUCP (09/27/83)

Ok, software solutions are pretty easy.  The main thing to remember
is that your V8 (11" Versatec) looks EXACTLY like the Varian, as
far as user-level code is concerned.  The easiest thing to do is hack
all the programs (vpr, vpd, etc) to think it's talking to the
Varian, but use the Versatec device (/dev/vp0 instead of /dev/va0).
(What I did for the eneevax versatec was a bit messier:  instead
of just changing device names, I changed everything to know that
the Versatec was 11" instead of 36", but that shouldn't be important.)

A REAL quick&dirty fix would be to make /dev/va0 be the Versatec.

Has anyone rewritten that mess of Versatec/Varian spooler?

DMA:  Well, we have the Versatec interface card, but the 4.1BSD
doesn't use DMA on it, just character-at-a-time.  If you have a
DMA interface I'd like a copy!  Concerning hanging:  William L.
Sebok (did I get your name right?), astrovax!wls, has posted fixes
to some of the VM management code for dealing with hung DMA transfers.
I'd like to see a "final" set of fixes myself....  Does anyone know
if 4.2 has all the VM bugs fixed?

Configuration:  Rather than cut up the Versatec card, we had our
LP11 interface moved and just plugged the thing right in.  Of
course, that left us with separate print and plot interrupts.  So,
I just changed the probe routine to subtract (or was it add?) 4 to
the value in cvec, and changed the config file to list a separate
"read" and "write" interrupt (both calling vpintr of course).
Poof, everything worked, and we didn't have to cut a single trace.
Of course, this way the board uses up some extra DMA vectors,
but....

Chris
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci
UUCP:	{seismo,allegra,brl-bmd}!umcp-cs!chris
CSNet:	chris@umcp-cs		ARPA:	chris.umcp-cs@UDel-Relay

dmmartindale@watcgl.UUCP (Dave Martindale) (09/29/83)

This seems worth posting.  Configure your system for a "vp" in the kernel's
config file, and do a MAKE vp0 in /dev.  Then mv vp0 to va0.  Then use
vtroff, vpr, etc just as if you had a Varian.  All the user-level software
thinks it's dealing with the Varian plotter, but the device driver
actually invoked is the Versatec one.  You may want to go through and
correct "vpq" and the manual sections eventually, but this will get
you running.

dmmartindale@watcgl.UUCP (Dave Martindale) (09/29/83)

The 4.1BSD driver for the Versatec DOES do DMA.  It allocates the UBA in
the strategy routine and releases it there, rather than using the more
complex ubago/ubadone interface of the disk and tape drivers, but it
is definitely not character-by-character.  Now, has anyone looked into
why it transfers data so slowly?  It was something over 30 microseconds
per transfer last time I checked.

jaap@mcvax.UUCP (Jaap Akkerhuis) (09/30/83)

Come on folks, the V-80 is not a varian look-a-like. It will not recognise f.i.
a `\f'.
Making weird changes in the system is something you don't want, just two
minutes editing is enough.
What you must do is to change vcat etc.
If the flag `wide' is used, vcat is for the Versatec. The difference between
the V-80 and the `wide' Versatec is that the V-80 is as wide as the varian.
So one just needs to remove the lines as indicated.

		case 'W':		/* Wide: the versatec. */
			varian = 0;
#ifndef V80
			BYTES_PER_LINE = VP_BYTES_PER_LINE;
			BUFFER_SIZE = VP_BUFFER_SIZE;
#endif
			break;

(This code is from vcat.c 4.1BSD around line 380, but it works with the other
filters as well)

Note that in 4.2BSD the documentation tells you it will support the 11'inch
Versatec as well. In fact, it will then decided it is a varian. To do it
properly do around line 360 something like:
	char *hostarg = NULL;
	char *acctfile = NULL;
#ifdef V80
	int versatec = 0;
#endif

#ifdef V80
	if (argv[0][strlen(argv[0])-1] == 'W') { /* Wide: the versatec. */
		versatec++;
	}
#endif

	while (--argc) {
		if (*(*++argv) == '-')
			switch (argv[0][1]) {
			case 'x':
				BYTES_PER_LINE = atoi(&argv[0][2]) / 8;
				BUFFER_SIZE = NLINES * BYTES_PER_LINE;
#ifdef V80
			if(!versatec)
#endif
				varian = BYTES_PER_LINE == 264;
(vcat.c from 4.2BSD, of course, getting 4.2BSD is another problem)

and vcatW is the proper filter for all the Versatec's.

	jaap akkerhuis, {decvax,philabs,ukc}!mcvac!jaap