Page 1 of 1

Supporting ReGIS vector graphics on CP/M from Windows 10

Posted: Wed Sep 28, 2022 4:05 am
by feilipu
Recently a question came up on whether it is possible to support graphics from an RC2014 running CP/M and display them on a Windows 10 computer.

The answer is yes. It can be done. Actually it is not too hard to get it working.

I've written a concise description on the process here. I've written it from the perspective of a RC2014 CP/M user, but basically any CP/M device with a serial port can access this capability.

The ReGIS library for z88dk is here.
Let me know what you think.

Phillip

Re: Supporting ReGIS vector graphics on CP/M from Windows 10

Posted: Fri Sep 30, 2022 6:34 pm
by dom
A genuine question: did you consider doing Tektronix 4014 codes? I know it's not a raster display, but last time (okay, 25 years ago) I checked it was enabled by default in xterm builds.

Re: Supporting ReGIS vector graphics on CP/M from Windows 10

Posted: Fri Sep 30, 2022 7:16 pm
by feilipu
No, I’ve not heard of that option previously. Now I need to read up. :-)

Though, wouldn’t be hard to get it working. The ReGIS library is nothing more than a “character generator”. So to do similar for Tektroniks would be straight forward.

The “trick” was connecting the Windows WSL1 X.org XTerm dots. And it is nice that it works without too much trauma.

Re: Supporting ReGIS vector graphics on CP/M from Windows 10

Posted: Mon Oct 10, 2022 1:35 pm
by feilipu
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 GLXGEARS 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 and getting it running on 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...
Image

Re: Supporting ReGIS vector graphics on CP/M from Windows 10

Posted: Mon Oct 10, 2022 7:53 pm
by stefano
Love the result and the backport!
I think you could replace the rotation function with the ones we have in lib3d.lib ;) they were borrowed from the OZdev project, which I squeezed forcing everything to byte types for getting faster and slightly smaller code.

Re: Supporting ReGIS vector graphics on CP/M from Windows 10

Posted: Mon Oct 10, 2022 9:47 pm
by feilipu
Hi Stefano,

yes it should be possible to integrate and use the lib3d.lib.

There would need to be some adjustments, as this graphics system (inherited from the original author) uses 4d matrices. I believe it is something to do with carrying the scaling for the projection.

The w axis is used as part of a homogenous vector to aid in clipping. I don’t truly understand this all yet. So bare with me if the explanation is wrong.

I’ve been playing with the various math libraries (math32, am9511, and math16), and I’m really happy that the program works across all of them without adjustment. Testament to the sccz80 compiler flexibility.

I think it would also be worth looking at the method the original author used to generate the models. It’s in Python, so I didn’t pay much attention (Python and I are not friends), but it could be an interesting way to build additional models.

Re: Supporting ReGIS vector graphics on CP/M from Windows 10

Posted: Tue Oct 11, 2022 10:53 am
by stefano
oops... sure, the FP lib improvements are impressive !!

Re: Supporting ReGIS vector graphics on CP/M from Windows 10

Posted: Mon Oct 17, 2022 9:14 am
by feilipu
Getting closer, now I've got the 8085 build for 3d and ReGIS working.
So I will start to work on #2099 shortly.