
reCart
Clean-room .NET 8.0 ahead-of-time static recompilation engine, 6502 -> C# lifter, and hardware-timed RP2A03 / RP2C02 (platformId: "nes") runtime for reEngine.
Road to v1.0.0: [##--------] 15% (v0.1.4 live with 125/125 isolated tests across 10 suites and 0 warnings; 7-minor backend path v0.2.0–v0.7.0 toward v1.0.0 Going Gold)
Beta (Pre-1.0):
reCart v0.1.4runs NES6502static ahead-of-time recompilation across Mappers0–3with hardware-timedRP2A03/RP2C02NTSC execution, 5 render backends, an interactive Clean-Room Media Gate for.nes/.prg/.zip/.7zuser-supplied cartridges, and a< 2 MBside-by-side Windows launcher/installer. Active development moves next tov0.2.0(unified6502 -> Shared IR, Collectible RyuJIT / Zero-RWX, and cooperative hardware scheduling) along a 7-minor path towardv1.0.0Going Gold.
About
![]() Clean-Room Media Gate ( v0.1.4) |
![]() Clean-Room Demo Cart ( IronFrame OuterFortress, Native PAR) |
reCart is a clean-room .NET 8.0 C# static recompilation engine and decompilation platform provider (platformId: "nes", 3-way engine alias reCart <-> reCartOne <-> reNes) built on Foundation (v0.5.5) and reEngine (v0.6.2, reEngine.Core + shared SDL3 reEngine.Host.dll).
reCart is strictly an ahead-of-time (AOT) static recompilation stack — not a generic compatibility emulator:
- AOT-Primary Execution (
staticAotOnlyDefault): Clean-room 2-member recipe ([module.recomp.json, aot-recipe.json]including inline jump-table pointer lifting) and 3-member lifted.recompcartridges compile locally out-of-process on the player's machine into<dataDir>\cache\<moduleId>\<key>\<moduleId>.Generated.dllfrom user-supplieddata\rom\media (.nes,.prg,.zip, and.7z) verified by SHA-256 while the interactive SDL3 window opens immediately with live compilation progress, failing closed cleanly if an unlifted code address is encountered. - Unified
6502 -> Shared IR& Raw-Media Bring-Up (v0.2.0->v0.7.0): Tier 3 Collectible RyuJIT and Zero-RWX Threaded-IR (--jit-bringup, arriving inv0.2.0and hardened throughv0.7.0) share a single bank+RAM-epoch-keyed IR frontend that enables emergency fallback,bringup.profile.jsonprofiling, best-effort standalone.nes/.fdsJIT boot, and automated100%static AOT promotion — whileInterpreterOracleremains strictly quarantined behind--execution-tier interpreterOracle. - Two-Phase Aspect-Locked Video & Band-Limited Audio: Today
reCartdrives all 5reEngine.Host v0.6.2backends (OpenGL 3.3 Core,Vulkan 1.3,DirectX 12,ParallelCpu,Software) defaulting tonativePar(8:7NTSC PAR pillarboxed — never stretched to16:9) alongsidefourByThree,squareInteger,nativeFit, and opt-inhorPlus16By9. Thev0.3.0–v0.4.0backend upgrades add CPU-cycle Blip-buffer synthesis,PAL/Dendytimings, two-phase scanline-bandParallelCpu(1xbit-exact toSoftware), and native GPU sprite/tile/shader composition (>8sprites, 24-bit overrides,120–240 HzSubTick, CRT/colorblind filters). - Proving Ground #1: Designed alongside reSlate and verified with clean-room fixture IronFrame-OuterFortress-Cart-01-Recomp (
IronFrame OuterFortress (Cart) 01/ironframe-outerfortress-cart-01) at deterministic60.0988 Hztiming.
Key Features
- Hardware-Timed Core (
NTSC+ Mappers0/1/2/3): Cycle-stepped6502(RP2A03CPU: 56 official opcodes, zero BCD,JMP ($xxFF)page-wrap,$4016/$40170x40open-bus,513/514-cycleOAM DMA+DMCstalls), cycle-paced static AOT block dispatch, dot-stepped262-scanlineRP2C02PPU (256x240, odd-frame dot skip, Loopyv/t/x/wscroll, sprite-0 hit & NMI suppression), 5-channelRP2A03APU (Pulse 1/2,Triangle,Noise,DMC), and Mappers0–3(NROM,MMC1,UxRom,CNROM). Dedicated backend minors expand through Shared IR/JIT (v0.2.0), Blip-buffer DSP +PAL/Dendy(v0.3.0), two-phaseParallelCpu/GPU compositing (v0.4.0), commercial iNES/NES 2.0 mappers + peripherals + Dual-Installer (v0.5.0), clean-room disk-system HLE + 6 expansion audio chips +.re*packs (v0.6.0), and raw-media hardening + static AOT promoter + Research rail (v0.7.0) ->v1.0.0Going Gold. - Static
6502 -> C#Lifter, Jump Tables, Cold AOT Cache &reCart.Decomp: Emits and compiles clean-room 2-member recipe (module.recomp.json,aot-recipe.jsonwith inline jump-table scanning across fixed/switchable banks) and 3-member lifted (.cs,dispatch.meta.json).recompZIP archives (zero*.Generated.dllor retail ROMs bundled), builds.Generated.dlllocally out-of-process asynchronously behind the host compile overlay, and enforces clean-source verification with zero-warning builds. - 5-Backend
reEngine.Host v0.6.2Player, Clean-Room Media Gate,.7zStaging & Settings Persistence: Supportsopengl,vulkan,directx/dx12,parallelCpu, andsoftwarewithwasapiaudio, 3-tier input profiles (settings.controls.json), persistentF1Video/Audio settings, jitter-free0 pxF3HUD, 4-port controller mapping,F5/F9deterministic quick saves,F11/Alt+Enterfullscreen,--demo-cartclean-room verification, fail-closed.7zextraction/staging via bundledtools\7z.*, and the interactive Clean-Room Media Gate (Select Media...,Select .recomp Module..., Drag & Drop, external ROM staging into<dataDir>\rom\, standalone raw-ROM guidance, and interactive unlifted-PC trap handling). - Zero-Daemon Containment & 4-Pillar Side-by-Side Installer:
< 2 MBsingle-filereCart.exe(AllowAutoStart = false), 4-pillarreCart-Setup-v0.1.4-win-x64.exe("suiteId": "reEngine",HostProtocolVersion = "0.6.2",MinSuiteVersion = "0.6.0", installing cleanly into%LOCALAPPDATA%\Programs\StreamItAll\reEngine\engines\reCart\v0.1.4\withapp\tools\{7z.exe, 7z.dll, LICENSE-7ZIP.txt}, root collision guard, and atomic.ready), and dual-binaryReleaseautomation stripping (ExitCode = 2on both Player and Setup EXEs).
Getting Started
- Download
reCart-Setup-v0.1.4-win-x64.exeorreCart-v0.1.4-win-x64-Portable.zipfrom the reCart v0.1.4 Pre-Release (or browse all GitHub Releases). - Run
reCart-Setup-v0.1.4-win-x64.exe(installs cleanly alongsidereEngine v0.6.2under%LOCALAPPDATA%\Programs\StreamItAll\reEngine\engines\reCart\v0.1.4\) or extract the-Portable.zipbundle. - Place your legally dumped
.nes,.prg,.zip, or.7zcartridge file inside your game module's localdata\rom\folder, or try the built-in clean-room synthetic demo cart immediately:
# Launch the built-in clean-room IronFrame demo cart (OpenGL, Native PAR, cold AOT into cache\)
reCart.exe --demo-cart --backend opengl --aspect-mode nativePar
# Launch a clean-room .recomp cartridge or local .nes/.7z ROM directly or via reEngine
reCart.exe --open "D:\Games\MyCart\app\MyCart.recomp" --rom "D:\Games\MyCart\data\rom\game.nes" --backend opengl --aspect-mode nativePar
reEngine.exe --open "D:\Games\MyCart\app\MyCart.recomp" --wait
Minimal 2-Member Clean-Room Package Contract (module.recomp.json + aot-recipe.json)
Clean-room .recomp recipe archives ship zero retail bytes — only metadata (module.recomp.json) and structural lift hints (aot-recipe.json) so reCart compiles native C# locally against your verified ROM:
// module.recomp.json
{
"schemaVersion": 1,
"moduleId": "my-clean-room-cart",
"title": "My Clean-Room Cart",
"platformId": "nes",
"engineId": "reCart",
"compatibleEngineTrack": "0.1.x",
"mapperId": 2,
"preloadRomDir": "data/rom",
"requiredDiscChecksums": [
{ "relativePath": "data/rom/game.nes", "sha256": "<64-char-sha256>" }
]
}
// aot-recipe.json
{
"schemaVersion": 1,
"moduleId": "my-clean-room-cart",
"platformId": "nes",
"mapperId": 2,
"entryAddresses": ["0xC000"],
"jumpTables": [
{ "prgBank": 7, "dispatcherAddress": "0xC6B7", "notes": "RTS table" }
]
}
Developer Build & Verification
The solution (Dev\reCart.slnx) builds cleanly with zero warnings and passes 125/125 isolated APP_ISOLATED_TEST=1 tests across all 10 test suites in both Release and Debug -p:ReCartTestAutomation=true:
# Clone & build from source
git clone https://github.com/StreamItAllGit/reCart.git
cd reCart
$env:APP_ISOLATED_TEST = "1"
dotnet build Dev\reCart.slnx -c Release /warnaserror
dotnet test Dev\reCart.slnx -c Release --no-build
dotnet build Dev\reCart.slnx -c Debug -p:ReCartTestAutomation=true /warnaserror
dotnet test Dev\reCart.slnx -c Debug -p:ReCartTestAutomation=true --no-build
Project Structure
- 8-Project
.NET 8.0Solution (Dev/reCart.slnx): reCart.Contracts(net8.0) — Public module ABI, clean-room recipe/header contracts, region timing profiles, and engine constantsreCart.Core(net8.0) —Cpu\,Mappers\(Nrom,Mmc1,UxRom,CnRom),Rom\,Ppu\,Apu\,Input\,Runtime\, and quarantinedOracle\; planned expansion slots forIr\,Jit\,Bringup\,Apu\Expansion\,Gpu\,Fds\,Saves\, andResearch\reCart.Compiler(net8.0) — Clean-room6502 -> C#static lifter, inline jump-table scanner, 2-member recipe + 3-member lifted.recompZIP packager, and cold local<dataDir>\cache\AOT compilerreCart.Decomp(net8.0) — NES decompilation platform provider (platformId: "nes"), disassembly-tell detector, and clean-build validatorreCart.Player(net8.0-windows) — SDL3 player ridingreEngine.Host v0.6.2across all 5 backends with async AOT compile overlay, Clean-Room Media Gate,.7z/.zip/external ROM staging,--demo-cart,--lockstep-oracle,F1/F3/F5/F9/F11, and Debug-only automation bridgereCart.Launcher(net8.0-windows) — Single-file< 2 MBreCart.execlean-root stub (AllowAutoStart = false)reCart.Installer(net8.0-windows) — 4-pillar Setup EXE ("suiteId": "reEngine", root-collision guard, bundledtools\7z.*, atomic.ready)reCart.Tests(net8.0-windows) — Zero-asset isolated xUnit verification suite (10modular classes,125/125tests)
Documentation
- Feature Map & Code Registry:
FEATURES.md - Milestones & Roadmap (
v0.1.0->v1.0.0+v2.0.0–v5.0.0):ROADMAP.md - Changelog:
CHANGELOG.md - Security Policy:
SECURITY.md - Contributing Guide:
CONTRIBUTING.md - Technical & User Manuals (
Dev/docs/): CHARTER.md— Conceptual mission, clean-room boundaries, and engineering heuristicsARCHITECTURE.md— System design, 4-tier AOT/IR execution stack, two-phase video & Blip-buffer pipelines, and slice boundariesINTERFACES.md— Public ABI, scheduled additive contracts,.recomp/.decompmanifests, and CLI switchesUSER_GUIDE.md— BYO media setup, overlays, aspect-ratio guarantees, and troubleshootingOPERATIONS.md— Build/test commands, install topology, logs, and release workflow- Companion Suite Projects: Foundation · reEngine · reSlate · IronFrame-OuterFortress-Cart-01-Recomp
Code Signing Policy
Release builds are currently signed locally, not by a public certificate authority, so Windows SmartScreen may show an "unknown publisher" prompt. Verify downloads against the SHA256SUMS.txt published with each release. Trusted organization code signing will be added once the publishing studio is formally established.
- Authors: Repository contributors and maintainers (
@StreamItAllGit) - Reviewers: Repository maintainers (
@StreamItAllGit) - Approvers: Repository owners (
@StreamItAllGit) - Privacy Policy: This program will not transfer any information to other networked systems unless specifically requested by the user or the person installing or operating it.
License & Legal
- Engine License: Clean-room engine source and contracts are licensed under the Mozilla Public License 2.0 (
LICENSE). - Clean-Room & Non-Affiliation:
reCartships zero copyrighted game ROMs, disk images, vendor BIOS dumps, CHR/PRG assets, or pre-generated retail game assemblies. End users supply legally owned.nesand.fdsmedia locally inside gitignoreddata\rom\directories. Nintendo, NES, Nintendo Entertainment System, Famicom, Famicom Disk System, Zapper, and Four Score are trademarks of their respective owners;reCartis an independent clean-room project with zero affiliation or endorsement. - Bundled / Referenced Runtimes: Built on
Foundation v0.5.5andreEngine v0.6.2(reEngine.Core,reEngine.Hostoverppy.SDL3-CSMIT/ SDL3zlib, and7-ZipLGPL-2.1+with unRAR restriction underapp\tools\).

