• Please review our updated Terms and Rules here

Composite out on CGA is coming out B&W

I noticed the symbols used for the "old" CGA: pipe and walker. Epic! :)
Some info about how that image was made, if you're curious: https://int10h.org/blog/2015/08/808...ls/#a-href-id-which-cga-am-i-a-which-cga-am-i

Oh, on the "8088 mph" intro scene - what's up with the 9-pin connector on the bottom left!? Composite is the BiS device, is that the dots further to the left of the 9DB connector?
If you mean the title image, that's easy- it was originally done in RGB and it never occurred to me to change that detail for the composite version in the demo. ;)

ALSO - is it possible to retrofit modifiable character set onto a CGA? That was a game changer for EGA and VGA. I know the original CGA hardware cards couldn't be easily retrofitted (without some soldering work), but spec-wise -- could something induce a character change if the character set ROM were instead some writeable chip?
In addition to what others said: there was at least one CGA card sold in Greece, which was basically the IBM board with a 32KB character ROM franken-rigged onto it for 9(!) different character encodings.
Info and photos here: https://www.vogons.org/viewtopic.php?p=531232#p531232
 
Just for the record, let's see how at Hercules they transformed their fixed fonts card into a redefinable fonts one (the Hercules Plus):

https://archive.org/details/198610ByteMagazineVol1111InsideTheIBMPC/page/n259/mode/2up?view=theater

First, they substitued the Motorola 6845 (same chip used on the CGA) by a custom made controller named V112. Another thing to take into account is that the Hercules card already had 64 kb of RAM while a standard CGA had only 16 kb. So while 16kb of text buffer was available, while on text mode the rest of the graphic memory, not in use on this moment, could be used to load custom charsets.
 
First, they substitued the Motorola 6845 (same chip used on the CGA) by a custom made controller named V112. Another thing to take into account is that the Hercules card already had 64 kb of RAM while a standard CGA had only 16 kb. So while 16kb of text buffer was available, while on text mode the rest of the graphic memory, not in use on this moment, could be used to load custom charsets.

Actually the HGC+ still uses a standard 6845 or compatible. See Here. The V112 is an ASIC that compresses much of the multiplexers and latches and other gross stuff necessary to change the memory architecture as necessary for the different modes. The CRTC actually doesn't "know" anything about character generation at all other than supplying a line # output in addition to a memory address, that's all left up to external logic.

What's actually really interesting is if you look at a tight closeup of the HGC+ you'll see something interesting that I'm surprised wasn't mentioned on Scott Elliot's page:
Hercules-HGCPlus.jpg

See the chips labeled "MB81416-12"? Those are 16Kx4 DRAMs. That means two of them make a 16Kbyte memory, so for 64K you need eight of them. There aren't eight of them; there are ten of them. If I had to hazard a guess why I think what's going on when this card is running in RAMFONT mode is it uses the four of them on the right half to create a 16 bit wide character/attribute buffer (effectively 16Kx16 to the video hardware but 32Kx8 to the computer, although only 4K of it would normally actually be used.), and the six of them on the left side are the 48K of RAM that act as the character generator memory. (48Kx8) Chopping it up like this would actually simplify things a *lot*; in text mode a normal MDA or CGA card has to make two memory fetches for each character, one for the glyph, which is latched and presented to the character generator, and one for the color/blink/whatever attributes, which are applied to the character generator output. The HGC+ lets you use 4 bits of the attribute byte to select which page of the soft-load character sets to use (effectively giving you 12 bit wide characters). This would make for a timing nightmare if it took two fetches to pull the effective address you need to apply to the address bus for the character memory. By divvying it up like this they made life way easier on themselves, at the cost of wasting some memory.

Here's a craptastic video I made about some toy video hardware I built on a breadboard that can use a single bank of memory for both the character glyphs and software defined characters. (It also does linear framebuffer bitmapped graphics, but *technically* it implements them by mapping a byte of framebuffer memory onto a 1 line tall character set because it eliminates the need to have different output hardware for the "text" and "graphics" modes.) The performance of this thing is is roughly analogous to CGA and gets away with doing the "two fetches for every character" thing with a single 8 bit memory, but if I had to add attributes to it things would start getting a little dicy, and that's with SRAM that supports 55ns access times.

 
Was there ever any kind of TSR to reduce CGA snow? When running MODM (music player) which uses 80-col color mode, it has quite a bit of snow (on a 5150 @ 4.77mhz with stock CGA) but otherwise does run ok.

I've read thru other threads that explain the reason for this snow on CGA in 80-col - and how software just "put up with it" since the fix is a performance hit.

Hmm, is there any 40-col mode MOD/music player out there that might work for the old 8088 ? That'd be a nice mod to MODM ! (pun intended :p )
 
Such a TSR isn't possible. CGA snow happens when software writes directly to (or reads directly from) video memory. These accesses cannot be intercepted by software on 8088/8086 other than by running the snow-prone software under emulation. Software that uses DOS or BIOS calls to output to the screen don't suffer from snow, because these calls already use the slow method of waiting for the raster beam to be outside of the active area. But the authors of software that writes directly to VRAM made the design decision to make that software faster at the expense of having snow on original CGA cards.
 
Many older DOS applications have an option to use BIOS calls to avoid CGA snow. Or conversely, an option to write directly to the hardware if you're using a system which doesn't have the snow problem.

Some, like DOS 5+'s EDIT and QBASIC, even have an option to avoid high-intensity colors, for those using an aftermarket RGB monitor which didn't support the intensity pin.
 
Personally I’m fine with snow, but maybe I’m warped by fond memories of the TRS-80 Model I, where it was utterly impossible to avoid. (To my knowledge there is no way, full stop, to know where the beam is.)
 
Personally I’m fine with snow, but maybe I’m warped by fond memories of the TRS-80 Model I, where it was utterly impossible to avoid. (To my knowledge there is no way, full stop, to know where the beam is.)
CGA's white snow is much more annoying than the TRS-80's black streaks, which there is a hardware mod to eliminate:

 
which there is a hardware mod to eliminate

At the cost of slightly blowing up timing loops.

Anyway, *shrug*, on CGA it never bothered me either despite the fact that, yeah, it looked like a little underline character was running willy-nilly around the screen instead of black streaks. But sure, I guess I can see how that might trigger someone. In this day and age I'd call it "retro charm".
 
"retro charm" Ok, I made this for you @Eudimorphodon :) Ya'll let me know if this amount of snow is bothersome :D

True, a SoundBlaster mixed in with a system that has CGA is awkward. But MODMs runs it well at 4.77mhz, neat stuff. KQ4 doesn't run too well at 4.77mhz though :( Same for SimCity. Lemmings runs decently though - sluggish, but tolerable.

Does a V20 chip make this go away? (I'd guess No it doesn't) I actually have a V20 but never installed it.


I still challenge someone to make a 40-column text mode front end to a MOD-music player. My understanding is that the 40-col modes on CGA could be processed fast enough, it didn't have snow?

How about a 40-column serial/modem terminal program? Any of those laying around?

40-col text editor/viewer?



How bad would it be to install both a CGA and VGA card at the same time? (I found an 8-bit ISA VGA card, works well, but no composite output) Not that have room in my 5-slot system. But would that output to both the VGA and CGA composite at the same time? or would it just blow up in flames?
 
Last edited:
40 column terminal program: Perfect Link from 1983. Note that most smart terminals can not be emulated in 40 character mode.

40 column text editor: IBM Personal Editor from 1982 does it.

I am sure there are more but most of the programs I am familiar with included snow prevention options instead or were written in BASIC which makes them extremely slow and limited.

Can't have CGA and VGA installed at the same time. You could have CGA and MDA installed together. Do the typing on MDA and see the graphics on CGA.
 
Ya'll let me know if this amount of snow is bothersome :D

It flashes along with the music, so what's the problem? ;)

(Really, sadly, it doesn't bother me. If it does then you can certainly ditch the original CGA card and use a clone that fixes this, but then you'll be trying to find one that's also completely compatible in every other respect, which is pretty rare.)

Does a V20 chip make this go away? (I'd guess No it doesn't) I actually have a V20 but never installed it.

Nope. This is an issue completely with the video card. Long and short of it is IBM took some shortcuts with implementing the 80 column text mode, which really strains the memory bandwidth available from the single bank of RAM on the card. (It requires twice the bandwidth of every other mode the card supports.) Clone cards fix this in various ways, but I don't know of any simple way to try to fix this on the original card. Maybe a method like the linked fix for the TRS-80 Model I would work, IE, adding some hardware that would halt the computer with wait states until the horizontal blanking area comes along if a write was attempted with the scan in the active area, but at the very least it'd change the system timings for any software the writes to the screen. Possibly significantly.

How bad would it be to install both a CGA and VGA card at the same time?

As already noted, nope.
 
The IBM 5140 Convertible had a roughly CGA-compatible display with redefinable characters, but that required support from the system BIOS to load the initial font at boot time (at the hardware level, the character RAM would be switched into the address space at 0xB8000). Off-hand, I can't think of another CGA clone with a loadable font.
 
Can't have CGA and VGA installed at the same time. You could have CGA and MDA installed together. Do the typing on MDA and see the graphics on CGA.
CGA and VGA can coexist, but the VGA card will be forced into MDA/Hercules emulation mode, if it is supported -- newer cards may not.
 
Couple things:

1) When Pentiums came out, I remember a DOS utility called SLOMO that would slow the processor down so we could still run Ultima 7 like it was supposed to (and other similar software that wasn't properly throttled). Was just thinking if something like that might help the snow issue?


2) From the perspective of 1981.... IIRC, IBM didn't even offer a color monitor for about the first year of the IBM PC? So on the August 1981 launch, IBM only offered MDA cards and MDA monitors? or users could use the composite out? Or was CGA and matching monitors offered on launch? Also, weren't the original PC-DOS 1.0 BASIC examples all in 40-column mode? (well, not ALL of them - some were in graphics mode)
 
Couple things:

1) When Pentiums came out, I remember a DOS utility called SLOMO that would slow the processor down so we could still run Ultima 7 like it was supposed to (and other similar software that wasn't properly throttled). Was just thinking if something like that might help the snow issue?


2) From the perspective of 1981.... IIRC, IBM didn't even offer a color monitor for about the first year of the IBM PC? So on the August 1981 launch, IBM only offered MDA cards and MDA monitors? or users could use the composite out? Or was CGA and matching monitors offered on launch? Also, weren't the original PC-DOS 1.0 BASIC examples all in 40-column mode? (well, not ALL of them - some were in graphics mode)
1) The only snow removal TSR I can find is XFLASH which patches the INT 10h scrolling method to prevent snow. It can be found at http://annex.retroarchive.org/cdrom/nightowl-001/012A/index.html The techniques for preventing snow were well known by about 1984 and many programs included snow prevention as an option but a TSR can't stop a program from writing to CGA memory at the wrong time.

2) IBM didn't have a color display in 1981 but IBM APL had already been assigned to use 80 column mode on CGA to handle the APL character set. The article on the development of IBM APL is an interesting read of the early days of the PC. Work started before IBM had either a working CGA display or a working 8087. The authors surnames are Tavares and Alfonseca. Look for the one from 1985. Earlier articles from the same authors detail the development of APL for other systems with the 1977 article explaining APL design for the 5100.
 
1) When Pentiums came out, I remember a DOS utility called SLOMO that would slow the processor down so we could still run Ultima 7 like it was supposed to (and other similar software that wasn't properly throttled). Was just thinking if something like that might help the snow issue?

Those programs work by latching onto a system timer and using regular interrupts to run a lot of make-work nonsense which sucks up a ton of CPU cycles. Trying to use this technique to prevent CPU snow on an 8088 might be remotely possible, but it'd slow the computer to an absolute crawl. About the only way I can see this working would be if upon initialization the TSR polled to figure out the start of the vertical blanking area and then set itself up to basically spin the CPU for the entire time the electron beam is in the active area, preventing the program you want to de-snow from doing direct writes to video memory. This would, optimistically, slow the computer down to about 1/5th its normal speed? (There's no way to catch if the program is *actually writing* to video memory so you'll just need to suck up 4/5ths of the available CPU cycles all the time. Realistically I don't know if this approach would even be possible with how much overhead it would consume.)

If you had a CGA card in a 386 or higher machine you could probably use VM86 mode to trap writes to CGA memory and delay them until the blanking area. The performance hit from that would be a lot less because the delay would only hit when writes to video happen, but, yeah, you need a 386 or better.

1) The only snow removal TSR I can find is XFLASH which patches the INT 10h scrolling method to prevent snow. It can be found at http://annex.retroarchive.org/cdrom/nightowl-001/012A/index.html The techniques for preventing snow were well known by about 1984 and many programs included snow prevention as an option but a TSR can't stop a program from writing to CGA memory at the wrong time.

The DOC file for that is interesting; it says it uses both the horizontal and vertical refresh periods to move characters, but it only has time to move a whopping one byte during the horizontal refresh period at the PC's standard CPU speed. That's... pretty slow. ;)

2) From the perspective of 1981.... IIRC, IBM didn't even offer a color monitor for about the first year of the IBM PC? So on the August 1981 launch, IBM only offered MDA cards and MDA monitors? or users could use the composite out? Or was CGA and matching monitors offered on launch? Also, weren't the original PC-DOS 1.0 BASIC examples all in 40-column mode? (well, not ALL of them - some were in graphics mode)

I believe MDA actually came out slightly after the PC's introduction? So far as I'm aware the initial video offering was CGA, and customers were expected to use it with a composite monitor or a TV. (They actually sold an RF modulator for it; it connects to the header pins on the card that later were used to drive the internal monitor on the 5155 Portable PC.) Or you could buy an RGB monitor from someone else; IBM didn't sell composite monitors either. A number of programs from the CGA era have specific options to allow the user to disable the use of "intense" colors, use only the 8 basic RGB-without-the-I, because monitors like that were fairly common when the PC came out.
 
The DOC file for that is interesting; it says it uses both the horizontal and vertical refresh periods to move characters, but it only has time to move a whopping one byte during the horizontal refresh period at the PC's standard CPU speed. That's... pretty slow. ;)
The source code indicates that it moves 210 bytes in a refresh cycle with the 8086 XFLASH-2 doubling that.
 
The source code indicates that it moves 210 bytes in a refresh cycle with the 8086 XFLASH-2 doubling that.

That's in the vertical blanking period. The one byte is the *horizontal* blanking area.

Code:
max_vert                equ     210             ; the maximum number of words to move in 
                                                ; a vertical retrace
max_horiz       equ     196             ; must be an even number!
                                                ; the maximum number of horizontal retraces
                                                ; to be used for moving 1 byte between 
                                                ; vertical retraces.  This is set to just
                                                ; less than the number of scan lines so that
                                                ; the next vertical retrace is not missed.  
                                                ; Increasing this value can actually slow the
                                                ; program down because it will have to wait
                                                ; longer for the next vertical retrace.

"the maximum number of horizontal retraces to be used for moving 1 byte between vertical retraces."
 
That's in the vertical blanking period. The one byte is the *horizontal* blanking area.

Code:
max_vert                equ     210             ; the maximum number of words to move in
                                                ; a vertical retrace
max_horiz       equ     196             ; must be an even number!
                                                ; the maximum number of horizontal retraces
                                                ; to be used for moving 1 byte between
                                                ; vertical retraces.  This is set to just
                                                ; less than the number of scan lines so that
                                                ; the next vertical retrace is not missed. 
                                                ; Increasing this value can actually slow the
                                                ; program down because it will have to wait
                                                ; longer for the next vertical retrace.

"the maximum number of horizontal retraces to be used for moving 1 byte between vertical retraces."
That is the maximum so presumably most bytes will be transferred over the span of fewer horizontal retraces. Looking at the horizontal refresh loop (mvm_1 to mvm_h_wait), it looks like multiple single byte transfers would be handled between each vertical refresh cycle. I don't have the proper system to profile the actual code speed and determine how many bytes will be transferred.
 
Back
Top