| View previous topic :: View next topic |
| Author |
Message |
Coldbird

Joined: 08 Feb 2007 Posts: 155
|
Posted: Mon Apr 06, 2009 11:34 am Post subject: How do games draw 3D data to screen? |
|
|
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 |
|
 |
jean

Joined: 05 Jan 2008 Posts: 489
|
Posted: Mon Apr 06, 2009 6:02 pm Post subject: |
|
|
| 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 |
|
 |
Coldbird

Joined: 08 Feb 2007 Posts: 155
|
Posted: Tue Apr 07, 2009 4:47 am Post subject: |
|
|
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 |
|
 |
Smong
Joined: 04 Sep 2007 Posts: 82
|
Posted: Sat Apr 18, 2009 8:45 am Post subject: |
|
|
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 |
|
 |
Coldbird

Joined: 08 Feb 2007 Posts: 155
|
Posted: Sat Apr 18, 2009 8:18 pm Post subject: |
|
|
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 |
|
 |
|