gbdev / pandocs

The single, most comprehensive Game Boy technical reference.

Home Page:https://gbdev.io/pandocs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lcd-position-and-scrolling: wrap behavior

dan-mcdonald opened this issue · comments

It's my understanding that when the value of SCX/SCY are large so that the coordinate would exceed 256, it will wrap over to 0.

"yes, no, kinda"
you literally cant write a value bigger than 255 to an 8 bit register

The SCX/Y values define the top-left corner of the screen's view of the BG/window area. So if SCY=255 then the first line will be the bottom of the BG/window area and the remaining lines will wrap to rows 0-142, right?

yup! the background wraps around

Is this documented anywhere in the pandocs? It seems like the logical place to mention it is in the scrolling section https://gbdev.io/pandocs/Scrolling.html

Seems about right. Would you like to open a PR?

Ill open a PR soon