Deus Ex: Game of the Year Edition

Deus Ex: Game of the Year Edition

39 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.
3
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.

< >
16 Comments
lilsy Oct 3 @ 2:39pm 
Cool thank you, I will join!
Baba O'riley Gaming  [author] Oct 3 @ 1:53pm 
@lilsy Yes, but it's in a different area, and HP1 has the code slightly different.

I have a new HP2 engine in the works that has the "fix" embedded into it + a lot of features like DX9, borderless fullscreen, a widescreen mod, and so on.

If you want to keep up on progress, join our discord.

https://discord.gg/Fgp48mB
lilsy Oct 3 @ 10:49am 
Can this fix be applied to the Harry Potter games as well? I'm having the speedup issue with the first game.
shadept Sep 12 @ 9:17pm 
I see. Thanks. I wonder if these changes can be made without fully replacing Engine.dll
Baba O'riley Gaming  [author] Sep 12 @ 3:58pm 
Disassembly work can take days to fully understand what you're looking at, and I just don't have days worth of free time right now to look at it lol. It might just be another clamp, IDK.
Baba O'riley Gaming  [author] Sep 12 @ 3:57pm 
I can look when I have some free time
shadept Sep 12 @ 3:38am 
im not really good at assembly and all that so perhaps you could look into that? though, i really wish i could just look for a way to easily edit it and see it without source as i looked into another unreal engine 1 game's source
Baba O'riley Gaming  [author] Sep 11 @ 3:02pm 
Nah, I haven't looked into that. Didn't even know that water sped up.
shadept Sep 11 @ 11:58am 
yo have you looked into speeding water with this? i looked up into some sause and it says it just happens to "simulate deltaseconds for 120 fps". the water speeds up with framerate and so it goes batshit crazy at 200-300 fps
Baba O'riley Gaming  [author] Jun 23 @ 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.