Tool
m2c
Decompiler for matching projects that turns GNU as-format 32-bit MIPS, ARM, PowerPC and SuperH assembly into draft C, with partial C++ support. A target combines platform, compiler (IDO, GCC or MetroWerks CodeWarrior) and language; context files supply types, and it can infer unknown struct fields and emit global initializers. The README places it alongside splat, asm-differ and decomp-permuter, and decomp.me calls it for initial decompilations.
- Targets
- Binary · Game
- Category
- Game analysis tools
- Relationship
- Foundation tool
- Sources reviewed
Requirements & limits
- Python 3.8+ with graphviz. Run m2c.py from a checkout or install it from the Git repository as a Python package; the package named m2c on PyPI is an unrelated project. There are no releases or tags.
- Input must match the GNU as assembly format, such as spimdisasm output. The README lists the mips, mipsel, mipsee (eabi64), ppc, arm, gba (APCS) and sh2 platforms, the ido, gcc and mwcc compilers, and the c and c++ languages. Struct-field inference skips structs with bitfields or unnamed union fields, and initializers cannot be generated for bitfield structs or symbols of unknown type.
- GPL-3.0-only. The README warns that output is sometimes suboptimal, especially for loops; it is a starting point to refine and check with a compiler and diff tool, not byte-identical source.
About this entry
The description was reviewed against primary sources.
Primary sources
- README.md GitHub · matt-kempster/m2c · Revision 708d2d2
- README.md#L26-L49 GitHub · matt-kempster/m2c · Revision 708d2d2
- README.md#L387-L404 GitHub · matt-kempster/m2c · Revision 708d2d2
- pyproject.toml GitHub · matt-kempster/m2c · Revision 708d2d2
- LICENSE GitHub · matt-kempster/m2c · Revision 708d2d2
- cromper/cromper/wrappers/m2c_wrapper.py GitHub · decompme/decomp.me · Revision f585075
More in Games
- decomp-toolkit · Tool
- Cheat Engine MCP Bridge · Integration
- ido-static-recomp · Tool
- PS2Recomp · Tool
- Xenosaga I Decomp Compatibility Kit · Tool
- GB Recompiled · Tool