Implement a VGA 80x25 text console aspect ratio
Asked Answered
P

1

6

I want to implement a text console with the look and feel of an old vga+crt monitor graphics configuration. To do so, I need information on the rendered aspect ratio of a typical setup.

  • 80 x 25 using 9 x 16 cells gives a ratio of 720x400. I have never seen a display with this ratio (It is slightly wider than 16:9). 720x400 is also the resolution when windows 9x splash image is shown.

  • I have measured the ratio from the video 8088 corruption. It gives me a 3:2 ratio.

  • I have always worked on 4:3 monitors which give huge stretched in the hardware text mode

  • Dosbox uses a ratio of 8:5 which makes sense for 320x200 resolution

So what ratio is correct for rendering block-character based ansi-art for example the ENDOOM lump?

Note that I speak of the aspect ratio that shows up on the monitor. I know that the CRT:s I have used have options to modify the width and height of output image, but how would the user set these if present. I set the v control to the full screen size giving streched characters but correct ratio for win95 splash image.

Pap answered 20/3, 2013 at 10:4 Comment(1)
If it still applies, the 3:2 ratio (3 pixels horizontal equal 2 pixels vertical) is right. It is almost correct (a 720x405 mode would have precisely this pixel aspect ratio on a strict 4:3), however sticking to this is nice, being quite clean for a decent software reproduction, and especially for the analog nature of the CRT you mention (the H-V knobs) it doesn't really matter at this scale. So just stick to 3:2.Acuminate
C
7

Nobody said the pixels were square.

In fact no common video adapter/monitor combination for IBM-style PCs (I don't know if the Macintosh or the Amiga did) rendered square pixels until VGA came along and provided 640x480.

Remember that VGA is an analog technology designed for CRT's. The resolution and refresh rate in particular were controlled by the video adapter on the motherboard, not the monitor. The monitor electronics could run the electron beam left-to-right and up-to-down (within the range of frequencies the electronics could tolerate) to produce any pixel resolution the video controller card wanted to output. Pixels were addressable elements, not display elements, and how 'rectangular' they were depended on the monitor (most monitors had controls to adjust the V-size of the display, so the proportion was not fixed).

Although there were "standard" resolutions (which basically means they were explicitly listed and supported by the IBM PC BIOS), if you knew which hardware you were using you could potentially reprogram the video adapter to render unusual resolutions. Several video games did just that.

I also remember a utility that reprogrammed the Monochrome Display Adapter of the original IBM PC ("MDA") to render 26 lines in text mode, instead of 25. The utility used the extra line to output a 'status bar' if you will, with the Caps Lock, Scroll Lock and Num Lock states (keyboards at the time didn't have status lights). The funny thing is that the MDA adapter didn't have enough RAM for a whole extra line of text, so the video output circuitry rolled-over at the end of the buffer, and the last third or so of the 26th line repeated the first few characters from the top-left of the screen. You lived with that. (The utility also worked on Hercules video adapters, which used the same controller chip but had more RAM to support the graphic modes, so there was no overflow with repeated characters).

You haven't heard of 720x400 because nobody cared. Programs cannot address the individual pixels in this mode because they are generated on the fly by the character generator circuitry, so it really didn't matter. The VGA adapter circuitry could obviously drive the monitor at this frequency, so in theory you could have had a graphic mode at that high resolution, but the adapter didn't have enough RAM to support it (other limits in the electronics could also have been present; for example, could the video RAM be scanned fast enough? I don't know.)

Edit, with some clarifications:

The V-size adjustment knobs were needed because the CRT electronics could not affordably be made exactly precise. Some wiggle room and manual tuning on the voltage that controlled the vertical scan range was needed, to account for voltage variations on the wall current, electronics aging (particularly capacitors), etc. The intent was to use the knobs to adjust the resulting height until the output was "right" (roughly 4x3). The knobs eventually disappeared when the electronics became sophisticated enough to make these adjustments automatically.

To answer your last question: you have to acknowledge the fact that the pixels were not square. A faithful look would require you to scale (compress or stretch) the rendered image 720x400 matrix to a 4x3 ratio at the resolition of your choice. it won't be razor-sharp I-can-count-the-pixels; it cannot be. It's the same problem laptop makers have rendering text mode on an LCD panel.

Cahier answered 20/3, 2013 at 13:35 Comment(2)
So the intended output is 4:3Pap
Correct: 4x3. Sorry; I feel like I gave a nice story but failed to answer your fundamental question.Cahier

© 2022 - 2024 — McMap. All rights reserved.