#118960 - Massif - Sun Feb 18, 2007 5:03 pm
I'm trying to get graphics to display on the main screen and text on the sub screen. I got it working in Dualis last night. However, I tried running it on my DSLite this morning and the graphics appear for a split second, but then disappear when the text on the sub screen shows up. I was using the touch screen as main and top screen as sub. However, when I removed the lcdSwap() line, the graphics displayed on the top and stayed there, but the text never even showed up on the bottom.
*EDIT*
Forgot to post the code. It's a 512x512 image
*EDIT*
Forgot to post the code. It's a 512x512 image
Code: |
videoSetMode(MODE_5_2D | DISPLAY_BG2_ACTIVE);
vramSetBankA(VRAM_A_MAIN_BG); vramSetBankB(VRAM_B_MAIN_BG); BG2_CR = BG_BMP8_512x512 | BG_BMP_BASE(0) | BG_PRIORITY(2); BG2_XDX = 1 << 8; BG2_XDY = 0; BG2_YDX = 0; BG2_YDY = 1 << 8; BG2_CY = 0; BG2_CX = 0; // Copy image and palette to main screen dmaCopy(cards512Bitmap, BG_GFX, cards512BitmapLen); dmaCopy(cards512Pal, BG_PALETTE, cards512PalLen); // Use the sub screen for text output videoSetModeSub(MODE_0_2D | DISPLAY_BG0_ACTIVE); vramSetBankC(VRAM_C_SUB_BG); SUB_BG0_CR = BG_MAP_BASE(31); // Set the colour of the font to White. BG_PALETTE_SUB[255] = RGB15(31,31,31); consoleInitDefault((u16*)SCREEN_BASE_BLOCK_SUB(31), (u16*)CHAR_BASE_BLOCK_SUB(0), 16); |