UltimateFIXDP
Download
UltimateFIXDP←

How it was fixed

Every fix in UltimateFIXDP started as a symptom somebody saw, became a cause found in the game's code, and only then a change. This page walks through them: what was wrong, why, what the mod does, and how sure we are that it works.

The method

Two builds side by side

The PC port and the Xbox 360 original are the same game built twice. Where they differ, the port usually lost something, and the console code shows what it should do.

Check the bytes, then patch

Every place the mod changes carries the exact bytes expected there. If they differ, that fix is skipped. A test compares all of them with the real Steam and GOG executables on every build.

Say what is proven

Reading code is not playing the game. Each entry below carries a status: confirmed in the game, confirmed by a player, or not checked yet. Unchecked fixes live in the Experimental tab, off by default.

  • Confirmed in the game
  • Confirmed by a player
  • Partly confirmed
  • Not checked in the game yet
  • Reworked, waiting for a check
  • Not done

Stability and time

Hangs, crashes and the frame rate: most of these were found from players' crash dumps and logs.

The 45 FPS ceiling

Confirmed in the game
Symptom
On some computers the game never went above about 45 frames a second, whatever the settings.
Cause
Every frame the game asks Windows about a WinMM gamepad, even when none is connected. On some systems that single call takes several milliseconds.
What the mod does
The call is made only when a pad is there, and the polling moved off the game's thread.

The slowdown only a reboot cured

Confirmed in the game
Symptom
After days without restarting Windows the game stuttered and slowed down.
Cause
The game counts time from the Windows uptime in single-precision floats. The larger that number grows, the fewer digits are left for the length of one frame.
What the mod does
The game is handed a counter that starts at zero together with it.

Physics and timers above 120 FPS

Confirmed in the game
Symptom
At 120 to 180 frames a second cars, doors, enemies and effects behaved wrongly or stood still.
Cause
About ninety counters turn the length of a frame into a whole number of steps. A frame shorter than half a step gives zero, so the counter never moves; the physics step has the same problem.
What the mod does
Short frames share whole steps of 1/60 s: the world update, the car and every such counter receive the steps of a common plan. Confirmed at 180 FPS.

The game ran too fast without a frame limit

Not checked in the game yet
Symptom
Between 61 and 139 frames a second, with no frame limit set, the whole game ran up to 1.7 times too fast.
Cause
In that range the game rounds its time step up to a whole one, so every frame moved the world further than the real time that had passed.
What the mod does
The frame pacer keeps the step equal to the time that really passed.

The endless device reset

Confirmed in the game
Symptom
After locking Windows, a driver restart or sometimes Alt+Tab the picture never came back.
Cause
When the video device is lost, the game tries to reset it every 50 ms forever if anything is still held on it. The mod itself had left its timing queries there.
What the mod does
The mod releases everything of its own before every reset try; the log counts the tries.

A save file ruined by a failed write

Confirmed in the game
Symptom
A crash or power loss while saving could leave dp.sav unreadable.
Cause
The game writes the whole 8 MB file in place, so an interrupted write leaves half of the old file and half of the new one.
What the mod does
The mod guards the write, keeps dated backup copies with the place in the story, and restores the newest good copy when the file is damaged.

Picture

What the port lost or drew wrongly compared with the console.

Everything is drawn at 1280×720

Confirmed in the game
Symptom
Whatever the window size, the 3D picture and the interface stayed at 720p and were stretched.
Cause
The scene and post-processing buffers are sized from two numbers that are 1280 and 720 for the whole game.
What the mod does
Those buffers are created at the size you choose, with supersampling on top if wanted, and the interface is drawn sharp at the output size.

Flicker in the distance

Confirmed in the game
Symptom
Far roads, roofs and signs flickered and fought with each other.
Cause
The play camera's near plane sits at 1.0 while the far one is 200000, so a 24-bit depth buffer has almost no precision far away. The Xbox 360 used a floating-point depth buffer.
What the mod does
Outdoors the near plane is moved out, never further than a third of the way to York; indoors the game's own value stays, because a wall next to the camera was otherwise cut open (#4).

The river without water

Confirmed in the game
The river with reflections and ripples, with the mod
Symptom
The river was a flat surface of one colour.
Cause
The game holds a record for the river's water (reflection, waves) and the port never applies it.
What the mod does
The record is applied as the console does: the river reflects and moves again. Other water in the game is still untouched.

The black blob in the prologue

Confirmed in the game
Symptom
Where smoke should drift across the path there was a solid black shape.
Cause
On the console the smoke is multiplied by a mask and comes out in wisps. The port draws two black sheets that add up to a blob, and puts the smoke volume into the depth buffer as if it were a wall.
What the mod does
The mod builds the smoke sheet anew and keeps the volume out of the depth pass. The Xbox 360 texture was found by Darkanioid1997. A match by eye, limited to the prologue.

Long loading screens

Confirmed in the game
Symptom
With sharper textures switched on, loading screens became several times longer.
Cause
The smaller copies of each texture were made level by level through the video card, and every step waited for a frame.
What the mod does
The mod builds them in memory itself: 244 textures in 1.7 s instead of 11.3 s in a player's log.

Empty doorways across the street

Confirmed in the game
Symptom
Doors, booths and vending machines appeared only when you were almost next to them.
Cause
The camera has several culling classes; the one holding doors and street furniture ends at 500 units.
What the mod does
Each class has its own distance in the menu; the default for that class is 3000.

The objective's light pillar is a white block

Reworked, waiting for a check
Symptom
Up close the pillar of light over an objective is a solid white cylinder (#28).
Cause
The pillar's texture is 46 % transparent, but the port draws the pillar in the opaque pass with blending off. Our first fix (0.8.0) blended the wrong part of the model, a small piece of 8 triangles, and changed nothing on screen; the player's screenshot showed that.
What the mod does
Reworked: the pillar is taken out of the opaque pass and drawn blended when the transparent pass begins. Waiting for the reporter's check.

Lamp light appears only close by

Confirmed by a player
Symptom
The pool of light under a street lamp shows up only when you are almost under it (#26).
Cause
A lamp's light fades out and is dropped once the camera is farther than 200 units in the town and 140 elsewhere. The console code has only the 200 case.
What the mod does
The distances are scaled, twice as far by default and up to four times in the menu. The fog still ends the light. Confirmed by the reporter.

The Xbox 360 camera

The port still carries the console's camera data. The code that used it was cut.

Fixed scene cameras

Partly confirmed
The fixed camera on the forest path of the prologue, on PC
Symptom
On the Xbox 360 the camera in some places becomes a fixed view of York from above or from the side while you keep playing. On PC it always stays behind him.
Cause
Stages contain camera areas, each with child points: an eye, a focus and a field of view. The console's player code walks the areas York stands in and moves the camera there. The PC function has the same loop, but its branch only sets a flag: the camera part was removed.
What the mod does
The mod reads the same stage data and places the camera at the area's eye point. The picture is confirmed in the game; turning the walking direction with the view is not checked yet.

The storeroom job seen from above

Not checked in the game yet
Symptom
The box job in the Milk Barn storeroom was played looking straight down on the console (#25). The port shows that view only while it asks whether to stop.
Cause
The view is defined in the job's own script; the port simply does not switch to it during play.
What the mod does
The mod sets the script's camera for the whole job and turns the walking direction with it.

Controls and world

Siren and boost lost on the triggers

Confirmed by a player
Symptom
With gas and brake on the triggers the siren / boost stopped working (#2).
Cause
This was the mod's own doing: it keeps the trigger axis away from the game, and two of the game's driving actions were bound to that axis.
What the mod does
They moved to the shoulder buttons. Confirmed by the reporter.

A crash entering a building

Confirmed by a player
Symptom
The game crashed while going into the milk barn.
Cause
When a level changes, the pool of grass objects calls a method through a pointer that no longer points at mapped memory.
What the mod does
The call is guarded. A player wrote that he could get in after the fix.

Day and night inside buildings

Not checked in the game yet
Symptom
Interiors had the wrong light for the hour.
Cause
The port reads the list of buildings with a byte-order description made for records of another size: 64 of 81 entries get a wrong key and are never found.
What the mod does
The description is replaced with one of the right record size.

Typos in the English text

Not checked in the game yet
Symptom
A few English lines have mistakes (#27, #22).
Cause
They are in the game's message file. Replacing the file would overwrite any translation.
What the mod does
A correction names the record and its original text, and is applied only while the game still holds exactly that text, so a translation is never touched. Checked against the real message file, not yet seen in the game.

Found against the Xbox 360, waiting for testers

These come from reading both builds' code side by side. None has been run in the game yet, so all are off by default: F10 → Game and world → Experimental.

Tips vanish before you can read them

Not checked in the game yet
Symptom
A tip window disappears after two seconds, however long its text (#16).
Cause
The window's life is one fixed constant, 120 time units. The console uses the same constant, so this is the game's own design.
What the mod does
A setting multiplies that time, up to 8 seconds.

Distant areas change brightness

Not checked in the game yet
Symptom
With raised draw distances, large far objects get brighter and darker as the camera moves (#21).
Cause
Sun shadows are drawn up to 1000 units; beyond that line everything is lit without them. Objects that are now visible farther than the game intended cross the line.
What the mod does
A setting moves the end of the shadows out to 3000 units. Far shadows get softer, since the same shadow map covers more ground.

The jingle after a race is cut off

Not checked in the game yet
Symptom
The melody for an unlocked item stops a second after the race ends (#29).
Cause
Leaving an event fades all of that event's sounds within 60 time units, the jingle among them. Same code on the console.
What the mod does
A setting makes the fade last up to 10 seconds. It applies to every event.

Food and drinks wear off too early

Not checked in the game yet
Symptom
The effect of an item on hunger and sleep ends twice as early at 60 FPS as on the console, and six times as early at 180.
Cause
Two timers lose one unit per drawn frame instead of per unit of time. The console ran at 30 frames a second.
What the mod does
The timers count game time, at the console's rate.

Chapter replay is easier than on the console

Not checked in the game yet
Symptom
Replaying an early chapter gives early-chapter enemies, and the difficulty resets.
Cause
The balance table is read by chapter and difficulty. In a replay the console takes the chapter of your real save and the difficulty picked in the replay menu; the port takes the replayed chapter and writes zero.
What the mod does
An option restores the console's behaviour. It changes the balance of replays, so it is a choice.

What we could not or would not do

DLSS, DLAA, FSR 3, RTX Remix

Not done
Symptom
Asked for often.
Cause
The game is a 32-bit Direct3D 9 program with programmable shaders and no motion vectors. Modern upscalers need 64-bit, Direct3D 11 or 12 and motion vectors; RTX Remix needs the fixed-function pipeline.
What the mod does
Not possible inside this game. What works today: supersampling, SMAA and sharpening in the mod, or an external frame scaler.

Putting the endless handgun into the toolbox

Not done
Symptom
The toolbox refuses two items (#30).
Cause
A table in the game marks them as not storable, and the console has the same rule. Several places hand York that handgun without checking that he owns it.
What the mod does
Left as the game made it.

The full technical documents

Addresses, byte patterns, stubs and dead ends are written up in English in the repository.