VOGONS

Common searches


First post, by eddman

User metadata
Rank Member
Rank
Member

Does slowdowns in Duke 3D (specifically with mirrors) happen with all VBE 2.0+ cards?

I've been testing it in 86box and VBE 1.2 cards perform just fine, yet it seems all 2.0+ cards suffer from major fps drops. Applying MSKVBEF7 fixes the problem.

Can anyone with real older cards (like Voodoo 3, Virge (VBE 2.0 bios), etc.) confirm this behavior? Test at least at 640x480 and enable the in-game fps counter by typing DNRATE. Make saves to be able to test the exact spot.

Here are examples from a VBE 2.0 Virge/DX in 86box:

stock-roof.png
Filename
stock-roof.png
File size
117.74 KiB
Views
335 views
File license
Public domain
mskvbef7-roof.png
Filename
mskvbef7-roof.png
File size
117.74 KiB
Views
335 views
File license
Public domain
stock-mirror.png
Filename
stock-mirror.png
File size
106.93 KiB
Views
335 views
File license
Public domain
mskvbef7-mirror.png
Filename
mskvbef7-mirror.png
File size
106.92 KiB
Views
335 views
File license
Public domain

Roof goes from 60 to 68, and mirror goes from 27 to 68 (2.5 times faster!).

With a Voodoo 3 PCI, it goes from 38 roof/17 mirror to about 76.

Last edited by eddman on 2023-12-30, 12:23. Edited 10 times in total.

Reply 2 of 4, by Falcosoft

User metadata
Rank Oldbie
Rank
Oldbie
badmojo wrote on 2023-12-30, 11:34:

I use a TNT2, which is VBE 3.0, and it works great with Duke3D - including mirrors.

Test it at higher resolution (1024x768 or higher) and type 'dnrate' to check FPS. In theory you should see some reduced FPS even on real hardware. It's because of DN3D in VBE 2.0 modes uses page flipped double buffering (no system memory is used as frame buffer) and in case of mirrors the engine needs to read from video memory that is slower than read from system memory.

Website, Facebook, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper

Reply 3 of 4, by eddman

User metadata
Rank Member
Rank
Member
Falcosoft wrote on 2023-12-30, 11:51:

It's because of DN3D in VBE 2.0 modes uses page flipped double buffering (no system memory is used as frame buffer) and in case of mirrors the engine needs to read from video memory that is slower than read from system memory.

So would that be an oversight by the game devs, not realizing the performance degradation?

Considering that the game seem to be working just fine on VBE 1.2 cards (at least in 86Box), why does Duke show that warning message about running it on a 2.0 card?

Reply 4 of 4, by Falcosoft

User metadata
Rank Oldbie
Rank
Oldbie
eddman wrote on 2023-12-30, 15:11:
Falcosoft wrote on 2023-12-30, 11:51:

It's because of DN3D in VBE 2.0 modes uses page flipped double buffering (no system memory is used as frame buffer) and in case of mirrors the engine needs to read from video memory that is slower than read from system memory.

So would that be an oversight by the game devs, not realizing the performance degradation?

Considering that the game seem to be working just fine on VBE 1.2 cards (at least in 86Box), why does Duke show that warning message about running it on a 2.0 card?

In theory page flipping should be always faster. Page flipping saves an unnecessary bit block transfer from system memory to video memory. If page flipping is enabled you have at least 2 video pages in video memory. The software always prepares content on the back buffer page and when the content is ready it simply swaps the back buffer for the front buffer page, thus the former back buffer becomes the front buffer and vice versa. It's only a simple pointer operation, no copying of data is necessary at all. When page flipping is not enabled the content from the system memory back buffer has to be copied to video memory that is not a simple pointer operation but a huge block transfer.
Although the situation is different when you need data from the frame buffer (that is you need to read from the frame buffer in video memory). Reading from video memory is always slower than reading from system memory. The magnitude of the slowdown is implementation dependent.
BTW, this kind of 'reading from video memory' slowdown is also present in e.g. Quake when page flipping mode is active and you press ESC to change settings meanwhile the game renders scenes at the background (so it has to combine 2 video memory surfaces to achieve transparent/translucent effect). This problem is also present in case of some Directdraw applications when they have to work with 2 (or more) video memory surfaces to achieve transparency.

Website, Facebook, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper