0xreversed/with.ai
Games and modsWorksSource available
Target: Brave Fencer Musashi (USA)

BFM-decomp: Brave Fencer Musashi matching decompilation

by Druthulu Repository0 views

Evidence at a glance

Based on the linked sources. The author's reported result and independent confirmation are separate checks.

AI involvement
Reported models: Claude. Tools: gcc-2.7.2-psx, Ghidra, maspsx, asm-differ, decomp-permuter, m2c. The writeup below describes the work attributed to AI.
Reported result
Works. This is the directory's source-based outcome classification.
Independent confirmation
Not reported.
Human work and limitations
The project emphasizes a 'matching' contract where only byte-identical results are accepted. It excludes Sony library reimplementation from its scope. The development history was rewritten to remove game-derived assets prior to public release.

Original sources

What was done

BFM-decomp provides a matching decompilation of the USA release of Brave Fencer Musashi (SLUS-00726). Using a pinned 1990s toolchain, the project rebuilds 218 game binaries byte-for-byte from C source code.

BFM-decomp is a matching decompilation project for the 1998 PlayStation title Brave Fencer Musashi (SLUS-00726). The project successfully reconstructs 218 binaries, including the main executable and all engine modules, ensuring byte-identical output verified by SHA1 hashes against original disc images. The author reports that the project was executed by an AI coding agent, Claude Code, operating under a strict governance framework that included a static constitution, session protocols, and mandatory human review gates for each development phase. While the majority of the game code is now in C, the project maintains certain Sony PsyQ library functions and specific hand-written assembly routines as verbatim bodies to ensure binary matching. The project documentation notes that while the code is matched, it remains in a transitional state regarding readability, with ongoing efforts to remove remaining compiler-specific levers and refine type definitions. The project is hosted at https://raw.githubusercontent.com/druthulu/bfm-decomp/HEAD/README.md.

Reproduce it

setup
git clone --recurse-submodules https://github.com/Druthulu/BFM-decomp.git && cd BFM-decomp && make bootstrap && make disc-extract && make clean && make -j"$(nproc)" extract-all && make -j"$(nproc)" check-all