From: bruce@ais.com
Newsgroups: comp.os.vms
Subject: Re: Programming a VT640 Graph Card.
Date: 10 Apr 92 09:33:44 GMT
Organization: Applied Information Systems, Chapel Hill, NC

In article <1992Apr6.052159.9635@menudo.uh.edu>, bchs2k@Rosie.UH.EDU writes:
> Ihavea program that has a graphical interface that uses the VT640
> Tektronix-4010 emulator, on a VT100 terminal equiped with a Retro_Graphics
> card.  I am trying to convert the graphical interface to X-Windows.
> 
> But, I do not understand the routines that are writing to the VT640
> graphics card.  EspeciallyI need some information on how the VT640
> card is programmed.  I do not have a manual and so I am lost.
> I was also wondering if anyone out there had a list of control characters
> or esc sequences.

It's been quite some time since I've dealt with the Retro Graphics card,
and I don't have a manual either.  But it is very similar to the Tektronix
4010, which you can get documentation on fairly easily.

I've pulled these sequences from an old graphics package that used the
Retro Graphics card as one of its output devices.  I don't make any claim
that they are complete, but they should be reasonably correct :-).

Note that in addition to the 4010 sequences the Retro Graphics-equipped
VT100 would also support all of the VT100 escape sequences as well...

NUL		- Delay timing
GS		- Go to cursor position mode.
US		- Go to alphanumerics mode

ESC FF		- Clear screen

ESC " 0 g	- Set normal graphics mode
ESC " 1 g	- (don't remember - not used by package)
ESC " 2 g	- (don't remember - not used by package)
ESC " 3 g	- (don't remember - not used by package)
ESC " 4 g	- Read locator position (convert to mouse under X?)
     
ESC :		- Set character size (small - 7 x 8)
ESC 8		- Set character size (large - 12 x 24)

ESC 0		- I think these also set character size, but they weren't used
ESC 1		- by the graphics package for some reason, but are mentioned in
ESC 2		- the comments.
ESC 3		-

ESC / 0 d	- Set mode for vectors etc.  Pixels set along vector.
ESC / 1 d	- Clear mode for vectors etc.  Pixels cleared along vector.
ESC / 2 d	- Complement mode for vectors etc.  Pixels complemented
		  along vector (XOR mode).

ESC / f		- Some kind of prompting mode (rubber band line?)

ESC `		- Set various hardware line styles.  I don't remember what
ESC a		- they were any more.  (The graphics package allowed the
ESC b		- application program to request a hardware-generated line
ESC c		- style like dotted, dashed, etc, for efficiency purposes.
ESC d		- The comments in the source didn't tell what these styles
ESC e		- were.  Most programs used software generated line styles
ESC f		- anyway, they are more reproduceable between different
ESC g		- display devices).  ESC ` is a solid line though.

In character position mode, the first coordinate causes the pen to move
to the position without drawing, then subsequent coordinates cause the
pen to draw in the current line style and drawing mode.

That's all the sequences the package used - I know there were others so
this isn't complete.  You might find a few in documentation for the 4010 if
you can find that (I also have code that wrote to the 4010 but it doesn't
use any additional sequences & I don't have my 4010 documentation any more).
I do know that the Retro Graphics card used some sequences not implemented
in the Tektronix terminals (the various modes like "complement vector" have
no meaning on storage tubes), so I have no guarantee that this list is
anywhere near complete, just that it was enough for the old graphics package.

If you need help cracking the vector position sequence I can dig that up
too, but that should be less trouble decoding (at least if the package you're
converting is reasonably well written).

Good luck -

Bruce C. Wright
Newsgroups: comp.os.vms