LockerGnomeFor serious tech professionals with a silly side.
Subscribe

Softwareaiagentsreverse-engineeringretroopen-source

REA Let Codex Rebuild 1996's DX-Ball From the .exe, and All 270 Functions Compile Back Byte for Byte

REA is a free MCP server that hands a coding agent Ghidra, Hopper or IDA. One user pointed Codex and REA at DX-Ball 1.07 and got readable C that recompiles to the original game's exact bytes.

Pixel-art Chris Pirillo peering through a magnifying glass at a floppy disk while a beige CRT beside him shows a brick-breaker game.
Illustration: LockerGnome

Somebody fed a 30-year-old brick-breaker to a coding agent and asked for the source code back. They got it.

The DX-Ball reconstruction is the work of GitHub user Ysopwnable (@r00tth3w0r1d). “Codex uses REA to inspect the program through Ghidra, recover its functions, and compare code compiled with Visual C++ 4.0 against the original,” the repo says. As of October 22, “all 270 authored functions and 84,968 authored code bytes are exact.” The rebuilt game runs under Wine, and a 15-minute session reached the third board without a crash.

The trick is the compiler. The project rebuilds each function, compiles it with the same Visual C++ 4.0 that shipped in 1996, and compares the output to the original executable. Any byte that doesn’t match is a clue about a wrong type, a missed write or a loop in the wrong order.

The sound code shows how small the clues get. REA’s DX-Ball case study starts from one prompt: “Use REA to find how DX-Ball calculates sound panning. Explain the calculation and show the code.” The decompiler’s first guess, longlong FUN_00406400(void), said the function took no input at all. The raw instructions showed it did: a brick’s horizontal position, multiplied by 1.5625, minus 500, times a stored pan scale. A brick at the left edge of the 640-pixel screen plays from the left speaker, one at the right edge from the right. REA’s README says the rebuilt function “passes 3,205 original-x86 cases,” every position from 0 to 640 at five pan scales, run against the original code.

DX-Ball was created by Michael P. Welch, with 3D graphics by Seumas McNally, and the reconstruction credits both. What’s still open is the full 50-board campaign, every power-up in live play, and the MIDI music, none of it verified yet.

Byte-matching decompilation used to be a years-long hobby for a handful of people per game. An agent that grinds through compile, compare and fix all night changes that math, and the easy prediction is a wave of old shareware and DOS games coming back as readable source. The harder question is what happens when the same loop gets pointed at software that’s still for sale.

More Software

Every Software story →