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

FastDoom: DOS Vanilla Doom optimized for 386/486 processors

Recommended Posts

7 hours ago, viti95 said:

Interesting WAD, i'll try some benchmarks on both my 386 and 486. I think your 386 is limited by the low amount of RAM, 4Mb will cause the game to stutter while loading and unloading assets from HDD. That's why enabling/disabling SmartDrive causes the performance to change. SmartDrive uses part of the RAM to cache data from the HDD, and that results in less memory available for Doom (which itself caches all the data). It also uses more cpu cycles while loading from the HDD.

 

I actually have 8MB on my 386, but good point about smartdrive

Share this post


Link to post

Well, nobody in their right mind would attempt to run Doom AND SmartDrv with just 4 MB of RAM. That being said, there were some cases (relatively small or not very resource-heavy WADs) where using SMARTDRV would actually speed up loading, by keeping in RAM resources that Doom's cache management system would unload even if there wasn't any imminent RAM pressure. It also allowed DOOM to shut down and restart pretty quickly, which could be useful if you were going through a bunch of crappy 1994 PWADs or recording demos. Of course you needed e.g. 8 MB to do that for stuff that would run "just OK" with 4 MB.

Share this post


Link to post

WOW! Everything is in one commit titled "This is what I've been working with. Most changes are in." He could have named it just "My stuff".

Share this post


Link to post
8 minutes ago, drfrag said:

WOW! Everything is in one commit titled "This is what I've been working with. Most changes are in." He could have named it just "My stuff". 

 

LOL Best commit ever, no doubts.

 

Thanks for the info @Redneckerz!! I'll check how fbDoom works, as i'm implementing a VGA Mode 13h renderer. It's nearly done but there are some bugs that i need to fix (specially the V_CopyRect and melting functions as there is no multiple screens in Mode 13h).

Share this post


Link to post

New release (FastDoom 0.66) !!

 

- Savegames are working again (broken in 0.6). Still not compatible with vanilla doom savegames, but at least it's working (latest version with compatible savegames is 0.5).
- Potato detail mode is now selectable from the options menu. Also it's selectable by pressing F5 ingame.
- Support for unlimited sprites. Doom II MAP30 now doesn't crash if there are too many enemies. Also NUTS.WAD is partially working (albeit your 386 won't be doing 144 fps 🤣).
- Experimental new uncapped fps mode. Enabled with "-uncapped". It has rendering problems and won't interpolate movement between frames. It allows you to see how "fast" can be your pc in realtime.
- Added "-forcePQ", "-forceLQ" and "-forceHQ" parameters. It allows setting the video detail quality from command line. Useful for benchmarks.
- More internal optimizations.

 

Grab it here! https://github.com/viti95/FastDoom/releases/tag/0.66

Edited by viti95

Share this post


Link to post

Curious, since you've managed to make the sprites unlimited, did you also update the sprite sorting algorithm as well? The one in vanilla Doom is a basically a selection sort --- pretty much the slowest algorithm possible. I'll be the first to admit I don't know if it actually is faster than a "better" algorithm when there are 128 or fewer vissprites though.

Share this post


Link to post

@Wagi the sorting algorithm is merge sort, as the implementation for unlimited sprites it's the same as MBF. I've changed the memory allocation to use the internal zone memory, rather than the outside malloc memory.

 

The performance it's about the same for low amount of sprites, but it's much faster when the number of sprites is high.

Share this post


Link to post

Actually, Vanilla's sorting algorithm isn't *that* bad if the sprites are already pre-sorted to a certain degree - which they are, because sprites are added by subsector. However, I have entirely replaced it with the system's native qsort() algorithm in Crispy Doom.

Share this post


Link to post

Heh, that reminds me of a tricky question in an old CS book -where Alice claimed that her Selection Sort algorithm was faster than Bob's quick sort algorithm, and the trick question was to determine how and when this could be possible.

 

On shitty old computers with a joke of a cache and an OS that doesn't have lightweight function calls, coupled with a low number of elements, this can certainly be the case -the "break even" point may be surprisingly high.

Share this post


Link to post

Time for a new release!! FastDoom 0.666

 

  • Renamed executable to FDOOM.EXE / FDOOM2.EXE
  • Added all FastDoom display options and sound options in the options menu (only screen size option is saved, next versions will fix this)
  • Added "-reverseStereo" command line option to reverse Left/Right stereo speakers. Your Sound Blaster PRO will love this.
  • Added "-size |screensize|" command line option to force screen size. Values allowed are 3 to 11, being 3 the smallest possible, 10 full screen with HUD and 11 the biggest, fullscreen without HUD.
  • Added "-logTimedemo" option to save the benchmark result onto the file "bench.txt". With this it's possible to run multiple FastDoom benchmarks in a batch and save the results in a single text file. Requires "-timedemo".
  • Removed "-cdrom" command line option.
  • Fixed bug that made some sprites look corrupted (depending on screen size, only FastDoom 0.66).
  • More engine code optimizations.
     

Download it here: https://github.com/viti95/FastDoom/releases/tag/0.666

Share this post


Link to post
2 minutes ago, viti95 said:

Time for a new release!! FastDoom 0.666

 

  • Renamed executable to FDOOM.EXE / FDOOM2.EXE

Whilst i get why, isnt Final Doom'''s executable called FDOOM.EXE already?

2 minutes ago, viti95 said:
  • Added all FastDoom display options and sound options in the options menu (only screen size option is saved, next versions will fix this)
  • Added "-reverseStereo" command line option to reverse Left/Right stereo speakers. Your Sound Blaster PRO will love this.
  • Added "-size |screensize|" command line option to force screen size. Values allowed are 3 to 11, being 3 the smallest possible, 10 full screen with HUD and 11 the biggest, fullscreen without HUD.
  • Added "-logTimedemo" option to save the benchmark result onto the file "bench.txt". With this it's possible to run multiple FastDoom benchmarks in a batch and save the results in a single text file. Requires "-timedemo".
  • Removed "-cdrom" command line option.
  • Fixed bug that made some sprites look corrupted (depending on screen size, only FastDoom 0.66).
  • More engine code optimizations.
     

Download it here: https://github.com/viti95/FastDoom/releases/tag/0.666

Bolded parts are sexy, other parts are epic.

 

Overall release is brilliant.

Share this post


Link to post
16 hours ago, Redneckerz said:

Whilst i get why, isnt Final Doom'''s executable called FDOOM.EXE already?

 

Which part of it, exactly? At least in the DOS replay release I own, they are called TNT.EXE and PLUTONIA.EXE respectively.

Share this post


Link to post
1 hour ago, Maes said:

 

Which part of it, exactly? At least in the DOS replay release I own, they are called TNT.EXE and PLUTONIA.EXE respectively.

I remember looking this up as to why TNT and Plutonia were given their own exe names. This is actually not as commonly referenced as one would think! :)

 

Could it be the difference between the Anthology and stock FDOOM?

 

If not, then a mea culpa on my end is in order. Given how Doom and Doom2 are named it makes a lot of logistical sense to have it called FDOOM in the first place.

Share this post


Link to post

I've done some benchmarks with the demo3 from Doom shareware 1.9 and these are the results. The testbench has this specs:

 

CPU: Cyrix CX486 33Mhz (8Kb L1 WB)

Mainboard: CH 498B (512Kb L2 WB)

RAM: 32Mb EDO

Video card: Generic S3 805i VLB (1Mb)

Sound card: None

I/O card: Generic IDE ISA

HDD: Generic CompactFlash 256Mb

 

Main conclusions:

  • FastDoom 0.666 is 20% faster in high quality, and 28% faster in low quality compared to Doom shareware 1.9 (fullscreen + hud)
  • FastDoom low quality is ~1.7 times faster than FastDoom high quality (fullscreen + hud)
  • FastDoom Potato quality is ~2.5 times faster than FastDoom high quality (fullscreen + hud)
  • Flatter surfaces isn't faster compared to flat surfaces with low quality and high quality. Flat surfaces gives 20% extra performance in low quality, and 17% in high quality. Flatter surfaces is faster with potato quality, giving 26% extra performance.
  • Reduced screen size gives an important boost
  • The other visual optimizations have minimal impact in performance

fastdoom_0666_benchmark1.png

fastdoom_0666_benchmark2.png

fastdoom_0666_benchmark3.png

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
×