VOGONS


First post, by Kahenraz

User metadata
Rank l33t
Rank
l33t

For fun I wanted to bench my Tseng Labs ET4000AX ISA VGA card. All of the tests were underwhelming and Doom was very sluggish. At the end I decided to try Quake for fun and to my surprise it actually ran very fast!

The system itself is very unbalanced. It's a 300mhz Pentium 3 on a 440EX paired with an ISA card for VGA.

Here is a short list of bench scores for comparison:

3DBench 1.0c 69.3
PC Player Benchmark 38.1 fps (320x200)
Doom 2134 gametics 2897 realtics
Quake 34.4 fps (320x200)

I know that this is just the software render but I would think that Quake would require more heavy lifting than what the ISA bus can provide.

How is I that Doom can run slow but Quake is fast? What are the mitigating factors that cause Doom to lag behind?

Last edited by Kahenraz on 2021-08-10, 04:04. Edited 1 time in total.

Reply 3 of 14, by Gmlb256

User metadata
Rank l33t
Rank
l33t

Doom uses a tweaked mode called mode X (or mode Y since the resolution is 320x200) which is planar while Quake uses regular mode 13h which is linear. Linear mode is faster than planar mode because in planar mode there is possible overhead when switching between planes and some video cards can't handle it fast enough.

Heretic and Hexen also uses regular mode 13h despite using the same engine as Doom.

VIA C3 Nehemiah 1.2A @ 1.46 GHz | ASUS P2-99 | 256 MB PC133 SDRAM | GeForce3 Ti 200 64 MB | Voodoo2 12 MB | SBLive! | AWE64 | SBPro2 | GUS

Reply 4 of 14, by The Serpent Rider

User metadata
Rank l33t++
Rank
l33t++

How is I that Doom can run slow but Quake is fast? What are the mitigating factors that cause Doom to lag behind?

Doom vs Heretic VGA performance difference

And yes, FastDoom VGA mode will dramatically improve performance.

I must be some kind of standard: the anonymous gangbanger of the 21st century.

Reply 5 of 14, by Gmlb256

User metadata
Rank l33t
Rank
l33t

Mode X has some tradeoffs and back then it made sense but the rules has changed by the time Quake was released. The main reason Carmack used it on Doom was to provide page flipping support (normal v-sync is expensive) as I noticed screen tearing on Heretic and Hexen when turning around while that doesn't happen on Doom.

Haven't checked FastDoom to see whether it uses the tweaked mode or the regular mode 13h.

Edit: I checked FastDoom and it is a very promising port with multiple video modes.

VIA C3 Nehemiah 1.2A @ 1.46 GHz | ASUS P2-99 | 256 MB PC133 SDRAM | GeForce3 Ti 200 64 MB | Voodoo2 12 MB | SBLive! | AWE64 | SBPro2 | GUS

Reply 6 of 14, by rasz_pl

User metadata
Rank l33t
Rank
l33t
Gmlb256 wrote on 2021-08-10, 12:25:

Mode X has some tradeoffs and back then it made sense

Thats also what Abrash was theorizing in some post Doom/mode Y writeup (faster fills by playing with latches faster than rendering to ram then copy). FastDoom disproves this, leaves universal Vsync as the only practical reason for mode y.

Open Source AT&T Globalyst/NCR/FIC 486-GAC-2 proprietary Cache Module reproduction

Reply 7 of 14, by Kahenraz

User metadata
Rank l33t
Rank
l33t

In this scenario the CPU is plenty fast. What then is responsible for Mode X being slow? Is it the Tseng ET4000 or the ISA bus?

I'm not familiar with ISA graphics cards. Is it normal for them to struggle with Doom?

Is it possible to summarize the Tseng ET4000 on the ISA bus as "unusually slow" at Doom, "unusually fast" at Quake, or simply "average" overall.

Reply 8 of 14, by Gmlb256

User metadata
Rank l33t
Rank
l33t
Kahenraz wrote on 2021-08-11, 16:23:

In this scenario the CPU is plenty fast. What then is responsible for Mode X being slow? Is it the Tseng ET4000 or the ISA bus?

I'm not familiar with ISA graphics cards. Is it normal for them to struggle with Doom?

Is it possible to summarize the Tseng ET4000 on the ISA bus as "unusually slow" at Doom, "unusually fast" at Quake, or simply "average" overall.

I don't have any ISA video card to confirm this but I get similar results (fast in regular mode 13h but slow in mode X) from my old computers. The Tseng ET4000 is one of the fastest ISA video card but the ISA bus is very slow compared to VLB, PCI, AGP and PCI-E due to having a low bandwidth.

I/O wait states may have also an effect on the performance of the ISA video card.

VIA C3 Nehemiah 1.2A @ 1.46 GHz | ASUS P2-99 | 256 MB PC133 SDRAM | GeForce3 Ti 200 64 MB | Voodoo2 12 MB | SBLive! | AWE64 | SBPro2 | GUS

Reply 9 of 14, by The Serpent Rider

User metadata
Rank l33t++
Rank
l33t++

Doom performance scales from data bus speed, if CPU is not primary bottleneck. It's simple as that. Even 486 will get some boost if you just overclock ISA, VLB or PCI bus. Therefore, you need PCIe 16x to achieve really high numbers in timedemo. I'm not joking.

I must be some kind of standard: the anonymous gangbanger of the 21st century.

Reply 10 of 14, by mkarcher

User metadata
Rank l33t
Rank
l33t
Kahenraz wrote on 2021-08-11, 16:23:

In this scenario the CPU is plenty fast. What then is responsible for Mode X being slow? Is it the Tseng ET4000 or the ISA bus?

The original VGA design is based on an 8-bit bus interface. That design is unable to take 16-bit write cycles. It is easy to build a slightly enhanced VGA design that can take 16-bit cycles in text mode (odd/even addressing) and in standard 256-color mode (chain-4 addressing), but difficult to build a slightly enhanced VGA design that can take 16-bit cycles in Mode X. Furthermore, in Mode X a 16-bit write cycle would set the color of two pixels which are not neighbouring, but separated by 3 pixels inbetween that can't get accessed at the same time. So it might be inconvenient to use 16-bit video memory access at all in Mode X. I don't know what classic DOOM does, but if it does byte writes to VGA memory, and especially if the mainboard adds extra waitstates to 8-bit cycles that can not be cancelled using the 0WS signal, performance will be poor.

If I remember correctly, I experimented with writing a tiny 3D enigne at a feature level between slightly above Wolf3D that gathered the parameters for all 320 columns on the screen and then rendered 4 lines at the same time, so it could write to the memory using 32-bit cycles maximizing the efficiency of posted writ buffering on a 486DX50 with an ET4000AX graphics card. That engine got stalled on rendering performance, not on the ISA bus. But as this is years ago, I might mix up what hardware I had in use during that experiment. If my recollection is correct, the ET4000AX should be able to take 16-bit writes in Mode X at good performance, though.

Reply 11 of 14, by rasz_pl

User metadata
Rank l33t
Rank
l33t

Afaik doom does a lot of byte accesses, not to mention reads back from VGA to do transparency. Try fastdoom, it does all the cool tricks to avoid bottlenecks.

Open Source AT&T Globalyst/NCR/FIC 486-GAC-2 proprietary Cache Module reproduction

Reply 12 of 14, by ViTi95

User metadata
Rank Member
Rank
Member

There are multiple reasons that make Doom slower on ISA cards compared to Quake on fast systems. The main difference on how both render the scene, is that Doom renders everything directly in the video card, while Quake uses a backbuffer in RAM memory and then copies that backbuffer to the video card. These are my guesses:

  • The use of Mode Y requires to change planes while rendering the scene, that is an additional OUT instruction to be called to the video card for every column. This is even worse for visplanes, as each line of the visplane requires multiple OUT instructions to be called (one for each pixel in high detail mode). For some video cards this is a really slow operation (Rendition Veritè, Cyrix MediaGX,...)
  • The memory writes to video card in Mode Y are 8bit wide, while using a backbuffer allows up to 32bit wide writes.
  • The way Doom renders the scene is very optimized (columns and visplanes don't overlap) but sprites and transparent walls are rendered after the whole scene is rendered. This overlap requires more data to be written to the video card than it really needs to (and ISA bus is WAY slower than the main ram, even on 486 processors)
  • Transparent objects in Doom requires reading from the VRAM in Mode Y, which is an insanely slow operation. Quake doesn't have this problem as it doesn't use that algorithm.

I think Doom benefits from Mode Y on slow processors, as it allows writing two pixels with a single 8bit operation for the low detail mode, and avoids using the main memory on 386 processors (again a very slow operation). Also page-flipping is good as it avoids screen flickering and doesn't require vsync.

https://www.youtube.com/@viti95

Reply 13 of 14, by leileilol

User metadata
Rank l33t++
Rank
l33t++
ViTi95 wrote on 2021-08-17, 10:09:

Quake doesn't have this problem as it doesn't use that algorithm.

Well, it doesn't have that problem after v1.06 😀
Once upon a time Quake had a 'fadescreen' function for the menu background that would brown it with a video read per pixel with a small [256] lookup table. By the time Johnc had started to write WinQuake though, this had to be taken out for performance reasons (DirectDraw's vram reading performance is horrendous), leading it to be replaced with a black stipple since 1.07.

Hexen II on the other hand.... 🤣 they'll pop that whole screen into the translucency table regardless of resolution. <1FPS at 800x600+ on 1997 computers yay!

apsosig.png
long live PCem

Reply 14 of 14, by Gmlb256

User metadata
Rank l33t
Rank
l33t

Some of the video modes that are on DOS Quake uses the tweaked mode such as 360x480 and you can set a 320x200 mode that exactly uses mode Y through the console.

The horrendously slow transparency effect also happens in older versions of Quake when using a VESA video mode, especially on high resolutions.

VIA C3 Nehemiah 1.2A @ 1.46 GHz | ASUS P2-99 | 256 MB PC133 SDRAM | GeForce3 Ti 200 64 MB | Voodoo2 12 MB | SBLive! | AWE64 | SBPro2 | GUS