Skip to content

Improve checked GSU code generation and add an interactive gem-chess scene - #22

Merged
DiscoManOfficial merged 2 commits into
mainfrom
dev/gem-chess-scene
Oct 20, 2026
Merged

DiscoManOfficial merged 2 commits into
mainfrom
dev/gem-chess-scene

Conversation

@DiscoManOfficial

Copy link
Copy Markdown
Member

Summary

Improve checked GSU code generation and add an interactive SNES gem-chess scene with current-source rendering regressions.

Changes

  • Add bounded local-storage planning and immutable RAM data pools, improve register allocation and loop-state reuse, and expose --require-no-spills for source compilation and allocation checks.
  • Refine branch lowering, checked pointer arithmetic, delay-slot scheduling and CACHE handling while retaining conservative fallbacks and placement checks.
  • Reset stack-check credit at control-flow entries and joins so an unexecuted predecessor or earlier loop iteration cannot justify omitting a required check.
  • Add a complete board and 32 faceted pieces, orbit/elevation/zoom controls, shaded and wireframe views, a double-buffered SNES host, build support and documentation.
  • Extend backend, storage, linker and CLI regressions; exercise the actual scene's raster, private-edge and paint kernels at O2 and Os through the shared native/direct test registry.

Validation

  • Release and Debug: 387/387 tests passed in each build, with no failures, skips or incomplete tests; the full prebuilt/direct suite also passed.
  • Strict C++14 syntax checks passed for 14 changed production translation units and two runners. Both builds passed 540 boundary self-checks and six gem-chess corpora: 432 public-edge, 568 private-edge and 536 polygon cases at each of O2 and Os, with byte-exact assembly paths.
  • Current scene payloads are 27,675 bytes at O2 and 27,260 bytes at Os. Project, direct, compiler-assembly and final-export paths matched byte-for-byte; 12 strict no-spill rejection/output-protection cases passed.
  • O2 Mesen positive/negative checks passed within the original 120-second CLI and external limits. Ten baseline BMPs, all 24,576 framebuffer bytes and primitive counts matched exactly; controller, ABI, VRAM/PPU and VBlank checks passed.
  • Emulator profile: Mesen 2.2.1+20ba206, NTSC, 21.477 MHz GSU at 100%, CLSR=1, normal multiply timing.

Limitations

  • The example is a scene/camera viewer, not a chess rules engine or a real-time game.
  • Full-scene Os emulator runtime and physical hardware were not tested; no fresh CI or sanitizer result is claimed. Existing previews and historical timing comparisons are not current performance measurements.
  • The scene still fails the optional spill-free constraint. Its diagnostic identifies the first offending function, not a whole-scene spill count; reduced stack traffic does not imply a stackless scene.

@DiscoManOfficial
DiscoManOfficial merged commit 9625fbf into main Oct 20, 2026
23 checks passed
@DiscoManOfficial
DiscoManOfficial deleted the dev/gem-chess-scene branch October 20, 2026 22:21
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