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 > 512x256 background how to ?

#120952 - zeGouky - Wed Mar 07, 2007 6:03 pm

Hi people,

i'm actually trying to use a 512x256 without luck.

here's my init code :

Code:

    videoSetMode(  MODE_0_2D |
                   DISPLAY_SPR_ACTIVE |    //turn on sprites
                   DISPLAY_BG0_ACTIVE |    //turn on background 0
                   DISPLAY_SPR_1D |
                   DISPLAY_SPR_1D_BMP      //and this in bitmap mode
                    );

   vramSetMainBanks(   VRAM_A_MAIN_SPRITE, VRAM_B_MAIN_BG_0x06000000,
                  VRAM_C_SUB_BG , VRAM_D_LCD);

   BG0_CR      = BG_64x32 | BG_COLOR_256 | BG_MAP_BASE(0) | BG_TILE_BASE(1);


When im doing this : mapMemory0[32] = 10; , the tile appear on the next line.

I don't know what i'm doing wrong if anyone can help.

Thanks

#120955 - tepples - Wed Mar 07, 2007 6:32 pm

A 512x256 pixel text background is organized as two 256x256 pixel maps side by side. This was the case on the NES, Super NES, and GBA.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#120956 - zeGouky - Wed Mar 07, 2007 6:41 pm

oh ok thanks its working.

#121029 - knight0fdragon - Thu Mar 08, 2007 8:38 am

I just learned that a couple of days ago, but if you use the rotation backgrounds it allows you to map it the way you intended, instead of pages, of course you dont get the 64x32 map sizes
_________________
http://www.myspace.com/knight0fdragonds

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