How hard would it be to make a CGA card?

Discussion about old graphics cards, monitors and video related things.

How hard would it be to make a CGA card?

Postby anetanel » 2018-7-22 @ 15:18

After dipping my toes in building my own retro card, with the Adlib clone, I wonder how complicated would it be to create a CGA card from scratch?
I'm not an electronics expert (pff not even a beginner..) but it seems that the only "proprietary" part would be a ROM chip with the BIOS/Character map etc.. but all other parts should be simple "off the shelf" components... Is it not?

I'm especially interested in making a card with composite output.

I googled a bit and couldn't find any project like this..
anetanel
Member
 
Posts: 103
Joined: 2017-1-01 @ 23:10

Re: How hard would it be to make a CGA card?

Postby root42 » 2018-7-22 @ 19:06

anetanel wrote:After dipping my toes in building my own retro card, with the Adlib clone, I wonder how complicated would it be to create a CGA card from scratch?
I'm not an electronics expert (pff not even a beginner..) but it seems that the only "proprietary" part would be a ROM chip with the BIOS/Character map etc.. but all other parts should be simple "off the shelf" components... Is it not?

I'm especially interested in making a card with composite output.

I googled a bit and couldn't find any project like this..


The MC6845 is EOL. So you would definitely have to buy those NOS or used...
Soldering, retro game reviews and more on YouTube and Bonus videos
80386DX@25 MHz, 8 MiB RAM, Tseng ET4000 1 MiB, Jazz16, PC MIDI Card + SC55MkII + MT32, XT CF Lite, OSSC 1.6
User avatar
root42
Oldbie
 
Posts: 1250
Joined: 2018-1-27 @ 13:23

Re: How hard would it be to make a CGA card?

Postby anetanel » 2018-7-22 @ 19:45

root42 wrote:The MC6845 is EOL. So you would definitely have to buy those NOS or used...

Sure. So are the Yamaha chips for the Adlib. But they are available easily and cheaply on ebay.
anetanel
Member
 
Posts: 103
Joined: 2017-1-01 @ 23:10

Re: How hard would it be to make a CGA card?

Postby Zup » 2018-7-22 @ 19:52

Wasn't the 6845 all digital?

If it has not any analog parts (like SID or OPL chips), it can be rebuilt into a FPGA... maybe the entire card can be fitted inside one.
I have traveled across the universe and through the years to find Her.
Sometimes going all the way is just a start...

I'm selling some stuff!
User avatar
Zup
Oldbie
 
Posts: 1286
Joined: 2003-10-04 @ 12:16

Re: How hard would it be to make a CGA card?

Postby Jo22 » 2018-7-22 @ 23:58

All digital, I think. Besides, there had been several variants of the Motorola:
Synertek 6845E, SY6545, MC6545, Rockwell 6545, MC6847, Hitachi HD46505, HD6845SP,
HD68A45, MC6845P, AMS40489, UM6845, UM6845R, CM607P, CAST C6845

MDA/CGA/HGC/EGA/VGA/SVGA/TIGA Overview (TU Chemnitz)

Other CGA/Motorola "compatible" machines used these enhanced chips:

µPD7220 - Robotron EC 1834, NEC PC-9801, DEC Rainbow 100
HD68A45 - Sanyo MBC-550
AMS40489 - Amstrad CPC (home computer)

//Other useful articles//

https://www.reenigne.org/blog/crtc-emulation-for-mess/
http://obsolescence.wixsite.com/obsoles ... -vdu-board

https://hackaday.com/2015/02/22/a-small ... w-amstrad/
http://www.cpcwiki.eu/index.php/CRTC

http://www.6502.org/users/andre/hwinfo/crtc/crtc.html
http://tinyvga.com/6845
"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//
User avatar
Jo22
l33t
 
Posts: 3889
Joined: 2009-12-13 @ 07:06
Location: Europe

Re: How hard would it be to make a CGA card?

Postby reenigne » 2018-7-23 @ 10:51

There's nothing fundamentally difficult about it - it's just a bunch of discrete logic, a bank of DRAM, the CRTC (which is not hard to find) and a character ROM (which is just a matter of writing the right data to an EEPROM or similar). The schematics are in IBM's documentation and not hard to find. The biggest obstacle, I think, is just that it's a very large card with a lot of chips on it, so laying out the PCB and soldering it together would take a while and it wouldn't be the cheapest board to get manufactured. Would you want to be true to IBM's original schematic or would you substitute some modern parts to make it cheaper and easier to build? Putting all the discrete logic in an FPGA might be a good way to do that. The CRTC too (though talk to me before you do that to push me to finish making an accurate model of the CRTC's behaviour first, so that we can be sure the FPGA-based design works with future demos). Indeed, as Zup said, the entire card could probably fit into an FPGA with just the DAC for the composite output being outside it.

I guess the reason that it's never been done is that CGA cards (even genuine IBM ones) aren't that rare or difficult to find, so there hasn't been any demand for a modern replacement. I think it would be an interesting project, though, and I'd be glad to contribute any help I can if you decide to take it on.
User avatar
reenigne
Oldbie
 
Posts: 509
Joined: 2006-11-30 @ 05:13
Location: Cornwall, UK

Re: How hard would it be to make a CGA card?

Postby root42 » 2018-7-23 @ 11:00

The thing that makes CGA interesting is probably the composite color mode. However this only works in NTSC, so us Europeans are already not that much interested. Hence a CGA card for me would only be interesting if it would already do the composite->NTSC conversion on board, outputting either PAL composite or a "modern" standard like VGA or HDMI. Also, as a hobbyist, soldering the card myself would be great. Hence doing "everything in a FPGA" is not very appealing.

All my VGA cards already have CGA emulation, without the composite color trick, though, which I can't use anyway, as explained above. So the only appeal to me is the soldering and the emulation of the NTSC color trick.
Soldering, retro game reviews and more on YouTube and Bonus videos
80386DX@25 MHz, 8 MiB RAM, Tseng ET4000 1 MiB, Jazz16, PC MIDI Card + SC55MkII + MT32, XT CF Lite, OSSC 1.6
User avatar
root42
Oldbie
 
Posts: 1250
Joined: 2018-1-27 @ 13:23

Re: How hard would it be to make a CGA card?

Postby reenigne » 2018-7-23 @ 11:24

root42 wrote:The thing that makes CGA interesting is probably the composite color mode. However this only works in NTSC, so us Europeans are already not that much interested. Hence a CGA card for me would only be interesting if it would already do the composite->NTSC conversion on board, outputting either PAL composite or a "modern" standard like VGA or HDMI.


The trouble with outputting VGA or HDMI is that the timings are not compatible, so you'd have to have either a complicated thing to convert between standards onboard, or end up with a less-than-compatible CGA card (which probably wouldn't be able to run 8088 MPH). What about outputting component RGB with CGA timings (i.e. "arcade CGA")? Many European TVs can accept such a signal through a SCART cable. The conversion between NTSC and component RGB is probably a single, easy to solder chip since it doesn't have to convert timings as well as colour information.

root42 wrote:Also, as a hobbyist, soldering the card myself would be great. Hence doing "everything in a FPGA" is not very appealing.


I think CPC FPGA was hand-soldered so it's not unprecedented. Not the easiest thing to solder though.
User avatar
reenigne
Oldbie
 
Posts: 509
Joined: 2006-11-30 @ 05:13
Location: Cornwall, UK

Re: How hard would it be to make a CGA card?

Postby canthearu » 2018-7-23 @ 11:28

The problem is that CGA (digital colour), is that monitors are hard to source, and the CRTs they use are getting rarer, more worn, and more difficult to repair.

In comparison, you can get a VGA card in any card format and run it on one of the hundreds of billions CRT and LCD monitors with compatible inputs. These cards are compatible with CGA.

The only thing you are missing is CGA 16 colour composite graphics output.
canthearu
Oldbie
 
Posts: 704
Joined: 2018-5-26 @ 01:00

Re: How hard would it be to make a CGA card?

Postby Scali » 2018-7-23 @ 11:28

anetanel wrote:but it seems that the only "proprietary" part would be a ROM chip with the BIOS/Character map etc.. but all other parts should be simple "off the shelf" components... Is it not?


Almost correct. There is no BIOS on a CGA card, the character ROM is the only thing on there.
Since the CGA and MDA cards were the two standard options for the original PC, the code is already in the motherboard BIOS, not on the card.
In fact, there is even a character map in the motherboard BIOS. This is for supporting characters in graphics modes.
So in theory you could create a CGA card without any ROM whatsoever, but it would only work in graphics mode. DOS is capable of running in graphics mode, but performance will not be great.
In text mode, the onboard character ROM is 'hardwired' to the display logic, so it fetches character bits directly from ROM. This ROM is not accessible by the system at all.

If someone is going to design a CGA card, I wuold think a great feature would be to use some kind of rewritable memory for the character ROM, and make it possible for the CPU to overwrite the character data.
Scali
l33t
 
Posts: 4364
Joined: 2014-12-13 @ 14:24

Re: How hard would it be to make a CGA card?

Postby anetanel » 2018-7-23 @ 11:32

I must admit that one of my reasons toward this project is the fact that I own a green monochrome monitor with only composite input.
I really want a card to put in my 286 that could drive it :)
AFAIK my best option is a CGA card.
So, to me, the color part is not a big issue...
anetanel
Member
 
Posts: 103
Joined: 2017-1-01 @ 23:10

Re: How hard would it be to make a CGA card?

Postby root42 » 2018-7-23 @ 11:38

reenigne wrote:
root42 wrote:Also, as a hobbyist, soldering the card myself would be great. Hence doing "everything in a FPGA" is not very appealing.


I think CPC FPGA was hand-soldered so it's not unprecedented. Not the easiest thing to solder though.


Well, of course that is possible. But for me, hand soldering is most fun when using standard, legacy through hole components, and not just one FPGA, plus one or two support ICs and a handful of tiny SMD passives. ;)

The through hole components look so much more retro, and are nice to handle.
Soldering, retro game reviews and more on YouTube and Bonus videos
80386DX@25 MHz, 8 MiB RAM, Tseng ET4000 1 MiB, Jazz16, PC MIDI Card + SC55MkII + MT32, XT CF Lite, OSSC 1.6
User avatar
root42
Oldbie
 
Posts: 1250
Joined: 2018-1-27 @ 13:23

Re: How hard would it be to make a CGA card?

Postby reenigne » 2018-7-23 @ 11:40

anetanel wrote:I must admit that one of my reasons toward this project is the fact that I own a green monochrome monitor with only composite input.
I really want a card to put in my 286 that could drive it :)
AFAIK my best option is a CGA card.
So, to me, the color part is not a big issue...


If you're not bothered about the colours being accurate and you have (or find) a CGA card with an RGBI output, it's a pretty simple circuit to go from RGBI to monochrome composite.
User avatar
reenigne
Oldbie
 
Posts: 509
Joined: 2006-11-30 @ 05:13
Location: Cornwall, UK

Re: How hard would it be to make a CGA card?

Postby Jo22 » 2018-7-23 @ 12:16

root42 wrote:The thing that makes CGA interesting is probably the composite color mode. However this only works in NTSC, so us Europeans are already not that much interested

Um, why not ? Our TV sets are multi-norm since a while. They support NTSC/PAL/SECAM and their spinoffs (PAL60, NTSC50).
"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//
User avatar
Jo22
l33t
 
Posts: 3889
Joined: 2009-12-13 @ 07:06
Location: Europe

Re: How hard would it be to make a CGA card?

Postby anetanel » 2018-7-23 @ 12:18

reenigne wrote:If you're not bothered about the colours being accurate and you have (or find) a CGA card with an RGBI output, it's a pretty simple circuit to go from RGBI to monochrome composite.


I have a card with a 9 pin female output (and an LPT port). not sure what is it.. it drives a monochrome monitor with MDA connector...
It has a "color" jumper. Does it mean that it is an EGA?
Attachments
2017-12-20 17.43.11.jpg
anetanel
Member
 
Posts: 103
Joined: 2017-1-01 @ 23:10

Re: How hard would it be to make a CGA card?

Postby root42 » 2018-7-23 @ 12:27

anetanel wrote:
reenigne wrote:If you're not bothered about the colours being accurate and you have (or find) a CGA card with an RGBI output, it's a pretty simple circuit to go from RGBI to monochrome composite.


I have a card with a 9 pin female output (and an LPT port). not sure what is it.. it drives a monochrome monitor with MDA connector...
It has a "color" jumper. Does it mean that it is an EGA?


I looks like this card supports both CGA and Hercules modes. Your card states at the bottom that it is auto-switching, so maybe you don't need to set the jumper...?
Soldering, retro game reviews and more on YouTube and Bonus videos
80386DX@25 MHz, 8 MiB RAM, Tseng ET4000 1 MiB, Jazz16, PC MIDI Card + SC55MkII + MT32, XT CF Lite, OSSC 1.6
User avatar
root42
Oldbie
 
Posts: 1250
Joined: 2018-1-27 @ 13:23

Re: How hard would it be to make a CGA card?

Postby reenigne » 2018-7-23 @ 12:32

anetanel wrote:
reenigne wrote:If you're not bothered about the colours being accurate and you have (or find) a CGA card with an RGBI output, it's a pretty simple circuit to go from RGBI to monochrome composite.


I have a card with a 9 pin female output (and an LPT port). not sure what is it.. it drives a monochrome monitor with MDA connector...
It has a "color" jumper. Does it mean that it is an EGA?


The colour mode could mean EGA or CGA or even colour MDA (like Hercules InColor) compatible. The way to check is to put a scope on the hsync output and check the frequency. CGA is 15.7kHz, EGA is 21.9kHz and MDA is 18.4kHz.
User avatar
reenigne
Oldbie
 
Posts: 509
Joined: 2006-11-30 @ 05:13
Location: Cornwall, UK

Re: How hard would it be to make a CGA card?

Postby reenigne » 2018-7-23 @ 12:36

Oh, root42's answer is better than mine. Actually, looking at that card it seems like there is actually composite generation circuitry on the card, but unpopulated. I wouldn't mind betting that if you populated those resistors, Q1 and P1 the same way as in root42's link that you'd actually get composite output on one of the unused outputs of the 9-pin connector.
User avatar
reenigne
Oldbie
 
Posts: 509
Joined: 2006-11-30 @ 05:13
Location: Cornwall, UK

Re: How hard would it be to make a CGA card?

Postby keropi » 2018-7-23 @ 12:37

that card looks like the myriad cga/mda/hercules cheap clone cards , no way color means EGA ... not a bad card especially for mda/herc
User avatar
keropi
l33t++
 
Posts: 7250
Joined: 2003-9-08 @ 06:45
Location: Greece

Re: How hard would it be to make a CGA card?

Postby anetanel » 2018-7-23 @ 13:01

keropi wrote:that card looks like the myriad cga/mda/hercules cheap clone cards , no way color means EGA ... not a bad card especially for mda/herc

Man.. I thought I had an excuse to buy a scope :)
anetanel
Member
 
Posts: 103
Joined: 2017-1-01 @ 23:10

Next

Return to Video

Who is online

Users browsing this forum: No registered users and 2 guests