#51438 - iainprice - Fri Aug 19, 2005 4:14 pm
Yes I know this sounds like a silly question... but is there a nice simple way to draw a line when using Mode5? Or do I have to make a long thin sprite?
#51459 - iainprice - Fri Aug 19, 2005 9:32 pm
I'm having some problems putting a pixel on the bottom screen. I am doing the following:
videoSetMode(MODE_0_3D);
videoSetModeSub(MODE_5_2D | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE);
vramSetMainBanks(VRAM_A_TEXTURE, VRAM_B_LCD, VRAM_C_SUB_BG, VRAM_D_SUB_SPRITE);
and then:
VRAM_B[(10*SCREEN_WIDTH)+21] = 0x7FFF;
or:
VRAM_C[(10*SCREEN_WIDTH)+21] = 0x7FFF;
but neither work... am I missing something somewhere?
any ideas?
Thanks.
#51468 - iainprice - Sat Aug 20, 2005 12:47 am
even if I try setting BG3 for BMP image:
BG3_CR = BG_BMP8_256x256;
and then address the BG_GFX:
BG_GFX[(10*SCREEN_WIDTH)+20] = 0x7FFF;
still nothing...
#51662 - iainprice - Mon Aug 22, 2005 8:30 pm
I am now trying:
[/code]
powerON(POWER_3D_CORE|POWER_2D_SUB);
videoSetMode(MODE_5_3D);
videoSetModeSub(MODE_5_2D | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE);
vramSetMainBanks(VRAM_A_TEXTURE, VRAM_B_LCD, VRAM_C_SUB_BG, VRAM_D_SUB_SPRITE);
BG_PALETTE_SUB[255] = RGB15(31,31,31);
irqInitHandler(irqDefaultHandler);
irqSet(IRQ_VBLANK, 0);
glViewPort(0,0,255,191);
glClearColor(0,0,0);
glClearDepth(0x7FFF);
SUB_BG3_CR = BG_BMP8_256x256;
SUB_BG3_XDX = 1<<8;
SUB_BG3_XDY = 0;
SUB_BG3_YDX = 0;
SUB_BG3_YDY = 1<<8;
SUB_BG3_CX = 0;
SUB_BG3_CY = 0;
BG_GFX[256*50 + 50] = 100;
[/code]
but still no pixels... where am I going wrong????