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 

GU Sync?

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



Joined: 05 May 2005
Posts: 122

PostPosted: Tue Mar 14, 2006 4:43 am    Post subject: GU Sync? Reply with quote

Hey guys I have a question. I am having a bit of trouble with this.

I am working on an n64 emu (if you dont already know). Anyways the n64 uses a small 4k buffer for textures. This block of memory is commonly overwriten many times while in the process of drawing a frame. So I am having problems of the memory being over writen before the gu draws the display list. So is there a way to sync the GU so it draws whats in the display list befor continuing? I've tried calling GuSync(0,0) but it locks up and crashes the application (and I guess this is because I just call it vs calling finish and gu start again).

So is there a way to sync the gu without having to flush the the display list and start a new? This sounds like it will be costly do.
Back to top
View user's profile Send private message
Jim



Joined: 02 Jul 2005
Posts: 487
Location: Sydney

PostPosted: Tue Mar 14, 2006 7:28 am    Post subject: Reply with quote

One way might be to allocate LOTS of 4k textures and have one renderlist.

Jim
_________________
http://www.dbfinteractive.com
Back to top
View user's profile Send private message Visit poster's website
chp



Joined: 23 Jun 2004
Posts: 313

PostPosted: Tue Mar 14, 2006 6:42 pm    Post subject: Reply with quote

But that 4k storage is temporary for rendering, isn't it? If you have to decode the texture before sending it to be rendered, you have store store it temporarily somewhere. Synchronizing the GE with the CPU is a BAD idea since you will lose a lot of precious time. Do what Jim suggests and use a big buffer of temporary memoryslots to hold the data prepared for upload. Decoupling the GE and the CPU is one of the most important things you have to accomplish to get good speed.
_________________
GE Dominator
Back to top
View user's profile Send private message
subbie



Joined: 05 May 2005
Posts: 122

PostPosted: Wed Mar 15, 2006 1:35 am    Post subject: Reply with quote

chp wrote:
But that 4k storage is temporary for rendering, isn't it? If you have to decode the texture before sending it to be rendered, you have store store it temporarily somewhere. Synchronizing the GE with the CPU is a BAD idea since you will lose a lot of precious time. Do what Jim suggests and use a big buffer of temporary memoryslots to hold the data prepared for upload. Decoupling the GE and the CPU is one of the most important things you have to accomplish to get good speed.


Thats definantly gonna hurt on the memory side. :(
Back to top
View user's profile Send private message
chp



Joined: 23 Jun 2004
Posts: 313

PostPosted: Wed Mar 15, 2006 3:41 am    Post subject: Reply with quote

You'll simply have to put a threshold how many textures you can cache before you wait for the GE to finish working.
_________________
GE Dominator
Back to top
View user's profile Send private message
Jim



Joined: 02 Jul 2005
Posts: 487
Location: Sydney

PostPosted: Thu Mar 16, 2006 6:50 am    Post subject: Reply with quote

I doubt any N64 scene is big enough to fill the PSP's Video memory with different textures - there just wasn't the bandwidth to do that. But since even with only 4kb texture memory people double buffered a couple of 2k textures or used multiple palettes with the same image you might need to copy the previous texture into the new one each time.
I would guess you'll have about 1Mb of PSP video memory to play with - that's 250x4kb textures. At worst you might have to sync 2 or 3 times.

Jim
_________________
http://www.dbfinteractive.com
Back to top
View user's profile Send private message Visit poster's website
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