Games // PROJECT NOTES

PLAYSTATION / LIGHTGUN

Die Hard Trilogy: controls & aim

Three focused fixes for two very different games: selectable Dual Shock controls in Die Hard 1, plus session-based lightgun calibration and a smaller HUD in Die Hard 2.

Focus
Input & HUD patches
Tools
MIPS · DuckStation · Python
Result
Controls, calibration & UI

A fourth controller layout

Die Hard 1 gains a selectable Dual Shock layout after the original A, B and C options. Move and strafe with the left stick; turn with the right. Analog input also works in the launcher and game menus. Analog mode still needs to be enabled on the controller.

Die Hard 1: the selectable Dual Shock layout and its on-screen instructions.
Die Hard 1: the selectable Dual Shock layout and its on-screen instructions. Project source.

Calibrate where you play

On the Die Hard 2 title screen, press and release the grenade button, aim at the center of the white target and shoot. Releasing the trigger returns to the title screen; Start cancels. The correction lasts for the current session and adjusts an offset, not edge-to-edge aiming scale.

Die Hard 2: aim at the center target to set the session offset.
Die Hard 2: aim at the center target to set the session offset. Project source.

Make room for the action

The independent UI patch reduces the score and ammunition counters, moves rocket and grenade counts to the bottom left, corrects health-badge proportions and removes the controller-mode icon. Calibration and UI patches can be applied together in either order.

Die Hard 2: smaller counters and the revised health display.
Die Hard 2: smaller counters and the revised health display. Project source.

UNDER THE HOOD

AI-assisted live debugging in DuckStation

The investigation combined a debugger connection to the running game with memory dumps, screenshots and logs. AI helped make sense of the evidence: which values changed, which MIPS routines handled them, and which edits were worth testing. The running game provided the feedback.

  1. Observe a repeatable actionCompare the game’s behavior while moving, turning, aiming or navigating a menu. Screenshots and logs connect the visible result to the state being investigated.
  2. Inspect the running stateDebugger access and RAM dumps expose the instructions and data actually loaded in memory. Comparing states helps narrow the search from the whole game to candidate input, aiming or drawing routines.
  3. Use AI to interpret the evidenceAI assists with reading MIPS instructions, following branches and reasoning about candidate values or control paths. Those interpretations are hypotheses to check against the game, not proof on their own.
  4. Change, replay, verifyTry a focused change and repeat the same action. Package the confirmed edits into a PPF patch, then check application, undo and disc-sector integrity. A fresh boot matters: an old savestate can reload unpatched code into RAM.

This overview combines the creator’s account of the tools used with the repository’s documented patch and validation results. It describes the method rather than reproducing a debugger transcript.

What has been verified?

Controls, calibration and UI changes were user-tested in DuckStation. Die Hard 1 passed 4,862 simulated MIPS cases. Physical hardware/MiSTer testing remains outstanding. The Die Hard 2 patches require the documented USA v1.1 image with the Nuvee GunCon conversion already applied.

Technical notes & project sources

Read the project README for installation, current limitations, supported revisions and validation details. Images above are labelled as screenshots, artwork or explanatory diagrams.