Did you know that VGA resolution isn't actually 640x480? - Page 1
Forum section: electronics / general

author: Ben321
author_rank: Frequent Contributor
timestamp: November 12, 2019, 06:51:48 am
content: Commonly VGA is assumed to be 640x480 with 256 colors. While 640x480 is the closest resolution to VGA that truly has a 4:3 aspect ratio, it's not a resolution that VGA cards support. At most, actual VGA cards support a resolution of 640x400. And they don't support 256 colors when the resolution is 640x400. They only support 16 colors at this resolution. For 256 colors, they must operate at the reduced resolution of 320x200 (and yes this once again is 320x200, not the similar resolution you've probably heard of which is 320x240). The resolutions 640x400 and 320x200 have an aspect ratio of 8:5 (not 4:3) which can also be expressed as 16:10. This, coincidentally, is actually very close to the modern wide-screen aspect ratio of 16:9. Yes, 640x400 and 320x200 resolutions filled a standard computer monitor who's screen's physical dimensions had a 4:3 ratio, but that's because the pixels were stretched vertically to fill the screen. Therefore you have a monitor with non-square pixels. To fill the same screen with square pixels would require pixel dimensions of 640x480 or 320x240 (with the smaller resolution having larger pixels, stretched both horizontally and vertically to fill the screen, which was the same as when you were using 320x200 resolution on a monitor that supported 640x400).Note that later there was an improved version of VGA technology called SVGA, and it did support actual 4:3 resolutions, as well as 256 colors at the largest resolutions. SVGA cards (assuming you had a monitor that supported it too) were capable of the standard 4:3 resolutions 640x480, 800x600, and 1024x768, and supported 256 colors with all of these resolutions.So when people are talking about the 640x480 VGA resolution, they should be calling it an SVGA resolution.

author: hamster_nz
author_rank: Super Contributor
timestamp: November 12, 2019, 07:43:20 am
content: I am not so sure. The original IBM PS/2 model introduced VGA, and I am very sure it had a 640x480 text mode 80 columns, 30 lines) , and maybe a 4-bit 640x480 graphics mode.BIOS video modes 11h and 12h, IIRC.Programs used to use 640x400 graphics mode as the display frame buffer/bit-planes were mapped into a fixed address window (A000:0000 to B000:FFFF, IIRC) , and 128,000 byte frame buffer worked better than a 153,600 one did.These was back in the days of 16-bit code and "segment:offset" addressing.I could be completely wrong, but the several reference I checked support this.

author: I wanted a rude username
author_rank: Frequent Contributor
timestamp: November 12, 2019, 07:54:41 am
content: Yeah, this is misinformation.I was there, man ... Isawthe VGA.Also,the Wikipedia article.It would be accurate to say, "Most high-resolution DOS games of the VGA era, such as Doom, used the 640x400 256-colour mode". But typewin.exeand you were in 640x480 16-colour mode.

author: james_s
author_rank: Super Contributor
timestamp: November 12, 2019, 08:03:32 am
content: The first machine we had with VGA had 256k of video RAM, it could do 320x200 256 color or 640x480 16 color, and then various other resolutions including 640x400. With 512k you could do 640x480 256 color. I remember some games and image viewers being able to use various oddball resolutions as well, VGA was a lot more flexible than most earlier video standards.SVGA was as I recall less of an official standard and more a name slapped onto any VGA-compatible display offering higher resolutions than VGA.

author: Ben321
author_rank: Frequent Contributor
timestamp: November 12, 2019, 08:06:47 am
content: Quote from: I wanted a rude username on November 12, 2019, 07:54:41 amWindows must have used some hack to enable more video RAM. However, standard modes included text and graphics modes that topped out at 640x400.

author: hamster_nz
author_rank: Super Contributor
timestamp: November 12, 2019, 08:11:25 am
content: This confirms (at least to me) that the original VGA did 640x480.http://bitsavers.trailing-edge.com/pdf/ibm/pc/cards/IBM_VGA_XGA_Technical_Reference_Manual_May92.pdfAs per pages 2-12 and 2-22 - VGA did have a 640x480 taxt mode, and a 2-colour (aka monochrome) graphics in 640x480 graphics mode.Standard VGA never did 640x400 in 256 colours, bur there was the "Mode X" and "Mode Y craze...https://en.wikipedia.org/wiki/Mode_X

author: Ben321
author_rank: Frequent Contributor
timestamp: November 12, 2019, 08:12:12 am
content: Quote from: hamster_nz on November 12, 2019, 07:43:20 am80 column text mode used 640x400 pixels. Letters look taller when the graphics mode is directly used on a 4:3 aspect ratio monitor, such as when booting to DOS (stretched vertically to fill monitor). however as soon as you run a DOS window in Windows that supports 640x480 or larger resolution, the screen is using square pixels (no vertical stretching), things look different. If you are used to the way text looked in DOS, when you see text in a DOS window in Windows, the text suddenly looks squished shorter, as characters are no longer as tall as they used to be. That's because you now have 640x400 square pixels not vertical rectangular pixels.

author: Ben321
author_rank: Frequent Contributor
timestamp: November 12, 2019, 08:16:52 am
content: Quote from: hamster_nz on November 12, 2019, 08:11:25 amStrange. I think I know what my mistake was. I was thinking about the NEC PC98's graphics mode which was in fact 640x400. I could have sworn though that the graphics modes on VGA cards for normal IBM (and compatible) computers also topped out at 640x400. My mistake.

author: hamster_nz
author_rank: Super Contributor
timestamp: November 12, 2019, 08:24:31 am
content: Quote from: Ben321 on November 12, 2019, 08:16:52 amUnderstandable though - in practice nobody used 640x480 mono graphics, as it made things look like a Mac...

author: RoGeorge
author_rank: Super Contributor
timestamp: November 12, 2019, 08:50:21 am
content: Quote from: Ben321 on November 12, 2019, 08:16:52 amPlease edit your first post and strikeout the text, so other people won't waste their time reading the whole thread.

author: mbless
author_rank: Regular Contributor
timestamp: November 13, 2019, 09:32:39 pm
content: Quote from: RoGeorge on November 12, 2019, 08:50:21 amAlso edit the title

author: amyk
author_rank: Super Contributor
timestamp: April 23, 2022, 11:11:48 pm
content: Quote from: Ben321 on November 12, 2019, 08:12:12 amWrong. If you're talking about modes 3 and 7, that's actually 720 pixels horizontally. The 9th column pixel of each character is not generated directly from the font bitmap but is replicated from the 8th column for certain characters when bit 0 in the sequencer clocking mode register is set, and otherwise 0.You can also program standard VGA hardware to do 320x240.I came across this thread while searching for some VGA information, and wanted to post another correction to this misinformation. It's hard enough to findcorrectinformation about details of VGA hardware as it is.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: April 24, 2022, 07:13:10 am
content: Some good information about "mode X" and other arcana can still be found online. Tools, even, to screw around with it:http://bbc.nvg.org/private/programming.htmlOld Dr. Dobbs articles contain a lot of information about this sort of thing too. Stuff like that, plus Michael Abrash, is how Quake came with support for so many oddball modes -- you don't normally think of VGA as supporting such things, but VGA itself is just a bunch of registers, the better question is whether the monitor can lock to the scan rate -- or catch fire trying!*(*AFAIK, this wasn'tactuallya problem for IBM PCs, but some really early ones (Commodore something or other maybe?? I don't know) had a "killer POKE" that could do something like abuse the scan rate circuitry, resulting in... dangerously incorrect operation.)There's also all the VESA (SVGA) extensions, which I think is what Duke3D used at the time for its support of not-quite-as-oddball modes?Also keep in mind, "CGA", "MDA", "EGA", "VGA", "XGA" etc. were creations of IBM -- they produced cards and chipsets with these designations, and led industry support of them. Most 3rd parties that copied these, added their own extensions. SVGA however is -- I think? -- just whatever they wanted to put into their cards, somewhat more loosely by industry agreement. So, that things were as consistent as they were, was a byproduct of the unique situation IBM held in those early days (mid 80s to early 90s say).Since then, ever more so, drivers have been necessary to use much of the features available between different cards. I don't know exactly how much hardware compatibility remains today; SVGA I think is fairly universally supported? Conversely, a lot of cards don't even boot in text mode as such, but a graphical emulation of it at a resolution closer to modern displays.Tim

author: SiliconWizard
author_rank: Super Contributor
timestamp: April 24, 2022, 05:23:41 pm
content: ... Was going to reply, and then read that others already did with references.In short, from what I've read in specs, the 640x480 resolution is listed, but only in 2 and 16 colors. 640x400 is actually NOT listed (unless I missed it).And the only resolution supporting 256 colors was 320x200.SVGA is typically 800x600, but it did include the 640x480 resolution, 256 colors at its minimum. So if you're talking about 640x480/256, you're right. If you're talking about 640x480 with 16 colors or less, you're not.And, again I dunno what's the deal with 640x400, where did you find it?

author: David Hess
author_rank: Super Contributor
timestamp: April 24, 2022, 06:06:06 pm
content: All of that is true about VGA modes, however at a practical level during that time, SVGA cards very quickly replaced VGA cards in the market. I never had or saw a VGA only card except as a curiosity. I and everybody around me went from "super" EGA cards directly to SVGA and if you configured a system with a VGA card, it was actually SVGA.

author: free_electron
author_rank: Super Contributor
timestamp: April 24, 2022, 07:00:06 pm
content: Quote from: T3sl4co1l on April 24, 2022, 07:13:10 ammy first screen was a NEC multisync III. specifically for that reason. it could lock onto anything without exploding.

author: m k
author_rank: Super Contributor
timestamp: April 24, 2022, 07:10:53 pm
content: Quote from: David Hess on April 24, 2022, 06:06:06 pmSame here, even that I'm a bit farther than a center.