Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Doom graphics modes

286 views
Skip to first unread message

Scott Amspoker

unread,
May 17, 1994, 1:32:50 AM5/17/94
to
I've been doing some reading lately about VGA/SVGA graphics and wondered
specifically what Doom was doing with the hardware. I assume Doom is
using 320x200x256 resolution. Is this correct? Also, how is Doom
performing frame switching in this mode?

--
Scott Amspoker |
Basis International, Albuquerque, NM | [X] NONE OF THE ABOVE
|
sc...@bbx.basis.com |

David Matteson

unread,
May 17, 1994, 4:11:53 PM5/17/94
to
Scott Amspoker (sc...@bbx.basis.com) wrote:
: I've been doing some reading lately about VGA/SVGA graphics and wondered

: specifically what Doom was doing with the hardware. I assume Doom is
: using 320x200x256 resolution. Is this correct? Also, how is Doom
: performing frame switching in this mode?

as you would notice if you ran a level with missing textures (or even one)
when you look through that part, it just shows what the last thing
displayed in the area of the screen was...
so, what anyone can figure out from that is ; DOOM doesn't do
page-swapping, because MCGA 320x200x256c only has 1 apage and 1 vpage,
(page 0), what it does is just completely redraw the ENTIRE (even the
status bar and border around vision-space when in any view size lower
than 2) screen every time it goes around the main loop. (maybe more than
once per cycle.)
i figured out that it redraws the status bar and borders because my
Trident 8900 (yes, i know, it's a piece of crap...well my ATI Mach 32 died
on me a few months ago and i'm geting a Mach 64 soon..maybe an Orchid, i
haven't decided...don't reply and tell me which one to pick, i don't
care..) anyway, my Tri8900 has a few bad bytes in it's memory, SO, every
time a program reads data (in this case, color of pixel at location x,y)
it will sometimes give a wrong answer, so, my status bar on DOOM gets a
lot of clutter-pixels on it after a while. (same with borders of screen,
and also when DOOM does that slime-clear thing there are bad pixels all
over the place, it looks really bad..)

so let me restate the answer to your question ; yes, it uses MCGA
320x200x256c and no it does not do any page-swaps, it can't, MCGA
320x200x256c only has 1 page.
...dave, 'you're welcome.'

null pointer Alex R. Moon

unread,
May 17, 1994, 7:43:00 PM5/17/94
to
In article <2rb8ea$s...@nigel.msen.com>,

I'm afraid, from what I've seen and heard, this is incorrect. Doom in
fact uses a mode refered to by game programmers as "mode X". This mode
is the byproduct of a significant amount of tweaking with low-level VGA
registers. It has several advantages over mode 13h (MCGA):
Multiple pages in memory
4 planes per pixel (actually a disadvantage for doom's engine, but hey)
Ability to do effects like hardware scrolling etc.
Doom, of course, only really benifits from the first. The fact that it
does use a weird video mode means it won't work on an MCGA only computer,
and that it will crash on some graphics accelerated computers when
running out of windows, because the Windows driver is already using some of
the things Mode X uses, and Mode X is not an "official" mode so is not
technically supported by the graphics card.

--Alex
mo...@sonata.cc.purdue.edu


Jered Floyd

unread,
May 17, 1994, 7:16:45 PM5/17/94
to
David Matteson (dave...@garnet.msen.com) wrote:

: Scott Amspoker (sc...@bbx.basis.com) wrote:
: : I've been doing some reading lately about VGA/SVGA graphics and wondered
: : specifically what Doom was doing with the hardware. I assume Doom is
: : using 320x200x256 resolution. Is this correct? Also, how is Doom
: : performing frame switching in this mode?

: as you would notice if you ran a level with missing textures (or even one)
: when you look through that part, it just shows what the last thing
: displayed in the area of the screen was...
: so, what anyone can figure out from that is ; DOOM doesn't do
: page-swapping, because MCGA 320x200x256c only has 1 apage and 1 vpage,
: (page 0), what it does is just completely redraw the ENTIRE (even the
: status bar and border around vision-space when in any view size lower
: than 2) screen every time it goes around the main loop. (maybe more than
: once per cycle.)

Actually, I'm pretty sure they use XVGA 320x200x256x4 pages.
If you notice carefully, there are 4 distinct frames. (Why does the HOM
effect look that way? It doesn't wipe the memory first.)


--
Jered Floyd
jjf...@vela.acs.oakland.edu
GAT d? -p+ c++++ l+ u++ e*@ m++ s/-- n--- h++ f? g- w++ t+++ r++
PGP Public key available by finger."

John Carmack

unread,
May 18, 1994, 6:50:20 AM5/18/94
to
>so let me restate the answer to your question ; yes, it uses MCGA
>320x200x256c and no it does not do any page-swaps, it can't, MCGA
>320x200x256c only has 1 page.

nope.

DOOM uses 320*200*256 VGA mode, which is slightly different from MCGA
mode (it would NOT run on an MCGA equiped machine). I access the
frame buffer in an interleaved planar mode similar to Michael
Abrash's "Mode X", but still at 200 scan lines instead of 240 (less
pixels == faster update rate).

DOOM cycles between three display pages. If only two were used, it
would have to sync to the VBL to avoid possible display flicker. If
you look carefully at a HOM effect, you should see three distinct
images being cycled between.

John Carnmack

Steve Larsen

unread,
May 18, 1994, 12:35:10 PM5/18/94
to
Scott Amspoker (sc...@bbx.basis.com) wrote:
: I've been doing some reading lately about VGA/SVGA graphics and wondered

: specifically what Doom was doing with the hardware. I assume Doom is
: using 320x200x256 resolution. Is this correct? Also, how is Doom
: performing frame switching in this mode?

Doom is in 320x200x256 mode X. Mode X implicitly allows double-buffering,
so no real "work" is required here.

: --

: Scott Amspoker |
: Basis International, Albuquerque, NM | [X] NONE OF THE ABOVE
: |
: sc...@bbx.basis.com |

Steve

Scott Amspoker

unread,
May 19, 1994, 4:25:13 PM5/19/94
to
In article <940518114...@idcube.idsoftware.com> jo...@idcube.idsoftware.com (John Carmack) writes:
>DOOM cycles between three display pages. If only two were used, it
>would have to sync to the VBL to avoid possible display flicker.

This is interesting. You switch pages in the middle of a video frame?
Do you just cycle through pages as fast as you can?

Ed Hurtley

unread,
May 21, 1994, 11:11:51 PM5/21/94
to
Steve Larsen (lar...@unislc.slc.unisys.com) wrote:

: Scott Amspoker (sc...@bbx.basis.com) wrote:
: : I've been doing some reading lately about VGA/SVGA graphics and wondered
: : specifically what Doom was doing with the hardware. I assume Doom is
: : using 320x200x256 resolution. Is this correct? Also, how is Doom
: : performing frame switching in this mode?

: Doom is in 320x200x256 mode X. Mode X implicitly allows double-buffering,
: so no real "work" is required here.

Check, please... In case you haven't hit ESC ever, the Options menu has
a Low/High resolution toggle... Low is 320x200, High is 640x400, with the
border graphics (the score bar, menu, etc...) are still 320x200...
(Just the same graphics files)

: : --

: : Scott Amspoker |
: : Basis International, Albuquerque, NM | [X] NONE OF THE ABOVE
: : |
: : sc...@bbx.basis.com |

: Steve

--
----------------------------------------
| Ed Hurtley | Feel the power |
| e...@agora.rdrop.com | of my IBM XT!! |
----------------------------------------

Ben Morris

unread,
May 22, 1994, 12:20:43 AM5/22/94
to

John,

You're using a planar graphics system for a bitmapped game that
updates the entire screen at a respectable framrate on a 486/66?

That's pretty incredible. I would have thought all the over-
head for programming the VGA registers would kill that
possibility.

-- Ben!

John Carmack

unread,
May 22, 1994, 7:23:14 AM5/22/94
to
e...@agora.rdrop.com (Ed Hurtley) wrote:

>Check, please... In case you haven't hit ESC ever, the Options menu
>has a Low/High resolution toggle... Low is 320x200, High is
>640x400, with the border graphics (the score bar, menu, etc...) are
>still 320x200... (Just the same graphics files)

Low detail is 160*200 in the view screen. This is done by setting
two bits in the mapmask register whenever the texturing functions are
writing to video memory, causing two pixels to be set for each byte
written.

ui...@freenet.Victoria.BC.CA (Ben Morris) wrote:

>John,

>You're using a planar graphics system for a bitmapped game that
>updates the entire screen at a respectable framrate on a 486/66?

Its planar, but not bit planar (THAT would stink). Pixels 0,4,8 are
in plane 0, pixels 1,5,9 are in plane 1, etc.

>That's pretty incredible. I would have thought all the over-
>head for programming the VGA registers would kill that
>possibility.

The registers don't need to be programed all that much. The map mask
register only needs to be set once for each vertical column, and four
times for each horizontal row (I step by four pixels in the inner
loop to stay on the same plane, then increment the start pixel and
move to the next plane).

It is still a lot of grief, and it polutes the program quite a bit,
but texture mapping directly to the video memory gives you a fair
amount of extra speed (10% - 15%) on most video cards because the
video writes are interleaved with main memory accesses and texture
calculations, giving the write time to complete without stalling.

Going to that trouble also gets a perfect page flip, rather than the
tearing you get with main memory buffering.


John Carmack

Mark Mathews

unread,
May 22, 1994, 3:18:00 PM5/22/94
to LAR...@unislc.slc.unisys.com
-> Doom is in 320x200x256 mode X. Mode X implicitly allows
-> double-buffering, so no real "work" is required here.
I thought mode X is 320x240x256.

Steve Larsen

unread,
May 23, 1994, 12:19:29 PM5/23/94
to
Mark Mathews (mark.m...@channel1.com) wrote:
: -> Doom is in 320x200x256 mode X. Mode X implicitly allows

: -> double-buffering, so no real "work" is required here.
: I thought mode X is 320x240x256.

No, that is just one of the many mode X's. 320x240 is nice because
of its square aspect ratio. However, 320x200 has the advantage that
the 256K of VRAM for the VGA allows 4 complete pages to be stored
on the video card. Since we now have it on good authority that Doom
is using triple-buffering, that leaves one free page that might be
being used to store bitmaps and intermediate screen states.

Steve

Scott Amspoker

unread,
May 26, 1994, 8:19:09 PM5/26/94
to

The main "feature" of mode X is the un-chained state when cycling through
the 4 bitplanes. This gives you the ability to use display memory for
page switching and smooth scrolling. With some tweaking of the VGA
control registers you can also get 320x240 pixels. Doom does not bother
with the extra resolution.

Antony Suter

unread,
May 30, 1994, 9:25:06 AM5/30/94
to
In article <Cq6ov...@agora.rdrop.com>, Ed Hurtley wrote:

> Check, please... In case you haven't hit ESC ever, the Options menu has
> a Low/High resolution toggle... Low is 320x200, High is 640x400, with the
> border graphics (the score bar, menu, etc...) are still 320x200...

Err, no, High Detail is equivalent to 320x200 and Low Detail is equivalent
to 160x200.

--
Antony Suter [0] ant...@werple.apana.org.au
Melbourne, VIC, Australia [1] s87...@minyos.xx.rmit.edu.au
"Savannah River, K reactor, 1968. That was a VERY good year."

0 new messages