0xreversed/with.ai
Games and modsWorksSource available
Target: Metal Slug 5 (Neo Geo MVS)

Recompiled Metal Slug 5 (Neo Geo) into a native Windows port, with Claude Code

Metal Slug 5 (Neo Geo MVS): Arcade-exact Metal Slug 5 as native code, checked against MAME frame by frame.
Image: GitHub (AlmazProud/metal-slug-5-recomp)

What was done

AlmazProud rebuilds the Neo Geo run and gun from its 68000 program as C on a reimplemented arcade board, verified frame by frame against MAME. The release needs no game files; source builds do.

AlmazProud ports Metal Slug 5 (Neo Geo MVS, 2003) to native Windows by statically recompiling the 68000 program to C and reimplementing the hardware around it. It follows the author Metal Slug 3 and Metal Slug X ports and shares their runtime and frontend, and a CLAUDE.md file describes every phase of the project for Claude Code. Nothing from the game ships: the release executable runs a cycle-exact interpreter reading your own MAME dump, and building from source with your copy produces the recompiled program too.

How it was done

The 68000 program was mapped with a recursive disassembler and 1.4 billion traced instructions from MAME, then every instruction was translated to C with exact cycle counts and interrupt timing. The runtime reimplements the NEO-PVC banking chip, the LSPC video chip, the real-time clock, the Z80 sound CPU and the YM2610. The MAME set for this game is encrypted, so the loader decrypts it with a compact description of the NEO-PVC, CMC50 and PCM2 schemes learned from MAME as a black box with synthetic patterns, and no MAME code was read or copied.

Results

The v1.0.0 release passed a differential harness against MAME 0.289: attract mode with 10,007 frames, bot games, a hand-played 13.4 minute run, scripted missions and boss sections were compared frame image and RAM at every vertical blank, with only a few stack and timing-order differences listed and checked byte by byte. Save states, autosave, boss rush, run-ahead, slowdown removal and the hidden developer menu are included. Audio is close but not sample exact, and Mission 5 middle bosses are missing from Boss Rush.