VGA Non-standard Resolutions Corrections

Post suggestions, correct errors or omissions, or anything else about the site
Great Hierophant
Less than a nibble
Posts: 9
Joined: February 10th, 2014, 8:49 am

VGA Non-standard Resolutions Corrections

Post by Great Hierophant »

Abuse, Bubble Pop, Magic Pockets and Moraff's Entrap are all running at a 320x200 resolution. Standard VGA is not capable of 640x400 or 640x350 in 256 colors. Pinball Fantasies is running at 360x350. Extreme Pinball is running at 320x400. Grand Theft Auto's 320×200×256c mode is technically VGA.

Magic Pocket's EGA screenshot is totally incorrect for real EGA. It uses a 320x200x16 mode.

I really appreciate this site by the way, having been a fan of it for a long time.
User avatar
MrFlibble
Forum Administrator
Posts: 1799
Joined: December 9th, 2010, 7:19 am

Re: VGA Non-standard Resolutions Corrections

Post by MrFlibble »

Thanks for the corrections, I'm sure DOSGuy will replace the screenshots and info soon.
Great Hierophant
Less than a nibble
Posts: 9
Joined: February 10th, 2014, 8:49 am

Re: VGA Non-standard Resolutions Corrections

Post by Great Hierophant »

Magic Pockets uses different looking graphics for EGA and Tandy, use DOSBox with machine type ega or tandy to take proper screenshots. See here for details : http://www.vogons.org/viewtopic.php?f=3 ... 21#p343321
User avatar
MrFlibble
Forum Administrator
Posts: 1799
Joined: December 9th, 2010, 7:19 am

Re: VGA Non-standard Resolutions Corrections

Post by MrFlibble »

Great Hierophant wrote:Magic Pockets uses different looking graphics for EGA and Tandy
Heh, I didn't know that :)

I only know that Prince of Persia has different graphics sets for EGA and I think even CGA (but not 100% sure right now). IIRC, in PoP you can switch between graphics modes by using a command line parameter when loading the game.
User avatar
DOSGuy
Website Administrator
Posts: 1063
Joined: September 2nd, 2005, 8:28 pm
Contact:

Re: VGA Non-standard Resolutions Corrections

Post by DOSGuy »

Great Hierophant wrote:Abuse, Bubble Pop, Magic Pockets and Moraff's Entrap are all running at a 320x200 resolution. Standard VGA is not capable of 640x400 or 640x350 in 256 colors.
They aren't official modes, but VGA is capable of displaying 256 colors at resolutions up to 640x400. VGA had 256KB of RAM, and 640x400x1 (8-bit color) = 256,000 bytes. See http://en.wikipedia.org/wiki/Video_Grap ... ing_tricks and http://en.wikipedia.org/wiki/Mode_X for more information about these non-standard or "tweaked" VGA modes. I took the screenshots for all of those games with DOSBox, and they came out 640x400 with 256 colors. It's possible that they are actually Mode 13h 320x200 and DOSBox is vertically and horizontally doubling the resolution for some reason. If that's the case, someone should file a bug report with DOSBox. 640x400x256c is possible with a standard VGA card and, as far as I know, these games take advantage of that capability.
Great Hierophant wrote:Pinball Fantasies is running at 360x350.
DOSBox has some trouble with Pinball Fantasies, but the screenshots came out at 640x350x256c, which suggested that it was designed to have EGA Mode Fh resolution with VGA 8-bit color depth. How are you running Pinball Fantasies when you get a resolution of 360x350?
Great Hierophant wrote:Extreme Pinball is running at 320x400.
Again, I report whatever DOSBox captures. DOSBox could indeed by doubling the vertical resolution in Extreme Pinball, and that should be reported to them as a bug.
Great Hierophant wrote:Grand Theft Auto's 320×200×256c mode is technically VGA.
Yes it is, but try running the game with DOSBox set to "vgaonly". The game requires a SVGA card, so I list the graphics as SVGA even though the resolution and color depth match VGA Mode 13h. EGA graphics cards support all CGA modes, VGA graphics cards support all CGA and EGA modes, and there are a few games that require the features of a newer standard despite using a graphics mode from a previous standard. Corncob 3D is a case of a game that uses an EGA graphics mode but requires the features of a VGA graphics card.
The FAQ in Corncob 3D v1.21 wrote:Why do you claim it is a VGA game, when it runs in an EGA graphics mode?

Corncob uses an EGA graphics mode because it has a nice high resolution,
but yet does not have too much information to convey to the screen.
Obviously, we could have made the game run in the 256 color VGA graphics
mode, but this would contain less than 1/3 the number of pixels, thus
reducing far object identification. We could have also chosen the
640x400 256 color mode, but there is so much more info to convey to the
screen per frame that the animation would become too chunky for all but
33Mhz 386's and above.
Corncob requires VGA because is uses write mode 3, an advanced hardware
feature for writing to the screen which is available only on VGA boards.
Also, in order to create the mindbender color-cycling, and the
blackout effect, Corncob uses color options only available on VGA
adapters.
By the way, I get my information about which modes are supported by each graphics card from this amazing list. The bitch is that each standard displays the text modes with a different number of vertical and horizontal pixels per character. Because of that, I will be taking screenshots of every text-mode game in each standard to show the difference. That's part of my plans for my vacation next week.
Great Hierophant wrote:Magic Pocket's EGA screenshot is totally incorrect for real EGA. It uses a 320x200x16 mode.
DOSBox really doesn't like Magic Pocket's EGA and Tandy modes. I took the best EGA screenshot that I could at the time. I don't remember what version of DOSBox I was using at the time, so I'll try again with 0.74 and the latest mega builds and see if I can get it working.
Great Hierophant wrote:I really appreciate this site by the way, having been a fan of it for a long time.
Thanks!
Today entirely the maniac there is no excuse with the article.
Great Hierophant
Less than a nibble
Posts: 9
Joined: February 10th, 2014, 8:49 am

Re: VGA Non-standard Resolutions Corrections

Post by Great Hierophant »

Regular 256KB VGA may have the memory capacity to display a 640x400x256c or 640x350x256c graphics page, but it just doesn't have the video bandwidth to display it, and the VGA won't allow it. The highest 256 color resolution that can be safely achieved on a VGA card using Mode X is 360x480. This is according to Michael Abrash, who literally wrote most of the book on Mode X.

Moraff's Entrap, for example, specifically gives resolutions when starting the game, and it specifically states it is using 320x200x256c. DOSBox using vgaonly will always give 640x400 resolution screenshots because it always doubles pixels like a real VGA card. The svga_s3 driver will give proper 320x200 screenshots, assuming the output is surface and no scaler is used. As of the current DOSBox SVN, Abuse, Bubble Pop, Moraff's Entrap and Magic Pockets all work with the svga_s3 driver as far as I can tell. I have attached an untouched 320x200x256c screenshot of each using the current SVN.

Sometimes DOSBox will adjust graphics at times to better match intended aspect ratios. All CGA 640x200x2c graphics will have pixels doubled on the vertical to 640x400x2c. The test I use is to reduce the resolution of a screenshot by 50% in one or both axes, and then increase the resolution by 200%, in both cases using nearest neighbor interoplation, and if the resulting graphics are identical to the original graphics, then I know DOSBox has done some scaling. DOSBox does this with the Pinball games. Its not a bug, its a feature, but modes characterization should go by the number of unique pixels on display.
You do not have the required permissions to view the files attached to this post.
Great Hierophant
Less than a nibble
Posts: 9
Joined: February 10th, 2014, 8:49 am

Re: VGA Non-standard Resolutions Corrections

Post by Great Hierophant »

The problem with Grand Theft Auto is that the installer and game menu screens use the 640x480x256c SVGA/VESA mode. The logos and the gameplay screens use in 320x200x256c and may work with a standard VGA card, but you need an SVGA card to get the game.
User avatar
MrFlibble
Forum Administrator
Posts: 1799
Joined: December 9th, 2010, 7:19 am

Re: VGA Non-standard Resolutions Corrections

Post by MrFlibble »

DOSGuy wrote:I took the screenshots for all of those games with DOSBox, and they came out 640x400 with 256 colors. It's possible that they are actually Mode 13h 320x200 and DOSBox is vertically and horizontally doubling the resolution for some reason.
I remember that I also had double-sized screenshots in DOSBox when I changed the default emulated video mode setting of SVGA to VGA.

As I haven't found any discussion of this issue in the DOBox forums, I just posted a question about it.
Great Hierophant wrote:DOSBox using vgaonly will always give 640x400 resolution screenshots because it always doubles pixels like a real VGA card. The svga_s3 driver will give proper 320x200 screenshots, assuming the output is surface and no scaler is used.
Ahh, okay then (I'm replying to individual parts of this thread as I read it). BTW, svga_s3, unto my experience, gets screenshots in their original dimensions regardless of output method and scaling settings.
Great Hierophant wrote:The problem with Grand Theft Auto is that the installer and game menu screens use the 640x480x256c SVGA/VESA mode. The logos and the gameplay screens use in 320x200x256c and may work with a standard VGA card, but you need an SVGA card to get the game.
I wonder if the same applies to Hexen, which only has the loading screen in 640x480x256c?
Great Hierophant
Less than a nibble
Posts: 9
Joined: February 10th, 2014, 8:49 am

Re: VGA Non-standard Resolutions Corrections

Post by Great Hierophant »

I assume you are referring to this Hexen loading screen : http://www.mobygames.com/game/dos/hexen ... tId,33984/

It only uses Mode 12h, 640x480x16c. A real screenshot taken from DOSBox shows a 16-color palette.

Interestingly, Pinball Fantasies uses a hacked Mode 12h for its menu select screens. Mode 12h only supports 16 colors on the screen, yet the PF menu shows 21-22 colors. It does so by changing some of the palette entries in mid-frame. This kind of trick can only be viewed in the vgaonly mode.

InfranView is an excellent tool for analyzing DOSBox screenshots.
User avatar
DOSGuy
Website Administrator
Posts: 1063
Joined: September 2nd, 2005, 8:28 pm
Contact:

Re: VGA Non-standard Resolutions Corrections

Post by DOSGuy »

Great Hierophant wrote:Abuse, Bubble Pop, Magic Pockets and Moraff's Entrap are all running at a 320x200 resolution.
I've confirmed that Abuse and Bubble Pop are VGA Mode 13h. That's frustrating that vgaonly produces resolution-doubled screenshots.

The interesting thing about Bubble Pop is that, if an SVGA card is present, it displays a 640x480x256c Spectrum Publishing logo, whereas the screen is just black during that time if set to vgaonly, so there is a single SVGA screen in an otherwise VGA game.
Great Hierophant wrote:Pinball Fantasies is running at 360x350.
The "10 Minute Demo" is coming up 320x240 for me under svga_s3 (doubled under vgaonly) now; my screenshots look identical to the "5 Minute Demo" and "PC Action 5 Minute Demo" except for saying "10 MIN DEMO" on the DMD. Now I don't know why I was getting 640x350 before, and why you're getting 360x350.
Great Hierophant wrote:Extreme Pinball is running at 320x400.
Both svga_s3 and vgaonly create 640x400 screenshots, but I can see when I zoom in that the pixels are double wide, and there's no loss of detail or color changes when I cut the horizontal resolution in half; it simply removes the redundant pixels. That's one more thing to watch for when checking my screenshots. Very annoying.
Great Hierophant wrote:InfranView is an excellent tool for analyzing DOSBox screenshots.
Thanks for the tip on IrfanView. I love that it provides color information for images, but the zooming isn't very user friendly. Between the zoom increment being relative by default instead of absolute (so you get to zoom rates like 214% instead of 200%) and the View options being set to resample by default, screenshots blur instead of pixelate as you zoom in with the default options. Paint zooms the way I want by default, so pixels just get bigger instead of trying to smooth the image out like a photo. Anyway, I figured out what to do.
Today entirely the maniac there is no excuse with the article.
User avatar
MrFlibble
Forum Administrator
Posts: 1799
Joined: December 9th, 2010, 7:19 am

Re: VGA Non-standard Resolutions Corrections

Post by MrFlibble »

DOSGuy wrote:I've confirmed that Abuse and Bubble Pop are VGA Mode 13h. That's frustrating that vgaonly produces resolution-doubled screenshots.
One of the people at VOGONS provided the following reply to my question:
That's how it should be, because the real number of lines is still 400. The lines are put out twice each with identical data. Certain demo programs switch this duplication on and off to produce special effects. To support these, we need the high resolution.
DOSGuy wrote:The interesting thing about Bubble Pop is that, if an SVGA card is present, it displays a 640x480x256c Spectrum Publishing logo, whereas the screen is just black during that time if set to vgaonly, so there is a single SVGA screen in an otherwise VGA game.
Heh, I now remember from playing Yendorian Tales that the Spectrum Pacific Publishing logo is indeed in 640x480 resolution :)
User avatar
DOSGuy
Website Administrator
Posts: 1063
Joined: September 2nd, 2005, 8:28 pm
Contact:

Re: VGA Non-standard Resolutions Corrections

Post by DOSGuy »

Magic Pockets is such a strange case that it deserves its own post.

For those who may be lost in the discussion of video modes, there are 14 video modes that are supported by the standards introduced by IBM up to VGA (I don't know what modes 8514 uses, or even if the 8514/A uses Interrupt 10h to set the video mode). They were introduced in the following standards:

CGA: 00h, 01h, 02h, 03h, 04h, 05h, 06h
MDA: 07h
EGA: 0Dh, 0Eh, 0Fh, 10h
MCGA: 11h, 13h
VGA: 12h

EGA supports all of the CGA and MDA modes. MCGA supports all of the CGA modes. VGA supports all of the CGA, MDA, EGA, and MCGA modes. Because MCGA was built into the motherboard of the IBM PS/2 Model 30 and 25 and never available as an expansion card, and because VGA supported the two new MCGA modes, including the most popular one (Mode 13h), most people only used the MCGA modes through a VGA card, and thus they are all typically referred to as VGA modes.

Magic Pockets have five video options: EGA, Colour VGA, Mono VGA, Four Colour CGA, Tandy 16 colour.

"EGA" is indeed revealed to be Mode 0Dh (320x200x16c) when DOSBox is set to ega, not Mode 0Eh (640x200x16c) as it appears when using svga_s3 or vgaonly. Furthermore, the graphics are distinctly different (worse) when run in ega, and do not simply appear to be a horizontally doubled version of "Colour VGA" as they appear under svga_s3 and vgaonly. Mission accomplished!

There are a lot of games that offer "Mono VGA" as an option, which would normally refer to Mode 11h (640x480xmono), but under svga_s3 it's actually 320x200xmono. There has never actually been a 320x200xmono video mode! The four 320x200 modes are Mode 04h (4c), 05h (4gray), 0Dh (16c), and 13h (256c). Magic Pocket's "Mono VGA" option, in fact, displays 16 shades of gray. The EGA palette of 64 colors doesn't have 16 shades of gray, whereas VGA can select up to 256 colors to be chosen from a palette of 262,144 colors. So it must be Mode 13h, right? Not so fast! VGA can also use any of the colors from that 262,144 color palette in the CGA and EGA modes, so I also tested that video mode in CGA and EGA. Nothing happens with DOSBox set to cga, but it runs under ega with 8 of the CGA colors! Could this actually be VGA Mode 0Dh?

The "Colour VGA" mode is indeed 320x200x16c under svga_s3, not 640x400x16c as it appears when using vgaonly. Okay. If this is truly a VGA mode, then it's Mode 13h using only 16 colors, but why use only 16 when 256 are available? The most obvious answer is: MCGA. MCGA didn't support EGA modes, so it couldn't play Mode 0Dh games. MCGA users were forced to use CGA modes when they bought games that supported EGA and CGA. Creating beautiful Mode 13h graphics with up to 256 colors from a palette of 262,144 colors was a lot of work, so a few developers took the graphics from their EGA Mode 0Dh games and converted them to Mode 13h so that MCGA users wouldn't have to fall back to CGA modes. So it must be a lazy port to Mode 13h, right? Even though the colors are different from the "EGA" mode, it could still actually be Mode 0Dh using the VGA pallette, so I also tested that video mode in CGA and EGA. Nothing happens in DOSBox set to cga, but it runs in ega with 8 of the CGA colors, looking identical to "Mono VGA"! Could both VGA modes actually be Mode 0Dh? Maybe only one of them is Mode 0Dh, and Magic Pockets falls back to Mode 0Dh when it detects no support for Mode 13h in the other? Of course, as I hinted at earlier, the only way to truly know what video mode is being used is to see what value is in the AL register when INT 10h is called with 00h in the AH register.

So, I went to the DOSBox Debugger. I ran Magic Pockets using "Mono VGA" and then searched for INT 10h in Code Overview. The first time I see a call to INT 10h, it immediately follows MOV AH,0B, MOV BH,01 and MOV BL,01. This is a call to set the Palette ID to 01h. Then there's a JMP instruction, followed by MOV AX,1000 and MOV BX,000D before another INT 10h. x86 is little endian (the least significant byte goes first), so this means that AL=10h and AH=00h when INT 10h is called. With those values, INT 10h is being instructed to set the video mode to 10h (640x350x16c), which makes no sense at all. (Incidentally, AH=10h isn't a valid value for INT 10h.) If I understood the debugger a bit better, I could halt execution at any point and insert MOV AH,0Fh and then INT 10h to get the current mode. I was also hoping that I might find some useful information at memory address 000A:0000, but all I ever find there is 40h ("@") and a bunch of nothing. Okay, so I'm not good enough with a debugger to figure this out. Does anyone know what to do here?
Today entirely the maniac there is no excuse with the article.
Great Hierophant
Less than a nibble
Posts: 9
Joined: February 10th, 2014, 8:49 am

Re: VGA Non-standard Resolutions Corrections

Post by Great Hierophant »

Quite a few games from the 1989-1990 period use VGA to support a much more colorful palette than EGA, but do not support more than 16 colors on the screen at one time. This made it easier to use the same graphics not only from Tandy and EGA but also the Atari ST and Amiga.

Magic Pockets is weird in that the Tandy mode shows more colors than the EGA mode, but the EGA graphics are arguably closer to the VGA graphics.

You may want to mention the PCjr./Tandy 1000 Modes 08h, 09h and 0Ah.

VGA was designed to connect to monochrome grayscale analog monitors as well as color analog monitors. The monitor would use color summation to display 64 shades of gray from the 256 color palette. Sierra had a graphics driver for some of its games that would give grayscale VGA graphics, I assume this was to display clearer graphics on monochrome displays.
User avatar
MrFlibble
Forum Administrator
Posts: 1799
Joined: December 9th, 2010, 7:19 am

Re: VGA Non-standard Resolutions Corrections

Post by MrFlibble »

DOSGuy wrote:For those who may be lost in the discussion of video modes
Yes, yes, I am lost, thanks for the detailed explanation! ^_^
User avatar
DOSGuy
Website Administrator
Posts: 1063
Joined: September 2nd, 2005, 8:28 pm
Contact:

Re: VGA Non-standard Resolutions Corrections

Post by DOSGuy »

Great Hierophant wrote:You may want to mention the PCjr./Tandy 1000 Modes 08h, 09h and 0Ah.
Good call. I wasn't going to mention the Tandy modes because they don't come from IBM (though the Tandy 1000 was otherwise PC-compatible), but those modes were actually introduced with the PCjr, which is indeed an IBM standard. The PCjr supported all CGA modes, but the PCjr modes are unique because none of them were supported by later IBM standards. Nevertheless, here they are:

08h = 160x200x16c
09h = 320x200x16c
0Ah = 640x200x4c

The Tandy 1000 supported all of these modes, as well as the CGA text modes (00h through 03h). Ironically, the Tandy 1000 supported these modes in order to compete with the PCjr, but it outlasted the PCjr by so many years that most of the games to ever use these modes were created for Tandy, so they're usually known as "TGA" or Tandy graphics modes!
Today entirely the maniac there is no excuse with the article.
Post Reply