IronFrame OuterFortress (Cart) 01
Documentation Menu
On This Page

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"]
  1. Zero Distributed Retail Code or Assets: This repository and its releases distribute no copyrighted cartridge bytes, no disassembled C bodies, and no precompiled *.Generated.dll game binaries.
  2. 2-Member Clean-Room .recomp Archive (9,167 B): app\IronFrame-OuterFortress-Cart-01.recomp contains strictly two UTF-8 JSON entries: module.recomp.json and aot-recipe.json (499 schema-derived seeds across fixed PRG_FIXED_07 and switchable BANK_00..06, 37 entry vectors/anchors, jumpTables: ["0xC6B7"] with 0 hardcoded retail ROM addresses, 17 UNROM $C932..$C958 / $FFD0..$FFD7 trampolines, and $0200/$0300/$0380 WRAM watches).
  3. Instant-Window Async Local Ahead-of-Time Cache Compilation: At runtime, reCart's ColdAotCacheCompiler and LifterJumpTableScanner validate the user's BYO .nes (131,088 B), headerless .prg (131,072 B synthesized in memory via CartPrgHeaderSynthesizer), .zip, or .7z archive (CartMediaArchiveLoader + Foundation.Retro.MediaContainerExtractor + bundled app\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.dll asynchronously on the player's machine (lifting $C2BD -> JSR $C6B7 -> $C2C6/$C2F5 cleanly 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

  1. Build-Time Recipe Emission (RecipeGen): OracleSchemaLoader reads read-only upstream functions_catalog.json, anchor_functions.json, and d3_module_map.json, stripping non-clean-room tokens, and AotRecipeEmitter emits deterministic Dev\src\IronFrameCart01.Module\Manifests\aot-recipe.json.
  2. 2-Member Packaging (pack_recomp_module.ps1): Combines Dev\module.recomp.json (with "defaultFramerateMode": "lockedCap") and aot-recipe.json into Builds\v0.1.0\app\IronFrame-OuterFortress-Cart-01.recomp, enforcing zero .dll/.g.cs/.nes entries and Zip-Slip path containment.
  3. Launcher, Pre-Flight .7z Media Discovery & Runtime Containment (Launcher): LauncherCliAndContainment strips any --autostart flags, rebases relative paths to the caller CWD, seeds split-domain settings*.json files via SettingsDomainStore, enforces APP_ISOLATED_TEST=1 and FOUNDATION_SANDBOX_ROOT containment, resolves reCart via EngineResolver (deterministic discovery precedence), and runs pre-flight BYO discovery across .nes/.prg/.zip/.7z via LauncherMediaDiscovery (ResolveSevenZipOverridePath locating tools\7z.exe + MediaContainerExtractor with ephemeral finally cleanup, forwarding --rom <path> on match or --preload-media to open the Clean-Room Media Gate when absent). On launch, reEngine.Host v0.6.2 hydrates and dirty-persists F1 Video/Audio settings via HostSettingsStore, eliminates F3 HUD width jitter (0 px), and defers synthetic non-hotkey tap release by 2 frames; standalone raw-ROM launches without .recomp route cleanly to reCart's Clean-Room Media Gate instead of crashing.

4. File & Symbol Lookup Registry

Domain Source File Key Symbols & Live Anchors
Oracle Loader OracleSchemaLoader.cs Load, ParseProgramBank, AssertCleanRoomText
Recipe Emitter AotRecipeEmitter.cs Emit, BuildSeeds, BuildTrampolines
RecipeGen CLI RecipeGen/Program.cs Main, Run
Cart Constants Cart01Constants.cs CreateDefaultManifest, IsTrampolineAddress
BYO Validation ByoRomValidator.cs ValidateDirectory, ValidateFile, ValidateBytes
SoA Watch Cart01MemoryWatch.cs CaptureSnapshot, ReadOamShadow, ReadAudioTelemetry
.recomp Loader Cart01RecipeLoader.cs LoadFromFiles, LoadFromArchive, PackageCleanRoomArchiveFromFiles
Launcher Host Launcher/Program.cs Main, Run, BuildPlayerArguments
Media Discovery LauncherMediaDiscovery.cs ApplyPreFlightRomDiscovery, DiscoverVerifiedRomPath, ResolveSevenZipOverridePath, ComputeSevenZipRomSha256Hex, ResolveSafeSuiteRoot
Launcher CLI LauncherCliAndContainment.cs ParseAndNormalize, ValidateContainment, SeedDefaultSettingsIfMissing
Engine Resolver EngineResolver.cs ResolvePlayerExecutable
Installer Host Installer/Program.cs RunMain, TryResolveAdjacentVerifiedPortableZip, RunCliFlow
Installer Wizard InstallerWizardHost.cs CreateThemeOptions, RunInteractiveWizard
Path Resolver InstallerPathResolver.cs ResolveInitialPaths, TryCollapseUmbrellaNesting, TryRepairLastInstallBaseDir
Installer CLI InstallerArgsAndContainment.cs ExtractHostArgs, ValidateContainment
Suite Bootstrap InstallerBootstrapHelper.cs InspectSuite, EnsureFullProfileBootstrappedAsync
Upgrade Safety InstallerSettingsAndRomPreserver.cs CapturePreUpgradeSnapshot, RestoreAndPersistAfterInstall

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: ByoRomValidator returns structured 3-part guidance (What happened / Why / How to supply) without crashing or mutating app\.
  • Missing Engine Runtime: LauncherHelpText.FormatMissingEngineRemediation reports actionable reCart v0.1.3+ setup instructions.
  • Release Automation Gate: Both Launcher and Installer exit with ExitCode = 2 whenever --automation-port is supplied in non-automation Release builds.
  • Zero Auto-Start & Deterministic Builds: AllowAutoStart = false across 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 on reCart v0.1.3's 2-member clean-room [module.recomp.json, aot-recipe.json] .recomp format (ColdAotCacheCompiler, LifterJumpTableScanner clean-room $C6B7 lifting, async HostAotCompileOverlayView, .7z extraction, cycle-paced CartMachineHost, + ReCartLockstepRunner), shipping 0 generated C# files or binaries in git or releases.
  • ADR-002 (2026-11-23, v0.1.0): Adopted strict DualSetup8 delivery (compact Online Setup fetching version-pinned SHA-256 Portable.zip from StreamItAllGit/IronFrame-OuterFortress-Cart-01-Recomp + Offline Setup + --offline-bundle), AllowAutoStart = false, and embedded-assembly < 2 MB (1,032,184 B) Clean Root Launcher.