{
  "schema": "mmx2-usa-runtime-research-v1",
  "rom_sha1": "637079014421563283CDED6AEAA0604597B2E33C",
  "rom_sha256": "F3246755F608A1E1DC9C848B61DA3B824C7853B29B3BE40DF6FC7F2793A887ED",
  "scope": "Read-only research metadata. Verified for X2 USA only. It is not a native-state converter, ROM write schema, complete level codec or parity certificate.",
  "evidence": [
    "docs/x2-runtime-research.md",
    "docs/physics-scene-parity.md",
    "docs/physics-stag-gator-parity.md",
    "tools/parity/capture_bizhawk_movie.py",
    "tools/bizhawk/MMX2_Debug_BizHawk.lua",
    "docs/physics-stag-calibration.md",
    "docs/physics-camera-bound-transitions.md",
    "docs/enemies/native/sea-canthller-source.json",
    "docs/enemies/native/pararoid-s38-source.json"
  ],
  "symbols": [
    {
      "name": "Game.Mode",
      "address": "7E:00D1",
      "kind": "Ram",
      "bytes": 1,
      "encoding": "u8",
      "description": "Game mode; paired gameplay uses 4."
    },
    {
      "name": "Game.Substate",
      "address": "7E:00D2",
      "kind": "Ram",
      "bytes": 1,
      "encoding": "u8",
      "description": "Mode substate; 2 is stage entry and 4 is normal gameplay in the recorded movies."
    },
    {
      "name": "Game.LogicCounter",
      "address": "7E:09CC",
      "kind": "Ram",
      "bytes": 1,
      "encoding": "u8-wrapping",
      "description": "Logic-update counter; a repeated value can occur with the joypad lag flag clear. It must not be used as an undeclared playback oracle."
    },
    {
      "name": "Rng.Seed",
      "address": "7E:09D6",
      "kind": "Ram",
      "bytes": 2,
      "encoding": "u16le",
      "description": "Current RNG seed. Observe call count/context as well as seed equality."
    },
    {
      "name": "Player.Entity",
      "address": "7E:09D8",
      "kind": "Ram",
      "bytes": 0,
      "encoding": "structure-0x110",
      "description": "Player direct-page structure; dispatched even with a zero first byte."
    },
    {
      "name": "Player.State",
      "address": "7E:09DA",
      "kind": "Ram",
      "bytes": 1,
      "encoding": "u8",
      "description": "Native player controller state; not numerically equivalent to XSharp PlayerState."
    },
    {
      "name": "Player.Substate",
      "address": "7E:09DB",
      "kind": "Ram",
      "bytes": 1,
      "encoding": "u8",
      "description": "Native state-specific substate."
    },
    {
      "name": "Player.PositionX",
      "address": "7E:09DC",
      "kind": "Ram",
      "bytes": 3,
      "encoding": "u24le-fixed8",
      "description": "World X with eight fractional bits."
    },
    {
      "name": "Player.PositionY",
      "address": "7E:09DF",
      "kind": "Ram",
      "bytes": 3,
      "encoding": "u24le-fixed8",
      "description": "World Y with eight fractional bits; positive coordinates go downward."
    },
    {
      "name": "Player.FacingFlags",
      "address": "7E:09E9",
      "kind": "Ram",
      "bytes": 1,
      "encoding": "flags-bit6-right",
      "description": "Bit 40 hexadecimal selects right-facing for the initial-state adapter."
    },
    {
      "name": "Player.VelocityX",
      "address": "7E:09F2",
      "kind": "Ram",
      "bytes": 2,
      "encoding": "s16le-fixed8",
      "description": "Stored horizontal velocity; suspended displacement does not imply zero stored velocity."
    },
    {
      "name": "Player.VelocityY",
      "address": "7E:09F4",
      "kind": "Ram",
      "bytes": 2,
      "encoding": "s16le-positive-up",
      "description": "Stored vertical velocity, eight fractional bits; positive means upward, opposite to XSharp."
    },
    {
      "name": "Player.Gravity",
      "address": "7E:09F6",
      "kind": "Ram",
      "bytes": 1,
      "encoding": "u8",
      "description": "Native gravity field; interpretation is controller/state dependent."
    },
    {
      "name": "Player.Health",
      "address": "7E:09FF",
      "kind": "Ram",
      "bytes": 1,
      "encoding": "u8",
      "description": "Raw player health/status byte. Recorded Stag 1275 briefly has high bit 80 set; preserve raw flags rather than treating the full byte as certified hit points."
    },
    {
      "name": "Camera.PositionX",
      "address": "7E:1E5D",
      "kind": "Ram",
      "bytes": 2,
      "encoding": "u16le",
      "description": "Observed whole-pixel camera X; stage effects may differ from the generic focus/clamp model."
    },
    {
      "name": "Camera.PositionY",
      "address": "7E:1E60",
      "kind": "Ram",
      "bytes": 2,
      "encoding": "u16le",
      "description": "Observed whole-pixel camera Y."
    },
    {
      "name": "Camera.EffectiveMinX",
      "address": "7E:1E66",
      "kind": "Ram",
      "bytes": 2,
      "encoding": "u16le",
      "description": "Effective minimum camera top-left X."
    },
    {
      "name": "Camera.EffectiveMaxX",
      "address": "7E:1E68",
      "kind": "Ram",
      "bytes": 2,
      "encoding": "u16le",
      "description": "Effective maximum camera top-left X; add viewport width when forming a world bounding box."
    },
    {
      "name": "Camera.EffectiveMinY",
      "address": "7E:1E6A",
      "kind": "Ram",
      "bytes": 2,
      "encoding": "u16le",
      "description": "Effective minimum camera top-left Y."
    },
    {
      "name": "Camera.EffectiveMaxY",
      "address": "7E:1E6C",
      "kind": "Ram",
      "bytes": 2,
      "encoding": "u16le",
      "description": "Effective maximum camera top-left Y; add viewport height when forming a world bounding box."
    },
    {
      "name": "Camera.RequestedMinX",
      "address": "7E:1E6E",
      "kind": "Ram",
      "bytes": 2,
      "encoding": "u16le",
      "description": "Requested minimum X; keep separate from the effective/interpolating value."
    },
    {
      "name": "Camera.RequestedMaxX",
      "address": "7E:1E70",
      "kind": "Ram",
      "bytes": 2,
      "encoding": "u16le",
      "description": "Requested maximum X."
    },
    {
      "name": "Camera.RequestedMinY",
      "address": "7E:1E78",
      "kind": "Ram",
      "bytes": 2,
      "encoding": "u16le",
      "description": "Requested minimum Y."
    },
    {
      "name": "Camera.RequestedMaxY",
      "address": "7E:1E7E",
      "kind": "Ram",
      "bytes": 2,
      "encoding": "u16le",
      "description": "Requested maximum Y."
    },
    {
      "name": "Graphics.ObjectLoadSet",
      "address": "7E:1F18",
      "kind": "Ram",
      "bytes": 1,
      "encoding": "u8",
      "description": "Current object graphics load set; checkpoint warmup may leave a different set from the movie."
    },
    {
      "name": "Stage.Id",
      "address": "7E:1FAD",
      "kind": "Ram",
      "bytes": 1,
      "encoding": "u8",
      "description": "Current stage: Sponge 2, Stag 4, Gator 8 in the recorded X2 USA movies."
    },
    {
      "name": "Stage.Checkpoint",
      "address": "7E:1FB4",
      "kind": "Ram",
      "bytes": 1,
      "encoding": "u8",
      "description": "Current checkpoint index; it does not encode all runtime camera/graphics/controller state."
    },
    {
      "name": "Rng.Advance",
      "address": "08:CB42",
      "kind": "Code",
      "bytes": 0,
      "encoding": "65816-entry",
      "description": "Native RNG entry used by read-only execution callbacks; the captured stacked return PC precedes RTL increment."
    },
    {
      "name": "Player.ResolvedContacts",
      "address": "7E:0A03",
      "kind": "Ram",
      "bytes": 1,
      "encoding": "flags-1-right-2-left-4-floor-8-ceiling",
      "description": "Collision result from the completed sweep; Stag frame 130 acquires floor bit 04 after integer Y correction."
    },
    {
      "name": "Player.PreviousContacts",
      "address": "7E:0A36",
      "kind": "Ram",
      "bytes": 1,
      "encoding": "flags-1-right-2-left-4-floor-8-ceiling",
      "description": "Controller contact snapshot at player +5E; consumed before requesting new movement."
    },
    {
      "name": "Player.WalkingControl",
      "address": "08:97B1",
      "kind": "Code",
      "bytes": 0,
      "encoding": "65816-entry",
      "description": "Walking dispatcher; its ordinary jump request dispatches immediate movement after the global dash-request phase."
    },
    {
      "name": "Player.GroundJumpRequest",
      "address": "08:B9C8",
      "kind": "Code",
      "bytes": 0,
      "encoding": "65816-entry",
      "description": "Native ground-jump request distinguishes walking from dash/idle control."
    },
    {
      "name": "Player.DashJumpRequest",
      "address": "08:BA14",
      "kind": "Code",
      "bytes": 0,
      "encoding": "65816-entry",
      "description": "Dash-origin jump sets air speed 0375, then prepares the impulse without ordinary displacement on the request update."
    },
    {
      "name": "Collision.WorldFloorProbes",
      "address": "08:CDE2",
      "kind": "Code",
      "bytes": 0,
      "encoding": "65816-entry",
      "description": "Floor probe setup: native center, left and right integer points. Stag 343 hits at offset +6 while center/left miss; see physics-stag-calibration.md."
    },
    {
      "name": "Player.FloorProbeExtensionInhibit",
      "address": "7E:0A07",
      "kind": "Ram",
      "bytes": 1,
      "encoding": "u8-nonzero-inhibits-extension",
      "description": "Player +2F: nonzero removes the extra floor reach. Ground-jump/fall requests set 08; wall-slide entry clears it. It is not simply a velocity sign."
    },
    {
      "name": "Collision.PlayerPhaseFlag",
      "address": "7E:1F2E",
      "kind": "Ram",
      "bytes": 1,
      "encoding": "u8-temporary-player-collision-phase",
      "description": "00:CF10..CF1E temporarily stores 80 around the player collision call. Floor setup selects six extra pixels in this phase when +2F is zero; it is not the water flag."
    },
    {
      "name": "Player.WallSlideRequest",
      "address": "08:BA57",
      "kind": "Code",
      "bytes": 0,
      "encoding": "65816-entry",
      "description": "Clears +2F and requests 12/00 without initializing wall-slide velocities until the following update."
    },
    {
      "name": "Collision.PlayerPhase",
      "address": "00:CF10",
      "kind": "Code",
      "bytes": 0,
      "encoding": "65816-entry",
      "description": "Sets temporary player collision phase, calls 08:C314 when enabled, then clears the phase flag."
    },
    {
      "name": "Player.IdleResumeOrWallKickDirection",
      "address": "7E:0A27",
      "kind": "Ram",
      "bytes": 1,
      "encoding": "u8-controller-dependent",
      "description": "Player +4F is the idle walking-resume countdown; wall-kick request writes retained wall facing (00 left/40 right). Slide-to-idle preserves it. Landing completion clears it. Do not infer its meaning from motion alone."
    },
    {
      "name": "Camera.BoundaryTransitionStep",
      "address": "7E:1E62",
      "kind": "Ram",
      "bytes": 2,
      "encoding": "u16le",
      "description": "Camera +0A is the effective-bound transition step in ordinary following (2 in Stag); it is not the follow movement cap."
    },
    {
      "name": "Camera.FollowMovementCap",
      "address": "7E:1E64",
      "kind": "Ram",
      "bytes": 2,
      "encoding": "u16le",
      "description": "Camera +0C limits ordinary following on both axes (8 in Stag)."
    },
    {
      "name": "Camera.FocusTop",
      "address": "7E:1E80",
      "kind": "Ram",
      "bytes": 2,
      "encoding": "u16le",
      "description": "Upper player screen target; 96 in Stag. Near-target release preserves the native subtraction carry."
    },
    {
      "name": "Camera.FocusBottom",
      "address": "7E:1E82",
      "kind": "Ram",
      "bytes": 2,
      "encoding": "u16le",
      "description": "Lower player screen target; 128 in Stag."
    },
    {
      "name": "Camera.FocusLeft",
      "address": "7E:1E84",
      "kind": "Ram",
      "bytes": 2,
      "encoding": "u16le",
      "description": "Minimum player screen X target; 128 in Stag."
    },
    {
      "name": "Camera.FocusRight",
      "address": "7E:1E86",
      "kind": "Ram",
      "bytes": 2,
      "encoding": "u16le",
      "description": "Maximum player screen X target; 128 in Stag."
    },
    {
      "name": "Player.PreviousIntegerX",
      "address": "7E:09FA",
      "kind": "Ram",
      "bytes": 2,
      "encoding": "u16le",
      "description": "Native player integer X history word used by camera-bound expansion; distinct from stored velocity."
    },
    {
      "name": "Player.PreviousIntegerY",
      "address": "7E:09FC",
      "kind": "Ram",
      "bytes": 2,
      "encoding": "u16le",
      "description": "Native player integer Y history word used by camera-bound expansion."
    },
    {
      "name": "Camera.AdvanceRequestedLimits",
      "address": "00:E166",
      "kind": "Code",
      "bytes": 0,
      "encoding": "65816-entry",
      "description": "Advances effective limits after following/clamping; stage requests generated this update are consumed on the next update."
    },
    {
      "name": "Camera.ClampEffectiveLimits",
      "address": "00:E08F",
      "kind": "Code",
      "bytes": 0,
      "encoding": "65816-entry",
      "description": "Clamps ordinary following against effective limits before their transition advances."
    },
    {
      "name": "Player.IdleRequest",
      "address": "08:B9BC",
      "kind": "Code",
      "bytes": 0,
      "encoding": "65816-entry",
      "description": "Walking release requests idle without clearing stored velocity. Stag 1532 retains FE88 while a new shot changes pose; idle initialization clears it next update."
    },
    {
      "name": "Player.DashFacingWallProbe",
      "address": "08:D60C",
      "kind": "Code",
      "bytes": 0,
      "encoding": "65816-entry",
      "description": "Wall-facing probe in movement/dash admission. Stag 1577 rejects Dash at the right wall; the following ordinary jump never enters BA14."
    },
    {
      "name": "Player.DashJumpOrigin",
      "address": "7E:0A2D",
      "kind": "Ram",
      "bytes": 1,
      "encoding": "u8-controller-flag",
      "description": "Player +55 dash-origin flag. Remains zero after the rejected Stag 1577 Dash request; distinguish an accepted dash from the held input bit."
    },
    {
      "name": "Player.AirControlSpeed",
      "address": "7E:0A34",
      "kind": "Ram",
      "bytes": 2,
      "encoding": "u16-8-fractional-bits",
      "description": "Player +5C horizontal air-control magnitude. Stag 1578..1582 ordinary jump keeps 0178 despite held Dash. Not equivalent to ground pre-walking speed."
    },
    {
      "name": "Player.LandingControl",
      "address": "08:9979",
      "kind": "Code",
      "bytes": 0,
      "encoding": "65816-entry",
      "description": "Landing substate dispatcher. Initialization sets +4E to 4; 99AA decrements it and zero branches to idle before Jump/walking input checks. Stag 2406..2409."
    },
    {
      "name": "Player.ControllerTimer",
      "address": "7E:0A26",
      "kind": "Ram",
      "bytes": 1,
      "encoding": "u8-controller-dependent",
      "description": "Player +4E controller timer. Landing initializes 4 and decrements each controller update; slow-walking reuses it differently. Interpret using state/substate, not animation duration."
    },
    {
      "name": "Player.WallSlideInitializeSpeeds",
      "address": "08:9BB9",
      "kind": "Code",
      "bytes": 0,
      "encoding": "65816-entry",
      "description": "First slide controller update calls C669 before testing Jump. Stag 2985 initializes VX 0100/VY FE00 before the wall-kick request, retaining them through 2989."
    }
  ],
  "source_project": "XSharp"
}
