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.

Graphics > HOW THE CAMERA SYSTEM WORKS IN TEXT MODE

#19524 - windfive - Wed Apr 21, 2004 2:26 pm

Hello.

In many commercial game I can see this trick. (e.g. No. 1102 our sun)
The screen mode is often mode0. The map data is updated dynamically in a column/row when the hero moves. I guess it's using a camera system. Does it use REG_BGOFFSET? And how the cam sys works in this mode?

I am a newbie and sorry for my poor english. Any response will be appreciated.

Thanks again.

#19542 - Miked0801 - Wed Apr 21, 2004 5:59 pm

You've just described edge scrolling. Because the VRAM buffers wrap, you only need to write out a row/column along the edge of the screen that is just coming into view - instead of updating the whole VRAM page. The scroll offset registers show the upper-left hand corner of the current window. Every time they move to a different char, an updated is requested. Note: because you can't use DMAs as much here, the benefit, while large, isn't quite as big as you'd think. It also means you have to be real tricky if your gonna use that VRAM page for anything else besides scrolling.

BTW, quick question: Does anyone know of Bitmap modes (3,4,5) allow wrapping?

#19562 - tepples - Thu Apr 22, 2004 12:20 am

Bitmap modes allow for vertical wrapping if you change the Y offset during horizontal blank. They do not allow for horizontal wrapping.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#19598 - Miked0801 - Thu Apr 22, 2004 5:45 pm

Ok, no built-in wrapping - rats. thanks.