VOGONS


First post, by deepthaw

User metadata
Rank Newbie
Rank
Newbie

Is there any way to get a CGA composite signal from a VGA/SVGA card? I’m imagining the card both supporting the mode and being able to get it by wiring an adapter up to the VGA port. Seems highly doubtful but I’ve seen weirder stuff.

Reply 2 of 14, by Jo22

User metadata
Rank l33t++
Rank
l33t++

Phew! Good question. To generate CGA artifact/composite video, an external colorburst circuit must be connected to the CGA video connector.

Or more precisely, the VGA card's equivalent.
Provided that the VGA card is register compatible with CGA, it may work.

The external circuit would need to combine H-Sync and V-Sync in a combined signal, too.

Unfortunately, most VGA cards don't support that register compatibility (have dummy registers that do nothing).
Except the early ISA VGAs with their mode utilities and their DE-9 + DE-15 connectors.

That limited/broken/hidden CGA compatibility was necessarily in order to be allowed to claim "100% VGA compatibility".
Third-party manufacturers copied the limitations of the IBM VGA so to say.

If a VGA card can be locked into CGA compatibility mode, a reset wouldn't change the CGA mode back to VGA's native mode.

In that case, the PC BIOS may think a real CGA card is present during POSR and provide the ordinary CGA video routines.

In that case, all the Composite specific registers would be available via BIOS calls, too.
Which would increase compatibility even more so.

But even without that, many DOS games may still work with VGA BIOS present in memory instead.
That's because many do fiddle with CGA registers directly, anyway.
All it matters to them is that they see a plain CGA card and nothing else (very old PC games are too old to know about EGA/VGA).

Anyway, I'm just thinking out loud here. Speaking under correction.

"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 3 of 14, by Tiido

User metadata
Rank l33t
Rank
l33t

Such an adaptor requires conversion of scanrates, because you only get that composite signal out of a standard 15kHz 60Hz signal with NTSC encoding. Closest thing to doing that are the cheap VGA to composhit adaptors on aliexpress etc. but they will do all they can to filter the signal so you won't get any of the rainbow artifacts that in turn give all those extra colors 🤣.

Perhaps there are some purpose built simulators out there nowdays...

T-04YBSC, a new YMF71x based sound card & Official VOGONS thread about it
Newly made 4MB 60ns 30pin SIMMs ~
mida sa loed ? nagunii aru ei saa 😜

Reply 4 of 14, by Jo22

User metadata
Rank l33t++
Rank
l33t++

That's what I thought, too. 🙂
Some older ISA VGA cards have a DE-9 video connector and DIP switch settings for monitor type.
If they support CGA monitors, the timings should be NTSC like.

"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 14, by deepthaw

User metadata
Rank Newbie
Rank
Newbie
Jo22 wrote on 2023-10-30, 12:37:
Phew! Good question. To generate CGA artifact/composite video, an external colorburst circuit must be connected to the CGA video […]
Show full quote

Phew! Good question. To generate CGA artifact/composite video, an external colorburst circuit must be connected to the CGA video connector.

Or more precisely, the VGA card's equivalent.
Provided that the VGA card is register compatible with CGA, it may work.

The external circuit would need to combine H-Sync and V-Sync in a combined signal, too.

Unfortunately, most VGA cards don't support that register compatibility (have dummy registers that do nothing).
Except the early ISA VGAs with their mode utilities and their DE-9 + DE-15 connectors.

That limited/broken/hidden CGA compatibility was necessarily in order to be allowed to claim "100% VGA compatibility".
Third-party manufacturers copied the limitations of the IBM VGA so to say.

If a VGA card can be locked into CGA compatibility mode, a reset wouldn't change the CGA mode back to VGA's native mode.

In that case, the PC BIOS may think a real CGA card is present during POSR and provide the ordinary CGA video routines.

In that case, all the Composite specific registers would be available via BIOS calls, too.
Which would increase compatibility even more so.

But even without that, many DOS games may still work with VGA BIOS present in memory instead.
That's because many do fiddle with CGA registers directly, anyway.
All it matters to them is that they see a plain CGA card and nothing else (very old PC games are too old to know about EGA/VGA).

Anyway, I'm just thinking out loud here. Speaking under correction.

The fact that I can get such a technical answer to such an esoteric question within thirty minutes of posting it is why I love this place so much. Thank you for the info!

Reply 6 of 14, by Jo22

User metadata
Rank l33t++
Rank
l33t++
deepthaw wrote on 2023-10-30, 12:52:

The fact that I can get such a technical answer to such an esoteric question within thirty minutes of posting it is why I love this place so much. Thank you for the info!

You're welcome! 🙂
And I agree, this is a fine place.
There are many skilled and experienced people here, most who know more than me.
Tiido, for example, I believe, knows a lot about the low level hardware things and sound chips.
Then there are also other fine souls who tinker with emulation and write demoscene prods..

If you're curious about hardware-assisted CGA compatibility (on ISA VGA cards), you can try out the mode utilities I've collected.

Re: Realtek realtalk, is it the best VGA for CGA? What is?

Good luck 🙂

PS: Many users from here are also on the vcfed.org forums.

Edit: I forgot to mention. A so called "sync combiner" circuit is used to generate a composite sync signal.
That's what CGA to SCART adapter cables use. In the simplest form, it's just a resistor/transistor.

To turn an RGB signal into composite signals (with colour) requires a bit more work, maybe.
Back in time, there were simple to use ICs available fir that. Transcoder ICs, so to say.

The French Nintendo NES had such an IC inside, it converted thw PAL video of the NES PPU to an RGB signal.
The reverse function is also possible.

But that's another story, maybe.

What we're looking for is getting a composite video from a VGA card (for CGA games), while ar same time generating artifacts colors for CGA titles.

But maybe we don't really need a true colours signal here.
The artifact colors work by using specific patterns that make the NTSC TV "see colours".

So maybe providing true CGA colours (RGB) isn't needed for all these games (mono composite may do).

What's important is that there's a colorburst carrier.
For coloring as such, a monochrome picture with those artifacts patterns (stripes) is primarily needed.

I mean, that's all what's available in 640x200 mode (CGA hi-res monochrome) and artifact colours do work here.

Speaking under correction, though.

Last edited by Jo22 on 2023-10-30, 13:26. Edited 1 time in total.

"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 7 of 14, by darry

User metadata
Rank l33t++
Rank
l33t++

Long shot, but maybe the CGA functionality of the PC XT MiSTer core could be implemented on a cheaper FPGA based board with either an ISA or PCI interface on one side and selectable (or simultaneous) simulated CGA composite artifacted output through a VGA port AND an actual CGA composite output through an RCA jack.

Selectable Hercules, VGA and EGA might be options too.

I'm guessing that interfacing with a PC's actual ISA or PCI bus would probably be a challenge.

Maybe this is technically and/or financially unfeasible.

Reply 8 of 14, by Jo22

User metadata
Rank l33t++
Rank
l33t++
darry wrote on 2023-10-30, 13:19:
Long shot, but maybe the CGA functionality of the PC XT MiSTer core could be implemented on a cheaper FPGA based board with eith […]
Show full quote

Long shot, but maybe the CGA functionality of the PC XT MiSTer core could be implemented on a cheaper FPGA based board with either an ISA or PCI interface on one side and selectable (or simultaneous) simulated CGA composite artifacted output through a VGA port AND an actual CGA composite output through an RCA jack.

Selectable Hercules, VGA and EGA might be options too.

I'm guessing that interfacing with a PC's actual ISA or PCI bus would probably be a challenge.

Maybe this is technically and/or financially unfeasible.

Darry, I think your idea isn't bad at all. 🙂👍
I vaguely remember there's a similar project using an FPGA.
Sadly, I have no experience with that. I'm rather new to FPGAa, too.

Btw, what also comes to mind, but I'm not sure about..

It's possible to generate a Composite signal directly from within the VGA card, albeit it's monochrome. But there's a catch.

a) The timings must be changed, so a reprogramming of the VGA's CRTC is needed.
That way way, we get 15 KHz, 60Hz video with up to ~300 lines.
That's fine for all the CGA video modes enough.

- Maybe it works also without any extra software, if the DIP Switch settings for monitor type take care of that by allowing a CGA TTL monitor to be chosen (but if they do, is the DE-15 VGA port still outputting an image for us, as well ?).

DOS programs exist for that CRTC re-programming, but I don't know how this affects CGA compatibility.
True CGA compatibility, I mean. Does CGA emulation mode (via mode utility) still work?
Can the CGA register for colorburst still be set?

b) Is this "special" VGA composite video cable good enough for use with artifact colors?
And must an external colorburst circuit be used with it or
can one of the pins of the VGA chip somehow be involved into providing it, maybe?
Or can the generation happen purely in software, maybe (via controlling H/V sync pins)?

Attachments

  • VkJij.gif
    Filename
    VkJij.gif
    File size
    8.51 KiB
    Views
    792 views
    File comment
    http://www.geocities.ws/podernixie/htpc/cables-en.html
    File license
    Fair use/fair dealing exception

"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 9 of 14, by BitWrangler

User metadata
Rank l33t++
Rank
l33t++

I think it might work with a Trident card, used with the 15khz driver TSR used in these projects..
https://www.epanorama.net/circuits/vga2tv/ (Ads got quite bad on there the other year, I have a blocker so can't tell you how bad it is now, just a headsup)
So using that and simple conversion, you might get output that's capable of causing interference colors.

However, it may be the case that you don't get quite the right interference colors, there was some question of what is rendered as bright yellow being supposed to be more of a light brown and other issues with non IBM CGA implementations, so if you can sneak some potentiometers in place of resistors inline to the color channels you might be able to tweak it.

Video at the top of this thread may also give some clues HOMEDADE CGA note the color problem I was talking of there was a different potential color problem.

Unicorn herding operations are proceeding, but all the totes of hens teeth and barrels of rocking horse poop give them plenty of hiding spots.

Reply 10 of 14, by darry

User metadata
Rank l33t++
Rank
l33t++

@Jo22
That Gremlin seems nice. Someday, I hope to be able to experience CGA composite mode on an actual CRT. It's not on the top of my priority list, but it's there.

@BitWrangler
It would be interesting to see someone try that.

This reminds me of the semi-related article I read years ago about someone having hacked a way to implement a QAM (QAM16, AFAICR) encoder / modulator that output tbrough the analogue VGA output of an ATI Radeon card of some model. A cable settop box was actual able to lock in to the signal, AFAICR. Wish I could find that article now.

Reply 11 of 14, by BitWrangler

User metadata
Rank l33t++
Rank
l33t++

I know Tomi Engdahls driver works for the VGA output having tried it a couple of decades back, I should probably have jumped ppl to this page though...
https://www.epanorama.net/circuits/vga2tv/cindex.html
and the "meat" which is the DOS drivers...
https://www.epanorama.net/circuits/vga2tv/driver_dos.html
Otherwise they'll be digging through the links for a week wondering what I am talking about. Not that there isn't good useful background and possibly generally applicable stuff to be found in some of the other links too.

Edit: according to bottom of driver page there, you can use Scitech Display Doctor to tweak modes, maybe this will let you get scanlines lined up right for the correct color effects for CGA on VGA.

Unicorn herding operations are proceeding, but all the totes of hens teeth and barrels of rocking horse poop give them plenty of hiding spots.

Reply 12 of 14, by Jo22

User metadata
Rank l33t++
Rank
l33t++
BitWrangler wrote on 2023-11-01, 13:20:

Edit: according to bottom of driver page there, you can use Scitech Display Doctor to tweak modes, maybe this will let you get scanlines lined up right for the correct color effects for CGA on VGA.

Sorry for replying, I know you didn't talk to me. 😅
But that last line reminds of the "Verde" utility that Vogons user theelf has mentioned a while ago : Some sofware to do fake EGA scanlines?

It can do certain modifications for CGA programs, so they will look more CGA-ish.
One setting does disable VGA's line doubling, for example. To create visible scan lines.
I tried it out with a VGA-Composite converter box once.

The result was a distorted image (the converter expects VGA timings).
Which means it successfully uses a non-standard timing.
A real VGA monitor/multi-sync monitor should be able to handle it.

PS: There's also a palette changing utility floating around.
It was being discussed a few years ago here on Vogons.
By using it, games like Prince of Persia can be run with different colours.
It requires EGA/VGA, I vaguely remember.

"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 13 of 14, by BitWrangler

User metadata
Rank l33t++
Rank
l33t++

I'm not thinking emulated scan lines on higher resolution monitors are going to have much to do with it, but I could be surprised.

This is more about making sure that on a TV that is approx the same resolution as a CGA monitor, you get your lines in the same relation to each other as on a CGA monitor, not inadvertently doing a 10% stretch or something.

Unicorn herding operations are proceeding, but all the totes of hens teeth and barrels of rocking horse poop give them plenty of hiding spots.

Reply 14 of 14, by Jo22

User metadata
Rank l33t++
Rank
l33t++
BitWrangler wrote on 2023-11-01, 14:39:

I'm not thinking emulated scan lines on higher resolution monitors are going to have much to do with it, but I could be surprised.

This is more about making sure that on a TV that is approx the same resolution as a CGA monitor, you get your lines in the same relation to each other as on a CGA monitor, not inadvertently doing a 10% stretch or something.

I'm not exactly sure how Verde works, I can only tell what happened when I tried it with my converter box..

Normally, as far as I know, the VGA card doubles 200 line modes (each line displayed twice), so pure, single-frequency VGA monitors always "see" 400 lines signals at 31,5 KHz (480 lines are also okay).

If the line doubling is disabled, DOS programs can make use 400 lines natively.
As in, use different pixels on all 400 lines (no repeats for subsequent lines).
Some demoscene products used that feature to display 400 individual lines.

What Verde seems to do is truly disabling the line doubling.
Rather than drawing a black line between each CGA line. So there are merely 200 lines at 31,5 KHz that the monitor sees.
Or maybe, it changes refresh down to 15 KHz, even.
To be honest, I have no idea what it does. Didn't have time to setup a testbed for this.

What's nice, though, Verde can change the CGA graphics to green monochrome.
That's cool enough already. So games with a very garish colour presentation can be enjoyed.
That's ideal for the Book 8088, maybe, if a VGA card is installed.
Especially 640x200 hi-res titles look cool in atomic green! 😃

"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//