#62044 - pt3r - Sat Nov 26, 2005 8:03 pm
I wrote following code to display a 256 color 8bit image on the 3 background of the main display:
This code works well on the dualis emulator as well as on my DS. Since I'm still very new to the DS coding I decided to experiment a bit with the code in order to check whether my assumptions regarding VRAM were correct. So i decided to use bank B instead of bank A. This code failed to work on the dualis emulator but it works without a fault on the DS. Is this a bug in the dualis emulator? The same thing happens when I use Bank C
with a vramSetBankC(VRAM_C_MAIN_BG_0x6000000);
I decided to push the experiment a bit further and tried to map a different VRAM area to my background. This code gives a black screen both on dualis and on my DS.
What am I missing? Any help/hints are highly appreciated.
Code: |
int main(void) { powerON(POWER_ALL); videoSetMode(MODE_5_2D |DISPLAY_BG3_ACTIVE); vramSetBankA(VRAM_A_MAIN_BG_0x6000000); BG3_CR = BG_BMP8_256x256 | BG_BMP_RAM(0); BG3_XDX = 1<<8; BG3_XDY = 0; BG3_YDX = 0; BG3_YDY = 1<<8; BG3_CY = 0; BG3_CX = 0; dmaCopy(screen_256Bitmap, (uint16*)BG_BMP_RAM(0), 256*192); dmaCopy(screen_256Pal, BG_PALETTE, 256*2); ... |
This code works well on the dualis emulator as well as on my DS. Since I'm still very new to the DS coding I decided to experiment a bit with the code in order to check whether my assumptions regarding VRAM were correct. So i decided to use bank B instead of bank A. This code failed to work on the dualis emulator but it works without a fault on the DS. Is this a bug in the dualis emulator? The same thing happens when I use Bank C
with a vramSetBankC(VRAM_C_MAIN_BG_0x6000000);
Code: |
int main(void) { powerON(POWER_ALL); videoSetMode(MODE_5_2D |DISPLAY_BG3_ACTIVE); vramSetBankB(VRAM_B_MAIN_BG_0x6000000); BG3_CR = BG_BMP8_256x256 | BG_BMP_RAM(0); BG3_XDX = 1<<8; BG3_XDY = 0; BG3_YDX = 0; BG3_YDY = 1<<8; BG3_CY = 0; BG3_CX = 0; dmaCopy(screen_256Bitmap, (uint16*)BG_BMP_RAM(0), 256*192); dmaCopy(screen_256Pal, BG_PALETTE, 256*2); ... |
I decided to push the experiment a bit further and tried to map a different VRAM area to my background. This code gives a black screen both on dualis and on my DS.
Code: |
int main(void) { powerON(POWER_ALL); videoSetMode(MODE_5_2D |DISPLAY_BG3_ACTIVE); vramSetBankA(VRAM_A_MAIN_BG_0x6040000); BG3_CR = BG_BMP8_256x256 | BG_BMP_RAM(16); BG3_XDX = 1<<8; BG3_XDY = 0; BG3_YDX = 0; BG3_YDY = 1<<8; BG3_CY = 0; BG3_CX = 0; dmaCopy(screen_256Bitmap, (uint16*)BG_BMP_RAM(16), 256*192); dmaCopy(screen_256Pal, BG_PALETTE, 256*2); ... |
What am I missing? Any help/hints are highly appreciated.