mstan/MegaManXSNESRecomp
حول
Mega Man X recompiled for the Super Nintendo using snesrecomp · Part of the R.A.I.D. community
الألعاب والمحاكاةما يمكنك فعله
- ☑ - Password saves (SRAM) - Remembers the last generated password and prefills it on the next launch. Enabled by default.
- ☑ - Adaptive widescreen - Expanded gameplay with adaptive, 16:9, 21:9, and 32:9 views.
- ☑ - Playable Zero - X3 Zero with his buster/saber combo and grounded character switching. Separate health for X and Zero.
- ☑ - Modern Zero - Direct saber attacks, double jump, air dash, and movement during airborne swings.
النمو المقاس للنجوم
- خلال 24 ساعة
- -١
- خلال 7 أيام
- +١
- خلال 15 يومًا
- +١٢
- خلال شهر
- جارٍ جمع السجل
تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.
README.md
الأصلMega Man X Recompiled
Windows frame composition
The pinned shared framework uses cached HLE frame composition by default on
Windows x64. Guest CPU, mapper, audio and status behavior keep their existing
interfaces; this is a host presentation optimization. For the maintained
correctness-reference compositor, configure a separate Release build with
cmake -S . -B build-frame-lle -DCMAKE_BUILD_TYPE=Release -DSNESRECOMP_FRAME_IMPL=LLE,
then cmake --build build-frame-lle. Selection is fixed at build time.
LLE can reduce performance; it remains available for correctness checks. Other
platforms keep LLE defaults, and existing CMake cache selections are preserved.
See HLE defaults and opt-out.
The reviewed native-view, uncapped Windows route measured 340.936 to 889.911 FPS (+161.02%, process CPU -67.17%); it includes boot/menu work and active gameplay. The owner accepted the normal-paced adaptive HLE build. These figures describe that measured build/route, not a new measurement of subsequent upstream title changes or other platforms. Foreign compiler activity limits precision. Normal play retains normal pacing/audio. See the shared framework's frame model for the host/guest boundary.
Play Mega Man X on PC with playable Zero, couch co-op and online netplay, all sixteen X2/X3 boss weapons, and adaptive widescreen. Choose Zero's original X3 combat, the optional Modern style with direct saber attacks, a second jump, and an air dash, or Saber Zero by RaphaelAzev.
Download | Getting started | Netplay setup
Android
A native Android APK is available alongside the desktop release, with the classic X campaign, optional Boss Rush, touch controls and Fit to screen by default. Import your own unmodified Mega Man X (USA) (Rev 1) ROM. See Android downloads and setup for platform scope and build details. The desktop release continues to provide the full mod catalog and online play.
Saber Zero
Saber Zero is contributed by RaphaelAzev, from the MegaManXSNESRecompSaberZero fork. It gives Zero a Y-button Z-Saber: a 3-hit ground combo, air, wall and dash slashes, the X3 finisher with its Saber wave, hit-priority follow-ups, and Ride Armor pilot art. The X button keeps Zero's buster and special weapons.
To play it, choose Zero behavior → Saber Zero in either Characters → Add Zero (single player, Select switches X/Zero) or Characters → Co-op (whichever player is Zero). Saber Zero uses your Mega Man X3 USA ROM. The optional Characters → Saber Zero settings entry tunes its damage, hit priorities, finisher window and swing volume, and can outline hitboxes. Without it, Saber Zero uses RaphaelAzev's defaults.
The Saber sprites and sound effects come from the
Zashiko Mod. They are included with permission
under PolyForm Noncommercial with the additional permissions in PERMISSIONS.md. Controls, timings, the priority ladder and every
option are in the Saber Zero reference.
Click the thumbnail to watch the gameplay showcase on YouTube.
X / Zero co-op Fight through X1 together, locally or over netplay. |
Modern Zero Direct saber attacks with movement during airborne swings. |
X2 / X3 weapon pages Sixteen imported boss weapons and their charged attacks. |
Imported weapons in action X3's Triad Thunder on X1's Highway. |
Gameplay screenshots from the project preview, plus a Modern Zero capture from the current playtest.
Features
Checked boxes indicate available features. Configure optional mods in the launcher's Mods screen; these character and weapon mods target the USA Rev 1 build.
| Available | Feature | What it adds |
|---|---|---|
| ☑ | Password saves (SRAM) | Remembers the last generated password and prefills it on the next launch. Enabled by default. |
| ☑ | Adaptive widescreen | Expanded gameplay with adaptive, 16:9, 21:9, and 32:9 views. |
| ☑ | Playable Zero | X3 Zero with his buster/saber combo and grounded character switching. Separate health for X and Zero. |
| ☑ | Modern Zero | Direct saber attacks, double jump, air dash, and movement during airborne swings. |
| ☑ | Co-op mode | X and Zero with independent health, weapons, and weapon energy. Optional local side-by-side screens, at 5:4 per player or widescreen per pane. |
| ☑ | Boss Rush | Endless fights against two different Mavericks, solo or co-op, from the game's title menu. |
| ☑ | X2 weapons | All eight boss weapons and their charged attacks, adapted for X and Zero. |
| ☑ | X3 weapons | All eight boss weapons and their charged attacks, adapted for X and Zero. |
| ☑ | Damage multipliers | Separate mods for X's damage dealt and player damage received, from 0.1x to 10x. |
| ☑ | X2 / X3 Armor (experimental) | Donor X graphics and abilities, unlocked through X1's armor capsules. X3 Gold Armor is awarded by the Hadouken capsule. |
| ☑ | Netplay | Two-player online co-op with lobbies and rollback, plus optional fixed widescreen. |
See the co-op validation notes for current limits.
Quick start (pre-built release)
- Download the latest Windows ZIP or Linux AppImage. Extract the ZIP on Windows, or make the AppImage executable on Linux.
- Open the launcher and select your own Mega Man X (USA) (Rev 1) ROM
(
.sfcor.smc). Headered and unheadered ROMs are supported. - Configure your keyboard or controller in Controls.
- Enable the features you want in Mods, then select Play.
For X3 Behavior, Modern, or Saber Zero, select your own Mega Man X3 USA ROM in Mods. The X3 weapon mod shares that selection. X2 weapons need your Mega Man X2 USA ROM. Assets are extracted automatically on your machine.
For X2 / X3 Armor (experimental), enable it in Mods, choose the donor game in the Armor dropdown, and supply that game's USA ROM. X starts with the donor game's basic appearance and ground dash. X1's capsules unlock the matching donor parts; X3's four regular parts remain standard armor, and the Hadouken capsule also grants Gold Armor and its enhancements. The mod is off by default and has passed preliminary playtests.
Select Modern under Zero behavior in either Zero mod for saber combat and extra aerial movement. X3 Behavior is the default. Add Zero and X / Zero Co-op are alternatives; enabling one disables the other.
X1 Zero
Choose X1 Zero (Project Zero) under Zero behavior in Add Zero or Co-op. Builds with the bundled character assets use only your Mega Man X USA Rev 1 ROM for this style. Zero uses the Project Zero sprite set, higher ground jump, and raised buster muzzle in the original Mega Man X campaign.
X1 Zero on Central Highway |
X1 Zero in the weapons menu |
The Zero artwork shown here comes from CF, Falchion22, and Programer Peru. Character art credits also go to cerberus-rack, brongaa12, Kensuyjin33, and fallensoldier420. Mega Man X: Project Zero
All Zero styles can break blocks with their head and feet from the start, including in co-op. X still needs his corresponding armor upgrades.
For widescreen, enable Widescreen in Mods and choose your view aspect. Display Aspect in Settings controls pixel proportions. Netplay uses the original view or fixed 16:9, 21:9, or 32:9.
Setup guides: Zero, X2/X3 weapons, password saves, and netplay. Use your own game ROMs to play.
For Storm Eagle's speedrun trick and local practice saves, see the Magic Carpet guide.
In Mods > Gameplay, enable X damage dealt or Player damage received and choose its Damage multiplier. The two mods are independent: 0.5x halves damage, 1x keeps normal damage, and 2x doubles it. Choices range from 0.1x to 10x; both mods start disabled with 1x selected. X's multiplier includes native and imported weapons and leaves Zero's attacks unchanged. Received damage applies to both characters after armor reduction. Fractional damage carries between hits, separately for each enemy and player: at 0.1x, five 2-HP hits cost 1 HP in total. Individual hits can cause no HP loss while retaining their normal hurt reaction. Damage caps safely at 127 HP. Immunities and instant-death hazards keep their native behavior. Save states and rewind preserve fractions.
Which ROM?
The game needs the v1.1 (Rev 1) cartridge dump. The original v1.0 release has different code and is refused. Checksums are for the ROM without a 512-byte copier header; the launcher removes the header before checking.
| Use for | No-Intro name | SHA-256 | SHA-1 | CRC32 |
|---|---|---|---|---|
| Game | Mega Man X (USA) (Rev 1) | b8f70a6e7fb93819f79693578887e2c11e196bdf1ac6ddc7cb924b1ad0be2d32 |
c65216760ba99178100a10d98457cf11496c2097 |
DED53C64 |
| Zero, co-op, X3 weapons/armor | Mega Man X3 (USA) | 65b03268afac296330e8ff8d60dd0825879e13ed658b37713c034a3bd074f1d7 |
b226f7ec59283b05c1e276e2f433893f45027cac |
FA0FE671 |
| X2 weapons/armor | Mega Man X2 (USA) | f3246755f608a1e1dc9c848b61da3b824c7853b29b3be40df6fc7f2793a887ed |
637079014421563283cded6aeaa0604597b2e33c |
947B0355 |
If the launcher refuses a ROM, it says which dump you picked and what it needs. For example: "This is Mega Man X (USA) v1.0. Mega Man X needs Mega Man X (USA) v1.1 (Rev 1) (SHA-256 b8f70a6e…)". It recognizes v1.0, the European and Japanese releases, the Legacy Collection and Mega Man X Collection extracts, and X2/X3 picked in the wrong place. An unknown file is described by its internal header, which also shows whether the ROM has been patched. ZIP and 7z archives are reported too, so extract the ROM first. Copy details copies your file's checksums for a bug report.
Do not pick a ROM patched for MSU-1, a translation or a hack. MSU-1 music, Zero and co-op are added through Mods.
Controls and co-op
Use the launcher's Controls screen to assign devices and remap buttons for each player. Xbox, PlayStation, and Switch Pro controllers are supported. For couch co-op, assign a controller or keyboard to each player. For netplay, configure your local Player 1 controls; the lobby assigns your game seat.
P2 joins automatically at a safe stage entrance in co-op. Hold P2 Select for 1.5 seconds to withdraw, and tap it to rejoin. A player who dies can tap Select to respawn beside the partner for one of the team's lives. Respawns are not available during boss or miniboss fights; the request waits until the fight is over, or until a 1-up is collected if no lives are left.
For younger or new players, turn on the Player 2 Learner Mode mod (it turns co-op on with it). Player 2 then cannot lose health or die: pits, spikes and falling behind off-screen beam them back beside Player 1, and Player 1 never waits for them. The camera follows Player 1 only, and Player 2 cannot pause, open doors, board Ride Armor or take over the stage. Player 1's death restarts the team as in single player. Player 2's health bar is hidden; Show Player 2 health bar brings it back.
Reopen the launcher during play with Ctrl+L or controller Select+L3.
Configure system shortcuts in Hotkeys. F7 opens the save-state browser
and F8 opens rewind; both pause gameplay while you choose.
With desktop OpenGL output, PrintScreen saves a BMP in screenshots/.
Rebind or clear Screenshot in Hotkeys. Saving a slot also refreshes its
matching preview in the save-state browser, including saves made by hotkey.
Reporting problems
Open an issue with your build, enabled mods, and steps to reproduce the problem. For gameplay bugs, include a nearby save state and describe the inputs that trigger it.
Windows diagnostics are saved beside the executable in
logs/mmx-<date>-<time>-<process-id>.log; read-only installations use
%TEMP%/MegaManXSNESRecomp/logs. Attach that log and last_run_report.json.
If a crash produced crash_report_*.json or crash_minidump_*.dmp, include
those too. Grab the reports before running the game again.
On Linux, check logs/ beside the AppImage or compiled executable. If that
directory is read-only, the startup log falls back to
$XDG_STATE_HOME/MegaManXSNESRecomp/logs (normally
~/.local/state/MegaManXSNESRecomp/logs), then /tmp/MegaManXSNESRecomp.
Set MMX_REPLAY_DIR to an existing writable folder to choose where replay
segments and their sidecars are recorded.
Netplay disconnect details and long application stalls are logged automatically in the session log. They distinguish a received peer goodbye from a timeout, report the age of the last peer packet, and identify long gaps in network processing or slow replay recording. Collect the session logs from both players when a match disconnects.
Gameplay Diagnostics (Mods > Diagnostics) is enabled by default and
your saved choice is remembered, including across updates. It records both
players' inputs, machine checkpoints, display settings and per-frame state checks
to logs/mmx-replay-* beside the game, and during netplay also writes
saves/netplay/net_diag.jsonl (the transport, whether ICE connected directly,
through STUN or through TURN, and any stalls; replaced by the next match). When a
problem occurs, stop playing, quit normally, and zip the session's
logs/mmx-replay-* files together, including all .replay, .replay.sav,
.config.ini, .mods.toml and .mods.txt files. A .replay alone is
insufficient. During netplay, collect the files from both players if possible.
Describe what happened and roughly when. Keep your source ROMs out of the attachment.
History keeps up to one hour (360 segments of up to 600 executions), with a
256 MiB budget for machine checkpoints plus the small input/settings
sidecars. Rollback or frequent state loads can shorten this window. Run-ahead
suspends capture; turn it off while collecting a report. Untick Gameplay
Diagnostics to stop recording; MMX_REPLAY_RECORD=0 (off) or =1 (on) overrides
the saved choice for one launch. Writes and state hashing run on a background
worker with a fixed 16 MiB queue: if storage falls behind or fails, recording
stops with one log message and gameplay never waits. An abrupt process kill can
lose the unflushed tail (flushes run every 100 ms).
Developers reproduce a capture with the same release and platform and owned
source ROMs, using the shared snesrecomp helper (replay_diagnostic.py in the
release, snesrecomp/tools/replay_diagnostic.py in a checkout):
python replay_diagnostic.py capture.replay --exe path/to/MegaManXSNESRecomp --rom path/to/mmx.sfc --shared-resource megaman-x.source.x3=path/to/mmx3.sfc --headless
The helper rebuilds the recorded settings and active mod set in a new directory,
replays offline, and stops at the first WRAM, co-op, camera-state or VRAM
mismatch with a nonzero exit status and replay-divergence.sav. A recording made
by a different release, engine, platform, ROM or gameplay mod set is refused up
front. Use --until N to stop after N executions, or omit --headless to watch;
--check validates records and checkpoint digests without starting the game. A
final input without a completed checkpoint identifies an interrupted frame:
playback executes it so the original hang/crash can recur under a debugger, and
reports the replay as incomplete, never as a success. Recordings preserve actual
rollback executions and restored checkpoints. The recorder is snesrecomp's shared
Gameplay Diagnostics session (runner/src/diagnostics/replay_session.c), the
same one Super Metroid uses; it follows X4's
Playtest Diagnostics.
The ROM-backed acceptance suite is tests/test_diagnostic_replay.py; build
with -DMMX_STATE_TESTS=ON and supply --state-tests, --game, --rom,
--assets (your extracted X3 Zero cache), and a new --work-dir. An optional
--fixture pointing to an upgraded gameplay checkpoint also checks P2 X armor
arrival, native checkpoint restart, and original-ROM sprite transfers during
movement and dash.
Supply --x3-rom to also exercise desktop Saber Zero playback when the saved
offline preferences differ from the active mod selection.
To see collision boxes, tick Hitbox overlay under Mods > Developer. It outlines each object's native hitbox: enemies red, players green (both players in co-op), player shots yellow, Zero and Saber attacks cyan, enemy projectiles magenta. It only draws, works with or without widescreen, and does not change the game. Items and pickups are not outlined.
Building from source and technical details
Building from source
Clone recursively and use the pinned engine's shared build command. Supply your original ROM; generated C and declarations stay in the build directory. Windows builds use MinGW GCC/G++, CMake and Ninja. Use one shared cache for your SNES titles.
python snesrecomp/tools/build_game.py --title . --rom "/path/to/original.sfc" \
--build-dir /path/to/build/game --cache /path/to/cache/snesrecomp
The default quick profile is for local development. The engine's
tools/package_game.py builds the optimized release profile, stages the
declared runtime payload and checks the archive. It requires committed source
and initialized, clean dependencies. See the
engine build guide.
Rockman X uses the same commands with --metadata variants/jp/title.json, its original Japanese ROM and a separate build directory.
What "static recompilation" means here
Known 65816 CPU blocks are translated to C in the build tree. The engine's default build selects HLE; a linked interpreter handles untranslated work, with native and interpreted execution reported at exit. LLE is a separate named build. Video, audio, cartridge and other hardware services come from the shared engine; this title supplies its renderer and game hook bodies.
The ROM is never redistributed — you supply your own legally-dumped copy.
Repo layout
| Path | Purpose |
|---|---|
src/ |
Runtime C (CPU state glue, NMI orchestration, hand-written bodies for things the framework doesn't recompile). |
build/generated/ |
Recompiler output generated from the original ROM, outside Git. |
recomp/bank*.cfg |
Per-bank function declarations + hardware hints the framework cannot derive from the ROM alone. |
build/generated/funcs.h |
Generated declarations; never committed or hand-edited. |
snesrecomp/ |
Pinned submodule containing the snesrecomp framework. |
recomp-ui/ |
Pinned submodule containing the shared, console-agnostic launcher UI. |
third_party/ |
Remaining game dependencies and their licenses. |
CMakeLists.txt |
Shared framework build helpers and USA/JP targets. |
config.ini |
The config. Generated next to the exe on first run if missing. |
Disassembly annotations
bogaa/dizProjects is pinned at
third_party/dizProjects. Its X1 project supplies named gameplay routines,
sprite/data tables and player RAM fields. The tracked symbol metadata
names discovered code and adds searchable annotations during regeneration.
Reviewed project names keep precedence. Search with
python snesrecomp/tools/diz_annotations.py --project-root . --query charge.
License
For this project's code covered by the PolyForm Noncommercial License, PERMISSIONS.md grants standing permission for voluntary donations, sponsorships, and advertising revenue, including support for broader development initiatives. Payment must not buy access to the software, games built with it, or their updates, features, or game content, including early access.
Matthew Stanley has authority from the relevant copyright holders to grant these permissions for the project's PolyForm-covered code. Third-party components and code explicitly licensed under other terms retain those terms.
PolyForm Noncommercial 1.0.0. See LICENSE. Code in this repo is
original; vendored dependencies under third_party/ retain their own
licenses.
The Mega Man X ROM and any data extracted from it are not in this repo and are not licensed for redistribution.
R.A.I.D. — Retro AI Development · a Discord for AI-assisted retro reverse-engineering, decomp & recomp
استكشف مشاريع مشابهة ومرتبطة
جارٍ التحميل…
