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 

vcallms

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



Joined: 03 Apr 2004
Posts: 182

PostPosted: Wed Nov 24, 2004 1:23 am    Post subject: vcallms Reply with quote

i was using the vu0 in macromode only so far and would like to use vcallms for some algorithms where i just move some values directly into vu0-registers (using the lqc2 instruction) and then start a subroutine from vu0-micromem. after the subroutine is finished i would store the value with sqc2 in main memory.

i saw an example that looked like this:

lqc2 vf4,0x0(%0)
lqc2 vf5,0x0(%1)
vcallms %2
sqc2 vf4, 0x0(%0)

since there is no code that waits for the end of the subroutine,
does that mean the vcallms-instruction is waiting until the subroutine is finished or does the following sqc2-instruction stall until its finished?

2nd would be better since i could do something else in the meantime.


thanks for any help
Back to top
View user's profile Send private message
blackdroid



Joined: 17 Jan 2004
Posts: 564
Location: Sweden

PostPosted: Wed Nov 24, 2004 7:04 pm    Post subject: Reply with quote

The only opcodes that does any interlocking with vu0 is qmfc2 and qmtc2, so they are the only ones actually waiting for a microprogram to finish after vcallms/vcallmsr,
lqc2 and sqc2 doesnt do any interlocking so they will just load/store the values at the time of execution. if you want to do stuff in the meantime of a mpg check the status register for vu0 when you want to fetch the result.
_________________
Kung VU
Back to top
View user's profile Send private message Visit poster's website
Saotome



Joined: 03 Apr 2004
Posts: 182

PostPosted: Thu Nov 25, 2004 4:40 am    Post subject: Reply with quote

thanks blackdroid

so if qmfc2 interlocks with vu0 then i dont need a loop where i read the status register and check if vu0 is still running, one qmfc2 instruction would suffice before writing the rest to memory?

for example:
Code:

...
vcallms %0
/* ...doing something else... */
qmfc2 $1,vf01  /* wait / interlock(?) */
sqc2 vf01,0x0(%1)
sqc2 vf02,0x10(%1)
sqc2 vf03,0x20(%1)

_________________
infj
Back to top
View user's profile Send private message
blackdroid



Joined: 17 Jan 2004
Posts: 564
Location: Sweden

PostPosted: Thu Nov 25, 2004 4:51 am    Post subject: Reply with quote

i should have said qmtc2.i/qmfc2.i, the normal operation is without interlock.
but yes your way of thinking is correct, just change qmfc2 to qmfc2.i
_________________
Kung VU
Back to top
View user's profile Send private message Visit poster's website
Saotome



Joined: 03 Apr 2004
Posts: 182

PostPosted: Thu Nov 25, 2004 5:45 am    Post subject: Reply with quote

ok, thanks a lot.
_________________
infj
Back to top
View user's profile Send private message
Saotome



Joined: 03 Apr 2004
Posts: 182

PostPosted: Fri Dec 09, 2005 12:39 am    Post subject: Reply with quote

Is this some kind of a bot? Can someone ban him and delete his nonsense posts?
_________________
infj
Back to top
View user's profile Send private message
gorim



Joined: 21 Sep 2005
Posts: 18

PostPosted: Sun Dec 11, 2005 5:03 pm    Post subject: Reply with quote

You may want to see this earlier VU topic thread which discusses the issue of interlock:

http://forums.ps2dev.org/viewtopic.php?t=494
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 -> 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