-
-
Notifications
You must be signed in to change notification settings - Fork 124
Document more of the Window's behaviour #626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
|
||
| 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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping @LIJI32
Co-authored-by: Antonio Vivace <avivace4@gmail.com>
Co-authored-by: Antonio Vivace <avivace4@gmail.com>
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.