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 

iALU Lower Instructions

 
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: Sun Nov 07, 2004 3:09 am    Post subject: iALU Lower Instructions Reply with quote

Hello,

I'm looking for VU bitwise logic operations instructions, I understood that the VU has an iALU which is accessible thru the lower instructions, and as a standard integer ALU I hoped to find instructions like right and left bit shifting, XOR, bit rotating... And it seems there is only add, sub, and & or.... is it a really limited ALU ????

Or simply the VU is really not a good way to handle bitwise operations... as the MIPS can be...

Is by nature the VU1 only dedicated to work on objects values (vertices, faces, lightsourcing...) and not for example on texture data/pixel values like a bumpmap for example ? (assuming the data can be stored in the VU1 memory of course)
_________________
- TiTAN Art Division -
http://www.titandemo.org
Back to top
View user's profile Send private message Visit poster's website
blackdroid



Joined: 17 Jan 2004
Posts: 564
Location: Sweden

PostPosted: Sun Nov 07, 2004 12:24 pm    Post subject: Reply with quote

The VU's are vector ALU's ( lets expand VU to Vector Unit ) wich where made to perfom 4x floats vector calculations well, so yes emphasis is on vector operations.

you can generate 32bit data/textures pretty nicely with the vu's. but I would not say its something they where design for. Also you have to remember that the iALU only handles 16bit integers, making it less usable for basically anything else than loop counters ( ok that might be abit harsh, but probably in lieu with design decisions ).
_________________
Kung VU
Back to top
View user's profile Send private message Visit poster's website
Shazz



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

PostPosted: Sun Nov 07, 2004 7:13 pm    Post subject: Reply with quote

blackdroid wrote:
you can generate 32bit data/textures pretty nicely with the vu's.


Can you tell more about this ??? Without bitshifting operations I have trouble to see how I would be able to generate 8888 RGBA textures (or can I split VU 32bits floating point registers into four 8bits registers to handle R,G,B,A component ?

Concerning my goal, playing for 16bits integer register was what I need as I planned to convert within the VU planar information into 16bits texture...

By the way, blackdroid, do you have somewhere an example of VU texture generation ? Or simply texture processing like I would do to code a oldsk00l bumpmapping ? (looking at each pixel RGB values....) ?

Thx !
Nice to have a Kung VU here :D


EDIT:
Obviously I'm talking about old 2D bump mapping when you generate a classic environment map and use a texture as a bump map which represent object’s surface height variations using RGB intensity.

Then by taking the difference between the height of the pixel and the height of its neighbours from the bump map, you'll have your nx and ny normals and plot the envmap pixel at nx,ny.

DOT3 bump mapping will be a good practice when having digesting 5 times the tutorial from Sparky...
_________________
- 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