#99439 - neonext - Mon Aug 21, 2006 6:34 pm
I'm stuck on getting 2 different backgrounds to display at the same time. If I only display either one on hardware, it works fine. If I try to copy both backgrounds into memory, I get 2 black screens of death on hardware (no sprites etc, the game obviously crashes). If i copy both backgrounds and run in an emulator, it works fine. I'm still a newb with ds homebrew, so i'm probably making an obvious mistake, that hopefully someone will point out.
i'm using 8bit bitmap backgrounds. i'd actually prefer to do them tilemapped, cause i've heard if you do it right you can save a lot of memory, but i haven't found any multilayer tilemapped background tutorials that i understand. besides, if i can get these to work, they will be good enough for what i'm trying to do.
here's what i've got with the bitmap backgrounds, minus the rotation and position attributes, which i highly doubt are related to the problem
i've tried changing the BASE/RAM values, and i've tried loading without using dmaCopy, and i always get the same results. please help, this is the last thing i can think of that i would get stuck on. all other aspects of the game (sprites, sound, file loading, etc) work great
i'm using 8bit bitmap backgrounds. i'd actually prefer to do them tilemapped, cause i've heard if you do it right you can save a lot of memory, but i haven't found any multilayer tilemapped background tutorials that i understand. besides, if i can get these to work, they will be good enough for what i'm trying to do.
here's what i've got with the bitmap backgrounds, minus the rotation and position attributes, which i highly doubt are related to the problem
Code: |
videoSetMode(MODE_5_2D | DISPLAY_BG2_ACTIVE | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D); videoSetModeSub(MODE_5_2D | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D); vramSetMainBanks(VRAM_A_MAIN_BG_0x6000000, VRAM_B_MAIN_BG_0x6020000, VRAM_C_LCD , VRAM_D_SUB_SPRITE); BG2_CR = BG_BMP8_256x256 | BG_BMP_BASE(0) | BG_WRAP_ON | BG_PRIORITY(0); BG3_CR = BG_BMP8_256x256 | BG_BMP_BASE(8) | BG_WRAP_ON | BG_PRIORITY(1); dmaCopy(back1_bottom3Pal, BG_PALETTE, 256*2); dmaCopy(back1Bitmap, (uint16*)BG_BMP_RAM(0), 256*256); dmaCopy(back2Bitmap, (uint16*)BG_BMP_RAM(8), 256*256); |
i've tried changing the BASE/RAM values, and i've tried loading without using dmaCopy, and i always get the same results. please help, this is the last thing i can think of that i would get stuck on. all other aspects of the game (sprites, sound, file loading, etc) work great