Skip to content

Add portable screen.render_visible dispatch and cross-engine contracts - #146

Closed
Roxas2712 wants to merge 20 commits into
UNDERdecoded:mainfrom
Roxas2712:codex/portable-screen-visibility
Closed

Roxas2712 wants to merge 20 commits into
UNDERdecoded:mainfrom
Roxas2712:codex/portable-screen-visibility

Conversation

@Roxas2712

@Roxas2712 Roxas2712 commented Oct 23, 2026 •

Copy link
Copy Markdown

Gen2Recomped accepted API-3 screen.render_visible registrations without a native producer, so a mod could not mirror a native menu while omitting its main-screen render. Dispatch (next, state) through the common StateStack and Game composition paths for native API 1/2, unified API 2 and API 3.

Only literal false hides a state. Hidden states stop drawing, cannot select the opaque render base/backdrop fallback, and cannot own main-screen palette zones. They retain their stack position, update and input ownership. Separate native opacity calculation for covered-state animation prevents a render-only predicate from changing simulation. Add capability/catalog coverage, a portable example, documentation and pinned-reference CI.

Stack / review scope

Depends on #145 and its existing prerequisites. This branch adds one feature commit above 7801f9d715c8c1f9910a7f982ef89a6396e4137e; the main-target diff also includes the unmerged prerequisites. Review only this change.

Validation

  • 4,415 focused checks: shared API-3 contract (57) and all 15 Gen2 host versions across four API/callback modes (4,358). Capability suite: 346/346.
  • 64 native cross-engine runs / 256 paired composition observations across the feature and combined integration. The exact same example source runs on clean, pinned Gen1Recomp 79ea62f45fb2ea8f65d081a109431e4eb1bbdb36 and Gen2Recomped on Red, Yellow, Gold and Crystal.
  • Real StateStack and Game draw methods, including Gen1 Gold's native drawScene, verify hidden opaque menus, overlays, empty/fully hidden stacks, palettes, literal-false behavior, continuation routing, errors, unsubscribe/owner cleanup, failed-entry rollback, native keyboard/Input delivery and unchanged covered animations.
  • StyLua, actionlint and whitespace checks pass.
ROM-free quick suite Engine Mod SDK B30 profile
Parent #145 86/96 3/3 pass
This feature 88/98 3/3 pass
Combined prior PRs + this feature 142/142 3/3 pass

The feature retains the parent's same ten failing suites and 17 failing assertions, with identical failure output. Separately proposed fixes are included in the green combined integration at db7ba3283dbd9b5bd9846130c2392ef273c08bf6. Integration resolution preserved existing callback catalog entries and documentation placement; no functional conflict resolution was needed.

Reference limits

The pinned Gen1 GBA UI stack does not dispatch this hook despite cataloguing it; cross-engine claims therefore cover its native Gen1/Gold-family producers. Gen2's common stack supplies it on all five generations. Gen1 API 3 supplies a shallow state context view, while Gen2 keeps an opaque state handle: the shared contract is a pure property-based predicate, not table-identity or arbitrary state-mutation parity. These differences are asserted/documented rather than modifying the reference engine. Gen1 API 2 ignores the unified opt-in.

Contract and reproduction commands describe these boundaries and host-specific palette/external-world routing. Tests are ROM-free/headless with presentation isolated; they do not claim GPU pixel equivalence, a cartridge playthrough or physical mirrored-display output.

Hosted CI

GitHub reports action_required for all 7 pull-request workflows; maintainer approval is required before the fork workflows can run. The new contract workflow has no started jobs. These are not hosted passes. Screen visibility contract run. Local feature and combined-integration results above were completed on the published/tested commits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant