Ok, I am writing a small library in which I want to take an RGB value from a function (255,255,255 format) and blit that pixel to the screen.
I think that ATM, with our knowledge of the PSP, we can only acheive 16bit colour. What I would like to know is how to display an RGB value on screen in 24bit colour, or how to convert it in-app to 16bit, and then blit that pixel.
Thanks for your help.
24bit - PSP screen? Help Please
-
- Posts: 197
- Joined: Fri Jul 01, 2005 2:50 am
Well, I'm using Nem's HelloWorld app, and i've set the startup.S file to load all needed kernel and display functions. I am setting the displayBuf's 3rd param to 3, but the image that is being drawn (I'm just using the sec logo) is in pink and is repeated 4 times on the screen.
Now that I am in 32bit mode (I think), how can I draw a single pixel to the screen from an RGB value?
Thank you for your patience, it is tricky to find your feet on a new OS.
Now that I am in 32bit mode (I think), how can I draw a single pixel to the screen from an RGB value?
Thank you for your patience, it is tricky to find your feet on a new OS.
-
- Posts: 197
- Joined: Fri Jul 01, 2005 2:50 am
Erm, still have a little bit of a problem, when accessing the vram, what format should you use, what is the line of code that the vram needs to take?
ATM, my xmain code looks like this:
I have also tried "vptr[1+1*512] = 255,255,255;" and "vptr[1+1*512] = 255|255|255;" but they all display a turqoise pixel on the screen.
Sorry for the noobishness, but i'm used to DirectX.
ATM, my xmain code looks like this:
Code: Select all
SetupCallbacks();
pgInit();
pgScreenFrame(2,0);
while (1) {
pgFillvram(0);
//pgBitBlt(1,4,1,1,2,0xFF00);
unsigned char *vptr; //pointer to vram
vptr=pgGetVramAddr(10,10);
vptr[1+1*512] = 0xFF00FF;
pgScreenFlipV();
pgWaitVn(1);
}
Sorry for the noobishness, but i'm used to DirectX.
-
- Posts: 197
- Joined: Fri Jul 01, 2005 2:50 am
Ah, excellent, that fixes it!
Just for other users reference, I used
Thank you all for your understanding help.
Just for other users reference, I used
Code: Select all
sceDisplaySetFrameBuf(pg_vramtop+(pg_showframe?FRAMESIZE:0),LINESIZE,2,1);