Code: Select all
sceDisplaySetMode(0, 480, 272);
int * p_vram = (int *) 0x44000000;
sceDisplaySetFrameBuf((void *)p_vram, 480,
PSP_DISPLAY_PIXEL_FORMAT_8888,
PSP_DISPLAY_SETBUF_IMMEDIATE);
int color;
color = RGB(0xFF,0,0);
for (int i = 0; i < 272 ; i++)
{
for (int j = 0; j < 480; j++)
{
*p_vram = color;
p_vram++;
}
p_vram += PITCH_VALUE;
}
where:
- RGB() macro is one for creating an int rgb color passing the three bytes values.
- PITCH_VALUE should be the amout of (bytes / 4) to get the address of the next row.
I have been trying to figure out what value could be the pitch, but no results.
any help?