Make the sequencer pixel generator cheaper on opened borders - #326
Merged
highbyte merged 1 commit intoSep 10, 2026
Merged
Conversation
The sequencer runs its per-cycle pipeline over every cycle of every line, so a frame with the vertical border opened is about twice the work of a text screen. Four changes to the generator keep that cheap: a block whose fetched bytes, mode and pipeline state equal the block before repeats its eight codes by copy (the idle byte across an opened border, runs of identical cells, blank cells under any XSCROLL), the line's colour resolve copies such blocks as well, sprite rows are decoded once and written as runs through the bulk pixel delegates instead of a delegate call per pixel, and the fetch ring's slots are derived instead of taken as modulos per cycle. On a sprites-only demo that opens the border the sequencer drops from 1587 to 1172 microseconds per frame with per-line sprites on and from 1404 to 1025 off on this machine; the text-screen benchmark is level with the integration branch. Output is unchanged: VICE test programs, game snapshots and all tests identical.
|
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.



Summary
The sequencer pixel generator runs its per-cycle pipeline over every cycle of every line, so a frame that opens the vertical border, where the whole line is output, is about twice the work of a text screen. On a sprites-only demo that does so the sequencer rendered at three times the legacy generator's cost. Four changes to the generator, none of which change its output:
Validation