Mortal Kombat vs Street Fighter II
A browser fighting game where the SNES casts of Mortal Kombat and Street Fighter II meet. Every sprite, stage, song and voice is read from your own ROMs, with a fighting engine written from scratch.
// Bring your own ROMs: it reads Mortal Kombat and Street Fighter II (SNES) files locally in your browser.
Seven Mortal Kombat fighters against eight Street Fighters, in Arcade, two-player Versus and CPU-vs-CPU modes. Each fighter keeps their own game’s specials, and a match won by a Mortal Kombat fighter ends with Finish him!, which works on Street Fighters too.
You bring both SNES ROMs. Nothing from either game is in the repository. The files are read in the browser, cached in IndexedDB and never uploaded.

How it works
Both games were reverse-engineered with a small SNES emulator written for the project, by tracing which code and data each game uses to draw a fighter.
- Fighters are decoded. Street Fighter II’s frames are rebuilt by replaying the DMA uploads that stream tiles into each character’s 4 KB of VRAM. Mortal Kombat’s compressed tiles (four mask bytes, one data byte per set bit) are unpacked with a pointer table rebuilt the way the game builds it in WRAM.
- Stages are recorded. Backgrounds are scrolled per scanline with lots of parallax, so instead of decoding them a Web Worker boots each game, starts a fight on the stage, and sweeps the game’s own camera variable from end to end, recording every line at every position.
- Sound is emulated. The SPC700 and S-DSP run in the browser. Music comes from a snapshot of the sound CPU that keeps running in an AudioWorklet; effects and voices are recorded as events.
- Fatalities are recorded by having the worker win two rounds and enter the move, then splitting the sprites by palette into fighter, victim and effects.
The fight itself is a new engine shared by both casts, drawn by a software renderer at 256×224. Hit and hurt boxes are measured from the sprites: whatever part of an attack frame reaches past the fighter’s idle body is what hits.
Running it
Serve the folder with any static server and pick both ROMs:
python3 -m http.server 8000
The first launch spends about a minute recording stages, music and voices in the background. The fighters are ready straight away.