Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
KVELLER

Why was the DOS version of Doom stretched?

Recommended Posts

So Doom worked with a 5:4 resolution, but the image is clearly in a 4:3 aspect ratio. Why was this? It seems to affect most (if not all) DOS games. Why not design the games like we design for widescreen nowadys?

Share this post


Link to post

Back then, all screens were 4:3, and the resolution used in Doom was 320x200. 640x200 was available, but with only 16 colors with a palette that was fixed. If you do some math to the screen shape and the resolution, you get the 5:4 pixel shape.

 

VGA arrived had 640 x 480 resolution, which gave us perfectly square pixels on a 4:3 screen. VGA already existed when Doom was made, but too few people had it for Id to be able to use it yet. Also, that higher resolution would have hurt the frame rates on the computers of those days. Even as-is, some players had to shrink the screen with that border around the sides to get a playable frame rate.

Share this post


Link to post

Contrary to popular belief, there actually was a standard for DOS capable IBM-compatible monitors: 640x400 at 70hz, Doom ran exactly half of that for performance and compatibility reasons: 320x200 at 35fps but at 70hz. Although PC games back then could run at decent framerates at 320x240 (4:3 aspect ratio) the extra 40 lines of pixels however demanded that a monitor runs at 640x480 at 70hz due to how sub-640x400 resolutions had to double the amount of vertical lines in order to reduce the intensity of scanlines. ie: running a game at 400x300 required a monitor with 800x600 capabilities. Now I want to stress that 99.8% of all VGA capable monitors could handle 640x480 at 70hz, but still, leaving out the extra 40 lines of pixels improved performance on 486DXs and most games ran at 320x200 anyways just to be safe because PCs, especially back in those days, were very inconsistent when it comes to quality and capabilities, and sticking to a predefined standard reduced any chances of any random problems

Share this post


Link to post

You might just wanna read this. It's the resulting (i.e., stretched) image that displayed in 4:3, whereas square pixels would've produced an 8:5 aspect ratio. 

 

Hardware at the time of Doom's inception was ever-changing, even moreso than now. It's natural that id software would work with something most people had access to. Doom also had PC Speaker sounds just to accommodate consumers that lacked a sound card, when no modern game company would bother these days.

Share this post


Link to post

For many old PC games, the 320x200 resolution was because of the use of Mode 13h.

 

It's important to keep in mind that back in the DOS era, the game had to do everything by itself: access the sound card, access the video card, all that was up to the game and the programmers had to handle all the video and audio rendering by themselves. (But while video was relatively unified with the VGA standard, there was no standard for sound cards. So instead of bothering with them, several games relied on third-party libraries such as the Miles Sound System or Human Machine Interface. This was the niche on which Paul Radek's DMX tried to position itself, but it only got the Doom engine and Raptor.)

 

Since the game had to handle all the task of putting the pixels on the screen by itself, they went for stuff that simplified their work and delivered good performances. So things like Mode 13h and Mode X were popular. Doom itself started in Mode 13h (320x200), then moved to a variant nicknamed Mode Y, a 320x200 variant of the 320x240 Mode X. If they had instead moved to Mode X, they'd have given us square pixels and everything would be simpler, but they kept the aspect ratio of Mode 13h.

 

IIRC Heretic and Hexen are in Mode 13h, too, instead of Mode Y.

Share this post


Link to post

The prime advantage of 320x200 wasn't precedent but the simple fact that it fit into a 64kb segment. 320x240 does not. For DOS this was crucial to have efficient access.

 

Share this post


Link to post
8 hours ago, fraggle said:

The next logical question is "why does VGA have 320x200 instead of 320x240 which would result in square pixels"?

Well VGA had both 320x200 and 320x240. It also had 640x480, and it was even possible to push up to 800x600. There was however a decision to make between resolution, color depth, and refresh rate; e.g. 320x200 in 256 color at 70 Hz, or 640x480 in 16 colors at 70 Hz, or 800x600 in 16 colors at 50 Hz.

Share this post


Link to post

Interesting about the whole 240p versus 200p thing. I can see how fewer vertical pixels could save on processing power back then.

Share this post


Link to post

320x240 supposedly uses memory differently in a way that makes it much, much slower than 320x200, far beyond the extra 40 lines by themselves. I'm sure Graf or Blzut3 could tell you more.

 

E: Nope, Doom 1.9 uses the same "planar" memory access as 320x240 Mode X, only earlier versions and the Raven games used "chunky" memory. However, as Graf said, 320x200x8 allows you to fit the entire screen neatly into 64KB of memory. Older x86 machines slice memory into 64KB "segments" and trying to write to/read from multiple segments is less efficient.

Edited by Woolie Wool

Share this post


Link to post
32 minutes ago, Woolie Wool said:

only earlier versions and the Raven games used "chunky" memory.

There you have it. Those earlier versions were when the decision was made.

 

Share this post


Link to post
On 6.6.2017 at 6:53 AM, fraggle said:

It's not that 320x200 made for some compelling screen mode and the id guys specifically wanted non-square pixels. Rather it's just what the VGA hardware present in early '90s PCs was capable of.

 

Since they were requiring a VGA with full 256kB of memory and compatibility with register level tweaking anyway, I think they could've gone for 320x240 just as well, as far as hardware capability is concerned. (well, there surely were monitors incompatible with nonstandard timings, but doesn't 320x240 @ 60Hz mode use the same timings as 640x480 @ 60Hz which is in the VGA standard?) Maybe they just liked the higher refresh rate?

 

Or maybe some of the graphics tools used only supported mode 13h, and it was helpful to see the graphics as they would appear in game?

 

 

On 6.6.2017 at 4:38 PM, Woolie Wool said:

E: Nope, Doom 1.9 uses the same "planar" memory access as 320x240 Mode X, only earlier versions and the Raven games used "chunky" memory.

 

Doom 0.99 already does NOT use standard mode 13h though. Unless you meant the pre-release versions? Also, Raven codebase was most likely around v1.2 so they elected to remove it themselves for some reason. Maybe to increase compatibility or something?

 

Also, Wolf3D does use the unchained mode IIRC.

Share this post


Link to post
6 minutes ago, xttl said:

Since they were requiring a VGA with full 256kB of memory and compatibility with register level tweaking anyway, I think they could've gone for 320x240 just as well, as far as hardware capability is concerned. (well, there surely were monitors incompatible with nonstandard timings, but doesn't 320x240 @ 60Hz mode use the same timings as 640x480 @ 60Hz which is in the VGA standard?) Maybe they just liked the higher refresh rate?

I don't know if any commercial game ever used that mode but remember one thing:

 

Assume some user got a monitor that does not handle that mode and the monitor ends up in a cloud of smoke. If that user had sued id for damages they might have had to pay and possibly recall the game from distribution. As far-fetched as that may sound - stuff like this has ruined companies in the past and a small startup couldn't risk such an outcome. Mucking around with undocumented parts of the hardware's video timing is something better left to tinkerers.

 

320x200 was an established and officially supported video mode, so no such risk would have existed. All the undocumented change did was change the memory layout, but not the video signal itself.

 

Share this post


Link to post

I think the more likely reason is that id's previous games had been in 320x200 and they didn't have any particular reason to change. Heck *Quake* ran by default at 320x200 in DOS, and it's not like it *had* to, since VGA DOS Quake supported all of the following:

 

  • 320x200
  • 360x200
  • 320x240
  • 360x240
  • 320x350
  • 360x350
  • 320x400
  • 360x400
  • 320x480
  • 360x480

Share this post


Link to post

If Quake supported both 320x200 and 320x240, did it apply the 1.2 pixel stretching in one of those modes?

Share this post


Link to post

Quake rendered a true 3D scene to whatever resolution you picked. I think it may have doubled the pixels vertically of the status bar and menus in the 320x400 type resolutions.

Share this post


Link to post
2 hours ago, dpJudas said:

If Quake supported both 320x200 and 320x240, did it apply the 1.2 pixel stretching in one of those modes?

Yes, the 320x200 mode in Quake has rectangular pixels and looks horrible because the art is not designed for it.

Share this post


Link to post

That's not really answering the question. It is generally accepted in the Doom community that the non-square pixels of 320x200 means that any source port that doesn't stretch them is not correct/faithful to the original game.

 

When I read that Quake supports both 320x200 and 320x240 it got me wondering what id software felt about the whole thing as they'd have exactly the same problem if they are supporting both of those resolutions.

 

Edit: thanks Woolie - but according to Linguica the 320x200 resolution was the default. So either they weren't aware of the problem at all or they just didn't care. Which makes me wonder how aware they were of the fact that the pixels aren't square for Doom.

Share this post


Link to post

Quake was smart enough to keep the geometry constant, at least. The HUD scaled differently in 320x200 vs 320x400 though.

 

YKgtI59.gif

Share this post


Link to post

Ah, so they did apply the pixel stretch. Thanks Linguica. For the HUD they probably had little choice as it would have required a complete new set of images to not make it look horrible if they stretched that part.

Share this post


Link to post

The HUD was also designed for 320x200, as can be seen from the id software logo on the main menu (pic shows 320x240, 320x200, real logo)

 

4p3wRdX.png

Share this post


Link to post

Interesting. So by this time they were still clearly making the game primarily for 320x200, but had changed the world coordinate space to be evenly scaled in all directions.

Share this post


Link to post
3 hours ago, dpJudas said:

Edit: thanks Woolie - but according to Linguica the 320x200 resolution was the default. So either they weren't aware of the problem at all or they just didn't care. Which makes me wonder how aware they were of the fact that the pixels aren't square for Doom.

My guess is that they started with 320x200, and made all their art look right in that resolution. Later they wanted to support higher resolutions, so they scaled as necessary to make the newer resolutions output geometry in the same place on the monitor.

 

With the HUD, it's way more important for the numbers to be sharp, than for the HUD to appear in the same physical place on the screen. Same goes for Doom - most ports have special case for the small ammo numbers. I know I had to, cause scaling those tiny sprites with a generic algorithm looked awful.

Share this post


Link to post

Yes, but I was looking for evidence that id software was consciously aware of the difference. In particular Linguica's image of the logo convinced me that they were.

Share this post


Link to post

There's more evidence as far as Doom is concerned, such as title pictures and mug shots. It's documented at the aspect_ratio page on the wiki.

Share this post


Link to post

The HUD art might just a consequence of Id's artists using Deluxe Paint DOS in 320x200x256 mode, rather than a conscious decision to optimise for that resolution. They definitely used DP for Quake, as they were still using it in 1998 to do the art for Quake 2.

Share this post


Link to post

For some reason I forgot that things were so complicated back in the day (in the graphics department at least). It seems that DirectX really helped to solve a lot of problems.

Share this post


Link to post

There's good reasons why Windows managed to completely eliminate DOS as a gaming platform in a handful of years.

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×