IronFrame OuterFortress (Cart) 01 — Architecture & Engineering (v0.1.0)
Architecture specification for IronFrame-OuterFortress-Cart-01 (v0.1.0, module ID ironframe-outerfortress-cart-01, repository IronFrame-OuterFortress-Cart-01-Recomp) — the downstream 4-folder clean-room static recompilation module for IronFrame OuterFortress (Cart) 01 hosted on reCart v0.1.3, reEngine v0.6.2, and Foundation v0.5.5.
1. System Context & Runtime Model
flowchart LR
User["User / reEngine --open"] --> Launcher["IronFrame-OuterFortress-Cart-01.exe (< 2 MB single-file)"]
Launcher -->|"Precedence + LauncherMediaDiscovery (.nes/.prg/.zip/.7z) + --open/--data-dir/--config/--log-dir/--save-dir"| ReCart["reCart v0.1.3 Player (60.0988 Hz, reEngine v0.6.2)"]
ReCart -->|"ColdAotCacheCompiler + LifterJumpTableScanner (2-member recipe)"| Cart["app/IronFrame-OuterFortress-Cart-01.recomp"]
ReCart -->|"Validates .nes/.prg/.zip/.7z or opens Clean-Room Media Gate"| Byo["data/rom/NES-ME-USA.{nes,prg,zip,7z}"]
Oracle["Upstream Decomp Schemas (Dev/schemas RO)"] -.->|"Build-time only (0 Corpus copy)"| RecipeGen["IronFrameCart01.RecipeGen"]
- Zero Distributed Retail Code or Assets: This repository and its releases distribute no copyrighted cartridge bytes, no disassembled C bodies, and no precompiled
*.Generated.dllgame binaries. - 2-Member Clean-Room
.recompArchive (9,167 B):app\IronFrame-OuterFortress-Cart-01.recompcontains strictly two UTF-8 JSON entries:module.recomp.jsonandaot-recipe.json(499schema-derived seeds across fixedPRG_FIXED_07and switchableBANK_00..06,37entry vectors/anchors,jumpTables: ["0xC6B7"]with0hardcoded retail ROM addresses,17UNROM$C932..$C958/$FFD0..$FFD7trampolines, and$0200/$0300/$0380WRAM watches). - Instant-Window Async Local Ahead-of-Time Cache Compilation: At runtime,
reCart'sColdAotCacheCompilerandLifterJumpTableScannervalidate the user's BYO.nes(131,088B), headerless.prg(131,072B synthesized in memory viaCartPrgHeaderSynthesizer),.zip, or.7zarchive (CartMediaArchiveLoader+Foundation.Retro.MediaContainerExtractor+ bundledapp\tools\{7z.exe,7z.dll,LICENSE-7ZIP.txt}), open the SDL3 window immediately with live"Preparing Native Module..."overlay feedback (HostAotCompileOverlayView), and compile<dataDir>\cache\*.Generated.dllasynchronously on the player's machine (lifting$C2BD -> JSR $C6B7 -> $C2C6/$C2F5cleanly across fixed and switchable banks directly from the BYO ROM).
2. Assembly / Project Dependency Graph
flowchart BT
SDK["SharedLibs: Foundation v0.5.5 + reEngine v0.6.2 + reCart v0.1.3"] --> RecipeGen["IronFrameCart01.RecipeGen (Build-Time Only)"]
SDK --> Mod["IronFrameCart01.Module (Clean-Room Contracts & BYO Validator)"]
SDK --> Launcher["IronFrameCart01.Launcher (< 2 MB Single-File WinExe)"]
SDK --> Installer["IronFrameCart01.Installer (DualSetup8, AllowAutoStart=false)"]
Mod --> Tests["IronFrameCart01.Tests (50 Zero-Asset xUnit Tests)"]
RecipeGen --> Tests
Launcher --> Tests
Installer --> Tests
| Project | Output Type | Packaging Target |
|---|---|---|
IronFrameCart01.RecipeGen |
Build-Time Console Tool | Dev/build-time only (omitted from Builds\ and .recomp) |
IronFrameCart01.Module |
Class Library (net8.0) |
Clean-room module metadata, BYO .nes/.prg validation, SoA telemetry helpers |
IronFrameCart01.Launcher |
Single-File WinExe (< 2 MB) |
Clean Build/Install Root (IronFrame-OuterFortress-Cart-01.exe, embeds Foundation.{Core,Launcher,Retro}, reEngine.Core, reCart.Contracts, settings.example.json) |
IronFrameCart01.Installer |
Dual-Setup WinExe (AllowAutoStart = false) |
Signed Online + Offline Setup (DualSetup8 8-file Releases\) |
IronFrameCart01.Tests |
xUnit Test Assembly (net8.0-windows) |
Isolated CI/local verification suite (APP_ISOLATED_TEST=1) |
3. End-to-End Clean-Room Data Flow
- Build-Time Recipe Emission (
RecipeGen):OracleSchemaLoaderreads read-only upstreamfunctions_catalog.json,anchor_functions.json, andd3_module_map.json, stripping non-clean-room tokens, andAotRecipeEmitteremits deterministicDev\src\IronFrameCart01.Module\Manifests\aot-recipe.json. - 2-Member Packaging (
pack_recomp_module.ps1): CombinesDev\module.recomp.json(with"defaultFramerateMode": "lockedCap") andaot-recipe.jsonintoBuilds\v0.1.0\app\IronFrame-OuterFortress-Cart-01.recomp, enforcing zero.dll/.g.cs/.nesentries and Zip-Slip path containment. - Launcher, Pre-Flight
.7zMedia Discovery & Runtime Containment (Launcher):LauncherCliAndContainmentstrips any--autostartflags, rebases relative paths to the caller CWD, seeds split-domainsettings*.jsonfiles viaSettingsDomainStore, enforcesAPP_ISOLATED_TEST=1andFOUNDATION_SANDBOX_ROOTcontainment, resolvesreCartviaEngineResolver(deterministic discovery precedence), and runs pre-flight BYO discovery across.nes/.prg/.zip/.7zviaLauncherMediaDiscovery(ResolveSevenZipOverridePathlocatingtools\7z.exe+MediaContainerExtractorwith ephemeralfinallycleanup, forwarding--rom <path>on match or--preload-mediato open the Clean-Room Media Gate when absent). On launch,reEngine.Host v0.6.2hydrates and dirty-persistsF1Video/Audio settings viaHostSettingsStore, eliminatesF3HUD width jitter (0 px), and defers synthetic non-hotkey tap release by 2 frames; standalone raw-ROM launches without.recomproute cleanly toreCart's Clean-Room Media Gate instead of crashing.
4. File & Symbol Lookup Registry
5. Settings & Storage Ownership
Stateless runtime (zero local databases). Persists user preferences through reEngine.Core.Updates.SettingsDomainStore under <dataDir>\config\ (settings.json, settings.video.json, settings.audio.json, settings.controls.json) using useGlobalFormatRules: true, seeded on first launch from embedded settings.example.json. Clean-room BYO digest reference lives in byo_media_sha256.json.
6. Failure Modes, Resilience & Security
- Missing BYO Media:
ByoRomValidatorreturns structured 3-part guidance (What happened / Why / How to supply) without crashing or mutatingapp\. - Missing Engine Runtime:
LauncherHelpText.FormatMissingEngineRemediationreports actionablereCart v0.1.3+setup instructions. - Release Automation Gate: Both
LauncherandInstallerexit withExitCode = 2whenever--automation-portis supplied in non-automation Release builds. - Zero Auto-Start & Deterministic Builds:
AllowAutoStart = falseacross both launcher and setup hosts; Directory.Build.props enables<Deterministic>true</Deterministic>, zero-PII<PathMap>, and<TreatWarningsAsErrors>true</TreatWarningsAsErrors>.
7. Design Decisions Log
- ADR-001 (
2026-11-23,v0.1.0): Standardized onreCart v0.1.3's 2-member clean-room[module.recomp.json, aot-recipe.json].recompformat (ColdAotCacheCompiler,LifterJumpTableScannerclean-room$C6B7lifting, asyncHostAotCompileOverlayView,.7zextraction, cycle-pacedCartMachineHost, +ReCartLockstepRunner), shipping0generated C# files or binaries in git or releases. - ADR-002 (
2026-11-23,v0.1.0): Adopted strictDualSetup8delivery (compact Online Setup fetching version-pinned SHA-256Portable.zipfromStreamItAllGit/IronFrame-OuterFortress-Cart-01-Recomp+ Offline Setup +--offline-bundle),AllowAutoStart = false, and embedded-assembly< 2 MB(1,032,184 B) Clean Root Launcher.