Deus Ex: Game of the Year Edition

Deus Ex: Game of the Year Edition

32 ratings
Deus Ex Speedup Fix
By Baba O'riley Gaming and 1 collaborators
One line of code causes all the problems..... A simple hex edit fixes it....

I will provide a fixed dll for lazy people and go over how to do it yourself.
2
2
   
Award
Favorite
Favorited
Unfavorite
Overview
So Deus Ex has a widely known problem: above a certain FPS, the whole game speeds up. This is known about in the community and "fixed" in the newer renderers (like DX10) by locking the FPS.

However: there are other Unreal Engine 1 games with the same exact issues. Enter Harry Potter 1 and 2. The second (Chamber of Secrets) had a prototype posted with the source, which allowed us to go over the engine. Lots of references to Deus Ex and Ion Storm were found throughout the engine, which explains now why both share the same speedup issue.
The Code
So, going through the source to HP2, I found the one reason why the game speeds up. In the level tick function, this code is run:

This one line of code tries to clamp the game between 10 and 200fps, but the problem is: that doesn't limit the FPS, that just limits the calculated delta between frames. What that happens instead, a value for above 200FPS is passed in and this code forces it to act as 200FPS. Removing the line, of course, fixes the issue and the game runs happily well up to 1000FPS.
Deus Ex's fix
Now you may say: "how does this pertain to Deus Ex?" Well, this exact code shows up in Deus Ex as well!



Such a stupid problem. I think they were trying to clamp the max FPS to 200, but you have to force the max tick rate in UGameEngine to do that (it's a function called MaxTickRate())
The Actual Fix
Now here's how to fix it in Deus Ex. You will need a hex editor like hxD.

Find "0AD7A33B" in hex forward, it'll look something like this:
Note the highlighted sections: this is to guide you to the correct section, there is multiple instances of this value and this is the correct one. Set it to 00 00 00 00

Next, find "CDCCCC3E" in hex forward, it'll look like this:
Also note the highlighted parts, as this helps mark where the value is.
Change it to "FF FF 7F 7F."

And now save. Now, if you use the DX10 render device, open DeusEx.ini and find
"[D3D10Drv.D3D10RenderDevice]"

Type "FPSLimit=0" under the header. Save and you should have a unlocked game. If you use DeusEXE, then go to configure and set the FPS limit to 0.

Now you have a game that will work fine uncapped!
Download
If you don't want to do all the hex editing yourself, here's the hex edit already done for you.
https://drive.google.com/file/d/17hRkKs9gu-s001SYttDxU6Q98tR9gdnB/view?usp=sharing

It contains both the fixed Engine.dll and the original Engine.dll.

< >
7 Comments
Baba O'riley Gaming  [author] 23 Jun @ 2:59pm 
Huh, guess they changed the variable names. I haven't used the DX9 driver for DX, so I just assumed it was the same as the UT one.
Scary Monsters 23 Jun @ 7:50am 
For D3D9 VSynce is "Swap Interval" and it needs to be set to 0 (default is -1).
Baba O'riley Gaming  [author] 22 Jun @ 4:29pm 
If they lock the FPS, then just remove the setting for it, or disable vsync in their settings.

The directx 9 renderer (and maybe opengl? Never used it tbh) setting is called "FrameRateLimit" under [D3D9Drv.D3D9RenderDevice]

Set it to 0.

For DX9, the VSync setting is just "VSync", setting to false disables vsync
Scary Monsters 21 Jun @ 4:23am 
Is there a way to get this working with other renderers?
Baba O'riley Gaming  [author] 8 Dec, 2020 @ 10:15pm 
Alright, I fixed that
Baba O'riley Gaming  [author] 8 Dec, 2020 @ 10:14pm 
Don't know how I missed that lmao.
geosmina 8 Dec, 2020 @ 9:52pm 
A correction, for the second search, it is " C(D) CC CC 3E "