The initial standalone integration retained romLoaded && Boss != null in both
BaseEngine.StartBossBattle and StartSigmaBossBattle. Production asset hosts
intentionally keep romLoaded false. A boss door therefore completed its full
animation and crossing, but never scheduled the boss spawn. The player remained
input-locked in the arena.
Both shared entry points now require the registered Boss only. Their music,
introduction flags and 64-update spawn delay remain the same. This applies to
any authored/imported stage using the normal door lifecycle or the specialized
Sigma entry; it is not a Penguin stage-ID exception. A missing boss remains a
no-op. The change neither creates missing boss implementations nor replaces
stage-specific scripted geometry/entry logic.
The remaining romLoaded branches in the engine handle decoder-specific loading,
VRAM/palette reconstruction, legacy source restoration, legacy stage music and
ROM checkpoint positions. Asset counterparts use package graphics, imported
checkpoint data and authored OnLoaded/OnReady callbacks. Resource selector
setters already dispatch to package snapshots before the optional decoder.
Boss registration and defeat callbacks also work through both legacy factories
and CreateBoss<T> for optional modules. No additional boss-entry gate on direct
ROM availability was found in the core or current optional boss modules.
Historical LOAD_ROM save-layout guards are a separate compile-time compatibility
convention; they are not used to decide whether an asset-backed boss may start.
BossMusicTests now exercises every concrete, parameterless boss type present in
the core and optional X1/X2/X3 assemblies with romLoaded both false and true.
The current set is 20 types / 40 source-mode cases. Tests check intro selection,
battle/introduction flags, the delayed callback and its boss target. Existing
normal/fortress music-loop checks and no-boss cases make 49 cases in this suite.
Some types are unfinished placeholders: accepting entry does not validate their
combat implementation.
Together with the package/reader/resource and game-manager checks, the focused
suite passed 99 cases. The ordinary Penguin campaign/state smoke also passed
727 updates after introducing the scripted room test host.
The scripted DX9 runner starts the embedded Penguin at checkpoint 2, walks right through the actual imported second-door trigger, observes opening/crossing/ closing/closed events and waits for the real introduction and first projectile:
dotnet run --project tests/XSharp.LevelSmoke/XSharp.LevelSmoke.csproj -- --penguin 2 --boss-room --capture=C:/Evidence/penguin-boss.png
Before the fix, all four door phases completed but BossBattle stayed false.
After the fix, entry took 296 updates, the introduction/health fill 201 more,
and the first ice projectile appeared 32 updates after the controls were released.
The boss was visible with 32 HP, and the selected tracks were 19 - Boss Intro.mp3
then 20 - Boss Battle.mp3. The scripted host honors its checkpoint argument and
uses explicit inputs instead of the user’s live keyboard.

The independent Bosspider room probe now loads the imported Sigma Fortress I asset, with no direct-ROM runtime. It also checks full second-door entry, visible boss, health fill, fortress music, a complete descent/vulnerability/retreat cycle and 180 updates of exact state-restoration continuation:
dotnet run --project tests/XSharp.BosspiderSmoke/XSharp.BosspiderSmoke.csproj
These are source-independent lifecycle checks, not a certification of full-game or original-console parity.
After Penguin’s defeat, the single-stage demo keeps the existing explosion,
victory music, delay, victory pose, upward teleport and 60-update black fade.
At fade completion GameManager.OnPlayerTeleportCompleted chooses the destination:
DemoGameManager reloads its authored initial level at checkpoint zero. The base
policy still reloads the current checkpoint, and a campaign may override it to
open stage selection. Lives and session data are preserved. Death/respawn does
not use this exit-teleport callback.
Fresh level teardown also clears BossBattle and BossIntroducing. Restoring
a saved battle still restores its serialized flags after the level is prepared.
No new state fields or schema version are introduced.
The integration probe applies a controlled lethal hit through the damage pipeline after observing Penguin’s first attack, then runs the real defeat/exit/restart:
dotnet run --project tests/XSharp.LevelSmoke/XSharp.LevelSmoke.csproj -- --penguin 2 --boss-victory
dotnet run --project tests/XSharp.LevelSmoke/XSharp.LevelSmoke.csproj -- --penguin 2 --boss-victory --campaign
The demo must return to checkpoint zero even when the probe initially starts at
checkpoint 2. The campaign check must retain checkpoint 2 and its completed-stage
record. Both verify observed victory music/teleport, unchanged lives, a fresh
player and unspawned boss, cleared battle flags and released controls.
Both checks passed: the demo restarted at (128,1183) with camera (0,1024);
the campaign retained checkpoint 2 and its stage-completion record. The focused
unit suite passed 100 cases, including custom game-manager dispatch after exit.