Vector Unit Command Line - News


Summary |  News |  Files | 
Posted By: abertsch
Date: 2002-Jul-31 12:29
Summary:VCL - Vector Unit Command Line

A new project has been added for a tool named VCL (Vector Unit Command
Line). Anyone thinking about programming the VUs (Vector Units) on the PS2
should check this out. The tool makes VU programming much easier and also
optimizes VU code better than most skilled engineers [for code of
reasonable complexity]. In addition, the tool comes with two sample
programs, full PDF documentation and a powerful set of VCL macros for
common 3D/math functions.

Latest News
Closing down playstation2-linux.com
 Linux for PlayStation 2 Community - sarahe - 2009-Jun-04 03:49
(32 Comments)
Server Outage
 Linux for PlayStation 2 Community - mrich - 2008-Aug-07 14:12
(2 Comments)
Firefox 2.0.0.8 available
 Mozilla for PlayStation2 - ppietro - 2007-Nov-09 04:10
(2 Comments)
The Future of Mozilla for the PlayStation2
 Mozilla for PlayStation2 - ppietro - 2007-Nov-09 04:09
(1 Comment)
PS2Linux pros at DevStation
 Linux for PlayStation 2 Community - sarahe - 2007-May-04 03:37
(0 Comments)

Discussion Forums: VCL - Vector Unit Command Line

Admin

Message: 22297
BY: exoticorn
DATE: 2002-Aug-02 00:04
SUBJECT: it doesn't cope well with this code

this is a vcl version of the first vu code that i optimized by hand. i wanted to see how well vcl does it, but it doesn't seem to be able to optimize the loop and after a while segfaults in frustration.
if anyone with more experience with vcl could give it a try and tell me whether it is a problem with my code or a problem with vcl, it would be very much appreciated.

.init_vf_all
.init_vi_all
.syntax new
.vu

--enter
--endenter

start:
lq.xy seed, 4(vi0)
rinit r, seed[x]
lq factors, 3(vi0)
iaddiu counter, vi0, 0
lq.x framecnt, 5(vi0)
loi 256.5
add.xzy colorscale, vf0, i
sub rndtemp, vf0, vf0
rnext.xyz pos, r

loop:
--LoopCS 8, 8

rnext.x rndtemp, r
rnext.y pos, r
mul.xyz color, colorscale, pos[z]
mul.x acc, pos, vf0[w]
msub.x pos, framecnt, pos[z]
ftoi15.x pos, pos
mtir ipos, pos[x]
mfir.x pos, ipos
itof15.x pos, pos
sub.y pos, pos, factors[z]
mul.xy pos, pos, factors
add.xy pos, pos, factors[w]
ftoi4.xyz pos, pos
ftoi0.xyz color, color
sq.xyz color, 1(vi0)
sq.xyz pos, 2(vi0)
xgkick vi0
mr32 rndtemp, rndtemp
move.xz pos, rndtemp
isubiu counter, counter, 1
ibne counter, vi0, loop

--cont

b start


 

Thread View

Thread Author Date
it doesn't cope well with this codeexoticorn2002-Aug-02 00:04
      RE: it doesn't cope well with this codestewart2002-Aug-05 15:18
            RE: it doesn't cope well with this codeexoticorn2002-Aug-08 10:13
                  RE: it doesn't cope well with this codestewart2002-Aug-08 10:40
                        RE: it doesn't cope well with this codeexoticorn2002-Aug-09 01:53

 

Post a followup to this message

You could post if you were [logged in]