View Full Version : EGA Monochrome Compatibility

Great Hierophant
January 5th, 2016, 08:05 PM
I always assumed that if you connected an IBM 5151 Monochrome Display to an IBM Enhanced Graphics Adapter, you would always see the same text characters as you would if you connected the display to an IBM Monochrome and Printer Adapter. Today I may have found what may be the exception to the rule, 101 Monochrome Mazes by IBM. This is a game that is intended only to work with the MDA. Of course it works identically with the Hercules Graphics Card. However, it does not display as it should with an EGA card in its monochrome mode. I have attached photos taken of the screens showing the same maze on an MDA and an EGA.

Maze with MDA :

Maze with MDA Closeup :

Maze with EGA :

Maze with EGA Closeup :

What looks like what is happening is that the character for the visible wall is shown in negative or turned from ASCII 178 to 176 in EGA. The character for the "safe" floor is shown in intensity in EGA where it should have not been in intense in MDA. In addition, the text cell for the character appears to look more solid than it did before, even though it uses the same character as the walls and floor. Finally, the one character cell for the gap for the exit can no longer be seen. Can anyone explain to me why these text cells do not appear as they should in EGA compared to MDA?

January 5th, 2016, 09:31 PM
Doesn't EGA use an 8x14 font instead of 9x14 on MDA?

January 5th, 2016, 10:19 PM
Doesn't EGA use an 8x14 font instead of 9x14 on MDA?
According to [here (http://www.minuszerodegrees.net/video/bios_video_modes.htm)], in both scenarios, mode 07h uses 9x14 characters.

The reference to 'note 2' may be relevant.

January 6th, 2016, 11:42 AM
Yep - looks like a case of the attribute bytes not interpreted exactly the same as on MDA/Hercules.

Interesting find; but at least this doesn't appear to make the hidden traps visible, which is what you'd get (http://8088mph.blogspot.com/2015/08/101-monochrome-mazes-why-not-color.html) if the game was allowed to run on CGA (and probably the reason why it wasn't). ;)

Great Hierophant
January 6th, 2016, 04:24 PM
There are eight bits in an attribute byte, and the effect of each combination on an MDA or Hercules card can be found here : http://www.seasip.info/VintagePC/mda.html It appears that not all the attribute bit combinations on the EGA behave in the same way. This is confirmed in the EGA Options and Adapters Technical Reference :

The Enhanced Graphics Adapter offers a wider variety of displayble monochrome character attributes than the IBM Monochrome Display Adapter. Some attribute values may display differently between the two Adapters. The values listed in the table below, in any combinations with the blink and intensity attributes, will display identically.

Four combinations are given after that, and with the blink and intensity attributes, you can have 16 attributes out of 256 that are guaranteed to behave reliably on the EGA :

00, 01, 07, 70 (non intense),
08, 09, 0F, 78 (intense)
80, 81, 87, C0 (blink)
88, 89, 8F, F8 (blink & intense)

The first column is non-display, the second column is underline, the third column is normal text and the fourth column is reverse video.

I would also note that blinking is set via different registers in MDA (03B8) and EGA (03C0, index 10), which could have an effect on the behavior of the game.

Now, looking at el_VR's blog, we can see the attribute bytes for each type of tile used by the game. The screen is filled with ▓, which is ASCII B2 or 178, with one or two exceptions. The attribute bytes determine whether the tile is intense, non intense or non visible. Here are the attribute bytes used :

Intense ▓ "Wall" - 18
Non intense ▓ "Floor" - 06
No display ▓ "Void" - 80
Non intense ▓ "Trap" - 10
Non intense ▓ "Hidden Wall" - 20
Reverse video ↓ "Starting Cursor" - F0
Non intense ▓ "Exit" - 40

So we can see that the wall and floor attributes are not guaranteed to display the same with EGA, but the void attribute will be. Similarly, the rest of the bunch are not guaranteed.