Skip to content

Add Forth Salon pixel shader demo#23

Merged
jserv merged 2 commits intomainfrom
forthsalon
Mar 6, 2026
Merged

Add Forth Salon pixel shader demo#23
jserv merged 2 commits intomainfrom
forthsalon

Conversation

@jserv
Copy link
Contributor

@jserv jserv commented Mar 6, 2026

This implements an interpreter compatible with the Forth Salon dialect.


Summary by cubic

Adds a Forth Salon–compatible pixel shader demo with a bytecode VM and tabbed examples, rendering on a 256x256 canvas in the example app. Also fixes a bottom sheet validation warning.

  • New Features

    • Forth Salon bytecode VM with compile-time word inlining, stack bounds checks, and NaN/Inf-safe memory ops.
    • Tabbed, time-animated examples (Twister, Rainbow, Checker, Metadonut) rendering per-pixel RGB on a 256x256 canvas with RLE scanlines and floor/ceil edge snapping.
    • New “Forth Salon” window and toggle in the example app; Kconfig option DEMO_FORTHSALON (default y; depends on DEMO_EXAMPLE && MODULE_NAVIGATION) and Makefile wiring.
  • Bug Fixes

    • Inline the rect literal into IUI_MD3_TRACK_BOTTOM_SHEET to avoid an unused-variable warning when runtime validation is disabled.

Written for commit 4771982. Summary will update on new commits.

jserv added 2 commits March 6, 2026 23:46
Inline the compound literal directly into IUI_MD3_TRACK_BOTTOM_SHEET()
instead of storing it in a separate variable.

When IUI_MD3_RUNTIME_VALIDATION is not defined, the macro expands to
((void) 0), leaving the variable unused.
This implements an interpreter compatible with the Forth Salon dialect
(forthsalon.appspot.com).  Each pixel is evaluated through a Forth
program that leaves R,G,B on the stack.
- Switch-dispatch bytecode VM with compile-time word inlining
- Stack bounds checking, NaN/Infinity guards on memory ops
- 256x256 canvas with RLE scanline rendering (floorf/ceilf snapping)
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 6 files

@jserv jserv merged commit c81356b into main Mar 6, 2026
11 checks passed
@jserv jserv deleted the forthsalon branch March 6, 2026 15:56
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