The rebuilt executable
uv run build compiles decomp/ and glue/ (reusing match's objects), the icon (BRCC32) and links them with TLINK32 1.50, Borland C++ 4.5's linker, into build/rebuild/zoombi32.exe with a map.
- Linked in the original's order (each source by its first marked function;
glue/where the code it stands in for was), with-Tpe -aa -c, the result has the original's six sections at the same addresses, the same export (__GetExceptDLLinfo) and the same icon resources, byte for byte. - Its imports differ only where its code does:
DebugBreakand theInterlockedfunctions replace the original's inline assembly, andGetVersionExAcame from Apple's QuickTime glue, whichglue/quicktime.cppstands in for. - It runs in the VM:
uv run vm run --exe build/rebuild/zoombi32.exe.--trace LOGmakes QEMU log the executable's code as it runs, anduv run trace LOGnames the functions from the map; after a crash, the last one is where it happened. - The game refuses to start while the global atom
Zoombiniexists, which a crash leaves behind: reboot the VM before running again.
A near-miss can be the bug: when the rebuild crashes, look at what differs in the functions it was in.