Supporting ReGIS vector graphics on CP/M from Windows 10

Post Reply
User avatar
feilipu
Member
Posts: 45
Joined: Tue Nov 15, 2016 5:02 am

Supporting ReGIS vector graphics on CP/M from Windows 10

Post 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
User avatar
dom
Well known member
Posts: 2072
Joined: Sun Jul 15, 2007 10:01 pm

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

Post 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.
User avatar
feilipu
Member
Posts: 45
Joined: Tue Nov 15, 2016 5:02 am

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

Post 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.
User avatar
feilipu
Member
Posts: 45
Joined: Tue Nov 15, 2016 5:02 am

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

Post 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
You do not have the required permissions to view the files attached to this post.
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

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

Post 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.
User avatar
feilipu
Member
Posts: 45
Joined: Tue Nov 15, 2016 5:02 am

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

Post 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.
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

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

Post by stefano »

oops... sure, the FP lib improvements are impressive !!
User avatar
feilipu
Member
Posts: 45
Joined: Tue Nov 15, 2016 5:02 am

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

Post 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.
Post Reply