Skip to content
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

Get Tile step during the FIFO needs correction / improvement #377

Open
datapaganism opened this issue Oct 12, 2021 · 1 comment · May be fixed by #379
Open

Get Tile step during the FIFO needs correction / improvement #377

datapaganism opened this issue Oct 12, 2021 · 1 comment · May be fixed by #379
Labels
content Improvements or additions to documentation enhancement New feature or request

Comments

@datapaganism
Copy link

If the current tile is a window tile, the X coordinate for the window tile is used, otherwise the following formula is used to calculate the X coordinate: ((SCX / 8) + fetcher’s X coordinate) & $1F. Because of this formula, fetcherX can be between 0 and 31.

fetcher's X and fetcherX are too similar and cause confusion.

Suggestion : rename fetcher's X coordinate to X_tile_number or something similar.
Also provide a range, since it is not inferred from the variable name, i.e. 0 - 31 (fetcher's X advances once every 8 pixel fetch).

If the current tile is a window tile, the Y coordinate for the window tile is used, otherwise the following formula is used to calculate the Y coordinate: (currentScanline + SCY) & 255. Because of this formula, fetcherY can be between 0 and 159.

currentScanline (same as LY?) ranges between 0 - 143 (visable), SCY ranges between 0 - 255, fetcherY therefore must be between 0 and 255 instead of 159.

Suggestion : change the range of fetcherY

@ISSOtm
Copy link
Member

ISSOtm commented Oct 12, 2021

Note: being covered by my reworking of this article.

@avivace avivace added content Improvements or additions to documentation enhancement New feature or request labels Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants