ReGIS remote terminal graphics

1,221 views
Skip to first unread message

Phillip Stevens

unread,
Jul 8, 2021, 9:38:22 PM7/8/21
to RC2014-Z80
Some background, to a question from Bill.

 Since I finished building the UX Module, and the ACIA emulation for it to work as a serial terminal, I've been thinking about how to implement graphics "CGA" quality graphics.

Some time ago Wuefel21 finished implementing the graphics engine for the UX Module, and so the real issue is creating a "device driver" for the graphics interface, and then a library for an application to write to.

I was planning to implement a GSX style interface for the UX Module, and use the z88dk GSX library to drive this. But, that would mean that any application written would need to have a UX Module to work. That's not that interesting.

So recently Fred Weigel mentioned ReGIS in a different context, and it seems like the perfect solution.
  • It has the required graphical capabilities which can be addressed from an API.
  • It will work with VT125 and later terminals, and most importantly current terminal emulators.
  • It doesn't require me to build a new device driver interface, as the commands are issued on a serial (ACIA) interface.
The last point is really useful, as it splits the problem into two sections. 1. Generating the correct ReGIS commands to check against a standard serial terminal. And 2. Interpreting those commands on the UX Module (or on any other video hardware like Bill's VGA Module).

So the next thing to do is to take the z88dk graphics API and modify it to produce ReGIS serial command strings.

lefa...@gmail.com

unread,
Jul 8, 2021, 11:51:29 PM7/8/21
to RC2014-Z80
Do you have a terminal emulator recommendation which support ReGIS on Windows ?

I've been looking for a while for a terminal emulator supporting Sixel to do some graphics in BASIC but couldn't find anything.
From what I've seen on your link, ReGIS seems to allow the same kind of features and I'd like to give it a try.

Eric

Katherine Rohl

unread,
Jul 8, 2021, 11:54:10 PM7/8/21
to rc201...@googlegroups.com
I don’t know of any free terminal software for Windows that does Sixel or ReGIS but xterm supports both, I believe. If you’re lucky enough to have a VMS system, DECterm supports them as well.

Sent from my iPhone

On Jul 8, 2021, at 10:51 PM, lefa...@gmail.com <lefa...@gmail.com> wrote:


--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rc2014-z80/ca756698-f467-4d90-a086-e1e776ef8245n%40googlegroups.com.

Scott Lawrence

unread,
Jul 9, 2021, 12:02:15 AM7/9/21
to rc201...@googlegroups.com
Oh wow. I haven't heard another person outside of my college friends mention ReGIS... ever!  We had it on our DEC GiGi (VK-52) terminals in college, going to Barco 13" RGB monitors.  I actually just found part of the GiGi manual the other day that covers all of the ReGIS graphics... Back in college I was planning on making a ReGIS capable terminal emulator for my Amiga but it never happened.

The book I have is the second, blue one here: https://archive.org/search.php?query=DEC%20GiGi

:D



--
Scott Lawrence
yor...@gmail.com

Richard Deane

unread,
Jul 9, 2021, 2:21:41 AM7/9/21
to rc201...@googlegroups.com
For anyone interested in gsx, the implementation by Kurt Mueller of multicomp on fpga supports cp/m with gsx. Info on retrocomputing website,  the one bill shen,  plasmo, uses.
Richard 

--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+...@googlegroups.com.

Phillip Summers

unread,
Jul 10, 2021, 1:13:12 AM7/10/21
to RC2014-Z80

lefa...@gmail.com

unread,
Jul 12, 2021, 1:07:14 AM7/12/21
to RC2014-Z80
On Friday, July 9, 2021 at 1:54:10 PM UTC+10 lui...@gmail.com wrote:
I don’t know of any free terminal software for Windows that does Sixel or ReGIS but xterm supports both, I believe. If you’re lucky enough to have a VMS system, DECterm supports them as well.

Thanks. I would have prefer something  on Windows, but I have a Raspberry Pi somewhere which may be a good way to do a quick test.

Eric

Phillip Stevens

unread,
Jul 12, 2021, 10:14:13 AM7/12/21
to rc201...@googlegroups.com
Katherine wrote:
I don’t know of any free terminal software for Windows that does Sixel or ReGIS but xterm supports both, I believe. If you’re lucky enough to have a VMS system, DECterm supports them as well.
Do you have a terminal emulator recommendation which support ReGIS on Windows ?

From what I've seen on your link, ReGIS seems to allow the same kind of features and I'd like to give it a try.
We’ll, I’ve spent quite some time trying to make xterm talk to a serial device (/dev/ttyUSB0) on Ubuntu Linux. But there’s something I’m not getting right.

What magic do I need?
Help, please. 

I’ve written the core of a ReGIS library, enough to set up a screen and draw a line, but I’d like to see the line on screen before going further.
P. 
--
Sent from a Mobile Device. Replies may appear terse.

Katherine Rohl

unread,
Jul 12, 2021, 10:58:02 AM7/12/21
to rc201...@googlegroups.com
Sorry, my experience with serial devices is on Windows and VMS.

Sent from my iPhone

On Jul 12, 2021, at 9:14 AM, Phillip Stevens <phillip...@gmail.com> wrote:


--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+...@googlegroups.com.

Rob Gowin

unread,
Jul 12, 2021, 2:08:26 PM7/12/21
to RC2014-Z80
Hi Phillip.

I don't know if xterm supports talking to serial port directly, so I'd suggest using "picocom," something like this:

% picocom -b 19200 -f n /dev/ttyUSB0

This a "dumb terminal" program that won't mess is the escape/control sequences sent between your device and xterm.

--

I wasn't having much luck getting the circle demo from the ReGIS Wikipedia page to work. This I ran across a hint here [1] that suggests that Linux distros may not compile xterm with ReGIS graphics enabled. That seems to be the case for the Linux Mint 20.1 distro that I'm using. So I built xterm from source using these steps:

% apt install -y libxaw7-dev libncurses-dev
% wget https://invisible-island.net/datafiles/release/xterm.tar.gz
% tar xf xterm.tar.gz
% cd xterm-368
% ./configure --enable-regis-graphics
% make -j 4

This will create a xterm binary in that xterm-386 directory. I didn't bother to install it; just ran it out of the build directory this way:

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

To create the circle.regis file for the Wikipedia example, you can run this little script. Google won't let me attach the circle.regis file directly. I assume that's because it has escape characters in it.

% base64 -d <<EOF > circle.regis
G1AwcFMoRSkoQzEpUFsxMDAsNDQwXVYoQiksWysxMDAsKzBdLFsrMCwtMTBdLFstMTAwLCswXSwo
RSlQWzUwMCwzMDBdLEYoQ1srMTAwXSkbXA==
EOF

(Inspect circle.regis file via "hexdump -C" [2] because you shouldn't trust a random internet stranger.)

Then from within the running xterm from above, do "cat circle.regis". Then you should see the circle as shown on the Wikipedia page.

Finally, you can combine running an xterm and picocom into one step:

% ./xterm +u8 -geometry 132x50 -ti vt340 -tn vt340 -e picocom -b 19200 -f n /dev/ttyUSB0

Hope that helps,

-- Rob

[1] https://news.ycombinator.com/item?id=7776755

[2]
% hexdump -C circle.regis
00000000  1b 50 30 70 53 28 45 29  28 43 31 29 50 5b 31 30  |.P0pS(E)(C1)P[10|
00000010  30 2c 34 34 30 5d 56 28  42 29 2c 5b 2b 31 30 30  |0,440]V(B),[+100|
00000020  2c 2b 30 5d 2c 5b 2b 30  2c 2d 31 30 5d 2c 5b 2d  |,+0],[+0,-10],[-|
00000030  31 30 30 2c 2b 30 5d 2c  28 45 29 50 5b 35 30 30  |100,+0],(E)P[500|
00000040  2c 33 30 30 5d 2c 46 28  43 5b 2b 31 30 30 5d 29  |,300],F(C[+100])|
00000050  1b 5c                                             |.\|
00000052

Phillip Stevens

unread,
Jul 13, 2021, 3:05:19 AM7/13/21
to RC2014-Z80
 
I wasn't having much luck getting the circle demo from the ReGIS Wikipedia page to work. 
This I ran across a hint that suggests that Linux distros may not compile xterm with ReGIS graphics enabled.

% apt install -y libxaw7-dev libncurses-dev
% wget https://invisible-island.net/datafiles/release/xterm.tar.gz
% tar xf xterm.tar.gz
% cd xterm-368
% ./configure --enable-regis-graphics
% make -j 4
 
% ./xterm +u8 -geometry 132x50 -ti vt340 -tn vt340 /bin/bash

To create the circle.regis file for the Wikipedia example, you can run this little script. Google won't let me attach the circle.regis file directly. I assume that's because it has escape characters in it.
Then from within the running xterm from above, do "cat circle.regis". Then you should see the circle as shown on the Wikipedia page.

Finally, you can combine running an xterm and picocom into one step:
% ./xterm +u8 -geometry 132x50 -ti vt340 -tn vt340 -e picocom -b 19200 -f n /dev/ttyUSB0
Hope that helps,
-- Rob

Hi Rob,

yes. Indeed that is a complete solution. It works. Thanks.

I've finished an initial draft of a ReGIS library for RC2014 and have published it here
Still lots of gaps. It is difficult to know when to stop adding functions, as ReGIS has a very powerful command set.
At the moment it is just pixels, lines, and boxes. Arcs and circles are on the to do list shortly.

regis_demo.png
 
Even without the library, MBASIC can be used to generate graphics strings directly, too.

Cheers, Phillip

Phillip Stevens

unread,
Jul 13, 2021, 6:19:02 AM7/13/21
to RC2014-Z80
I've finished an initial draft of a ReGIS library for RC2014 and have published it here
Still lots of gaps. It is difficult to know when to stop adding functions, as ReGIS has a very powerful command set.
At the moment it is just pixels, lines, and boxes. Arcs and circles are on the to do list shortly.

Done arcs and circles (as a complete arc) too.
regis_demo.png 
An artist, I am not.
P.

Phillip Stevens

unread,
Jul 14, 2021, 10:45:13 AM7/14/21
to RC2014-Z80
I've finished an initial draft of a ReGIS library for RC2014 and have published it here
Still lots of gaps. It is difficult to know when to stop adding functions, as ReGIS has a very powerful command set.

To circle back to the original purpose, building a planetary motion machine, and joining up with the multi-APU floating point calculation work, I've now built a simple planetary motion visualisation.

It is geocentric, as it is obvious to me that everything spins around the earth, right?


planets.png
The video shows two years of orbits, and is calculating and displaying every day.
Hope this is useful.
Phillip

Phillip Stevens

unread,
Jul 16, 2021, 4:15:54 AM7/16/21
to RC2014-Z80
I've finished an initial draft of a ReGIS library for RC2014 and have published it here
Still lots of gaps. It is difficult to know when to stop adding functions, as ReGIS has a very powerful command set.
 
To circle back to the original purpose, building a planetary motion machine, and joining up with the multi-APU floating point calculation work, I've now built a simple planetary motion visualisation.

Oops. I think I had the Y coordinates inverted, and the planets were moving in the reverse direction.

Here's another go at a video of planetary motion.

As the earth is the centre of this solar system, it is easy to see retrograde motion in the planets apparent location against the fixed sky, by scrolling back and forward.
This weird motion must have confused early astronomers. Never really thought about it until now.

Phillip

Dylan Hall

unread,
Jul 19, 2021, 8:43:00 PM7/19/21
to RC2014-Z80
Hey all, going back to the topic of picoterm, another option that may work is consrv (https://github.com/mdlayher/consrv). It's an ssh->serial server. 
I was using it for a while on a Raspberry Pi that I connected to my SC130 system so that I didn't need to be less than a usb cable's length away from it. It works nicely with the exception it doesn't support flow control (RTS/CTS). I don't think it messes with the characters it passes so I would expect it to work with ReGIS. I also have a python ssh->serial server I wrote with does support flow control which I'm happy to put somewhere public if anyone is interested.

Dylan



Fred Weigel

unread,
Jul 20, 2021, 2:28:19 PM7/20/21
to RC2014-Z80
Dylan

Have you considered

socat PTY,link=sshterm,wait-slave SYSTEM:"ssh fred@carthoris",pty,cty,setsid

Then attach to ./sshterm (example using my la36 terminal emulator)

la36 -d ./sshterm

sshterm will be a PTY slave and can be treated as a serial device. No code needed.
And, it can be attached to a real serial device -

socat /dev/ttyUSB0,rawer SYSTEM:"ssh fred@carthoris",pty,cty,setsid

would do the trick nicely. Instant serial ssh server.

If you don't need PTY, nc provides for a slightly simpler alternative.

Fred Weigel

Fred Weigel

unread,
Jul 20, 2021, 2:35:56 PM7/20/21
to RC2014-Z80
Rob

Yes, picocom is an excellent idea! Minicom wll not work... but picocom does pass regis and sixel nicely.
Here is my invocation for using bluetooth from xterm to my retro system: Setting escape to \\ means
that ctrl-\ is used as the command key, sx and rx are used as the file transfer commands. The advantage
of picocom over socat is that file transfer is somewhat integrated (still external, but command access is
built-in).

#!/usr/bin/bash

  picocom --escape \\      \
        --baud 9600      \
        --flow n         \
        --databits 8     \
        --stopbits 1     \
        --noreset        \
--send-cmd sx    \
        --receive-cmd rx \
        /dev/rfcomm0

Fred Weigel

Phillip Stevens

unread,
Jul 20, 2021, 8:56:20 PM7/20/21
to RC2014-Z80
Rob,
Yes, just to echo Fred's words, picocom is a pleasant surprise.
Having the ability to integrate send / receive using an external command (eg in our case sx and rx for xmodem) is a substantial advantage.

I'm usually using a combination of GTKTerm for direct connection and colour support, and moserial for xmodem, and swapping between them during a session.
But using picocom inside xterm is a much simplified solution.

Thanks again for describing how to use it.

Fred wrote:
Rob
Yes, picocom is an excellent idea! Minicom wll not work... but picocom does pass regis and sixel nicely.

Dylan Hall

unread,
Jul 20, 2021, 10:04:44 PM7/20/21
to RC2014-Z80
I tried socat early on but I failed to get the right incantation to make it glue ssh and a serial port together. I'll have to take some time to understand how your example works :)

I did end up using socat with consrv and my python ssh->serial server so I can do xmodem transfers. consrv allows multiple ssh sessions to share the same serial port (they all see the same output and any ssh session can write to the serial port). So in one window I "ssh sc130" and interact with CP/M and in another window I can "xsend.sh sc130 <filename>" or "xrecv.sh sc130 <filename>".

xsend.sh: 
#!/bin/bash
socat EXEC:"sx -vv $2" EXEC:"ssh -T $1"

xrecv.sh:
#!/bin/bash
socat EXEC:"rx -vv $2" EXEC:"ssh -T $1"

My python ssh->serial server takes a slightly different approach and only sends output from the serial port to the most recently connected ssh session so I don't see the xmodem transfer in my main terminal window. 

I have a custom board inspired by the Pi Zero Serial Terminal that tweaks the FTDI connector so I can get serial with flow-control from the Pi.

IMG_20210721_135457_0151.JPG

Phillip - sorry, getting rather off topic.

Dylan

Phillip Stevens

unread,
Oct 10, 2022, 9:19:15 AM10/10/22
to RC2014-Z80
On Friday, 16 July 2021  Phillip wrote:
I've finished an initial draft of a ReGIS library for RC2014 and have published it here
Still lots of gaps. It is difficult to know when to stop adding functions, as ReGIS has a very powerful command set.
 
To circle back to the original purpose, building a planetary motion machine, and joining up with the multi-APU floating point calculation work, I've now built a simple planetary motion visualisation. The planet-motion repository is here.

I've been having some further fun with 3D graphics and the RC2014. Following the discussion on getting ReGIS working on Windows, I thought it was worth porting my z88dk ReGIS library to the Arduino platform. During that process, I found that someone had written GLX-GEARS for Arduino so I adapted their C++ Arduino program to use my Arduino ReGIS Library for demonstration.

And then I thought it would be fun to move GLX-GEARS back to CP/M and z88dk in C and getting it running on RC2014 CP/M.
In the process I separated the 3D graphics matrix and vector functions out into a z88dk 3D library, and used the GLXGEARS program as the demonstration.

And, it works, CP/M ReGIS graphics...

z80gears.png

The program can display and rotate a CUBE, an ISOSCELES, one GEAR, or 3 GLXGEARS.
But the frame rate is pretty low, for GLXGEARS at least. I've been experimenting with using math32, the APU, or with 16-bit math.
There's pretty heavy usage of trigonometric functions and I think that slows things down.

Anyway, another interesting distraction.

Cheers, Phillip

Scott Lawrence

unread,
Oct 10, 2022, 10:20:14 AM10/10/22
to rc201...@googlegroups.com
SO AWESOME!

It makes me I wish i still had my DEC GiGi... ;D

-s

--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+...@googlegroups.com.


--
Scott Lawrence
yor...@gmail.com

Phillip Stevens

unread,
Jun 16, 2024, 7:43:37 AM6/16/24
to RC2014-Z80
I've finished an initial draft of a ReGIS library for RC2014 and have published it here
Still lots of gaps. It is difficult to know when to stop adding functions, as ReGIS has a very powerful command set.
 To circle back to the original purpose, building a planetary motion machine, and joining up with the multi-APU floating point calculation work, I've now built a simple planetary motion visualisation. The planet-motion repository is here.

I've been having some further fun with 3D graphics and the RC2014. Following the discussion on getting ReGIS working on Windows, I thought it was worth porting my z88dk ReGIS library to the Arduino platform. During that process, I found that someone had written GLX-GEARS for Arduino so I adapted their C++ Arduino program to use my Arduino ReGIS Library for demonstration.

And then I thought it would be fun to move GLX-GEARS back to CP/M and z88dk in C and getting it running on RC2014 CP/M.
In the process I separated the 3D graphics matrix and vector functions out into a z88dk 3D library, and used the GLXGEARS program as the demonstration.

The program can display and rotate a CUBE, an ISOSCELES, one GEAR, or 3 GLXGEARS.
But the frame rate is pretty low, for GLXGEARS at least. I've been experimenting with using math32, the Am9511 APU, or with 16-bit math.

Its been a while, but this has been nagging at me, because my initial implementation for the ReGIS library was full of hubris.
So, I've revised it to use exclusively stdio functions, and it is a bit faster, but the main aim was to use memory more efficiently.

I've got it running on my RC2014 with 8085 CPU + Am9511 APU on my desk now, though honestly it achieves just "seconds per frame" rather than frames per second.

Screenshot from 2024-06-16 20-59-03.png

Cheers, Phillip

Fred Weigel

unread,
Jun 16, 2024, 3:22:39 PM6/16/24
to RC2014-Z80

Phil

Look at my la36 program -- it does that. Also, look at "shell" in that project for mapping a pty into something usable. (uses socat to attach a pty to a program)

Reply all
Reply to author
Forward
0 new messages