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.

Coding > Switching Bg modes

#1291 - Papa Smurf Advanced - Thu Jan 16, 2003 12:50 pm

Guys,

Anyone know how to switch from mode 4 to mode 0, then back to mode 4 or any other bitmap modes & back again to mode 0 safely?

every time i try it, the screen goes white. :S

Any code would be greatly appreciated.

thanks.

-Papa Smurf Advanced-

#1292 - Splam - Thu Jan 16, 2003 12:58 pm

White and stays white, or just white for a few frames or even just 1 frame?

You do realise that when you're in mode 4 (or 3,5) that you're probably using all of the vram (especially if using both buffers) so when you swap to mode 0 you've got to copy in a map and tile data?

Actually swapping modes won't break anything, just make sure you're pointing at the gfx properly (map and tiles) and you should be fine.

#1308 - Ped - Thu Jan 16, 2003 5:30 pm

I read somewhere that changing tile_mode <-> bitmap mode in the middle of screen will cause GBA hw to render about 3 blank lines, but I can't confirm it.
As long, as you wish to switch modes after the screen is rendered, you can do it anytime, there's no limitation.
_________________
-- Ped - ped at 7gods dot sk
there used to be times, when sex was safe and flying was dangerous...