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. |
||
|---|---|---|
| docs | ||
| tools | ||
| .gitignore | ||
| README.md | ||
| run_and_log.bat | ||
| run_probe.bat | ||
Havoc — Preservation & Godot Remaster
Reverse-engineering, asset-extraction, and Godot remaster of Havoc (Reality Bytes, Inc., 1995) — a first-person vehicular-combat shooter for Windows 95/98.
Havoc renders a software-rasterized 3D world (textured terrain, low-poly enemy/pickup models, drivable and flyable vehicles, dithered 8-bit color) into a DirectDraw framebuffer, framed by an elaborate 2D cockpit HUD (mirrors, radar, gauges, weapon icons). Biomes include desert, snow/ice, lava, and ocean.
The original 32-bit executable (DirectDraw + DirectSound, no Direct3D — the 3D is all software) no longer runs reliably on modern Windows (legacy DirectDraw + a 16-bit installer/DirectX setup path). Rather than only emulate it, this project extracts the original data into open formats and rebuilds the game in Godot as a quality-of-life remaster.
Legal: Havoc is 30-year-old abandonware. This repository contains only original reverse-engineering code and documentation. It does not redistribute the game's executables, DLLs, or data files (see
.gitignore). You must supply your own copy of the game data to run the tools.
Status
- Identified binaries:
HAVOC.EXE/LAUNCHER.EXE/SETUP.EXEare 32-bit PE (i386), DirectDraw + DirectSound, not 16-bit/DOS. - Cracked the
.FF("FlashFile") archive format — see docs/FORMATS.md. - Extracted
MUSIC.FF: 97 WAV segments + 17 playlist-sequenced songs (verified correct). - FL Studio pack: per-song MIDI + sample mapping (
tools/ff_extract.py --fl). - ogg/mp3 conversion (
--convert, needs ffmpeg). - Boot
HAVOC.EXEon Windows 11 (dgVoodoo2) — NOCD + copy-protection fix, see docs/PATCHES.md. - [~] Crack graphics formats:
GRAFIX*.DATdone (docs/FORMATS.md);LAND*.DAT,MAP*.MAP,STUF*.DATnext. - Decompile
HAVOC.EXE(Ghidra) to recover game logic. - Godot remaster project (widescreen, higher-res, rebindable input).
Tools
tools/ff_extract.py — extract any .FF archive.
python tools/ff_extract.py MUSIC.FF -o out_music --songs # raw entries + assembled songs
python tools/ff_extract.py MUSIC.FF -o out_music --songs --convert ogg
python tools/ff_extract.py MUSIC.FF -o Havoc_MUSIC_FLStudio --fl # FL Studio samples + MIDI
Layout
tools/ reverse-engineering & extraction scripts (tracked)
docs/ format documentation (tracked)
godot/ Godot remaster project (tracked, WIP)
<game files> original data — supplied by you, gitignored