XSharp

Bosspider milestone

The optional XSharp.Bosses.X1 module supplies Bosspider battle states and the Petitpider subordinate. X1 object event 0x63 constructs the boss, and the existing boss-door flow starts it. Register X1BossesModule before loading the level; the WinForms demo does this explicitly. The former empty core class could never complete introduction/health filling, so room entry left the boss absent and the intro music active. Room entry now uses OST\X1\05 - Sigma Intro 1.mp3, then health filling completion switches to OST\X1\06 - Sigma Boss Battle.mp3.

Bosspider, Vile (including Ride Armor Vile), Rangda Bangda and D-Rex select these shared tracks through Boss.UsesSigmaBossMusic. Both tracks are precached by the common boss base, so they are available without constructing or precaching Jedi Sigma. Ordinary Maverick bosses retain their existing tracks, and Jedi Sigma retains its specialized battle track.

The existing file-specific loop points are preserved: Sigma Intro 1 returns to 8.226 s at 16.418 s; Sigma Boss Battle returns to 0.023 s at 55.348 s. These values were already defined in PlaySigmaBossIntroOST and PlaySigmaBossBatleOST; this correction does not claim a new experimental calibration of their sample accuracy. BossMusicTests checks track dispatch, loop arguments, shared precaching and stopping for both music groups, plus Jedi Sigma’s specialization, without an audio device.

The boss uses its embedded sprite sheet from the content assembly, a separate eye overlay, connections between four lanes, three health-dependent travel speeds, a vulnerability interval, retreat, subordinate spawning and the existing defeat sequence. The real Sigma I event is at (5832,224), the rightmost lane of the room beginning at X=5632. Arena placement now derives the aligned room origin instead of incorrectly treating that event as its center.

Run the tests with a .NET SDK that supports net9.0.

dotnet test XSharp.Tests/XSharp.Tests.csproj

Three additional source checks run when XSHARP_TEST_ROM_X1 points to a user-supplied headerless Mega Man X USA ROM. These check SHA-1 449A00631208FBCC8D58209E66D0D488674B7FB1 before interpreting any offsets.

$env:XSHARP_TEST_ROM_X1 = 'C:\path\to\Megaman X (USA).sfc'
dotnet test XSharp.Tests/XSharp.Tests.csproj

The source checks compare the engine values against the original lane table at $86:D65C, Petitpider launch tuples at $86:D664, connection rows at $86:D692, speed table at $86:D6A2 and collision boxes at $86:D652, $86:D657 and $86:C3D7. The local USA disassembly was used to inspect Bosspider $82:DB76..E282 and Petitpider $88:8162..82C3. FredYeye’s public disassembly targets Rockman X Japan, which has different table addresses.

The deterministic tests exercise the actual movement state callbacks through 3,072 generated descents and verify connection-following, arrival, the 24-frame vulnerability boundary, retreat and per-attack speed latching. They also cover selection branches, launch parameters, gravity and landing.

Imported room regression

dotnet run --project tests/XSharp.BosspiderSmoke/XSharp.BosspiderSmoke.csproj

This Direct3D 9 probe loads the imported Sigma Fortress I asset without a ROM, skips the route by moving X immediately before the second door, and enters through the real trigger. It checks the registered event, boss appearance in the camera viewport, health filling, released player input, Sigma introduction/battle track selection and loop/stop byte positions, route bounds, descent/open/retreat cycle and deterministic 180-frame full-engine save-state replay with the external boss module. The player is protected during this controlled integration test. It does not establish natural traversal or original-game frame parity.

Full game parity remains open. In particular, connection artwork is currently drawn by the engine and crossings use planned coordinates instead of the original collision-marker probing. Intro movement and timing, animation frame durations, eye alignment, allocation pressure, RNG consumption and the original screen-wide defeat effect still need original-runtime frame traces. Original-versus-XSharp synchronized replay is also pending; deterministic XSharp save/load alone does not prove that equivalence. Other pending X1/X2/X3 bosses remain outside this milestone.

Sprite loading and Petitpider corner regression

The shared D3D9 loader now retains each PNG’s original dimensions and colors; see sprite palette regression. Bosspider’s 203 x 135 source sheet previously became 256 x 256 through the D3DX default loader, invalidating the original crops and exact palette matches for the boss and Petitpider. The render regression checks all source pixels and indexed body, walking-child and climbing-child crops on a real device.

Petitpider’s walking controller also relied solely on a center-plus-eight-pixel map probe. The production collision sweep could stop it a pixel before that probe reached the wall, clear VX, and leave it walking in place forever. The controller now also accepts the resolved side contact in its travel direction before entering its existing upward wall-climb path. Eight device-free production entity/world tests first reproduced the stuck WALKING state, then verified climbing, upward velocity and eight uninterrupted upward updates in both directions, both speed variants and multiple fractional starting positions. This fixes the engine corner stall without claiming complete original-game Petitpider timing or allocation parity.

The boss-room smoke test now loads the copied Assets/Levels/X1/09.xlevel through its initial-level override and accepts an optional imported package path. It verifies X1/stage 9 identity and absence of a ROM runtime, independently of interactive legacy constants. After the shared asset-backed boss-entry correction, the full second-door, viewport, health/music, combat cycle and 180-update restoration checks pass on this path as well. The revision-pinned ROM source tests above remain separate, optional research checks.