Skip to content

Add bounded canvas helpers and a resilient Windows 3.0 example - #16

Merged
astrobleem merged 1 commit into
mainfrom
codex/bounded-canvas-reviewed-20261030
Nov 3, 2026
Merged

astrobleem merged 1 commit into
mainfrom
codex/bounded-canvas-reviewed-20261030

Conversation

@astrobleem

@astrobleem astrobleem commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

Add optional caller-owned canvas and damage helpers for Windows 3.0 real-mode applications. Callers track the old/current rectangle union, draw into a bounded color or monochrome GDI bitmap, and commit damage only after successful presentation. The helper preserves destination colors and retains handles when cleanup must be retried.

The standalone CANVAS30 example demonstrates animation, expose/resize handling and compact-screen placement. Its single task timer survives window destruction so failed DC/bitmap deletion is retried before quit. Failed background FillRect calls prevent damage commit and trigger full-client repaint, including before an unrelated partial expose.

Validation:

  • Exact reviewed tree ec12a671 is preserved in commit 61052a7, based on current main 3ac1140; all 18 changed files and the complete Git tree were byte-compared after applying CANVCOMP.PAT.
  • Fresh strict C89 host tests pass: 44,048 helper assertions and 1,485 actual-example assertions, including repeated cleanup failure and background repaint failure controls.
  • Native MSC6 builds ran in private Windows 3.0 real-mode Tandy HX 8088/640 KB fixtures using matched current TR51616/TR53216 drivers. Normal and injected actual-WinMain tests pass 5,008 controller checks across four runs, including task unload, stable free memory and clean owned-process/lease release.
  • Synthetic native API wrappers inject partial background painting, DeleteDC failure and bitmap deletion failure; logs verify full-client black restoration and quit only after handles release. Exact identities, footprint and limits are recorded in NATIVE.JSN and FAILURES.JSN.

The API uses fixed storage and adds no library timer or display-driver change. Physical hardware, long-duration exhaustion, permanent-failure UX and other native modes remain unqualified. This PR contains source, tests and evidence metadata; no SDK, OS media or guest images. BOR/Mesen resources were untouched.

Publication was authorized. Approval and merge require separate authorization.

Exact-head CI at 61052a723a1ac8ddb243126065e4cf566301c8f5: all five workflows passed—Bounded canvas helper, RAWCLK shared sound ownership, TPLAY exact-head source policy, Large VGM/VGZ foreground playback, and Selectable PSG banks. No approval or merge performed.

@astrobleem
astrobleem merged commit f43632c into main Nov 3, 2026
5 checks passed
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