Skip to content

Rexfsn - #252

Merged
techomancer merged 3 commits into
mainfrom
rexfsn
Oct 18, 2026
Merged

Rexfsn#252
techomancer merged 3 commits into
mainfrom
rexfsn

Conversation

@techomancer

Copy link
Copy Markdown
Owner

should fix #176

techomancer and others added 3 commits October 17, 2026 17:06
and add more docs for other hardware
IRIS GL draws Z-buffered lines as F_LINEs without DOSETUP, one ZPATTERN GO
per stroke with an MSB-aligned mask. fsn's label text came out fragmented,
then with stray pixels at stroke joints. Ground truth came from IRIS GL
itself: it computes the same pixels for its software Z buffer, and later
soft-Z spans are masked there (fns.log trace, fsn.rec recording).

- ZPATTERN write reloads the pattern: the next pixel tests bit 31. The bit
  position used to carry over from the previous stroke.
- BRESROUND (BRESRNDINC2[31:24]) decides the d == 0 step per octant, in the
  interpreter and the JIT. IRIS GL loads 0, the X server 0xff.
- F_LINE/A_LINE setup (fline_setup): slope from the fixed-point endpoint
  deltas; the spec's octant table has y pointing up, so its y fraction is
  16 - the register's; d/incr kept exactly in 1/256 pixel; no first-pixel
  adjustment (IRIS GL confirms the start point's own pixel in 113 of 119
  deciding strokes); walk length along the octant's major axis.
- JIT: a SPAN ends with XSTART one past XEND and YSTART untouched (it was
  ended like a BLOCK row), and row ends restart disabled patterns' bit
  positions as the interpreter does. Interpreter and JIT now replay fsn.rec
  (4M records) to the same state.
- Replay: REX3_REPLAY_LIMIT (first n records) and REX3_REPLAY_STATE (final
  registers as TOML), used to bisect that divergence.

Tests: ZPATTERN reload on fsn's stroke sequence, BRESROUND both ways, a
2000-line fractional sweep against a geometric oracle (fline_geom) on both
engines, fsn strokes, span end on both engines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dump (records with register names, numbered as REX3_REPLAY_LIMIT counts
them), text (slices in the text form for testdata/), summary, and
from-trace (a `rex trace`'s GF lines as a replayable recording, for
replaying a trace's drawing offline).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@techomancer
techomancer merged commit 6a85123 into main Oct 18, 2026
7 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.

from p7

1 participant