A Windows tool that corrupts Mesen's native emulator code in memory, changing emulated hardware rules instead of editing the ROM.
Created by Random Týpek. Unofficial and unaffiliated with Mesen, Mesen Community Edition, or Real Time Corruptor.
- 84 presets affecting sound synthesis, envelopes, DMC decoding, graphics, and controller reports.
- Up to four compatible presets active together, with shared patches applied once.
- Random timing and five modes: Classic bursts, Build-up, Stutter, Rolling overlap, and Mutation walk.
- Exact-build verification, instruction checks, conflict rejection, and restoration of owned patches.
- No Mesen rebuild, DLL replacement, or ROM modification required.
Effects depend on the game and its active hardware channels. This is an experimental corruption tool: it can break gameplay, blank the picture, or crash the emulator. Native bounds checks do not guarantee stability.
Seven audio-only additions bring the total to 84 presets, including 54 audio presets.
| Preset | What changes |
|---|---|
| Pulse channels become ramps | Output the phase as an eight-step descending ramp instead of a duty-gated pulse |
| 14-bit noise feedback | Insert the feedback bit at position 13 |
| 12-bit noise feedback | Insert the feedback bit at position 11 |
| 10-bit noise feedback | Insert the feedback bit at position 9 |
| Pulse 1 accelerating decay | Reload its divider from the current envelope level |
| Pulse 2 accelerating decay | The same independently for pulse 2 |
| Noise accelerating decay | The same independently for noise percussion |
Click New audio for these seven additions, or Audio only for all 54 audio presets. Use Rolling overlap or Mutation walk for random compatible combinations. Stop and restart scheduling after changing the pool.
The ramp preset affects both pulse channels through their shared output routine. It ignores duty-pattern selections and uses phase 0..7 directly; existing phase-mask presets can shorten the ramp. It inherits the phase-amplitude caveat: envelope scaling and its length-zero output are bypassed at this stage, so notes can sustain after their normal release. Earlier mute paths remain. Partial patch transitions also stay bounded, although their intermediate output differs from the completed ramp.
Shortened noise feedback changes the recurrence rather than its clock rate. Existing high bits drain over subsequent shifts. Some state/tap combinations can fall into silence. Restoring code does not reseed a zero noise register; a game/emulator reset may be needed to recover that state.
Accelerating decay reloads the divider from the level before decrementing it. High levels wait longer and low levels fade faster. The original start/reset timing remains. Try combining it with a corresponding forced-decay preset; fixed-volume output can hide the effect. Every-tick decay removes the timing difference, and envelope hold stops the level progression.
All changes are bounded native-code patches. Live sound quality and gameplay stability remain untested.
Windows x64, NES games, one exact Mesen CE 2.2.1 core. This is not general support for every build labelled 2.2.1 or for Mesen's other consoles.
| Identifier | Expected value |
|---|---|
| Core | MesenCore.dll |
| Original DLL SHA-256 | 55a5f918c8ead04d4a401fc12f0ce9e4de69bebbc484f1ca3a7c018916b1fad1 |
| Source commit recorded in the inspected build | 20ba206cef5ba207c21203176d02cb9f43dda9fb |
The tool locates the core in the running process and verifies its executable section and selected data. A matching version string or rebuilding the same commit is not enough to guarantee a match. Unsupported builds are rejected; do not disable the checks to force attachment.
Mesen CE is available from its upstream repository. Its current release may not match this tool. No emulator download is bundled or asserted to match the required hash.
-
Install 64-bit Python 3.10 or newer on Windows, with Tkinter and the Python launcher.
-
Download this repository and extract it into a folder.
-
Open a terminal in that folder and install dependencies:
py -3 -m pip install -r requirements.txt
-
Restart the supported Mesen build, load an NES game, and use its standard renderer without HD packs.
-
Run
Start.bat, select the Mesen process, and click Attach and verify build. -
Click Start random mode, or choose a preset and apply it manually.
Default random behavior: wait 3–10 seconds, activate 2–4 compatible presets for 2–6 seconds, restore, and repeat. All 84 presets are in the standard pool, including the bitplane and sprite-pixel effects that can alter sprite-zero-hit timing.
Use Restore original, press Esc while this tool has focus, or close the tool to attempt restoration. A forced close cannot run cleanup; restart Mesen. Restoring code does not rewind gameplay or reset accumulated emulation state. Patch groups are written sequentially, not atomically.
For modes, preset descriptions, and combinations, see the usage guide.
Install the additional test dependency and run from the repository root:
py -3 -m pip install -r requirements-dev.txt
py -3 -m unittest discover -vThe included 57-test suite covers instruction decoding, simulated patching and restoration, compatibility, scheduler behavior, and bounded calculations. It does not require an emulator or ROM. Some exhaustive tests take time.
During v14 development, all 59 presets and 354,946 compatible stacks were applied and restored against an offline mapped copy of the inspected DLL. Isolated native instruction checks were also performed. Live Windows GUI behavior, gameplay stability, and audible effect quality have not been validated.
For v15, offline native execution additionally checked both new waveform lookups over 1,024 duty/phase/volume cases, the new noise selections over 131,072 state/mode cases, and nine envelope configurations over 1,024 states each. All ten added presets restored the mapped DLL exactly. These checks do not establish perceived sound quality or live stability.
For v16, focused offline checks covered all eight new presets against the original DLL, 16,384 native volume-routing cases, 3,072 native phase-amplitude cases, and five envelope configurations across 4,096 states each. All restored code bytes matched the original. These do not establish live listening quality or stability.
For v17, focused native checks covered the seven new presets against the original DLL, 12,288 ramp/partial-transition cases across six lookups, 589,824 shortened-noise state/tap/width cases, and six envelope configurations with 4,096 states each. Each new preset restored the mapped DLL to its original full-image hash.
The two optional Unicorn-based native verification scripts from the private development package are omitted from this public package pending a separate licensing review. Those historical native checks are not reproduced by the included unit suite. See inspection notes for patch evidence.
Include your Windows and Python versions, Mesen build and core hash if available, the exact error, selected presets, and performance mode. For gameplay issues, include the game title and reproduction steps. Do not attach ROMs, emulator binaries, or memory dumps. Exact-build rejection is expected for unsupported cores.
This project is distributed under GNU GPL version 3 or, at your option, any later version, without warranty. See LICENSE.
Copyright (C) 2026 Random Týpek, for project contributions. Mesen-derived instruction fragments, hardware reference data, and source-informed test models are attributed separately; this project does not claim ownership of upstream material. See THIRD_PARTY_NOTICES.md.
Mesen executables, core DLLs, ROMs, and third-party dependency binaries are not included. This project was developed with AI assistance. License selection and attribution are not a guarantee of legal clearance or runtime safety.