MUGEN 1.1 unleashed, source code reconstruction.

Started by Romhack, October 23, 2026, 06:29:20 AM

Previous topic - Next topic

Romhack

mugen-unleashed: the M.U.G.E.N 1.1 engine, reconstructed in C

For as long as I can remember, someone in this community has asked "what if we had the MUGEN source code?" Elecbyte never released it, and the engine has been frozen at 1.1 Beta 1 since 2013. Today I'm releasing a full reconstruction of that engine in C:

https://github.com/zxmarcos/mugen-unleashed

What it is
The whole of mugen.exe (1.1 Beta 1, the 2013 build) has been rebuilt as readable source code: state controllers, triggers, the character, stage and screenpack loaders, rounds, the camera, the AI, the menus, music, all of it. It compiles into a new mugen.exe that you drop into your MUGEN 1.1 folder and run.

It behaves like the original
This is not a new engine "inspired by" MUGEN. The goal was to reproduce the original exactly, bugs and quirks included, and it was tested extensively against the original exe to make sure of that. Your characters, stages and screenpacks should behave exactly as they do today.

What it is not
  • It is not Elecbyte's original source. It was rebuilt from the program itself, with names and comments written along the way.
  • It does not include any game files. You need your own MUGEN 1.1 Beta 1, since the new exe uses its data and libraries.
  • It does not fix anything yet. This first release is a faithful starting point on purpose.

Getting it
A ready-to-use exe is attached to the v1.1b1 release on GitHub. If you prefer to build it yourself, the README explains how.

Why this matters
With a faithful starting point in hand, a lot becomes possible:
  • Fixing the engine's long-standing bugs.
  • Lifting old limits.
  • Bringing it to other platforms.
  • Finally answering "how does MUGEN really handle X?" by reading the code instead of guessing.
If you have ever been puzzled by an obscure trigger, a HitDef parameter or a camera behaviour, the answer is now there to read.

Legal
M.U.G.E.N belongs to Elecbyte. This project is for preservation and study, is not affiliated with Elecbyte, and ships none of their files.

Feedback, bug reports (anything that behaves differently from the original exe counts as a bug) and contributions are very welcome. Thanks to Elecbyte for the engine, and to this community for keeping it alive all these years.

PotS

I was just saying earlier that this would happen for sure, haha.

Maybe you'll want to change the executable's name and the versioning.
You can help with Ikemen GO's development by trying out the latest development build and reporting any bugs on GitHub.
My Mugen and Ikemen content can also be found here.

O Ilusionista


beterhans

#3
oh if ikemen-go could grow based on this will avoid a lot of compatbitlity issue. i guess. bug it's a bit too late.

videoman

#4
It begins! With AI so advanced right now, it's only a matter of time

KorosKoros

Chars? Stages? Screenpacks? You want it? It's yours my friend! As long as you have enough Rupees!

Romhack

With this source code, it's pretty easy to add new features, although I think it's mostly useful for porting MUGEN to other platforms and preserving it for historical purposes, since Ikemen is much more advanced. That said, I've already got Ikemen's 3D stage support working in this codebase. It was relatively easy to port over using AI.

What I think would be really cool about this engine, though, is having a proper MUGEN editor/debugger, since you can run things and edit them in real time, like in this debugger I made as a proof of concept:


Gacel

Quote from: beterhans on <strong>Yesterday</strong> at 03:26:22 PMoh if ikemen-go could grow based on this will avoid a lot of compatbitlity issue. i guess. bug it's a bit too late.
Codebase structure and programing language is too diferent for that sadly.
GO and C memory management for a start. Also render engines.

Granted, some of the feataures like 3D could be backported, like Romhack is shown.
Also is more portable than GO code. This is huge for homebrew.
Also for debugging behaviours if Ikemen GO has any compatiblity diference compared to Mugen.

Elecbyte CNS parser is cursed foundation tho.
That thing probably needs a rewrite considering horror stories of the cheapie community.
A very well know bug in Mugen CNS is:
[state ]
type=null
trigger1=0&&Var(0):=Var(0)+1
trigger3=1|| Var(0):=Var(0)+1
trigger3=0&&Var(0):=Var(0)+1
trigger2=0&&Var(0):=Var(0)+1
[state ]
type=null
trigger1=1
If you write this, the bug causes Var(0) to only increase by 3,
But wait!! We haven't made the Suave Dude character yet!!

PhantomD

#8
Bro this is Amazing. Somebody buy this man a bottle of champagne!

This totally opens up the possibility of a Native x64bit build by rebuilding the old 32bit binaries.
No more needing to rely on work-arounds and the old faithful NTCore 4GB Patcher for address space ceiling issues etc.

Time to start labbing! Really curious to see where this leads.

One small thing: Tried to relanch a mugenhook test build and this happened.


May be irrelevant though as now the features it offered can literally be implemented.
Just a matter of time now I guess.

djlain

This M.U.G.E.N decompilation project is absolutely amazing, thank you so much for your hard work! I was wondering if you might be interested in adding full support for 1.0 and WinMUGEN syntax and version-specific quirks down the line (or even DOS 0414 and 0101, though I imagine that would be extremely difficult)? As you know, every M.U.G.E.N update broke countless characters. People have to keep all kinds of patches and conversions, yet it's impossible to get the exact same behavior as the older engines, and some just don't work at all anymore. While adding new features is certainly exciting, an 'ultimate form' with flawless backward compatibility across M.U.G.E.N's history is a dream for many of us.