#92194 - TheRain - Wed Jul 12, 2006 1:01 am
So far, one of the biggest hurdles for learning DS programming with libds has been understanding video modes and how vram is mapped and such... are there any good resources for understanding this??
kvance wrote: |
http://tobw.net/dswiki/index.php?title=Graphic_modes |
Code: |
vramSetMainBanks(VRAM_Ablah,VRAM_BBlah,VRAM_CBlah,VRAM_DBlah); |
Code: |
videoSetMode(MODE_5_2D | DISPLAY_BG3_ACTIVE | DISPLAY_BG2_ACTIVE); vramSetMainBanks( VRAM_A_MAIN_BG_0x6000000, VRAM_B_MAIN_BG_0x6020000,VRAM_C_MAIN_BG_0x6040000 , VRAM_D_LCD); u16* background2 = (u16*)(0x06020000); dmaCopy(back1_bin, BG_GFX, 256*192*2); dmaCopy(back2_bin, background2, 256*192*2); |
TheRain wrote: | ||
and when the program is run, both backgrounds have back1_bin displaying on them... I've been trying to sort it out by changing these values around but I can't makes sense of it. |
Code: |
BG2_CR = BG_BMP16_256x256 | BG_BMP_BASE(0);
BG3_CR = BG_BMP16_256x256 | BG_BMP_BASE(8); /* 0x20000 divided by 0x4000 */ |