📈 GH Trending Explorer 🎲 Surprise me

← all repos

nautilusbits / retrokit

git clone https://github.com/nautilusbits/retrokit.git v0.2.0 · 8d ago

Headless-Ghidra toolkit for reverse engineering 32-bit DOS and Win32 games (1993-2010): own LE/LX loader, Watcom calling conventions, library signatures, MCP server

+0
stars, 24h · #35,779
+~0
stars, 7 days · #36,167
+32
stars, 30 days · #14,090
36
★ total
2
forks · 1 open issues

Star history (as recorded here)

2026-10-20 · 32 ★ 2026-10-22 · 36 ★
LanguagePython
LicenseApache-2.0
Created2026-10-13 (8d ago)
Last push7d ago
Watchers2
OwnerUser

GitHub topics

Links

README excerpt
# retro-kit – reverse engineering old games (headless Ghidra)
A toolkit for decompiling 32-bit games from roughly 1993–2010 with headless Ghidra:
- **DOS LE/LX** (DOS/4GW, DOS/32A, PMODE/W, CauseWay, DOS/4G bind; also OS/2 LX and VxD)
 built with Watcom C/C++ – with its own LE/LX loader for Ghidra and Watcom compiler specs for
 both calling conventions.
- **Win32 PE** (typically MSVC): DirectX calls through COM vtables shown with their method
 names, Miles/Smacker/Bink/FMOD/BASS imports typed, C++ classes from MSVC RTTI, the
 compiler version from the Rich header.
The output is a workspace with one large `.c` file holding every function plus indexes
(functions, call graph, strings, fixups/pointer tables, imports) that you can grep and split up
between people or AI agents. Names found during the analysis go back into Ghidra and the export
is regenerated.
## Install
Prerequisites: Ghidra 12.x
(unpacked), a JDK 21+ (`JAVA_HOME`), Python 3.10+.
 [code] 
Ghidra is found via `--ghidra DIR`, `$GHIDRA_INSTALL_DIR`, or a `ghidra`/`ghidra_*` directory next
to the game or the kit. `install-loader` compiles the loader with `javac` against that Ghidra
(no Gradle), installs it into `Ghidra/Extensions` and registers the Watcom compiler specs; run it
again after updating Ghidra (`doctor` tells you when).
## Use
 [code] 
`analyze` detects the format, the loader and – for Watcom – the calling convention
(`--cspec watcom|watcomreg` overrides it) and stores them in `GAME_analysis/retrokit.json`;
later commands only need the workspace. A workspace:
 [code] 
**AI agents**: `retrokit mcp GAME_analysis` is an MCP server (stdio, no extra packages) over
the workspace: functions, decompiled code, call graph, cross references, strings, pointer
tables, disassembly and bytes, libraries; it records name proposals and notes and can
re-export with the names applied (on request, in the background). Claude Code:
 [code] 
Setup for other clients, every tool and how an agent should work: docs/MCP.md;
a short version for agents in AGENTS.md.
Names: write proposals to `notes/names_ .csv` (`addr,name,confidence,comment`, confidence
`V` verified or `G` guess); `retrokit names WS` renames functions/labels (V wins over G,
collisions get `_ `) and re-exports.
What the pipeline does:
- **Libraries** (both formats): `retrokit libs` (also part of `info` and `analyze` ->
 `notes/libraries.md`) recognises ~20 libraries of the period - Miles/AIL, HMI SOS, DIGPAK,
 Smacker, Bink, FMOD, BASS, DirectX, zlib, libjpeg, libpng, PKWARE DCL, Lua, ... - from
 strings, imports and data files, with version, notes on their formats and port hints.
 Library code is found by signature (shipped: Watcom C/C++ run-time, math and C++ libraries
 from Open Watcom, zlib 1.0.4-1.2.3, libjpeg 6b; `retrokit sigs build` makes them from
 libraries you own, `sigs learn` from functions you identified) - exact matches first, then
 similar code from other compiler versions - named, and typed from `retrokit/knowledge/*.h`.
- *