havoc-remaster/.gitignore
pyr0ball 27174a1c79 feat: NOCD patch boots Havoc on modern Windows (defeats CD copy protection)
Diagnosed and fixed the crash that killed HAVOC_NOCD.EXE ~1s after launch
(dgVoodoo window appears black, then the process exits). It was not a clean
exit: an ACCESS_VIOLATION (null-pointer read at VA 0x444E6A) during init.

Root cause is a copy-protection check in the WORLDS\ data-file loader
(0x42a480). It opens each file (GRAFIX/LAND/MAP/STUF) from both a local
"WORLDS\<name>" path and a CD-drive path (HAVOC.INI [SETUP] DRIVE=D:\), and
returns a valid stream only when the local open fails and the CD-drive open
succeeds. With files present locally and no D: drive it returned NULL, and the
GRAFIX loader (0x444db0) dereferenced that NULL without checking.

Fix: 14-byte patch at FO 0x29a2b rewrites the return decision to hand back the
successfully-opened local object. The game now boots to the title screen
("HAVOC(tm) by Reality Bytes"), responsive, main loop running.

- docs/PATCHES.md: full patch table (28 patches) + crash write-up
- tools/: RE + patching scripts (r2pipe disasm, minidump parser, ctypes
  debugger, PE/IAT/import analysis)
- run_probe.bat / run_and_log.bat: reliable native launch for repro
- .gitignore: exclude CD images, Ghidra install/project, dgVoodoo, *.ini

Diagnosed via WER minidumps (%LOCALAPPDATA%\CrashDumps) parsed in pure Python
(no cdb/windbg available).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TN4Ytn3gdWRonNmHpisWQv
2026-07-03 09:29:59 -07:00

67 lines
991 B
Text

# --- Original game data (copyright Reality Bytes, Inc. 1995) — DO NOT COMMIT ---
*.EXE
*.exe
*.DLL
*.dll
*.VXD
*.FF
*.DAT
*.MAP
*.ICO
*.INF
*.INI
*.ini
.windows-serial
BIGFILE.DAT
WORLDS/
DIRECTX/
LICENSE.TXT
# --- CD images (copyright) ---
*.cue
*.bin
tmp_cd/
# --- Third-party (dgVoodoo2 DirectDraw wrapper) - not ours to redistribute ---
dgVoodoo.conf
dgVoodooCpl.exe
ddraw.dll
DSETUP*.DLL
# --- Ghidra: install is third-party; project + decompile output embed the binary ---
ghidra/
tools/ghidra_*/
tools/ghidra_decompile.txt
# --- Derived audio / extracted assets (also copyrighted) ---
tools/out_*/
tools/Havoc_*/
*.wav
*.ogg
*.mp3
*.mid
*.zip
# --- Python / tooling cruft ---
__pycache__/
*.pyc
.venv/
venv/
# --- Godot ---
.godot/
*.import
export_presets.cfg
# --- Reference material (third-party copyrighted screenshots) — local only ---
tools/refs/
# --- Claude Code local session/settings ---
.claude/
# --- Editor / OS ---
.vscode/
.idea/
*.swp
.DS_Store
Thumbs.db