XSharpDemo enables Aclanda through new X2EnemiesModule { EnableAclanda = true }.
The regular X2 stage loader registers event 5B, including its body, separately
damageable head and projectiles. No comparison tool or native-buster setting is
required to make the enemy available during normal play.
The optional module’s property still defaults to false so other hosts can select
their content explicitly. XSharp.MovieParity also enables the actor for paired
validation. This availability does not establish complete original-game or
whole-scene parity; the historical captures and later milestones below document
their respective scopes. See the current scene analysis
for the latest full-movie diagnostics.
The DX9 integration probe uses the same X2 content switches as the regular demo, with native buster/dust/player-animation options left at their defaults. It loads Sponge explicitly, moves the camera through the production event-scanning columns, checks body/head initialization and projectile attacks, and compares 90 updates after restoring a complete engine snapshot. Camera positioning and no clip prepare the test scene; this is an integration test, not original-movie or pixel parity.
dotnet build tests/XSharp.ContentSmoke/XSharp.ContentSmoke.csproj
Push-Location tests/XSharp.ContentSmoke/bin/Debug/net9.0-windows7.0
try {
.\XSharp.ContentSmoke.exe --x2 'C:\path\Megaman X2 (USA).sfc'
} finally {
Pop-Location
}
The original no-argument X1 content smoke scenario remains available.
The camera scanner activates event 5B on 605. The body and separately damageable
head initialize on 606, sharing the original attack protocol. The first-free native
big-object allocator preserves initial fractional slot bytes. Initial pool state is
imported once from the original frame-zero snapshot; later updates use simulated
allocation/release without frame-by-frame correction. Opaque occupied source slots
remain reserved until their classes receive semantic ports.
Both subtype-2 body projectiles pass 148 original observations, covering delayed launch, expansion, flight, animation and timers. The hosted replay also matches all 148 projectile positions, including their retained initial fractions. Ballistic head shots use the shared oblique-launch API. The 48-frame original assembly sheet, including body, head, projectiles and fragments, reports no missing tiles.
The new comparator maps Scriver, Aclanda and its projectile slots to native identities
and checks lifecycle, positions, velocities, health, facing, control fields and animation
cursors. The 1,070-input experimental run compares 1,177 actor states; 1,165
match, with the first difference at 762, where the hosted full buster damages the
body one update early. Subsequent ordinary shots also hit one update early. Gun
origins, initialization motion/contact rules and retained player-weapon pool state
remain the next adapter work. The original movie contains 35 accepted buster shots;
engine creation times and charge kinds already match all 35. Their read-only CPU
observations are retained in parity/gap-buster-shots.csv and its source JSON.
RNG seeds/call counts agree through 1054 in this run; the next native draws belong
to head fragments on 1055. Head destruction is currently early because of projectile
timing, and its fragment RNG is not yet dispatched. This prefix is not evidence that
combat or all entities already match. Player/camera/health agree throughout this
1,070-input run, and the 20-update engine save replay from 635 passes.
parity/gap-jumps-aclanda-host.json retains the exact audit and remaining differences.
AclandaHead translates $29:B1DD..B32D, including the parent-request handshake, opening animation, strict 63/64-pixel branch boundary, both directions, shot requests and completion on the following update. Close shots use X offsets +7/-7, Y -44 and horizontal speed 4. Far shots use +10/-10, Y -51 and the shared MovementUtil.GetObliqueLaunchVelocity SNES overload. The arithmetic belongs to the existing physics API also used by Dig Labour; the optional content project supplies the original Q13 direction table. There is no separate Aclanda aiming solver.
Four controlled native head attacks retain 240 observations, including every controller/animation update, one shot on update 59 and completion on 60. aclanda-head-protocol-source.json describes the explicit private RAM setup and hashes. Another 448 read-only idle observations, 607-1054 of the original movie, check the idle cursor. Fifty native aim cases verify exact velocities for both directions and targets above/below the emitter; their provenance also accompanies the shared physics fixture. ROM tests pin all head animation triples/loops and direction coefficients. Save tests restore body and head together through 300 later updates.
The common X2AnimationCursor keeps simulation markers separate from rendering and also serves Scriver. These checks certify the component inputs/outputs described above. The isolated checks do not certify hosted combat, complete pool ownership, destruction effects or whole-scene equivalence.
Aclanda is X2 event 5B, native entry $29:AE7B, sprite assembly 98. Its implementation belongs to the optional XSharp.Enemies.X2 project. Body/head AI and projectile control remain device-free models. The optional hosted adapter supplies assets, damage, ownership and dispatch phases; registration of event 5B uses the content switch enabled by the demo as described above.
AclandaBody translates $29:AF31..B10F with original state values:
| State | Behavior |
|---|---|
00 |
Wait 30 updates, test facing, then select an attack |
02 |
Opening animation, first body-shot request, 60-update wait, second request |
04 |
Opening and extension animations, first alternate body shot, 60-update wait, second shot, 30-update recovery |
06 |
Wait for the head’s attack completion or head loss |
The routine reads the attack-choice table from $06:DA72, because DBR is $06; using the code bank $29 would read unrelated data. The low four bits of one actual RNG draw select the table entry. Integer distance below 150 uses the second half; distance 150 uses the first. Facing is checked first, with equal X accepted only while facing left. Losing the head selects state 4 without drawing RNG, after the facing/wait tests pass.
The body emits a request for projectile dispatch 29, subtype 0 or 2, at X offsets 22 and 10 toward the facing direction, Y offset -12. Allocation success is external: a full projectile pool must not stall the attack’s timers or animation. The hosted adapter now creates projectile entities from these requests. Native projectile allocation copies integer coordinates and leaves existing fractional slot bytes intact; that pool behavior must be represented when connecting the actor to continuous replay.
AclandaAnimation independently reproduces $08:C690 (load) and $08:C673 (advance) for the four used body scripts under table $2F:E5F6. Each entry contains duration, flags and assembly frame; the last-entry marker is visible as soon as that entry is loaded, before its timer expires. Controllers test it before advancing. Relative loop targets are retained in the static data. In state 4, the second shot and recovery retain animation 6; they do not load animation 7 or reset to the original idle frame.
The model’s state, substate, timer, head-loss flag and animation cursor are serializable. It stores no device, engine singleton, random callback or renderer resource. The random callback is supplied only for an update that needs a draw. This keeps the simulation suitable for headless tests and future HunterBaseStudio reuse.
XSharp.Tests/Fixtures/X2/aclanda-body-gap.csv retains 726 consecutive original observations, frames 606–1331 of the user’s Gap Jumps.bk2, body slot 0D58. Its source JSON pins the movie, USA ROM revision and captured scene-memory hash. CSV hashing uses canonical LF (the test normalizes CRLF checkouts). The capture starts at native initialization, excluding the allocation frame’s stale uninitialized data, and ends before the death routine.
The component comparison checks every captured state/substate, cooldown, head-loss flag, animation duration, marker, assembly frame and script pointer. It also checks the one observed RNG draw on 635 (49299 -> 16852) and body-shot requests on 704 and 764. The input to the isolated RNG starts at that draw’s observed incoming seed once; this does not correct or certify the whole engine’s RNG timeline. The child reports its loss after the parent’s update on 1055.
Additional tests cover all 32 attack choices, both directions, the 149/150 distance boundary, facing equality, missing-head selection, head completion, both firing patterns, and serialization at nine attack boundaries followed by 600 updates each. With XSHARP_TEST_ROM_X2 set to the documented USA ROM, another test directly verifies all choice bytes, animation triples, pointers and loop words against the SHA-1-checked ROM. Without that environment variable the ROM-specific test skips explicitly; the captured component regressions still run.
$env:XSHARP_TEST_ROM_X2 = 'C:\ROMS & ISOS\SNES-ROMS\Megaman X2 (USA).sfc'
dotnet test XSharp.Tests/XSharp.Tests.csproj --filter 'FullyQualifiedName~Aclanda'
The single-shot and head-attack branches are translated from original code and covered with boundary tests; the supplied movie exercises the double-body-shot branch. This milestone is not complete Aclanda behavior parity. Remaining work includes native player-weapon origins and initialization/contact timing, destruction/debris/drop handling, complete offscreen behavior and shared object-pool ownership. The experimental host connects the separately damageable head, dispatch 29, original assets and retained enemy/projectile slot fractions. The Scriver analysis records its translated hosted controller and destruction/RNG milestone.
The continuous 2,060-input run in parity/gap-jumps-aclanda-combat.json matches every mapped Scriver, Aclanda body/head and Aclanda projectile state, including health, allocation, lifetime, controllers, animation and position. The earlier one-update damage differences were native weapon initialization/placement and inclusive integer hitbox edges. Native weapons remain opt-in within X2 gameplay content. This milestone still first differs in player/camera motion at 2002 and RNG at 1442; the subsequent ceiling and native wall-dust work must be revalidated separately.
Aclanda head death queues four subtype-22 fragments and one subtype-23 fragment at its native integer offset (+/-16,-29). Body death queues paired subtypes 24..28 and performs the class-4 drop draw before the small-object dispatcher. All fifteen isolated particle trajectories compare exactly against 1,021 independent original states, using each native initial fraction/seed and camera trajectory as component inputs.
Enemy big/projectile allocation now uses the shared SnesObjectSlotPool API. Actual debris and wall dust use the same bounded small-object pool through SnesObjectPoolController; the enemy module has no dependency on X2 gameplay. Other small-object producers, source explosion/impact effects, pickups, rendering visibility and full-scene correspondence remain pending, so particle slot identity in a hosted full replay is not yet certified.