#163551 - Kayvon - Sat Oct 04, 2008 9:42 pm
I've been lurking since about a week ago, when I first started programming on the DS. I'm an experienced coder and I'm almost done with a simple "Missile Command" homebrew, but I'm stuck.
I can't text over an image on the subscreen to work:
I can get the splash image to appear on the subscreen no problem. I can get normal text (helpful in debugging) without a problem. But I can't get the both to work at once.
Any help here is appreciated. I suspect I've done something wrong with the memory banks[/code]
Last edited by Kayvon on Sun Oct 05, 2008 3:55 am; edited 1 time in total
I can't text over an image on the subscreen to work:
Code: |
int main() { static const int DMA_CHANNEL = 3; // low priority DMA channel to background copy powerON(POWER_ALL); irqInit(); irqSet(IRQ_VBLANK, 0); vramSetBankC(VRAM_C_SUB_BG_0x06200000); // map bank C to sub screen background memory videoSetModeSub(MODE_3_2D | DISPLAY_BG3_ACTIVE | DISPLAY_BG0_ACTIVE); SUB_BG3_X0 = 0; // X-Pos SUB_BG3_Y0 = 0; // Y-Pos SUB_BG3_CR = BG_BMP16_256x256 | BG_BMP_BASE(0) | BG_PRIORITY(3); SUB_BG3_XDX = 1 << 8; SUB_BG3_XDY = 0; SUB_BG3_YDX = 0; SUB_BG3_YDY = 1 << 8; SUB_BG3_CX = 0; SUB_BG3_CY = 0; dmaCopyHalfWords(DMA_CHANNEL, splashBitmap, // This variable is generated for us by grit. (uint16 *)BG_BMP_RAM_SUB(0), // address for sub background 3 splashBitmapLen); BG_PALETTE_SUB[255] = RGB15(31,31,31); // white font SUB_BG0_CR = BG_MAP_BASE(2); consoleInitDefault((u16*)SCREEN_BASE_BLOCK_SUB(2), (u16*)CHAR_BASE_BLOCK_SUB(0), 16); iprintf("Testing...\n1, 2, 3!"); while(1); } |
I can get the splash image to appear on the subscreen no problem. I can get normal text (helpful in debugging) without a problem. But I can't get the both to work at once.
Any help here is appreciated. I suspect I've done something wrong with the memory banks[/code]
Last edited by Kayvon on Sun Oct 05, 2008 3:55 am; edited 1 time in total