# 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](snesrecomp/docs/HLE_DEFAULTS.md).
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](snesrecomp/docs/FRAME_MODEL_HOSTS.md) 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](#saber-zero) by RaphaelAzev.
[Download](https://github.com/mstan/MegaManXSNESRecomp/releases/latest) |
[Getting started](#quick-start-pre-built-release) | [Netplay setup](docs/netplay.md)
## Saber Zero
**Saber Zero** is contributed by [RaphaelAzev](https://github.com/RaphaelAzev),
from the [MegaManXSNESRecompSaberZero](https://github.com/RaphaelAzev/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). Both use your Mega Man X3 USA ROM, like the other
Zero modes. 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](assets/saber-zero/CREDITS.md). 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](docs/saber-zero.md).
*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](https://1379.tech/megaman-x-recompiled-coop-zero-weapons-wip/),
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](docs/local-independent-views.md), at 5:4 per player or widescreen per pane. |
| ☑ | **[Boss Rush](docs/boss-rush.md)** | 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. |
| ☑ | **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](docs/coop-port.md) for current limits.
## Quick start (pre-built release)
1. Download the latest [Windows ZIP or Linux AppImage](https://github.com/mstan/MegaManXSNESRecomp/releases/latest).
Extract the ZIP on Windows, or make the AppImage executable on Linux.
2. Open the launcher and select your own **Mega Man X (USA) (Rev 1)** ROM
(`.sfc` or `.smc`). Headered and unheadered ROMs are supported.
3. Configure your keyboard or controller in **Controls**.
4. Enable the features you want in **Mods**, then select **Play**.
For Zero or co-op, 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.
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](docs/zero-0.0.1.md), [X2/X3 weapons](docs/x-weapons-port.md),
[password saves](docs/password-saves.md), and [netplay](docs/netplay.md).
No ROMs or extracted assets are included in the downloads.
For Storm Eagle's speedrun trick and local practice saves, see the
[Magic Carpet guide](docs/magic-carpet.md).
### 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.
## Reporting problems
[Open an issue](https://github.com/mstan/MegaManXSNESRecomp/issues) 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--