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 > Backgrounds And Text?

#100359 - DimondEdge - Sun Aug 27, 2006 3:07 pm

Hello!

I'm trying to make a screen with the main and sub screens both displaying a background,
but when I use iprintf, the text dosen't appear! The backgrounds are both on
BG3, main and sub. Can anyone tell me whats going on?

Thanks!

DE

#100379 - knight0fdragon - Sun Aug 27, 2006 4:59 pm

post some code, otherwise we are just blind men trying to find the corner of a round room lol
_________________
http://www.myspace.com/knight0fdragonds

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

#100438 - DimondEdge - Sun Aug 27, 2006 10:45 pm

Code:

   vramSetMainBanks(
         VRAM_A_MAIN_BG_0x6000000,
         VRAM_B_MAIN_BG_0x6020000,
         VRAM_C_SUB_BG_0x6200000,
         VRAM_D_LCD);
   vramSetBankE(VRAM_E_MAIN_SPRITE);

   videoSetMode( MODE_5_2D |
         DISPLAY_SPR_ACTIVE |
         DISPLAY_BG3_ACTIVE |
         DISPLAY_SPR_1D);
   videoSetModeSub(MODE_5_2D | DISPLAY_BG3_ACTIVE);

    SUB_BG3_CR = BG_MAP_BASE(31);

   BG_PALETTE_SUB[255] = RGB15(31,31,31);rendered with color 255

   
   consoleInitDefault((u16*)SCREEN_BASE_BLOCK_SUB(31), (u16*)CHAR_BASE_BLOCK_SUB(0), 16);

#100525 - Lick - Mon Aug 28, 2006 1:00 pm

You might want to set the background color also. This is BG_PALETTE_SUB[0].
_________________
http://licklick.wordpress.com

#100529 - DimondEdge - Mon Aug 28, 2006 2:18 pm

Oh, yeah, thats what I forgot to say... I'm using images as backgrounds on both screens,
normally I have no problem with text.

#100532 - knight0fdragon - Mon Aug 28, 2006 2:25 pm

BG_PALETTE_SUB[255] = RGB15(31,31,31) | BIT(15);rendered with color 255
_________________
http://www.myspace.com/knight0fdragonds

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

#100534 - Lick - Mon Aug 28, 2006 3:14 pm

KoD, that's not needed for paletted modes. Only for 16-bit color mode. In paletted modes, the first entry (in this case 0) is transparent.
_________________
http://licklick.wordpress.com