• Please review our updated Terms and Rules here

VGA graphics for the TRS-80 and others.

GK2001

Experienced Member
Joined
Jul 17, 2017
Messages
186
I’ve worked out a trio of universal-use VGA video card circuits built entirely with “discrete” 74-series derivative logic. They’re intended to be used with old-school computer architectures and have a 5V TTL/CMOS, uP-compatible interface. The data bus is 8-bits wide. Each card basically just looks like a standard read/write memory device to the host computer. The specs for each card are:

a) 640x480, 60Hz, 24-bit colour.
b) 640x480, 60Hz, 6-bit colour.
c) 320x240, 60Hz, 6-bit colour.

Construction wise, so far, I’ve knocked up a quick prototype of b) to verify my logic design. The circuity had to be a bit of a kludge because I didn’t have all of the most ideal logic devices in stock, but the couple of hours of design work checked out. The photo attached shows the prototype, not wired to a host device, just displaying the random contents of its video memory upon power-up.

I’m currently laying out the PCBs. Initially, I want to operate the cards with my TRS-80 model 1 (clone) over the expansion interface port. The TRS-80 obviously can’t allocate enough free memory space so this will require a small additional interface circuit (all in discrete logic of course) incorporating an indirect memory addressing register and also (for convenience) a hardware video memory wipe.

It will be interesting to write some machine code subroutines for the tasks of drawing lines, circles, arcs, etc and get some TRS-80 high resolution CAD happening.
 

Attachments

  • vga1.jpg
    vga1.jpg
    123.9 KB · Views: 28
  • vga2.jpg
    vga2.jpg
    181.1 KB · Views: 27
Last edited:
Thanks for taking on this project. While I love all the new TRS-80 accessories that have been released recently, I do like the fact that you are keeping it old-school with the 74 series logic. I'm eagerly awaiting updates!
 
Respect, that's really cool. TRS-80 Model 3 was my first real computer so I'll always have a soft spot for it :)
 
That's just something I knocked up in my etch tank. The circuitry is a mix of 74LVC, 74HC and 74HCT. Synchronous 74LVC logic is used for the horizontal timing and video throughput for speed. 74LVC isn't available in through-hole, so I couldn't resort to breadboard.
I could post the Gerber files in a bit.
 
Would a TRS 80 even be capable of driving a VGA display considering how much lower the native resolution is, the fact that is mono and not color, and the feeble amount of RAM that these machines have?
 
Would a TRS 80 even be capable of driving a VGA display considering how much lower the native resolution is, the fact that is mono and not color, and the feeble amount of RAM that these machines have?

The sheer amount of RAM those color depths and resolutions require obviously would require some kind of paging mechanism, X-Y pixel registers, or some other indirect mechanism for updating the pixel data, but outside of that the main limitations would be:

1: Performance (updating a "dozens" to "hundreds"-of-K framebuffer is going to be a bit slow for a 2-4Mhz Z80)
2: Memory limits on the driver software. (Obviously blitting bitmaps around is going to be an issue if you have more framebuffer RAM than system RAM, which would be the case even for 320x240.)

No reason that it *won't* work, but it is about an order of magnitude more pixel data than, say, the roughly comparable Percom Electric Crayon or those later color graphics add-on devices that were based on the TMS9918A, and both of those actually had a modicum of onboard hardware acceleration.
 
Thats a nice build.
I don't want to rain on your parade, so this is only my opinion...
The Z80 is a bit under powered for hi resolution graphics.
I suggest you give it some help. Add a graphics processor (really low end GPU ;-)

Your Z80 could send high level commands like:
move to x,y
linedraw to x,y
arc start,finish,radius
circle origin,diameter
rectangle x,y
color r,g,b
clear

leave the bit handling to the graphics processor.
Off load as much as possible to the GPU. Give the z80 time to do things.

Just so I'm clear... Your VGA in TTL is very cool!!
I just think a z80 may not be up to the task.

joe
 
I suggest you give it some help. Add a graphics processor (really low end GPU ;-)

Your Z80 could send high level commands like:
move to x,y
linedraw to x,y
arc start,finish,radius
circle origin,diameter
rectangle x,y
color r,g,b
clear
Yea, that's the real question. Is a large, raw bit map the most effective way to empower something like a TRS-80 with a capability such as this.

TRS-80 will almost a full second to fill that frame buffer (150K).

Even if you had some sort of shared memory, I wonder how many "lines per second" you effectively draw on that display.
 
Thats a nice build.
I don't want to rain on your parade, so this is only my opinion...
The Z80 is a bit under powered for hi resolution graphics.
I suggest you give it some help. Add a graphics processor (really low end GPU ;-)

Your Z80 could send high level commands like:
move to x,y
linedraw to x,y
arc start,finish,radius
circle origin,diameter
rectangle x,y
color r,g,b
clear


Yeah, I am aware of the hardware limitation of a TRS-80.
Like I said in my first post; "It will be interesting to write some machine code subroutines for the tasks of drawing lines, circles, arcs, etc and get some TRS-80 high resolution CAD happening."
My BBC Micro does a fairly good job of drawing hi res graphics at 320x256 and 640x256 (even in BASIC) with it's 1MHz clock and I'm pretty sure it doesn't have a graphics co processor.

In initially interfacing these cards with my TRS-80, I am not interested in blitting full screen bitmaps or playing mp4 videos - more like running Mandelbrot and chaotic attractor or other mathematical simulations, some of which I might even let run overnight.

t20347

t20347
 
I was mostly reacting to "TRS-80 high resolution CAD happening."

If you are planning to let stuff run over night then a dumb interface is just fine.
For CAD it's going to be very unpleasant to use.

joe
 
If you follow the VDU concept of the BBC micro you can even create a separate graphic engine and send commands through for example the printer port.
The VDU engine collects 8 bit commands and data over a single channel. Once enough bytes have been gathered for that specific command it will execute it.
You can offload the VDU commands to, for example an ARM microcontroller which can generate VGA (for example Teensy) or even HDMI by using a Raspberry Pi.
A simple 8 bit level converter and maybe another for handshaking could be used for interfacing from 5 Volt levels to 3.3V.
The source of BBCbasic is available so adaptations are relatively easy.
 
Yeah, I could use a Teensy or a Raspberry Pi, which would be a pursuit barely related to collecting and playing around with old fashioned computer hardware. I don’t think that I implied that I was intending to get my TRS-80 running Solidworks or AutoCAD with my “dumb interface” ideas either……

Starting a project thread on an internet forum is akin to dining out at McDonalds. It occasionally feels like a good idea after a good lapse, but the poop you receive in return for your patronage in the end just leaves you groaning and wondering to yourself why you were stupid enough to do that again. I’m out; this is only going to be a waste of effort and time on my behalf.
 
Starting a project thread on an internet forum is akin to dining out at McDonalds. It occasionally feels like a good idea after a good lapse, but the poop you receive in return for your patronage in the end just leaves you groaning and wondering to yourself why you were stupid enough to do that again. I’m out; this is only going to be a waste of effort and time on my behalf.

To be clear, personally I have no problem with your plan, I was just clarifying that just because it "sounds hard for a "Z80" there's no reason it won't work, and I would in fact love to actually see your device in action. Build it and show the haters.

(The 640x480x24 bit color mode with its 900k of video RAM does at least *sound* like a bit much, but, eh, if you build it so it does simple X*Y*color port access to set/reset pixels and mostly use it for line plots it should be fine.)
 
Some years ago I connected an 8 bit VGA card to a Z80 system.
In text mode it is fast enough to quickly display listings and such, in graphic mode you can use some VGA tricks to get some speed.

VGA memory is mapped in the top 32k.

Have a look at: http://kgelabs.nl/?p=147
 
To be clear, personally I have no problem with your plan, I was just clarifying that just because it "sounds hard for a "Z80" there's no reason it won't work, and I would in fact love to actually see your device in action. Build it and show the haters.

(The 640x480x24 bit color mode with its 900k of video RAM does at least *sound* like a bit much, but, eh, if you build it so it does simple X*Y*color port access to set/reset pixels and mostly use it for line plots it should be fine.)


To very clear I was never a "hater" I actually like the project. I was not the one who said the objective was "CAD".The OP said that. I only pointed out that "CAD" implied response time that was beyond what a bare z80 could do.

I stand behind that opinion.

joe
 
Yeah, I could use a Teensy or a Raspberry Pi, which would be a pursuit barely related to collecting and playing around with old fashioned computer hardware. I don’t think that I implied that I was intending to get my TRS-80 running Solidworks or AutoCAD with my “dumb interface” ideas either……

Starting a project thread on an internet forum is akin to dining out at McDonalds. It occasionally feels like a good idea after a good lapse, but the poop you receive in return for your patronage in the end just leaves you groaning and wondering to yourself why you were stupid enough to do that again. I’m out; this is only going to be a waste of effort and time on my behalf.

I feel your pain, but also I know how frustrating it is to get a prototype up and running only to find out that for instance the external access to the videoram is quite difficult to get right. I also made a graphics 'overlay' on top of the original video signal for the Kaypro. It is made of a fast SRAM chip, some counters and a bunch of latches all controlled by a GAL20V8. The displaying of the videodata was the easiest part. Then came the access from the Z80.. I had opted for a simple system without the need of connecting directly to the Z80 bus, the Kaypro has two Z80PIO chips of which both have a complete 8 bit port free. Through one of these I connected the data bus to the graphics overlay board, the other 8 bit port is partially used to select between the address and data latches. In the end the result is that I could manage to access the graphics ram but not without interfering with the display (aka the well known CGA snow effect) so animation is not quite possible, static images are fine. It took quite some fiddling to getting the writes to SRAM 100% perfect.

It is possible to put in more complex logic and delay the writes to the SRAM but I could not get that into the (simple) GAL20V8. So for now the project is on the backburner.
 

Attachments

  • photo_2020-10-08_22-09-49.jpg
    photo_2020-10-08_22-09-49.jpg
    165.4 KB · Views: 7
  • photo_2020-10-15_20-58-17.jpg
    photo_2020-10-15_20-58-17.jpg
    37.7 KB · Views: 6
  • justlines_ok.jpg
    justlines_ok.jpg
    130.2 KB · Views: 6
Speaking of the Gigi thread.

This was a machine with a 3MHz 8085, 768x240 with 8 color graphics.

And it ran with 16k of video RAM.

I posit this simply as an example of a "slow" 8 bit machine with hi-res color graphics.

Now it's curious hot they pulled this off.

Overall, the machine has 32k of total RAM, but even at "1 bit" of resolution, 768/8 * 240 is 23K of ram, much less with 8 colors.

I glanced through the technical manual, it has a very detailed description of the system. I don't quite grok all of it. It's not a simple bitmap -> display system, it's more sophisticated.

Still not clear how they get by with so little RAM though.

But, the fundamental point being that here was a pretty high res color graphic system with limited RAM and processor, and it was quite functional at the time I used it back in the day.

It you're looking for things like static charts, it's more than adequate.
 
This project (TRS80-interfacing/coding) is now out of the way and fully documented here (all design files/code/instructions of use/etc):

http://www.glensstuff.com/trs80vga/trs80vga.htm

I'm not going to write the next stage/level machine-code routine package any time soon, but will be uploading more advanced BASIC example/graphics-drawing programs as time permits.

land_rover_1.jpg
 

Attachments

  • land_rover_1.jpg
    land_rover_1.jpg
    94.2 KB · Views: 4
Last edited:
Back
Top