Thursday, July 23, 2020

Legacy Direct 3D Frame Rate Limiter

i've been quietly captured by some nostalgia this past year.

that's OK. Maybe...

but, GPUs even old ones are now really excellent.
Playing Star Wars: Shadows of the Empire on an old NVIDIA
Quadro FX 1000 (itself an under-clocked version of the Geforce FX 5800)
is just impossible, even with VSYNC @60FPS.

even the damn intro audio to missions ends early!

normally, on a modern computer, its easy to set a frame cap
within either the NVIDIA Profile Inspector or
AMD's excellent Catalyst panel.

however, Windows 98 SE drivers have no such features,
to fix this, I decided to amend a through Direct X wrapper library
to support preventing Direct 3D's ::EndScene function
(upto DX7) from returning earlier than 33.3 ms:

https://github.com/slartibardfast/dxfpscap/releases/tag/v1.0-release.20200719

the wrapper on win32 systems hooks though ddraw.dll
in the path of the game to be capped at @30fps, but in
Windows 9x, you'll have to hex edit the game exe to replace
DDRAW.dll references with 30CAP.dll as it loads the
C:\windows\system32\ddraw.dll always!

if anyone knows how to override the linker in Windows 9x
properly please do leave a comment or drop me an email!

anyway, none of this nostalgia matters, we can never return.

No comments: