 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
Atenus
Joined: 05 Nov 2006 Posts: 9 Location: Argentina
|
Posted: Tue Nov 21, 2006 7:35 am Post subject: vram direct access and pitch |
|
|
im accessing vram directly thrugh 0x44000000, but the problem is that i dont know the pitch, so supouse i want to make a code to fill all screen with an RGB color:
| Code: |
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? _________________ - Ateneo - |
|
| Back to top |
|
 |
Raphael

Joined: 17 Jan 2006 Posts: 646 Location: Germany
|
|
| Back to top |
|
 |
Atenus
Joined: 05 Nov 2006 Posts: 9 Location: Argentina
|
Posted: Tue Nov 21, 2006 10:31 am Post subject: |
|
|
thanks a lot _________________ - Ateneo - |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|