rtg: leave COMPLEMENT lines to Picasso96 - #19
Merged
Conversation
struct Line does not carry the RastPort's FRST_DOT state, so an accelerated COMPLEMENT line cannot tell a fresh Draw from one continuing at a shared vertex. Drawing that vertex twice is visible under XOR. Found by p96cts DrawLine-complement, a closed pentagram whose five vertices are each shared by two Draw() calls: four pixels came back inverted. Ported from the ZZ9000 driver, which stopped accelerating this mode for the same reason. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fix comes straight from the ZZ9000 driver that Z3660.card forked from -- same reasoning, same code, only reindented. See BlitterStudio/zz9000-drivers PR #53 (
fix/rtg-line-endpoints), whereDrawLine()gained:struct Linecarries no FRST_DOT flag, so an accelerated COMPLEMENT line cannot tell a freshDraw()from one continuing at a shared vertex. Under XOR, rendering that vertex twice inverts it back, and the result depends on which of the two segments claims it. Every other draw mode is idempotent at a shared pixel and stays on the fast path.How it shows up
p96cts DrawLine-complementdraws a closed pentagram: five segments, five vertices, each shared by twoDraw()calls. Four pixels came back inverted relative to the reference.Testing
Verified under Copperline with
p96cts Z3660 640x480x8and640x480x24:DrawLine-complementgoes from FAIL (4 of 64000 pixels) to PASS at both depths, and no other scene changes.Independent of #18 -- different function, applies cleanly in either order. With both applied, Z3660 passes 21/23 at 8 bits and 19/20 at 24 bits; what remains is
BltBitMap-mintermsandBltBitMap-planemask, which look like a separate issue in the planar blit path.🤖 Generated with Claude Code