#44124 - TheMikaus - Mon May 30, 2005 4:16 pm
I know I saw this on the forum, but when I did a search for blank screen I couldn't find what I was looking for. So I apologize ahead of time if this is already on here somewhere.
From there I go on to load the map tiles and such. It works fine on the emulator but when I run it on the DS I get to black screens. Can someone tell me what it is that I'm forgetting to initialize properly?
-------------EDIT---------------
I think it has to do with loading the tiles, but I'm not sure. I used the birds project as a template of sorts for this. So here's a download link.
http://www.themikausprojects.com/ds-temp.zip
Help!!!! Please.
Code: |
powerON(POWER_ALL); videoSetMode(MODE_0_2D | DISPLAY_BG0_ACTIVE); videoSetModeSub(MODE_0_2D | DISPLAY_BG0_ACTIVE); vramSetMainBanks(VRAM_A_MAIN_BG, VRAM_B_MAIN_SPRITE, VRAM_C_SUB_BG, VRAM_D_SUB_SPRITE); #ifndef EMULATOR lcdSwap(); #endif irqInitHandler(irqDefaultHandler); irqSet(IRQ_VBLANK, 0); irqEnable(IRQ_VBLANK); //get the maps uint16 * map0 = (uint16 *)SCREEN_BASE_BLOCK(0); uint16 * map1 = (uint16 *)SCREEN_BASE_BLOCK_SUB(0); //Make both the top and the bottom maps 256 color screens BG0_CR = BG_COLOR_256 | BG_32x32 | (0 << SCREEN_SHIFT) | (1 << CHAR_SHIFT); SUB_BG0_CR = BG_COLOR_256 | BG_32x32 | (0 << SCREEN_SHIFT) | (1 << CHAR_SHIFT); //Copy the needed palette info COPY16((uint16*)splashPal, (uint16 *)BG_PALETTE, 256); COPY16((uint16*)splashSubPal, (uint16 *)BG_PALETTE_SUB, 256); //Copy the needed tile info COPY16((uint16*)splashTile,(uint16 *)CHAR_BASE_BLOCK(1), 26000); COPY16((uint16*)touchTile,(uint16 *)CHAR_BASE_BLOCK_SUB(1), 26000); |
From there I go on to load the map tiles and such. It works fine on the emulator but when I run it on the DS I get to black screens. Can someone tell me what it is that I'm forgetting to initialize properly?
-------------EDIT---------------
I think it has to do with loading the tiles, but I'm not sure. I used the birds project as a template of sorts for this. So here's a download link.
http://www.themikausprojects.com/ds-temp.zip
Help!!!! Please.