pgBitBlt

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
JJPeerless
Posts: 82
Joined: Mon Jun 20, 2005 3:32 am

pgBitBlt

Post by JJPeerless »

using pgBitBlt, is it possible to BitBlt to something other than the "screen"..does the psp only have one screen buffer? or can i have like a Graphics object to draw to..then blit that to the screen buffer and then flip that..

i want to be able to blit to other surfaces before flipping them to the screen..
inomine
Posts: 53
Joined: Thu May 05, 2005 7:26 pm

Post by inomine »

Have a look at the "Unlimited sin ball" demo from AloneTrio, the source is pretty straight forward to understand. It does what you are looking for, for a maximum of 7 buffers.

If you don't understand it after looking at it for a while come back and we'll take it from there.
JJPeerless
Posts: 82
Joined: Mon Jun 20, 2005 3:32 am

Post by JJPeerless »

if you wouldnt mind me asking, where do i get this demo?
JJPeerless
Posts: 82
Joined: Mon Jun 20, 2005 3:32 am

Post by JJPeerless »

just found it, nevermind
JJPeerless
Posts: 82
Joined: Mon Jun 20, 2005 3:32 am

Post by JJPeerless »

dont really get it tho..

pgScreenFrame

does it have to do with that?
JJPeerless
Posts: 82
Joined: Mon Jun 20, 2005 3:32 am

Post by JJPeerless »

all i really wanna be able to do is.. blit to a second buffer... then clip that so its the size of the screen 480x272..and then flip that to the screen..

thats all..
inomine
Posts: 53
Joined: Thu May 05, 2005 7:26 pm

Post by inomine »

Right, it's as simple as this.

The PSP has 2Mb of VRAM, this is what the nice pointer that you have is pointing to the top of. Obviously 272 lines at 512 pixels does not use all of it, so all you have to do to get a new framebuffer is write further down in the RAM than the end of the screen of the current buffer. Then all you do is call

Code: Select all

pspDisplaySetFrameBuf(pg_vramtop,512,1,1);
to set the screen to be displayed from the pointer pg_vramtop.

Hmm, not really the best explanation ever but have a read of his code along with these comments.
JJPeerless
Posts: 82
Joined: Mon Jun 20, 2005 3:32 am

Post by JJPeerless »

im using Nem's PG library to do all my graphics stuff..
i dont really understand what you are trying to say..

do i have to edit nem's pg stuff..because his pgbitblt function only blits to the top buffer?

is that it?
inomine
Posts: 53
Joined: Thu May 05, 2005 7:26 pm

Post by inomine »

Nem's stuff is nice but if you want to get anywhere I would say ditch it and make your own, that way you will actually understand what is happening a lot better.
JJPeerless
Posts: 82
Joined: Mon Jun 20, 2005 3:32 am

Post by JJPeerless »

i totally agree..because i dont know how nem's stuff works..i only know how to use it..

where can i learn about the psp's functions he used to do what he did..
jboldiga
Posts: 27
Joined: Mon Jun 20, 2005 10:16 am

Post by jboldiga »

You can also point to another area in vram like inomine said and use that as a texture. Rendering to a texture can produce some nice effects. As for how to get started on psp, you might want to look at how things work on PS2 since its heavily documented and would give a firm grasp of the architecture before diving into psp dev. There are a bunch of api lib calls here on the forums.
Last edited by jboldiga on Thu Jun 23, 2005 8:58 am, edited 1 time in total.
inomine
Posts: 53
Joined: Thu May 05, 2005 7:26 pm

Post by inomine »

JJPeerless wrote: where can i learn about the psp's functions he used to do what he did..
Read his code, go from there. Have a play with some of the functions in the lib and maybe try to add some of your own.
Post Reply