• Please review our updated Terms and Rules here

z80 homebrew - interfacing to VGA card

Joined
Jul 3, 2009
Messages
21
Location
Hebden Bridge, UK
Hello,

I've finally got my z80 homebrew machine going its only 25 years since I first wanted to build one!

At the moment its very simple but I'd like to (try to) interface it to a 1980's VGA card. I have an old ISA VGA card (pictured) it's marked "CT-8490 Magic VGA" and uses the "Cirrus Logic GD510A" chip-set.

The thing that worries me is that there is a DIP switch at the back I've no idea what the switches do, nor do I have an ISA machine in which to try it so the long shot is - does anyone know what the switches do! I remember they could be a pain to get working even if you knew what the switches were supposed to do!

Does anybody have any other advice about interfacing z80 stuff to an ISA bus?

I was going to tie A20 high and use a D-type latch for A19..A12 (output enabled when A15..A12 and MREQ of Z80 high) and make a 4k window in my memory map to access the VGA memory and a similar arrangement for IORQ. Not sure what other pins of the ISA bus I need to worry about?

Should keep me quiet for a good while!

Cheers

Dom
 

Attachments

  • DSCF0011-s.jpg
    DSCF0011-s.jpg
    98.6 KB · Views: 2
Hello,

I've finally got my z80 homebrew machine going its only 25 years since I first wanted to build one!

At the moment its very simple but I'd like to (try to) interface it to a 1980's VGA card. I have an old ISA VGA card (pictured) it's marked "CT-8490 Magic VGA" and uses the "Cirrus Logic GD510A" chip-set.

The thing that worries me is that there is a DIP switch at the back I've no idea what the switches do, nor do I have an ISA machine in which to try it so the long shot is - does anyone know what the switches do! I remember they could be a pain to get working even if you knew what the switches were supposed to do!

Does anybody have any other advice about interfacing z80 stuff to an ISA bus?

I was going to tie A20 high and use a D-type latch for A19..A12 (output enabled when A15..A12 and MREQ of Z80 high) and make a 4k window in my memory map to access the VGA memory and a similar arrangement for IORQ. Not sure what other pins of the ISA bus I need to worry about?

Should keep me quiet for a good while!

Cheers

Dom

Hi Dom! Congratulations! Great job on the new Z80 home brew computer! Nothing beats the wonderful feeling of your own machine booting up and working!

Please consider joining us on the N8VEM home brew computing project! I think you would have a lot of fun and your contributions would be a great thing! There are a lot of resources you can use, all free, and lots of like minded home brew enthusiasts to help out! All the N8VEM information for hardware and software is freely and publicly available for you to use whether you are in the N8VEM project or not.

Adding an ECB bus to a Z80 home brew computer is relatively easy. Basically, it is just the Z80 address and control signals buffered with some very minimal control logic for the data bus. If you add ECB then you could reuse the N8VEM peripherals to help develop your own system.

You idea of interfacing a Z80 home brew computer to the ISA bus is excellent. I recall discussing this topic with one of the N8VEM builders a while back. Certainly I think it is possible to do so.

You might even be interested in the recent project we are working on called the "PropIO" board. It is a board that plugs into the N8VEM ECB backplane so the SBC can use it. The PropIO uses the Propeller to provide VGA display, PS/2 keyboard, and SD for mass storage.

The PropIO development is underway now. Dave is leading the software development and initial hardware design/prototype. I have built another prototype and testing the software along with Dave. I'll be adding some more features with a second Propeller and then making PCBs available for everyone.

If you develop peripherals for the N8VEM project, you can get PCBs made and I will help you with that. You can make your own and sell them to recoup your expenses or I will do it for you and include it with the rest of the N8VEM peripherals.

There are 7 N8VEM PCBs available; the SBC, ECB backplane, ECB bus monitor, ECB prototyping board, Disk IO (IDE and FDC), Zilog Peripherals board (CTC, DART, and dual PIO), and 6809 host processor board. There is a VDU (video display unit) also in development along with the PropIO.

Several N8VEM builders have made their own peripherals and gone on to make them available for other home brew computing hobbyists. James has made a whole series of new SBCs, Dan and Rich made the DSKY board (front panel like mini terminal display keyboard), Vince made his PockeTerm, and there have been many others.

You are certainly welcome to join us and I hope you'll consider it.

Thanks and have a nice day!

Andrew Lynch
 
Thanks Andrew,

I've been watching the N8VEM site (and thread here) with interest, though I can't find any specs for the EBC bus - I might well add that onto the end of my bus and get a few cards from you guys!

How do I join?

Anyway back on the VGA front I've found some documentation on the DIP switches which looks ok but am still not sure about some of the other connections I need to make for (older) VGA cards, is it as simple as just the address and data lines + MREQ/IOREQ or do I need to consider the DMA, IORDY/WAIT and clock/osc lines?

Cheers

Dom
 
Hi Dom! You may want to consider the XT-IDE project as a simple example of how to do basic IO and memory accesses on an 8 bit ISA board. That might be useful to help you design and prototype an ISA VGA interface.

Thanks and have a nice day!

Andrew Lynch
 
I've recently started a similar project.

For experimenting, I sawed the ISA bus section out of an old motherboard.
I've connected it to a Freescale micro DemoJM board, using the 32-bit Flexis processor, just because it provides an excellent IDE and debugger. I'm basically big banging all the signals out of the I/O ports.

I have it working the monochrome card from an XT as a start.
The mono card did require the ISA bus CLK signal, to guard some other signals. I bit bang that out as well.

VGA is next.

Bill

Pic...

DemoJM_ISA_2.jpg
 
Hi Bill,

Just spotted this - it looks great!

Re the clock signal, did this need to bear any particular relation to the signals or just occur once during an active address/data cycle?

Dom
 
Hi Bill,

Just spotted this - it looks great!

Re the clock signal, did this need to bear any particular relation to the signals or just occur once during an active address/data cycle?

Dom

Here's an example of the code.
The CLK has to be high before IOWR goes low, then CLK returns low.

Then CLK has to be high again before IOWR returns high, then CLK returns low.

void IoPortOutB(word addr, byte val)
{
AddrBus_SetOutput();
AddrBusHi_PutVal(0); // Put address on bus
AddrBus_PutVal(addr);
PulseALE();

DataBus_SetOutput();
DataBus_PutVal(val); // Place data on bus

IO_CLK_SetVal();
IOWR_ClrVal(); // Pulse IOWR low
IO_CLK_ClrVal();
IO_CLK_SetVal();

asm { nop }
asm { nop }

// wait for I/O channel ready
while ( !IO_CH_READY_GetVal() ) { }

IO_CLK_ClrVal();
IO_CLK_SetVal();
IOWR_SetVal(); // Pulse IOWR high

IODelay();
}

Since my original post I got an OAK VGA to work as well.
That one turned out to require the +12V supply, and the 14.318 MHz OSC signal. It seems to work just fine with no synchronization between the OSC signal and the others. (which is how it works in a PC AT also)

I've put up a few more pics:
http://www.wrljet.com/isabus/

Bill
 
Hello,

Thanks for that example, I'm going to have a go at designing a first cut z80 to ISA bus "bridge" tonight.

A few questions though:

I'm guessing in your example the the IO Clock is the main bus clock - I'm hoping to use the z80's 4/8MHz clock for this did you find that the card was fussy about the speed of this at all?

The other is the io_channel_ready did this ever get asserted by your card? I'm hoping to get away with ignoring this!?!

Off to stare at Horrowitz and Hill and lots of datasheets....

Cheers

Dom
 
Hello,

Thanks for that example, I'm going to have a go at designing a first cut z80 to ISA bus "bridge" tonight.

A few questions though:

I'm guessing in your example the the IO Clock is the main bus clock - I'm hoping to use the z80's 4/8MHz clock for this did you find that the card was fussy about the speed of this at all?

The other is the io_channel_ready did this ever get asserted by your card? I'm hoping to get away with ignoring this!?!

Off to stare at Horrowitz and Hill and lots of datasheets....

Cheers

Dom

Dom,

None of the cards I've tried out have asserted the IO_CH_READY.
None have been fussy at all about the speed. Running it all by hand in the debugger I've had some of the signals asserted for many minutes while I've been snooping around. Everything so far is static, so it just works.

The only catch so far is on the original Mono card itself, due to the way IBM chose to convert the Intel style bus signals to the Motorola style required by the 6845 chip. "E", etc. That's why I needed to add the CLK (what I called IO_CLK in the code)

Also, the VGA that I got working does require the 14.3 MHz OSC signal, but not sync'd in any way to the CLK. (which is how the PC AT works, so that makes sense)

Bill
 
Hello,

Thanks for that example, I'm going to have a go at designing a first cut z80 to ISA bus "bridge" tonight.

A few questions though:

I'm guessing in your example the the IO Clock is the main bus clock - I'm hoping to use the z80's 4/8MHz clock for this did you find that the card was fussy about the speed of this at all?

The other is the io_channel_ready did this ever get asserted by your card? I'm hoping to get away with ignoring this!?!

Off to stare at Horrowitz and Hill and lots of datasheets....

Cheers

Dom

Hi Dom,

How is your Z80/ISA bus interfacing going on? I am eager to reference your idea as I am doing a similar project. The MCU I am planning is the 8051 (or probably a homebrew CPU (http://www.mycpu.eu)). I want the ISA capability to make use of legacy VGA and ethernet cards. Ruud Baltissen had done some projects based on VIC-20 (http://www.baltissen.org/newhtm/vic20isa.htm). He also quoted a Z80ISA (http://www.baltissen.org/newhtm/Z80PC.htm) which is a dead link though.

Cheers,
Patrick
 
Hi Patrick,

I've not done much on this recently due to other pressures on my time. Also I've run out of wirewrapping sockets and I don't like doing lots of soldering on prototypes...

On the ethernet front I've recently bought a Vinculum, which I intend to use for storage and possibly wireless ethernet too (if I can work out how to write a driver!) http://www.vinculum.com/prd_vdip1.html

Dom
 
Back
Top