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 > Using tiled bgs alongside extended rotation bg.

#100663 - Dark Knight ez - Tue Aug 29, 2006 12:38 pm

Hey everybody.

I've taken a look at what mode could do what's mentioned in the subject of this topic.
Mode3 seems like a good choice, with bg0 through bg2 being tiled backgrounds, and bg3 being an ERB.

Now, my question is, how can I get them to work alongside each other?
In tutorials I've seen, a mode with an ERB was usually only utilizing the ERB, not other backgrounds as well.

Is there a register to let the ERB know where its data/framebuffer starts in the allocated VRAM banks, or is it always set to the start of the first BG allocated VRAM bank?

Also, since I think I'll be needing a 256x256 ERB, that means I'll need 128kb for that alone (when using 16bits). If I want to use other (tiled) backgrounds as well, I need to allocate more room for BGs in the VRAM banks.
Can I just allocate C, H and I (I want it to be SUB screen) and treat it as one big bank which has no gaps?

Greets.
Dark Knight ez

#100678 - knight0fdragon - Tue Aug 29, 2006 4:36 pm

take a look at my example at http://hyperclubbingfriends.yourfreewebspace.com/Knight0fDragon/
_________________
http://www.myspace.com/knight0fdragonds

MK DS FC: Dragon 330772 075464
AC WW FC: Anthony SamsClub 1933-3433-9458
MPFH: Dragon 0215 4231 1206

#100686 - Dark Knight ez - Tue Aug 29, 2006 7:04 pm

Thank you. Got my radar working now (RTS engine). :)
I didn't have bit 15 enabled.

Also, in your code you set BG3_XDX and BG3_YDY twice in the code snippet which inits everything. Both to the same value. You might want to remove one of the two. (Preferably removing the first pair for consistancy with other tutorials.)