gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Beginners > Best way to scroll a screen?

#35728 - WillyWonka - Thu Feb 10, 2005 6:26 am

I'm trying to make my program scroll in tile mode now that I have stuff working and I was wondering about something.

The screen tiles, so the vofs and hofs increase and the screen wraps, what happens when the number overflows? Does it just reset to 0 and look as though nothing happened?

Or should I just be scrolling one tile over, then redrawing the entire background and reset the offsets back to 0?

#35730 - sajiimori - Thu Feb 10, 2005 6:47 am

You can't overflow the scroll registers, because they are write-only which means you can't "add" to them. You can only write new values. Any overflowing that occurs will be in your own state variables, which are under your control.

Text BGs always wrap.