VOGONS


How hard would it be to make a CGA card?

Topic actions

First post, by anetanel

User metadata
Rank Member
Rank
Member

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

Reply 1 of 67, by root42

User metadata
Rank Oldbie
Rank
Oldbie
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 […]
Show full quote

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

YouTube and Bonus
80486DX@33 MHz, 16 MiB RAM, Tseng ET4000 1 MiB, SnarkBarker & GUSar Lite, PC MIDI Card+X2+SC55+MT32, OSSC

Reply 3 of 67, by Zup

User metadata
Rank Oldbie
Rank
Oldbie

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!

Reply 4 of 67, by Jo22

User metadata
Rank l33t
Rank
l33t

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/obsolescence/the-vdu-board

https://hackaday.com/2015/02/22/a-smaller-homebrew-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//

Reply 5 of 67, by reenigne

User metadata
Rank Oldbie
Rank
Oldbie

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.

Reply 6 of 67, by root42

User metadata
Rank Oldbie
Rank
Oldbie

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.

YouTube and Bonus
80486DX@33 MHz, 16 MiB RAM, Tseng ET4000 1 MiB, SnarkBarker & GUSar Lite, PC MIDI Card+X2+SC55+MT32, OSSC

Reply 7 of 67, by reenigne

User metadata
Rank Oldbie
Rank
Oldbie
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.

Reply 8 of 67, by canthearu

User metadata
Rank Oldbie
Rank
Oldbie

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.

Reply 9 of 67, by Scali

User metadata
Rank l33t
Rank
l33t
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.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 10 of 67, by anetanel

User metadata
Rank Member
Rank
Member

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

Reply 11 of 67, by root42

User metadata
Rank Oldbie
Rank
Oldbie
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.

YouTube and Bonus
80486DX@33 MHz, 16 MiB RAM, Tseng ET4000 1 MiB, SnarkBarker & GUSar Lite, PC MIDI Card+X2+SC55+MT32, OSSC

Reply 12 of 67, by reenigne

User metadata
Rank Oldbie
Rank
Oldbie
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 in […]
Show full quote

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.

Reply 13 of 67, by Jo22

User metadata
Rank l33t
Rank
l33t
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//

Reply 14 of 67, by anetanel

User metadata
Rank Member
Rank
Member
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

Reply 15 of 67, by root42

User metadata
Rank Oldbie
Rank
Oldbie
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...?

YouTube and Bonus
80486DX@33 MHz, 16 MiB RAM, Tseng ET4000 1 MiB, SnarkBarker & GUSar Lite, PC MIDI Card+X2+SC55+MT32, OSSC

Reply 16 of 67, by reenigne

User metadata
Rank Oldbie
Rank
Oldbie
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.

Reply 17 of 67, by reenigne

User metadata
Rank Oldbie
Rank
Oldbie

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.

Reply 18 of 67, by keropi

User metadata
Rank l33t++
Rank
l33t++

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

🎵Link to buy a PCMIDI mpu
🎧Orpheus soundcard project
💻WTB Amstrad PC7486SLC-33 system

Reply 19 of 67, by anetanel

User metadata
Rank Member
Rank
Member
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 😀