XSharp

Direct control adaptation batches

These changes replace generic EnemyBrain behavior with direct C# adaptations of original routines. Native scripts and tables are retained as data. Engine collision, projectile, lifetime, damage and effect adapters do not imply native runtime equivalence. Broad behavior/BizHawk comparisons remain deferred while implementation proceeds. Named focused headless regressions are recorded per actor below and in the projectile review; they do not certify the full old arena suite.

Current batch

Actor Original routine Adapted behavior and remaining adapter limits
Blady X3 $07:8580..879E; cosmetic helper 01 $01:F2BB..F318 Replaces invented orbit/returning dust bullets with rolling at one pixel/tick, 480 walking ticks, 64/256 gravity when airborne, script-driven blade deployment after the uncharged-buster hit and landing, ten-pixel shape clearance, expanded 42x44 contact shape and 32/256 acceleration toward two pixels/tick. Initialization overrides header health 9 with 16. Script 05 frames 8/9 are ground dust at Y+18, not weapons. Complete weapon-index tables, dust/debris, native culling, collision/contact order and engine damage integration remain pending; five focused headless cases pass.
Wind Turbine X3 $07:E1A9..E321 Removes invented horizontal fan-copy shots. Activation requires horizontal distance below 160; the running updraft directly subtracts six Y pixels when X is above/at the turbine and horizontal distance is below 32, preserving stored velocity. Static housing uses script 0. Fixed ROM coordinates 1138/0390 are adapted to placement for custom stages. Cosmetic helper 1F (blades/dust), wind state flag 0A14 bit 0, native damage tables and destruction map edits remain pending.
Barite Laser X2 $07:DEC1..E0A0; projectile 11 $02:DE81..DF4E Wall attachment, 24-tick vertical alignment, ten-tick preparation, three script-controlled laser releases and sixty-tick recovery. Lasers retain growth script, original offsets/sector vectors, sixty-tick lifetime and final flicker. Carrier subtype exposes an explicit parent/delay adapter; Probe 8201-U (object 2C) wiring and native combat/collision ordering remain pending.
Escanail X3 $05:B7AC..B9C7 Replaces horizontal patrol/shots with the original 120-tick waits, 1-pixel descent and 0.25-pixel ascent; leading wall/support probes choose transitions. Shell loss switches scripts/shapes and makes the body rideable and non-damaging. Detached shell/debris, native weapon thresholds and platform pushout still require verification.
Notor Banger X3 $07:879F..8AA2; projectile $04:EA85..EB25 Thirty/ninety-tick preparation, near/far three-shot scripts, optional subtype jump and landing recovery. Four launch offsets/vectors, projectile script 11 and gravity 0.25 come from the ROM. Ground sweeps, effect/sound helpers, weapon tables and special stage-preservation subtype remain host adapters.
Tubamail S and child Tubamail X2 $08:F793..FB02 Replaces invented flight/shots with the stationary 24-HP generator, thirty-tick preparation, script releases and three-child population gate. Child rises/falls toward X, pauses sixteen ticks and accelerates from 1.75 to 4.5 pixels/tick; damage enters the original twenty-tick falling death. Native cosmetic allocation/RNG, level-wide counter edge cases, combat tables and sweeps remain host adapters.
Rolling Gabyoall X1 $87:D119..D3AC Patrol at 0.75 pixels/tick around spawn +/-48, forty-tick RNG choice, short/128-tick transformation phases and animation-selected contact shapes/damage masking. Native weapon table and effect/slot ordering remain host adapters.
Batton Bone / Batton M-501 X1 $87:A07F..A45E Shared wake/open/pursue/return/close/cooldown control, 600-tick flight budget, native sector velocities and closed/flight shapes. Flap clock uses engine slot identity; angle ties, terrain sweeps, afterimages and drops remain unverified. Bone now uses its own assembly 4B/resource 4A/palette E8, rather than M-501’s 4C/4B/EA.
Dodge Blaster X1 $82:99D8..9B7A, projectile $82:9B7B..9BCA Eight attachment probes, low-byte approach gate, vertical tracking/dodge, 48-tick shot preparation. Its native projectile now uses script 4, the original shape, 2-pixel speed and sixty-tick lifetime, replacing the generic shot. Offscreen/contact ordering remains unverified.
Ray Field X1 $87:B824..BA71 Subtype scripts, charge/cooldown, growing 50-tick contact beam and global Ray Trap activation. Subtype bit 5’s special-event spawn remains pending.
Ray Trap X1 $87:BAAC..BBB7; projectile 1C $83:AC6A..AD4A Waits for the field trigger, 32-tick preparation, delayed aim and one shot. The laser now selects its original directional script via $86:D226, with leading shape/probe tables and impact script 11; four focused headless direction cases pass. The integer octant helper and its native low-bit mask now replace trigonometric rounding; five additional emitted-child boundary checks pass. Complete collision/culling ordering remains unverified.
Planty X1 $81:C255..C422 Proximity box, hidden/open/fire/close phases and script-driven Iworm allocation. Cosmetic opening/closing debris uses no substitute RNG draws and remains pending.
Iworm X1 enemy-projectile 05 $81:ABFC..AE1D Parent emergence, jump/descent/crawl, wall reversal and rare animation/life-drop choice. Native weapon/drop tables and physical slot reuse remain host adapter work.
Morgun X2 $02:B952..BCBC; projectile 0E $15:FA1F..FA83 RNG action choice, walk/retreat/jump/fire states, frame-selected flame area and configurable death plane. Native shot uses script 5 (flame-only frames 28..31), damage 3, ninety-tick lifetime and final thirty-tick flicker. Engine angle quantization and culling remain adapters. A focused headless regression confirms actual emitted entities use flame frames rather than body pose 32.
Gas Pipe X2 $02:CB3A..CC83 Initial/recurring gas delay, quarter-rate gas playback, Morgun flame-contact ignition, 90-tick burn and closing script. Native sound/effect details remain deferred.
Refleczer X2 $2F:F653..F882 Subtype orientation/muzzle/velocity tables, preparation and 60-tick recovery; child projectile grows then reflects until its fourth contact. Native trail particles and exact sweeps remain adapters.
Wall Shock X3 $05:BB14..BBE5 Invulnerable vertical patrol at 1.125 pixels/tick, spawn +/-40 bounds and native pre-motion reversal. Retains the unusual 12-bit camera-mask immediate.
Atareeter X3 $07:DC00..DE17 Jaw opening, 0.125-pixel advance, consumable terrain types and terminal close/idle. Terrain probes use engine collision maps; dust/debris and the weapon-specific disabling callback remain deferred.

The source record is direct-control-source.json. An actor counted as having ROM-derived control may still have incomplete helpers; the ledger deliberately retains zero complete native parity certifications.

Extraction and reusable data

NativeAnimationExtractor only extracts selected original animation scripts, their relative loop words and ROM provenance; it does not translate AI. Its directories were checked against the original script setters: X1 $AF:A000, X2 $2F:A000, X3 $3F:8000.

dotnet run --project EnemyExtractor -- `
  --rom 'C:\path\to\Megaman X2 (USA).sfc' `
  --animation-assembly 73 --animation-count 12 --output Refleczer.animations.json

Per-actor *.animations.json sidecars retain native byte segments. Reviewed constant/shape/muzzle tables can accompany the scripts. Keeping this data separate from graphics JSON prevents a graphics-only re-export from erasing control metadata. OriginalAnimatedEnemy bridges native script playback and explicit world sweeps; it supplies no default/generic AI and never performs a second movement pass.

Original pool identity matters. Planty is common object 06; its Iworm child is enemy-projectile 05 dispatched through X1 USA $80:F793 to $81:ABFC, using the same assembly 0B and graphics resource 04. The old packet path identifies the shared graphics, not the child’s control entry. Editor integrations should retain that distinction rather than merging object IDs from different native pools.

Deferred verification work

Earlier test counts belong to earlier commits and do not validate this batch. The old generic tests assume an unobstructed arena, immediate damage acceptance and a universal initial firing clock; native wall attachment, emergence immunity and triggered traps require state/geometry-specific fixtures instead. No full regression, save-state continuation, GPU rendering or native frame replay has been executed for this batch. In particular, exact aim ties, projectile impact ordering, native collision probes, effect allocation/RNG and special stage-event subtypes still need verification.

2026-11-17 Flame Pillar: renderer/audio-free emergence/return state, Common3F transition, positive-up fixed-point motion, native animation, placed-event culling, and source-revision-scoped floor patch adapter. Research: flame-pillar-source.json. Native warning/debris/RNG/campaign/combat services are not complete. The actual imported Mammoth event passed cue ages48/269, both floor patches and 30 restored engine frames; this is not emulator parity certification.