• Please review our updated Terms and Rules here

EGA on monochrome, I thought it had 4 level greyscale?

deathshadow

Veteran Member
Joined
Jan 4, 2011
Messages
1,378
Am I remembering this wrong, or did the universe skip a groove again? I can't find any information about it, but I could have sworn that a 64k EGA on a TTL monochrome display was capable of 4 level greyscale 640x350 graphics, since intensity without video is supposed to deliver "dim".... as evidenced by attribute 0x78's behavior on a hercules card the displays are capable of it. There's TWO bits free for video (video and intensity) not one.

This capability would be useful for a ... project I'm working on. I'm restricting myself to the hardware available to a 1984 AT class machine, but really want high resolution greyscale.

I don't have a TTL mono display to test with right now, but for now I'm working in mode 0x10 as a placeholder.
 
Last edited:
Depends on the monitor. A traditional MDA-style monitor is capable of displaying only 2 levels.

There were a few monochrome monitors specifically made for EGA use (there were also monochrome VGA monitors). For those, in theory, you can have 64 levels of gray, though you'd be hard put to see the finer gradations and you wouldn't be working in the special EGA 0x10 monochrome mode, but rather, one of the color modes.
 
Yeah, I think the trick here is that native EGA output is digital, so it's going to depend to a great extent on how the monitor chooses to handle it.

All by itself, as Chuck notes, it would hypothetically be capable of displaying 64 levels, though how many would be discernably unique is the question. At any rate you could certainly get a useful 16-level gradient out of it, I think.
 
So, EGA mode F is actually 640x350x3 grays...
I thought the only card supporting 3-grays graphics was Tecmar Graphics Master.

There was that Wyse WY-700 card, supporting 4-grays, but on some special monitor, not IBM 5151.
 
So three bits for every 2 pixels to get “3” color graphics?
No.
At least not in EGA mode F - in this case it's definitely 2 bpp, and the resulting 4 combinations are: black, normal, intensified, blinking.

Video modes with bpp other than 1/2/4/8/16/32 would be difficult to program, so probably the only exception was 24 bpp.
 
Video modes with bpp other than 1/2/4/8/16/32 would be difficult to program, so probably the only exception was 24 bpp.
Not really - or, at least, not with a planar display like the EGA. If you're using chunky pixels (ala VGA 256-color modes,) then yes, it's more complicated than is worth bothering with, but with a planar display you only need to add additional bitplanes. The Amiga, for example, supports any bitdepth from 1-6 bpp.
 
Not really - or, at least, not with a planar display like the EGA. If you're using chunky pixels (ala VGA 256-color modes,) then yes, it's more complicated than is worth bothering with, but with a planar display you only need to add additional bitplanes. The Amiga, for example, supports any bitdepth from 1-6 bpp.
You're right, now I recall those Sanyo MBC-55x machines, with 8-color graphics, using 3 bitplanes: R, G, B.
 
Depends on the monitor. A traditional MDA-style monitor is capable of displaying only 2 levels.
No, four minimum if you count black. connect a GB112 card to a standard TTL monochrome display, disable blink, in text mode.

https://www.seasip.info/VintagePC/Images/hpattr0.png

See how the darker background (bit 7 on the attr) doesn't match the text brightness in the top area? Yeah, that. You can even program a GB112 (hercules plus) or Herc in-colour to output 4 levels of gray on a TTL.

I just thought EGA could do it in mode 0x10. (not mode F, that's 2 colour)... as evidenced by the spec saying that with only 64k of RAM mode 0x10 is in fact 4 colour, not 16. Though I see no way to determine or set that via the BIOS... which seems really stupid!

If you can weasel 4 levels of grey in text mode out of a hercules plus card, and there's a four colour high res mode for 64k EGA's.... I don't see why the two can't cross the streams; and in fact I remember it being capable of such.

I just won't be able to test that until I actually get a TTL mono display I guess.

... and NO I'm NOT talking about mode 0x0F. I'm talking about the 64k RAM 4 colour behavior of 0x10... which I also can't test as I only have clone EGA cards with 256 on the board and there seems to be no BIOS difference in how they're set.

-- edit -- what am I doing?!? I have Ferraro's book right there on the shelf; if it exists, it should be in there!
 
I think you're probably seeing an artifact. Namely, the pinout of a monochrome display indicates 2 levels of white+ black:

Monochrome pinout

All levels are TTL, so either 0 or 1. It is true that the background can be white, gray or black, but that's not the same thing. For any pixel, you get black, dark white and bright white. While it's true that some monitors may display "bright black", that's not the way it's supposed to work.
 
Ok, now I'm REALLY confused...

RBIL
0x0F 2 level mono
0x10 4 colour 64k
0x10 16 colour 256k.

Ferraro (Programmer's Guide to the EGA/VGA)
0x0F 4 colour
0x10 as 16 colour

Duncan (IBM ROM BIOS, M$ Press)
0x0F 2 colour
0x10 16 colour

Don't even get me started about Norton's or Compute's books on the topic... who list 0x10 as 4 colour on EGA and 16 colour on VGA. :/

Though I should probably just trust what IBM says in the EGA tech reference... which is mode 0x0F after all, and not 0x10. So much for the RBIL.

mode0x0F.png


Four colour mode 0x0F? Great, I've got five different sources and they all say something different. Time to wait until I have a proper TTL monitor to test... though if memory serves doesn't an EGA set to use a MDA monitor output shades of blue when connected to a EGA monitor?

I'm going to assume 0x0F is correct for 4 level greyscale and move forward from there.

... and to think I thought the IMF had s*** documentation.
 
Oh man, this looks funky. Just tried it... I am getting four shades in 0x0F on a EGA monitor if I turn off blink in mode 0x0F... black, blue, green, and cyan. Low intensity across the board since it's pins 6 and 7. And if you don't set the mode control register it does blink instead of the green channel.

Ok... so I'm kind-of able to test this.
 
BTW: what hardware are you using?
The orignal IBM EGA with IBM 5154 monitor?
I thought it was impossible to use mode F on EGA monitors...
 
BTW: what hardware are you using?
10mhz AT mobo, devil if I know who made it.
AST 3G Plus EGA clone
... and yes, actual 5154 monitor.

I thought it was impossible to use mode F on EGA monitors...
It's a hardware switch lockout, not an actual restriction. The EGA monitor will sync to the MDA signal as it's the same rates. Remember, EGA text is actually 720x348 (9x14) just like MDA so it can most certainly handle the frequencies. That's part of why driving a mono display is just a switch setting. It's the exact same range of frequencies. The only mechanical difference is that mono "video" line (pin 7) runs to low intensity blue, and mono "intensity" runs to low intensity "green" (pin 6). The only thing that might be a long term issue is that low intensity red (pin 2) connects to ground which should be some form of lockout protection for the monitor, but mine doesn't seem to care. Wonder if that's actually more of a card-side restriction/safety. Otherwise Hsync is still pin 8, vsync is still pin 9, and pin 1 is still ground. Hmm... might make a custom cable to let me run the video out to all three (or select specific) high intensity, then run intensity to all the low intensity lines. Three position switch maybe? r+g with a pot on G to adjust for amber, G only, and white?

In THEORY the vsync voltage isn't flipped, but the 5154 doesn't seem to care... which is odd since that's the 350 line mode trigger. It SHOULD be trying to sync to a 200 line mode with the signal that way. Could also just be the oddball AST video card behaving different from the real deal. Maybe it is picking up the red short to ground and adjusting accordingly?

One of my old favorite tricks was to feed CRTC values that would actually push EGA to 720x400 graphics, though you had to adjust the vsync manually to get it to hold. Kind of like using Scitech's display doctor and their custom video driver to push 800x600 in win 3.1 and 9x out of a standard 640x480 VGA display by adjusting the timings WAY out of norm... I even once got a stable 1024x768 without interlacing out of a 8503 off a S3 Trio - wasn't even blurry because, well... monochrome. (though Christmas knows what damage that was doing to the hardware long-term). It's actually funny how far out of parameters you can feed the CRTC values and then adjust the monitor side of things to sync to it via randomly playing with the pot's inside.

I kind of like to treat video hardware like the Aquarius LEM. I'm not interested in what it was designed to do, I'm more interested in what it can do. 'Tell ya, I'd love to trick this -- or my Herc InColor card -- into a 512x384 mode.
 
It's a hardware switch lockout, not an actual restriction. The EGA monitor will sync to the MDA signal as it's the same rates.
But they aren't the same...
MDA - 18 kHz / 50 Hz
EGA - 21 kHz / 60 Hz

I suspect that that AST EGA behaves differently from IBM EGA, and - contrary to IBM - supports mode F even with DIP switches set to EGA monitor, in this case at 21 kHz / 60 Hz.
 
But they aren't the same...
MDA - 18 kHz / 50 Hz
EGA - 21 kHz / 60 Hz
I believe that 21khz is for 640 modes, not the 720's. I might be mistaken, but 20.8125 (18.5 / 8 * 9) is so close in spitting distance to the 21.8 that it's inside the error threshold for sync. It's why the 90 * 8 modes have different rates, even on VGA. VGA's 720x400 text mode is nowhere near the timings of the 640x480 graphics ones. As such the display needs to be able to handle that.

Though it's funny how many books and references make no mention of the fact that EGA and VGA text modes are 720 wide, much less the timing implications that come with that -- even though they will say it's a 9x14 or 9x16 character with the... gah, what's it called on the mode control register? Was just reading that section earlier. The one that doubles the last column of a character if the top-right pixel is set. Aka why none of the dithering characters look right on EGA/VGA and the box-drawing ones are all off-center.
 
Remember, EGA text is actually 720x348 (9x14) just like MDA

AFAIK on a color EGA monitor, a real IBM EGA (not sure about clones) will use an 8-dot character clock for text mode = 640 dots wide. Only on a monochrome monitor (where I believe the BIOS actually sets mode 07h for all requested text modes), the 9-dot clock is used, and the 'wide' characters in the 8x14 font are replaced by 9x14 versions. This is one of those areas where EGA and VGA differ (VGA always does 9-dot text by default, regardless of the monitor type).

The register that determines the 8/9-dot clock may not be readable on an EGA (? - it is on VGA), but there's an even easier visual way to verify this. Print some consecutive shaded-block characters on screen (B0h, '▒') - if they look contiguous they're 8x14 characters (640-dot mode), if you get thin vertical stripes they're 9x14 (720-dot mode). Again, I'm quite sure that a true EGA wouldn't show the latter on a color EGA monitor.
 
EGA was one area where the clones rapidly surpassed the original IBM version. Heck, my early cheap Everex card does a pretty good job of supporting mode 12h. What advantage is realized by using the original IBM version over a clone?
 
VGA has two crystals: 25.175 and 28.321 MHz, so it can easily support both 8- and 9-pixel-wide characters, ie. 640x400x70Hz and 720x400x70Hz.

EGA, however, has only one - 16.257 MHz, just like MDA/Hercules.
And there's always the 14.31818 MHz signal available via the ISA bus.

14.31818 is used for CGA (and other 200-line) modes - 640x200x60Hz.
16.257 is for 640x350x60Hz (on EGA monitor) and 720x350x50Hz (on MDA monitor).

But how can a 720x350x60Hz mode work, using the same dot clock as above?
I guess it requires adjusting horizontal size on the monitor, doesn't it?
 
Back
Top