forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

pgBitBlt

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
JJPeerless



Joined: 20 Jun 2005
Posts: 82

PostPosted: Thu Jun 23, 2005 8:13 am    Post subject: pgBitBlt Reply with quote

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..
Back to top
View user's profile Send private message
inomine



Joined: 05 May 2005
Posts: 53

PostPosted: Thu Jun 23, 2005 8:19 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
JJPeerless



Joined: 20 Jun 2005
Posts: 82

PostPosted: Thu Jun 23, 2005 8:25 am    Post subject: Reply with quote

if you wouldnt mind me asking, where do i get this demo?
Back to top
View user's profile Send private message
JJPeerless



Joined: 20 Jun 2005
Posts: 82

PostPosted: Thu Jun 23, 2005 8:28 am    Post subject: Reply with quote

just found it, nevermind
Back to top
View user's profile Send private message
JJPeerless



Joined: 20 Jun 2005
Posts: 82

PostPosted: Thu Jun 23, 2005 8:31 am    Post subject: Reply with quote

dont really get it tho..

pgScreenFrame

does it have to do with that?
Back to top
View user's profile Send private message
JJPeerless



Joined: 20 Jun 2005
Posts: 82

PostPosted: Thu Jun 23, 2005 8:34 am    Post subject: Reply with quote

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..
Back to top
View user's profile Send private message
inomine



Joined: 05 May 2005
Posts: 53

PostPosted: Thu Jun 23, 2005 8:40 am    Post subject: Reply with quote

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:
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.
Back to top
View user's profile Send private message
JJPeerless



Joined: 20 Jun 2005
Posts: 82

PostPosted: Thu Jun 23, 2005 8:48 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
inomine



Joined: 05 May 2005
Posts: 53

PostPosted: Thu Jun 23, 2005 8:52 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
JJPeerless



Joined: 20 Jun 2005
Posts: 82

PostPosted: Thu Jun 23, 2005 8:53 am    Post subject: Reply with quote

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..
Back to top
View user's profile Send private message
jboldiga



Joined: 20 Jun 2005
Posts: 27

PostPosted: Thu Jun 23, 2005 8:56 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
inomine



Joined: 05 May 2005
Posts: 53

PostPosted: Thu Jun 23, 2005 8:57 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
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