r/DeadlyPremonition • u/Cesario67 • 16h ago
Working on an all-in-one fix
Hi everyone!
Deadly Premonition is one of my favorite games, but let's be honest: the PC port of The Director's Cut has a lot of technical problems that have made it difficult to enjoy properly for years.
Given how long it's been since the game was released, I decided to try something: using Claude as an AI-assisted development tool to investigate the game's code and see how many of its longstanding issues I could fix.
I've been working on an open-source project that aims to address these problems in one place, rather than requiring players to combine several mods, patches, and workarounds.
Before going further, though, I'd like to know what already exists in the community. I know about DPfix and have also come across ZachFix, but are there other mods, fixes, or research projects I should look into? I'd rather build on existing work than duplicate someone else's efforts.
https://github.com/Cesario67/DeadlyPremonitionFix
What I've been working on
Saves and crashes
- Save corruption: The game overwrites dp.sav directly, which means a crash during saving can destroy the save file. I've implemented a safer approach that writes to a temporary file before replacing the original, along with dated backups that can be restored through the launcher.
- Crash diagnostics: Automatic minidumps and readable crash reports to help investigate recurring crashes, including the infamous Chapter 9 diner crash.
- 4 GB patch: Applying the Large Address Aware flag through the launcher, with a backup of the original executable.
DPfix improvements
DPfix by Durante has been essential to making the PC version playable, and I have enormous respect for the work that went into it.
I've been working on integrating DPfix 0.9 from its GPL-licensed source code and addressing several longstanding issues:
- Freezes after Alt-Tab or the first display mode change, caused by resource reference leaks that also resulted in continuous memory leaks.
- Startup crashes in borderless or windowed mode related to the refresh rate.
- Borderless mode being reapplied every frame, preventing hotkeys from working correctly.
- An infinite loop at startup when
DPfix.iniis missing. - A double release of a graphics surface.
The goal is to preserve DPfix's functionality while fixing these issues. The original DPfix binary is not redistributed.
PlayStation controller support
I've also investigated the controller problems affecting DualSense and DualShock 4 users.
- The infamous spinning camera: The game expects an Xbox 360 controller layout through an older Windows API. With a PlayStation controller, releasing R2 can be interpreted as pushing the right stick fully to the left. I've implemented controller input conversion to address this, without requiring DS4Windows or Steam Input.
- An additional controller input bug: The game makes another controller call using an uninitialized data structure. Depending on the environment, this can produce broken input, frozen sticks, and buttons that appear to be released. I've implemented a fix to reject this invalid call.
Stuttering and timing
- Periodic stuttering: I've investigated a roughly 65 ms freeze that occurs approximately every 20 seconds during controller polling. The proposed fix moves controller reads to a background thread so the game doesn't have to wait for them.
- Game clock precision: The game derives its timing from the system uptime counter, while its floating-point calculations can be affected by Direct3D's single-precision state. This can reduce timing precision the longer Windows has been running. I've implemented a higher-precision timing approach to improve camera smoothness.
- Restricted aiming: When the aiming reticle reaches the edge of the screen, the camera can stop following it. ZachFix identified the underlying mechanism: a comparison that depends on single-precision floating-point behavior. I've applied single precision to the relevant function.
- Frame rate: The game can run faster than intended on high-refresh-rate displays. I've implemented a 60 FPS limiter.
- Windows timer resolution: The mod requests 1 ms timer resolution to improve timing consistency.
Quality-of-life improvements
- Skip the intro logos without modifying DP.exe on disk.
- A launcher with accessible graphics presets and settings for resolution, anti-aliasing, SMAA, supersampling, SSAO, shadows, and reflections.
- A central place to configure the fixes, manage save backups, and restore default settings.
What I'd like to know
I'm particularly interested in hearing from anyone who has worked on the game or investigated its engine.
- Are there other known fixes or mods besides DPfix and ZachFix?
- Is anyone still maintaining a project aimed at fixing the PC port?
- Have other developers investigated the Chapter 9 diner crash or other recurring crashes?
- Are there known issues with the Director's Cut that I haven't mentioned?
- Are there any existing solutions that would make parts of this project unnecessary or that could be integrated instead?
I'm also interested in bugs that might not be widely documented. If there's a technical issue that has bothered you for years, I'd love to hear about it.
A note about AI-assisted development
I'm using Claude to help with code analysis, reverse engineering, and implementation. That doesn't mean I'm blindly accepting whatever it generates: the idea is to investigate the actual behavior of the game, understand the underlying causes, and validate the proposed fixes through testing.
I'm not a C++ specialist, so AI assistance has made it much more feasible for me to explore problems that would otherwise be difficult to tackle alone.
The project is intended to be free and open source, and I'd like to make the results useful to the wider community.
Thanks to Durante for DPfix, ZachFix's author for the detailed technical research, and everyone who has kept this game alive on PC despite its many quirks.
If you've worked on Deadly Premonition fixes, know of an obscure patch, or have technical information that could help, please let me know! I'd really appreciate any pointers before taking this further.