#66288 - Rinky - Mon Jan 09, 2006 3:39 pm
I absolutely can not get the Extended Rotation Background to work on the touch screen. I've search the forum and tried a thousand different things but it just stays blank.
I have a BMP class which renders itself to the specified buffer; both BMPs work fine if drawn to the top screen e.g. topBMP.render((uint16*)VRAM_0);
Anyway...
I power on and swap the screens (just for DSEmu)...
Then set the video mode for the top screen
Now calling the render method of my BMP class with the parameter VRAM_0 displays EITHER file on the top screen perfectly.
I deal with the second screen...
and try to "render" to display. E.g. bmp.render((uint16*)0x6200000); but it stays blank.
The memory viewer in DSEmu would suggest that nothing is being written to the memory bank i.e. it isn't enabled properly???? I've also tried doing a direct write and this doesn't work either
Can anyone give me the code to activate Mode 5 on the sub screen; and explain where I'm going wrong.
It'd really be appreciated.
I have a BMP class which renders itself to the specified buffer; both BMPs work fine if drawn to the top screen e.g. topBMP.render((uint16*)VRAM_0);
Anyway...
I power on and swap the screens (just for DSEmu)...
Code: |
powerON(POWER_ALL); lcdSwap(); |
Then set the video mode for the top screen
Code: |
videoSetMode(MODE_5_2D | DISPLAY_BG2_ACTIVE); vramSetBankA(VRAM_A_MAIN_BG_0x6000000); BG2_CR = BG_BMP16_256x256; BG2_XDX = 1<<8; BG2_XDY = 0; BG2_YDX = 0; BG2_YDY = 1<<8; BG2_CY = 0; BG2_CX = 0; |
Now calling the render method of my BMP class with the parameter VRAM_0 displays EITHER file on the top screen perfectly.
I deal with the second screen...
Code: |
videoSetModeSub(MODE_5_2D | DISPLAY_BG3_ACTIVE); vramSetBankC(VRAM_C_SUB_BG_0x6200000); SUB_BG3_CR = BG_BMP16_256x256; SUB_BG3_XDX = 1<<8; SUB_BG3_XDY = 0; SUB_BG3_YDX = 0; SUB_BG3_YDY = 1<<8; SUB_BG3_CY = 0; SUB_BG3_CX = 0; |
and try to "render" to display. E.g. bmp.render((uint16*)0x6200000); but it stays blank.
The memory viewer in DSEmu would suggest that nothing is being written to the memory bank i.e. it isn't enabled properly???? I've also tried doing a direct write and this doesn't work either
Code: |
uint16* buf; buf = (uint16*)0x6200000; *buf = RGB15(255,0,0) | BIT(15); |
Can anyone give me the code to activate Mode 5 on the sub screen; and explain where I'm going wrong.
It'd really be appreciated.