• Please review our updated Terms and Rules here

Any project to connect CGA/EGA monitor to windows (maybe via USB)

Quadko

Member
Joined
Sep 15, 2011
Messages
14
Location
Colorado Springs
I didn't turn up anything with Google, but have you heard of anything to connect a CGA or EGA monitor to a windows box as an additional monitor? I'm mostly thinking about use in DosBox, honestly, but there could be other fun, too.

On the "simpler" end, maybe a driver/hack in dosbox could send the video output to the board to display, and windows doesn't recognize the board as anything special. On the "not simple" end, possibly windows recognizes it as a normal (usb) video card, and the driver or the hardware converts the input image (hopefully something like 320x200x32bpp) to the appropriate palette (320x200x4bpp!). It doesn't have to be USB, of course, I am just assuming that was simplest.

But there are lots of problems even if that all worked, especially managing or selecting video modes. Worst case it could be done manually with buttons on the device, but to get seamless emulation behavior the emulator would probably have to know to talk to the device for mode and video port calls. Or would it be simpler if the device was just a bridge between a USB memory buffer and a real ISA CGA/EGA card? Or is that much, much harder a project!


Ah well, aside from being fun to hook up an IBM CGA monitor to Windows 8, it's really the aspect ration and non-square pixels that are driving me nuts playing games on modern LCDs and that got me thinking. I was surprised there wasn't a set of discussions that turned up on a few google searches. Probably just a diverting pipe dream, but it was fun to think about! Or am I missing a project out there that would be fun to follow up with?
;)
 
That's a really interesting idea. I think the MAME people do similar things, but tend to use 3-bit (RGB) digital or analog instead of 4-bit CGA (RGBI) or 6-bit EGA (RGBrgb) and just have a converter from VGA.

I think the best way wouldn't be to work from the perspective of the video mode you want to display but from the perspective of the image format needed by the monitor. Then there would be only two "modes" to switch between, corresponding to the two possible clock frequencies: CGA (14.318MHz) and EGA/MDA 350-line modes (16.257MHz).

From an electronics perspective, the circuit could then be quite simple. A couple of ways to do it spring to mind. One would be to have some RAM (512KB is enough to store an entire frame at 8 bits per pixel, RGBrgb plus horizontal and vertical, even at MDA refresh rate) connected to a USB microcontroller and a little circuit to scan through the RAM at the correct clock rate and just output the bits to the 9-pin CGA/EGA/MDA connector. The microcontroller could communicate with the PC to update bits in the framebuffer and tell the PC whenever a frame is complete.

Another possibility would be for the microcontroller to just continually receive data from USB and output it (just buffering enough to cope for the mismatch between the USB clock and the pixel clock). Again some feedback to the PC would be necessary to tell it if the buffer is getting too full (or empty).

In order to cope with the data rates necessary for a fast-moving screen (16MB/s for EGA/MDA, 14MB/s for CGA), it might be necessary to have a fairly beefy microcontroller or even an FPGA - I'm not sure.
 
I can't see any advantage to doing this; if you want multiple screens, you can simply connect them to modern boxes. If you want some special case where you want to debug a graphics-mode program, find an ISA machine and put an MDA card in it (although I'm not sure how you could use the second monitor in Windows).
 
although I'm not sure how you could use the second monitor in Windows.

You can't. Windows reserves the entire A0000-BFFFF range for the primary card, plus all the control ports (3BX/3Cx/3Dx). The only second monitors supported are PCI/AGP/PCIe cards as they have relocatable memory and I/O.
 
That's interesting, I've seen the Mame/jamma vga converters, I hadn't thought about them being a possibility. Or maybe I thought they went the other way: cga output to modern vga monitor - I'll take a closer look. I like the framebuffer design, probably because it's "simple" and similar to how my brain works. And yes, only two modes, I completely missed that. Very cool ideas.

evildragon, that youtube is a riot! Thanks for the link. :)

And I agree there isn't "advantage" thinking data or monitors, this is just all about driving the original hardware from a modern box for fun and profit^H^H^H^H^H^H^H^. And achieving the old 1:1.2pixel aspect ratio.
 
Back
Top