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 > Changing video mode at smoothly

#15698 - doudou - Wed Jan 28, 2004 2:21 am

My game is a tile based game so it run in mode 0. I'd like to have my menus in mode 4, so i change mode at run time. It works, but the transition is not "smooth". Any suggestion ?

#15700 - sajiimori - Wed Jan 28, 2004 2:55 am

How about fading the BG palette to all black before changing modes?

#15705 - Miked0801 - Wed Jan 28, 2004 5:06 am

Or Alpha blend.

#15707 - sgeos - Wed Jan 28, 2004 6:26 am

Fade Out
Load Menu
Fade in

If you fade to white, you can force a blank, load your menu and then fade from white. Lunar Legend fades to white when entering battles.

-Brendan

#15725 - doudou - Wed Jan 28, 2004 5:12 pm

I think that i did not explain myself clearly. My problem is that when i pass from one mode to the other, there is a "glitch". Even if I fade in/out, at the transition this problem will still be there.

#15727 - poslundc - Wed Jan 28, 2004 5:14 pm

There won't be any visible glitch if all of the colours in the sprite/background palette are the same.

Dan.

#15736 - Touchstone - Wed Jan 28, 2004 7:30 pm

Is the glitch still there if you:
1. fade to white
2. turn off LCD
3. change mode
4. load menu
5. turn on LCD
6. fade to regular colors
_________________
You can't beat our meat

#15739 - doudou - Wed Jan 28, 2004 8:47 pm

how do we turn off LCD ?

#15742 - DekuTree64 - Wed Jan 28, 2004 9:38 pm

There's a bit in DISPCNT to switch it off. Bit7, I think. You know how some games have a 'sleep' mode? That's mainly what it's for, to save the battery power the screen would be using, but it works for changing video modes without seeing any glitches too.
But really, there shouldn't be any problems if you set the palette to all black and/or fade to black with BLDMOD.

EDIT: And wait until VBlank to switch, that should go smoothly even if the screen is not blacked out.
_________________
___________
The best optimization is to do nothing at all.
Therefore a fully optimized program doesn't exist.
-Deku

#15744 - Touchstone - Wed Jan 28, 2004 9:48 pm

By setting the forced blank bit in the display control register (http://www.work.de/nocash/gbatek.htm#lcdiodisplaycontrol)

But you don't actually turn off the LCD, which I thought when I wrote the previous post, but you make the video controller draw white instead of whatever the display control register is set up to draw. Don't know if it helps.
_________________
You can't beat our meat