MeadowValley BackToEarth (SlateOne) 04 Recomp

Architecture Deep-Dive — Local AOT Pipeline, .text-Scoped Collectible Overlays & Schema B Controls


1. Zero-*.g.cs Clean-Room Distribution & Local <dataDir>\cache\ AOT

  1. Packaged Payload (MeadowValley-BackToEarth-SlateOne-04.recomp): - Ships strictly clean-room assemblies (MeadowValley-BackToEarth-SlateOne-04.recomp.dll), byte-identical module.recomp.json, and aot-recipe.json (14 module descriptors, 4,334 unique entry addresses including explicit resident seed 0x8002C5B8, derived from MeadowValley-BackToEarth-SlateOne-04.decomp v0.2.1). - Both the Launcher pre-flight check (LauncherContainmentAndModule) and test suite (ArchitectureAndHygieneTests) reject any .g.cs, *Generated.dll, or retail ISO/disc files.
  2. Cold vs. Warm Launch on the Player PC & .text-Scoped Overlays: - Media Check & Non-Destructive Save/Settings Migration: Discovers SLUS-01115 media recursively under <dataDir>\rom\, verifies byo_media_sha256.json locally, migrates legacy <dataDir>\settings.json -> <dataDir>\config\settings.json, and copies legacy .mcr/.rst files via SaveMigrationHelper into --save-dir (or <dataDir>) memcards\memcard_meadowvalley-backtoearth-slateone-04_slot{1,2}.mcr and saves\ with fail-closed containment (AppEnvironment.AssertPathContained / MemCardMcrStore.ResolveSaveBaseDir) without altering originals. - Cold Compile, Pure-Static Readiness & TextScopedOverlayModuleAdapter: When <dataDir>\cache\meadowvalley-backtoearth-slateone-04\<cacheKey>\meadowvalley-backtoearth-slateone-04.Generated.dll is absent or stale, reSlate v0.4.0 + AotCacheManager compile locally using aot-recipe.json. Overlay slots wrap in TextScopedOverlayModuleAdapter (ITextScopedOverlayRecompModule, IRecompCompiledEntryLookup) so PsxCpu.IsOverlayRamMatch hashes strictly immutable .text bytes (Part 11 0x800BBC34 416,588 B, Part 27 0x800B7EEC 11,636 B), preventing mutable .data/.bss writes from thrashing AOT, while Slus01115PureStaticReadiness.Evaluate certifies 14/14 resident and dual-slot overlay execution (jit=0, threadedIr=0, interp=0 under staticAotOnly). - Collectible Assembly Unloading: Overlay slots load through collectible AssemblyLoadContext instances verified by WeakReference collection tests (AotRecipeAndCacheTests) across Part 11 <-> Part 15/Part 30 transitions.

2. Schema B Input Pipeline & "PRESS START" Bridge

Slus01115InputProfile declares 21 atomic actionIds organized across 15 UI rows (Settings -> Keybinds) supporting all three input tiers (Global 1:1, Game 1:1, and Modern PC) with KBM+controller rebinding (<= 3-slot KBM [1st, 2nd, 3rd] 4..511/1001..1007, gamepad 2001..2032 incl. LT/RT triggers, right-click/Del clear to 0, and move* defaulting to DPadUp..DPadRight with zero map/journal/callMount/callCompanion D-Pad collisions).

  • Menu Navigation Isolation (!IsGameplayContextActive(cpu)): Slus01115NativeActionHook always reads physical GamepadButtonsMask D-Pad + Left Stick + move* actions with zero PadSelect leakage, while bridging menuConfirm / primaryAttack (E, Enter, Space, LClick, Pad A, Start) onto Start (0x0800) across 0x01U and 0x0DU phases 2/6/0x1D (0x800B8698) cleanly into OVL_part11_id06 phase 7 -> Cross.
  • Crop-Grid Isometric Mode (isometricMoveMode):
  • "cropGrid" (default): rotates KBM movement (KbmMoveMask) by 45° (W -> Up+Right, S -> Down+Left, A -> Up+Left, D -> Down+Right) without rotating physical controller D-Pad or analog stick vectors.
  • "screenSpace": maps W/S/A/D (KbmMoveMask) and physical D-Pad to raw cardinal SlateOne directions.
  • 360° Radial Analog Deadzone & Zero-RAM Haptic Rumble (v0.5.0): Slus01115NativeActionHook.ComputeRescaledAnalogVector rescales circular stick magnitude using stickDeadzoneInnerPercent (5–50%, default 15%) and stickDeadzoneOuterPercent (60–100%, default 95%) around neutral byte 0x80 (0x5C..0xA4 safe neutral bounds), while Slus01115HapticRumbleController.ObserveTickEnd reads committed-tick DualShock motor levels (0x42–0x4D small/large motor state) strictly outside InSubTickRender with zero guest RAM mutations.
  • Controller D-Pad Mode (controllerDpadMode) & Collision Isolation:
  • "quickActions" (default): unclaimed physical D-Pad directions emit Free-Roam quick actions (D-Pad Up Horse L2, D-Pad Down Dog L1, D-Pad Right Status Start, D-Pad Left Map Select), yielding any direction flagged in ControllerDpadClaimedByNonMoveMask while keeping keyboard map/journal/callMount/callCompanion independent.
  • "dpadWalkStickRun" / "stickWalkDpadRun": controls walk/run Circle (0x2000) chord behavior between Left Stick and unclaimed physical D-Pad while keeping explicit keyboard quick-actions intact.
  • 4:3 Default Presentation & Settings Preservation: SettingsMigrator migrates legacy schemaVersion: 1 settings to schemaVersion: 2, keeping isWidescreen16By9 = false (4:3 pillarbox), preserving v2 idempotence when keyBindings.controllerBindings is absent, and retaining valid 0 / 2001..2032 entries across migrations.