Open
Conversation
avivace
requested changes
Sep 23, 2025
LIJI32
reviewed
Sep 23, 2025
|
|
||
| If the WY condition has already been triggered and at the start of a row the window enable bit was set, | ||
| then resetting that bit before the WX condition gets triggered on that row yields a nice window glitch pixel where the window would have been activated. | ||
| The scroll registers are re-read on each [tile fetch](<#Get Tile>), except for the low 3 bits of `SCX`, which are only read at the beginning of the scanline (for the initial shifting of pixels). |
Contributor
There was a problem hiding this comment.
You'd think the low bits of SCX would only be read once per line, because that's the logical way to do so, but unfortunately this isn't true. The fetched tile's X position is calculated (roughly) by adding SCX to LX and taking the 5 topmost bits, rather than adding the 5 topmost bits of SCX and LX.
Member
Author
There was a problem hiding this comment.
I see. Do you know of a test ROM that checks this?
Also, it seems like it'd be a better fit for a separate PR, so I'll open one when I have some info to pen down.
avivace
requested changes
Oct 1, 2025
Co-authored-by: Antonio Vivace <avivace4@gmail.com>
Co-authored-by: Antonio Vivace <avivace4@gmail.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.
Fixes #376.
cc @LIJI32 for review
In particular, I have a TODO for linking to a test ROM, as I believe mealybug-tearoom has one for the “trigger Window multiple times in a single scanline” behaviour, but I couldn't figure out which one.