The IBM MDA Should Have Been The CDA

If you are reading this on an IBM PC-compatible computer, it is a certainty that its graphics card will support the lowest common denominator of PC displays, the Monochrome Display Adapter, or MDA. This was a video card which delivered a text-only display in black-and-white that was an option fitted to the very first PC models. But was it really a monochrome display adapter? [TubeTimeUS] is here to show us that when connected to the appropriate colour monitor, it can produce text in colour. It seems that this was a feature only on the very earliest revisions of the card.

Reading up on the MDA card, we find that at its heart it had a Motorola MC6845 CRT controller, a chip that appeared in a huge variety of machines from that era. The beauty of this chip was that it provided the correct timing signals and memory locations for video to be created, but didn’t include any video circuitry thus the designer was free to craft a video device to their specification, allowing for it to appear in both colour and monochrome devices. While the MDA card only supported a text mode it seems its designers managed to put in some form of colour attribute support even if it was never marketed as such. We’re not students of IBM graphics card modes here at Hackaday, but it would be fascinating to know whether this undocumented mode works in the same way from the software side as the colour text modes on CGA and better colour cards.

Thanks [Stephen Walters] for the tip.

Header image: German, CC BY-SA 3.0

21 thoughts on “The IBM MDA Should Have Been The CDA

  1. Note that the monochrome _display_ (the CRT) relied on the adapter for its timing signals. It was reportedly possible to put the adapter into a mode that would cause actual damage to the display’s circuitry. Caveat hackitor.

      1. That’s IBM’s fault, partially, at least. The oscillator in the IBM MDA monitor should never have had been able run out-of-range in first place.

        Third-party MDA monitors, those who were actually being used by the majority of users and mattered, did contain such filters. Some, at least.

        There was the bad practice of being too faithful at imitating IBM.
        Those manufacturers who merely did clone IBM look&feel visually were wiser.

        1. I think that was because third party monitors were derived from those used from CGA ones that didn’t suffer from this problem because they were derived from TV circuits. Philips monochrome monitors had the same PCB for composite and MDA monitors and the difference was on missing on added components. And the circuitry of the monitor was similar to the transistors used to the period monochrome TV.

    1. Conversely, the CPU knows the exact timing, and can use it to its advantage.

      The Data General Dasher D200 terminal used a capacitive keyboard which was sensitive to the EMI from the display flyback pulse. This caused the terminal to produce spurious characters when the keyboard was rested on top of the terminal (something done where space was at a premium).

      I wrote code which interleaved the scanning of the keyboard with the horizontal sync pulses. Presto: no more garbage characters! IIRC, I managed to get two keyboard row scans per video horizontal line.

    2. One of my early, circa-2000, electronics projects was trying to interface a by then already ancient CGA monitor to a 68HC11 micro-controller with a 6845 (that I pulled from a CGA card). I got something wrong, because something popped…

      I still have another 6845 around, I will try this again someday.

    3. Back in the day I killed a display on purpose. After explaining the problem to my boss, he refused to believe something so stupid, and told me to demonstrate it. The monitor died and the boss was enlightened. Good times.

  2. Uh… probably not. The MDA sat at different memory address than any other later videocard. If I remember correctly, every *GA card is at B800:0000 and MDA is at B000:0000 which is what allowed to have dual monitors with MDA + CGA in one computer. Also, the MDA had larger horizontal resolution than other cards until SVGA, so none of the older cards had emulation capability for it.

    So no, your card probably cannot emulate MDA (or Hercules).

    1. VGA text mode is 720×400, the same horizontal resolution as MDA. And EGA could be configured to run on an IBM 5151, and when it did it also used the same 720×350 timing as the MDA for text mode.

      1. Maybe the devil is in the detail.

        “Also, the MDA had larger horizontal resolution than other cards until SVGA, so none of the older cards had emulation capability for it.”

        Super VGA cards (available since February ’88, at least) did include hardware emulation modes of earlier graphics modes: MDA, CGA, EGA, Hercules (aka HGC aka MGA), as well as weird hi-res text modes for productivity software(132×43 etc).

        These modes had to be manually enabled by either jumper block (setting monitor type) or by a DOS-based mode utility.
        SVM89, for example, on a Trident 8900 ISA VGA.

        But it’s not just video mode compatibility. VGA supported user-definable fonts.
        So an (S)VGA cards could faithfully simulate an MDA.

        Some advanced EGA cards supported similar things, speaking under correction here.
        Super EGA (SEGA) cards, so to say.
        The did 800×600 resolution on multisync monitors before VGA was out in 1987, even.

    2. “sat different memory address than any other later videocard” – yet you mention Hercules, which also sat at that same B000:0000 address, and was a later card (and a quite succesful one).

  3. What’s also should be not forgotten, maybe:
    The original IBM MDA wasn’t very popular.
    Hercules Monochrome and its numerous no-name clones did matter.

    Hercules provided exactly what professional users needed.
    – A printer port (often at address 3BC)
    – An all-pixel-addressable graphics mode

    On top of that it supported two pages of 32 KB each.
    One page overlapped with CGA video page (2x 16KB), even.

    This made CGA graphics emulation possible in first place.
    Because, it allowed the CGA applications to write into *something*.

    Otherwise, the data would have had ended up in the void.
    Trapping port accesses wasn’t possible before 80386 in practice (EMM386, QEMM had APIs for that).

    That’s all very interesting matter, I think. 😁

    The reason why Hercules didn’t conflict was because its designers were wise, foreseeing.

    – On boot-up, the Hercules is in plain MDA mode only.
    It’s not visible as a Hercules card, it does not expose its video RAM yet (merely 4KB for MDA).

    That’s why MSD and CheckIt! see it as plain MDA (run any Hercules software like MSHERC etc to make it visible).

    This mode was often used by developers with a VGA card, running a debugger (SoftICE?) on MDA screen.

    – If run in Hercules mode (full mode), it will made both 32 KB pages (64 KB total) available (msherc.com /half). That way, CGA RAM is available on bus. SIMCGA and other CGA emulators can work.

    – If run in Hercules mode (half mode), it will made the Hercules’ important video page available and leave CGA video page alone (msherc.com).
    This allows both CGA and Hercules+MDA to be used simultaneously, on two physical monitors.

    If Hercules is in full mode, but a CGA card is also in the system, glitches can occur.
    The same CGA image data is written to both the CGA and Hercules same time.
    The strongest/quickest video RAM will dominate the results.

    Speaking under correction here.
    Feel free to correct me.
    I just find this matter really fascinating. 😅

    PS: Technically, there was Hercules InColor.
    It was like a Hercules Monochrome or Hercules Plus, but in color.
    So maybe this one can be seen as a distant descendant of the color MDA, too?!

    1. ^Typo. msherc /half is for half mode, of course.
      Msherc is a driver library (TSR) for Microsoft programs, but it just happens to set the right Hercules registers and leave them that way.
      So other programs can benefit of it. The original Hercules card shipped with utilities that did same job.

  4. The MDA stored characters in ASCII and used a character generator to go from ASCII to the dots used on the screen. One extra bit allowed the brightness to be high or low. There is not enough memory for color and the character generator only generated on and off. The card cannot do color.

    1. This is totally false. First, the YouTube video actually shows it can. Secondly, the MDA memory layout is exactly the same as that of the CGA, viz. 1 byte for the ASCII code, 1 byte for the attributes. Why comment on a topic you clearly have no clue about? Geez…

  5. “it is a certainty that its graphics card will support the lowest common denominator of PC displays, the Monochrome Display Adapter, or MDA” – this is false. The lowest common denominator of modern graphics cards is VGA, not MDA. VGA has different timing standards, and outputs analog, not digital signals (though on a modern graphics card its probably digital, but in a quite different way).

    There is absolutely no modern graphics card that is MDA compatible (and in fact, the _only_ gfx card that ever was is Hercules and clones, and some early ATi Small Wonder cards that did CGA/MDA/Hercules).

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.