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 

How do games draw 3D data to screen?

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



Joined: 08 Feb 2007
Posts: 155

PostPosted: Mon Apr 06, 2009 11:34 am    Post subject: How do games draw 3D data to screen? Reply with quote

Again it's me with another PRX linked question.

I do know that the Gu functions the PSPSDK provides are a bunch of asm functions that make stuff more readable...

(So you can pass vertices, etc.)

This are lateron converted to Ge commands... from what I can tell...

But is there a bit more documentation on it?

I intend to hook somewhere into that process of drawing vertices to get my own verticestream into it before rendering to screen...

I thought of doing a little asm function to achieve that... that's not the problem, but I seriously got no idea where to forward into that ASM function to add my own.
_________________
Been gone for some time. Now I'm back. Someone mind getting me up-2-date?
Back to top
View user's profile Send private message MSN Messenger
jean



Joined: 05 Jan 2008
Posts: 489

PostPosted: Mon Apr 06, 2009 6:02 pm    Post subject: Reply with quote

Download pspsdk sources: there are no better documentation. In that package you should even find a txt file with the command codes GU uses to communicate with GE chip.
Back to top
View user's profile Send private message
Coldbird



Joined: 08 Feb 2007
Posts: 155

PostPosted: Tue Apr 07, 2009 4:47 am    Post subject: Reply with quote

I figured as much, but I was hoping that someone had previous experiences with the matter.

Thanks anyway jean.
_________________
Been gone for some time. Now I'm back. Someone mind getting me up-2-date?
Back to top
View user's profile Send private message MSN Messenger
Smong



Joined: 04 Sep 2007
Posts: 82

PostPosted: Sat Apr 18, 2009 8:45 am    Post subject: Reply with quote

If you really want to inject GE commands I would try hooking sceGeListUpdateStallAddr. You would need to do some basic processing of the command list to handle the jump/call/ret commands, keep "dry executing" it until you find the "finish" instruction. Here you can start inserting your own instructions. Then append what was on the end of the original list, I think it's usually a "finish" followed by an "end". You would have to be careful not to overflow the size of the display list.

An easier way would be to just hook sceGeListSync/sceGeDrawSync, then insert a new list before calling the original functions. For sceGeListSync you'd need to call that a second time with your list's ID. You can also manage the list memory yourself with this method.

It's possible a game will sync multiple times per frame (for special effects), so you may not want to inject every single time.
_________________
(+[__]%)
Back to top
View user's profile Send private message
Coldbird



Joined: 08 Feb 2007
Posts: 155

PostPosted: Sat Apr 18, 2009 8:18 pm    Post subject: Reply with quote

Now that's some info I can work with, thanks Smong.
_________________
Been gone for some time. Now I'm back. Someone mind getting me up-2-date?
Back to top
View user's profile Send private message MSN Messenger
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