Bitmps and Text
Posted: Tue Apr 07, 2009 10:20 am
Hello,
I am trying to display bitmap images on a background, and then some text on top of it. Right now the two images are displayed fine. I am configuring my background using the registers and not the BgInit functions, and so when looking at using the consoleInit and PrintConsole features they aren't working. Is there a way to display text while leaving my background init like this rather then using BgInit? I need a lower level way of printing I think, and to configure which screen to print to and where. Any help would be great.
lcdMainOnBottom();
vramSetBankA(VRAM_A_MAIN_BG);
vramSetBankC(VRAM_C_SUB_BG);
videoSetMode(MODE_5_2D | DISPLAY_BG2_ACTIVE);
videoSetModeSub(MODE_5_2D | DISPLAY_BG3_ACTIVE);
REG_BG2CNT = BG_BMP16_256x256 | BG_BMP_BASE(0) | BG_PRIORITY(3);
REG_BG2PA = 1 << 8;
REG_BG2PB = 0;
REG_BG2PC = 0;
REG_BG2PD = 1 << 8;
REG_BG3CNT_SUB = BG_BMP16_256x256 | BG_BMP_BASE(0);
REG_BG3PA_SUB = 1<< 8;
REG_BG3PB_SUB = 0;
REG_BG3PC_SUB = 0;
REG_BG3PD_SUB = 1 << 8;
dmaCopyHalfWords(DMA_CHANNEL, fleurBitmap, (uint16 *)BG_BMP_RAM(0), fleurBitmapLen);
dmaCopyHalfWords(DMA_CHANNEL, mikeBitmap, (uint16 *)BG_BMP_RAM_SUB(0), mikeBitmapLen);
iprintf("Hello World");
Thanks in advance,
Mike
I am trying to display bitmap images on a background, and then some text on top of it. Right now the two images are displayed fine. I am configuring my background using the registers and not the BgInit functions, and so when looking at using the consoleInit and PrintConsole features they aren't working. Is there a way to display text while leaving my background init like this rather then using BgInit? I need a lower level way of printing I think, and to configure which screen to print to and where. Any help would be great.
lcdMainOnBottom();
vramSetBankA(VRAM_A_MAIN_BG);
vramSetBankC(VRAM_C_SUB_BG);
videoSetMode(MODE_5_2D | DISPLAY_BG2_ACTIVE);
videoSetModeSub(MODE_5_2D | DISPLAY_BG3_ACTIVE);
REG_BG2CNT = BG_BMP16_256x256 | BG_BMP_BASE(0) | BG_PRIORITY(3);
REG_BG2PA = 1 << 8;
REG_BG2PB = 0;
REG_BG2PC = 0;
REG_BG2PD = 1 << 8;
REG_BG3CNT_SUB = BG_BMP16_256x256 | BG_BMP_BASE(0);
REG_BG3PA_SUB = 1<< 8;
REG_BG3PB_SUB = 0;
REG_BG3PC_SUB = 0;
REG_BG3PD_SUB = 1 << 8;
dmaCopyHalfWords(DMA_CHANNEL, fleurBitmap, (uint16 *)BG_BMP_RAM(0), fleurBitmapLen);
dmaCopyHalfWords(DMA_CHANNEL, mikeBitmap, (uint16 *)BG_BMP_RAM_SUB(0), mikeBitmapLen);
iprintf("Hello World");
Thanks in advance,
Mike