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.

DS development > Framebuffer question

#62483 - pt3r - Thu Dec 01, 2005 12:15 pm

What is the use of a framebuffer mode ? according to doublec's framebuffer tutorial:
Quote:

A 'framebuffer' is a screen mode where the screen is mapped to a portion of memory. Writing data to this memory area will result in that data appearing on the screen.


But is this not the same for a rotational background? I can just set up a rotational background and write directly to the memory of the background and it will also display directly on the screen. So my question is why would anyone use the framebuffer mode?

#62496 - headspin - Thu Dec 01, 2005 4:06 pm

A framebuffer is in fact is two regions of memory that are swapped to create smoother display of animation.

Eg. BG3_CR ^= BG_BMP_BASE( 96 / 16 ); //base is 16KB and screen size is 256x192x2 (96KB)

will flip the region of memory pointed to for BG3 from 0x06000000 to 0x06000000 + 256*192*2 or vias versa.
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game

#62514 - DekuTree64 - Thu Dec 01, 2005 7:13 pm

The only reason I know to use framebuffer mode is because you can display a bank that's allocated to the LCD, rather than BG. That means you can use the capture hardware to write to that bank, and do motion blur without having to double buffer like you do with the 2 screen 3D trick.
_________________
___________
The best optimization is to do nothing at all.
Therefore a fully optimized program doesn't exist.
-Deku

#62528 - tepples - Thu Dec 01, 2005 9:22 pm

But doesn't the frame buffer work only on the same screen as the 3D core?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.