ReGIS

From SizeCoding
Revision as of 03:29, 16 November 2025 by Popolon (talk | contribs) (link to a backup of the official manual available on line on a VT museum like website, add instruction on more recent distro (argument +u8 with xterm fail now).)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

ReGIS is a vector graphics markup language made by DEC for it's VT125, VT230, VT240/241 and above terminals. commands can be sent to it by serial or any other text/tty connexion.

official manual "VT330/VT340 Programmer Reference Manual - Volume 2: Graphics Programming" by Digital, is available online in HTML format here: https://vt100.net/docs/vt3xx-gp/ and pdf https://raw.githubusercontent.com/hackerb9/vt340test/main/docs/EK-VT3XX-HR-002_VT330_VT340_Programmer_Pocket_Guide_May88.pdf

Overview of the features

Depending on terminal resolution and features changes

  • VT125 768×240 pixels, 2 bitplans
  • VT230 800×480 pixels, 2 bitplans
  • VT240/VT241 768×480 pixels, 4 bitplans

There is "shading" management allowing to mix simple patterns for fill or border,

It supports curves with polynomial interpolation, by default with only one point + a value, it builds a circle.


Use it on Linux distros

Xterm supports it. Arch Linux and derivative support it from scratch. It must be recompiled on Debian and derivatives, with the --enable-regis-graphics option. Display will change depending on used VT emulation.

Launch xterm like this to have more capabilities:

xterm +u8 -geometry 132x50 -ti vt340 -tn vt340 /bin/bash

On some recent distribution, +u8 could fail and the command just return with return code 0. In this case, just start with:

xterm -geometry 132x50 -ti vt340 -tn vt340 /bin/bash

then launch the script or connect by one of the available serial tools (screen, minicom, etc...) to the hw producing the markup.

The markup is send to terminal prefixed, after the documentation by 0x1b 0x50 0x32 x70 (ESC + 'P2p', but on xterm implementation at least, any single digit decimal number instead of 2 works). It is also suffixed by 0x1b 0x5c (ESC + '\', standard VT endline sequence).

Implementation in Bash:

echo -e "\x1bP2p${command}\x1b\\"

in Lua:

io.stream(string.char(0x1b).."P2p"..command..string.char(0x1b,0x5c))

Don't forget to flush the stream in tests with system based languages, to avoid a buffer filling few seconds wait :).