• Please review our updated Terms and Rules here

DIY: FPGA MDA/EGA/CGA to VGA Converter :D

Retro Canada

Experienced Member
Joined
Aug 23, 2012
Messages
280
Location
Vancouver, BC
Hello guys, this is my last project I’ve been working this month:

A truly FPGA MDA/CGA/EGA to VGA Converter. And it will be open source.


First, few answers before watching the video:

1) No, I am not selling this. I am designing it. It will be available later as DIY and open source.
2) It’s a W.I.P. I need to add MDA support now
3) It’s purely DIGITAL. No, your Amiga, Apple GS won’t work
4) Being DIGITAL it’s tied up to the EGA-MDA and CGA pixel clocks: 16.257Mhz and 14.318Mhz. Anything different than that, like your ZX-Speccy 128 will look jagged and jittered. Not to mention the sync pulse polarity that must match the EGA/CGA.
5) It converts CGA and outputs as 640x400@70Hz (21.175Mhz). For EGA it uses 640x350@70Hz (21.175Mhz). These are VESA standard resolutions supported by a standard VGA monitor. Your fancy new HDMI monitor probably will give a middle finger to that.
6) For MDA it will use 720x350x70Hz another VESA.
7) There is no HDMI output and it won’t have it.
8) There are no margins the signal is displayed in 640x350/400. Some programs like ChekIt changes the CGA 6845 registers and mess up with the borders. For that in CGA you can use a DIP switch to fine adjust the screen. This problem doesn’t seem to happen in EGA.
9) I’m testing with my boards. There could be variations
10) I still need to solve some race conditions in EGA that causes it to make very hard to add changes. Too many lines being written/read at same time. But the video is stable.
11) You will be able to change the resolutions like output in 800x600, provided you can change the FGPA design and add new pixel clocks and solve many *ISSUES* it may cause :D hey it’s fun! But there won’t be scale-up, unless you implement it in FGPA >:) using linear interpolation. Right now the only scaling present is CGA where I double scan each line from 640x200 to 640x400.
12) Why am I doing this instead of using a GBS8200 ? Have you ever used that board ?

Enjoy the video:

https://www.youtube.com/watch?v=8_fl28-o9tE
 
Yeah, I'd like to take a look at this, just from a repair depot point of view.

The less monitors I have on a work bench, the more computers can be worked on in a comfortable radius.

The ones we've looked at, so far, are either really bad or really expensive.
 
Sounds like a great project! It looks like your project is geared towards being able to easily use commodity monitors, based on this info:

5) It converts CGA and outputs as 640x400@70Hz (21.175Mhz). For EGA it uses 640x350@70Hz (21.175Mhz). These are VESA standard resolutions supported by a standard VGA monitor.
6) For MDA it will use 720x350x70Hz another VESA.
...
8) There are no margins the signal is displayed in 640x350/400.
 
I want a 9 pin cable that I can blindly hook up, and it gets fed through to my LCD and capture hardware. I currently have this for VGA, so being able to go CGA/EGA/MDA to VGA is very helpful.

Excellent work on the project, I was experimenting with this idea myself using the internal Dual Port RAM on a Xilinx Artix 7 but could never quite get my internal timings done right and it kind of got put to one side. Also glad to see it's not a BGA part.
Looking forward to the MDA and the source/project files because I'd love to build one.

From memory with MDA I ended up playing with 720x400 and 720x350, on my test LCD these basically looked the same with the 350 mode just having black bars top and bottom. I never tried a CRT or the capture stuff, but figured if there was any issues it'd be fixable with vertical height adjustment.
 
I was experimenting with this idea myself using the internal Dual Port RAM on a Xilinx Artix 7 but could never quite get my internal timings done right and it kind of got put to one side. Also glad to see it's not a BGA part.
Looking forward to the MDA and the source/project files because I'd love to build one.

I guess you don't have enough RAM bits inside the FPGA (well maybe MDA using 2 bits per pixel you need 63K). but since I need 6-bits per color this is why I use an external SRAM chip of 8ns! I use the dual port ram only the for incoming and outcoming rows.

You don't have to solder the FPGA Cyclone, you just buy the smal CoreEP4CE6 from ebay, it costs 25 dollars and it comes ready to use. You just need to build the daugherboard I designed to use with it.
 
I guess you don't have enough RAM bits inside the FPGA (well maybe MDA using 2 bits per pixel you need 63K). but since I need 6-bits per color this is why I use an external SRAM chip of 8ns! I use the dual port ram only the for incoming and outcoming rows.

You don't have to solder the FPGA Cyclone, you just buy the smal CoreEP4CE6 from ebay, it costs 25 dollars and it comes ready to use. You just need to build the daugherboard I designed to use with it.

You can get the Artix 7 with up to 2,700kbit of internal memory (mine was the 1,800kbit model), but with it being BGA and a little pricey per chip, I think the SRAM solution is much better. My issue wasn't hardware limited but mostly a lack of time, knowledge and skill.
 
The screens look a lot better than those I get using my C128 DCA /Gonbes 8220 combination and it sounds like it may be slightly cheaper. Very cool.
 
I bought a Gonbes about 5 years ago and it never worked right. So I'm looking forward to this :cool:
 
Cool project, I assume it's compatible with Tandy & IBM PCjr enhanced CGA too?

I would assume so, since they use the same 16-colour RGBI interface to the same monitor (640x200 resolution).
The enhancements are only in the display circuitry, which can display 16 colours at a time, where CGA is limited to 4. EGA is the same, in 320x200 mode, it can be used on a regular CGA monitor.
 
8) There are no margins the signal is displayed in 640x350/400. Some programs like ChekIt changes the CGA 6845 registers and mess up with the borders. For that in CGA you can use a DIP switch to fine adjust the screen. This problem doesn’t seem to happen in EGA.
CGA software often makes use of the border color, so I'd miss it if it wasn't shown at all. I know it's impractical to make the border go all the way into the overscan area like real CGA did on a CRT monitor, but VGA at least displayed a thin border on CRT monitors.
 
CGA software often makes use of the border color, so I'd miss it if it wasn't shown at all. I know it's impractical to make the border go all the way into the overscan area like real CGA did on a CRT monitor, but VGA at least displayed a thin border on CRT monitors.

There are no pixels left. Unless I shrink it or use a higher resolution like 720x400 but then you'd lose on aspect ratio and would end up with huge left and right borders.
 
Back
Top