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 > more background woes. Resetting and hardware.

#9777 - immortalninjak - Mon Aug 18, 2003 1:03 am

Hello all,
two questions:
1. could someone explain to me how I would reset and disable backgrounds between levels and selection screens.
I am using two different set of tiles and maps for two different stages. The first stage scrolls bg2 with wraparound. Then when I start stage 2 I find that the background is centred about where stage one finished even though I have included
Code:

             bg2.x_scroll = 120;
             bg2.y_scroll = 80;

when setting up bg2 for stage 2.

2. Again using bg2 with a 256*256 rotational map. The screen displays perfectly fine while using visual boy advance. How ever played on hardware using a flash linker cart, the bg displays properly for a fraction of a second but then shifts down a row of tiles while duplicating the top row. While the sprites remain uneffected so they appear to be walking in thin air. Does anyone know the cause of this. Its driving me nuts.

#9780 - immortalninjak - Mon Aug 18, 2003 1:13 am

ahh.
Fixed problem one. Took out the line updating bg2 beacuse it was messing up my screen. Know the answers to both those problems now :)
Initilize Pa,b,c,d then update bg.
Still have the hardware problem to sort out though ;(

#9789 - sgeos - Mon Aug 18, 2003 5:56 am

immortalninjak wrote:
The bg displays properly for a fraction of a second but then shifts down a row of tiles while duplicating the top row. While the sprites remain uneffected so they appear to be walking in thin air. Does anyone know the cause of this. Its driving me nuts.


Are you waiting for vblank before updating your BG? Try writing a vvery simple program that displays your BG and try to get that to run properly on hardware. Both my tone demo and rotation demo (old now... May I think) fail the first time I tried to get them to run on hardware. They worked fine in the emulators. Caused major headaches. I'm sure it's a simple oversight.

-Brendan

#9832 - immortalninjak - Tue Aug 19, 2003 2:57 pm

aye.
yup you were right it was a simple thing in the end. The problem was I was copying OAM before updating the bg after vsynch.
Man that had me annoyed.
Thanks for the help.