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 

DMAC/VIF limitation ?

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



Joined: 31 Aug 2004
Posts: 244
Location: Somewhere over the rainbow

PostPosted: Mon Mar 28, 2005 7:57 pm    Post subject: DMAC/VIF limitation ? Reply with quote

Hello folks,

I'd like somebody to explain me this behavior following...

Context:
I build a VIF DMA packet which contains :
- the matrix using UNPACK VIF code
- the vertices XYZ2 data,m RGBAQ color data and textures coordinates ST using classic UNPACK VIF code

To maximise the VU usage, I sent in each GIF TAG 1 triangle (9 regs : 3x(RGBAQ + ST + XYZ2)) and I loop 28 times using the NLOOP register.

So basically I'm sending to the VU microprogram :
- 2 QW (Matrices)
- 28*3 (GS registers)
--------------------------
256 QW

I'm sending them uisng the DMAC chained mode and path 1 obviously.

So why 28 looping times ??? Because after it freezes... as it seems this 256 QW per pass seems a limit. (and 256 is never a random value :P)

I was thinking of a memory issue, I tried using the SPR and normal EE memory.. same result
I tried to cut the DMA packet using two DMA CNT tags to transmit the data in two blocks, same result

I tried to send 12 REGS within the GIF TAG isntead of 9 (2 triangles, no RGBAQ data) and so NLOOP was divided by 2 but same result, so basically NLOOP*NREGS shoud be lower than 256 (incluiding other QW sent like matrice...)



But I did not find this limitation anywhere, as it is not a DMAC limitation (2^16 QW limit if I'm not wrong), is it :
- a UNPACK vif code limitation ?
- a VIF limitation ?
- a bug in my code ?

Thanx :D
_________________
- TiTAN Art Division -
http://www.titandemo.org
Back to top
View user's profile Send private message Visit poster's website
Saotome



Joined: 03 Apr 2004
Posts: 182

PostPosted: Mon Mar 28, 2005 9:16 pm    Post subject: Reply with quote

i had the same problem recently :)
its because the vifpacket has a limit of 256 QW. but if you want to send 256 QW the NUM field of the packet should be 0, cause its only 8bit wide (0=256). so if you set the NUM to 256 it overflows into (/is OR'ed with) the VIF-CMD field and so the command is not what it should be anymore.
_________________
infj
Back to top
View user's profile Send private message
Shazz



Joined: 31 Aug 2004
Posts: 244
Location: Somewhere over the rainbow

PostPosted: Mon Mar 28, 2005 9:32 pm    Post subject: Reply with quote

Arg !!!! On my schema I saw that the NUM field was 16 bits wide but I missed that is was impossible !!! Yep only 8 bits !!! (hum yep 16+16+8 != 32 !)

Ok so it should work if I split the data in two sequential VIF packets so.. Hum, I thought I already tried... need to check !

Thx Saotome (again :D)
_________________
- TiTAN Art Division -
http://www.titandemo.org
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 -> PS2 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