PDA

View Full Version : Schematic/spin code that would allow a Propeller to use a CGA arcade monitor



codepro
10-20-2006, 01:23 AM
Does anyone have a schematic/spin code that would allow a Propeller to use a CGA arcade monitor as a display device?

The CGA arcade·monitor has the following characteristics:

input signals
Video: RGB analog, 1v to 5v peak-to-peak (adjustable with contrast control), 4.7k ohm input impedance, 40 usec to 50 usec active video.

horizontal scan
Frequency: 15.1 kKhz to 16.8 kHz
Linearity: +- 5%

Vertical Scan
Frequency: 47 Hz to 63 Hz
Linearity: +- 5%

Gadgetman
10-20-2006, 04:18 AM
My guess is that the VGA software should be able to do it.
you just need to adjust the resolution down to whatever the monitor can handle.
(I don't have any CGA monitors at the moment, so I can't test it)

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Don't visit my new website...

codepro
10-20-2006, 05:13 AM
There is more then just resolution differences between CGA and VGA.· The horizontal scan frequency is double that of CGA.

Mike Green
10-20-2006, 11:52 AM
The lowres VGA driver (VGA.spin) in the library (included with the Propeller Tool) is very adjustable. Have a look at the comments at the end of the module. Most of the items are in terms of clock ticks rather than MHz or KHz, but you can do the conversion. You will probably have to fiddle a bit to get it to look nice.

Dennis Ferron
10-25-2006, 01:27 PM
CGA's RGB signals are a little funky, as I recall. Instead of 3 analog lines you actually specify color with 4 digital lines. 3 of the bits are on/off for RGB, and the 4th bit is brightness. That's why CGA text mode is 16 colors: 0 - 7 are dark colors, 8 - 15 the same colors but brighter. You should be able to connect the 4 lines directly to the Propeller with just a 100 ohm resistor for protection, instead of using the resistors from the VGA circuit. I think the H and V sync circuits are the same for VGA and CGA. *BUT* the CGA may be interlaced too. What that means is that you may need to scan first all the even numbered lines, then all the odd numbered lines. I don't know if that introduces a timing issue - i.e. how does the monitor synchronize whether you're on odds or evens at a certain time?

You could probably make a clever circuit that would let you derive 3 RGB plus a brightness signal from the "normal" VGA pins. It would be pretty straightforward. All you have to do is put a two input "OR" gate across each of the 2 bit DAC's (minus their resistors) to generate CGA RGB signals, and slap a 3 input OR gate across the pins that are normally connected to a 240 ohm resistor in the VGA DAC's, and this would give you a brightness signal. You could also do this with small signal diodes (called "wired OR"), but you would need pull down resistors - in the end, it would be easier to use a pair of real 7400 series OR gate chips.

But, since you have to modify the code anyway to get the resolution right, it might be easier to modify the VGA driver to also work with the 4 bit CGA colors. I don't know the VGA object well enough to say how you would have to set up the video registers.