havoc-remaster/docs
pyr0ball 763509e4bc feat: set up Linux Ghidra pipeline, find and patch FPS-coupling and pause-hang bugs
Ghidra decompilation environment stood up on Linux (headless, no sudo): JDK 21 +
Ghidra 12.1.2 in ~/tools, reusing the existing analyzed project at
tools/ghidra_project/ from the prior Windows session instead of starting fresh.

FPS-coupling investigation: traced the main game loop's per-frame path and found
the real root cause - compute_frame_delta_ticks_60hz_min1_clamp (0x4092D0) computes
correct delta-time from timeGetTime(), but clamps the minimum return value to 1 tick
even when zero ticks truly elapsed, causing simulation speed to scale with framerate
above 60fps. First patch attempt (NOP the clamp) crashed on level load because the
shared delta value has 203 read sites across 40+ functions and only 2 were checked
for zero-safety; reverted and archived as a documented lesson. The corrected fix
(busy-wait instead of lying) is designed but not yet built.

Pause-loop hang fixed: the pause command handler blocks the Windows message queue
in a tight GetAsyncKeyState polling loop (found while locating the cheat code
handler), which trips modern Windows' "Not Responding" hang detection if left
paused too long, permanently disconnecting input. Patched (HAVOC_NOCD_PAUSEFIX_v1.EXE)
to pump one message per loop iteration via the game's own existing message-drain
function; confirmed fixed by play-testing, including the related "alt-tab while
paused resets to menu" symptom. A separate "alt-tab while not paused" reset symptom
remains open.

New tracking docs: docs/FUNCTIONS.md (function-by-function RE progress),
docs/PATCH_VERSIONS.md (binary patch version log), docs/LEVEL_NOTES.md (level/AI
design quirks for the Remaster variant). Extended docs/PATCHES.md and
docs/METHODOLOGY.md with full discovery narratives including dead ends.
2026-07-03 22:32:28 -07:00
..
FORMATS.md feat: crack GRAFIX0N.DAT texture format + extractor 2026-07-03 09:36:41 -07:00
FUNCTIONS.md feat: set up Linux Ghidra pipeline, find and patch FPS-coupling and pause-hang bugs 2026-07-03 22:32:28 -07:00
HANDOFF.md feat: set up Linux Ghidra pipeline, find and patch FPS-coupling and pause-hang bugs 2026-07-03 22:32:28 -07:00
LEVEL_NOTES.md feat: set up Linux Ghidra pipeline, find and patch FPS-coupling and pause-hang bugs 2026-07-03 22:32:28 -07:00
METHODOLOGY.md feat: set up Linux Ghidra pipeline, find and patch FPS-coupling and pause-hang bugs 2026-07-03 22:32:28 -07:00
PATCH_VERSIONS.md feat: set up Linux Ghidra pipeline, find and patch FPS-coupling and pause-hang bugs 2026-07-03 22:32:28 -07:00
PATCHES.md feat: set up Linux Ghidra pipeline, find and patch FPS-coupling and pause-hang bugs 2026-07-03 22:32:28 -07:00
WEAPONS.md feat: NOCD patch boots Havoc on modern Windows (defeats CD copy protection) 2026-07-03 09:29:59 -07:00