Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PS2 VIFCODES for TRISTRIPS? How do they work
#1
Hello all!

I'm not sure if this was the right place to post but I need an insight from one of the emulator developers here on how the PS2 handles the vertex format codes game developed have used to define how vertex data/face data is stored and loaded.

I've been doing research into various PS2 title file-formats and presently working on a game called Resident Evil Dead Aim.

They store their models in a csf fileformat. It uses triangle strips like most ps2 games
however if you read in the trips you notice there are a few that appear flipped
[Image: cd998.jpg]

Now I really doubt they don't use back-face culling. I have no idea why they randomly flip the strips like this could someone possibly help. After doing some research into this I've read that some developers use VIFcodes to determine how the vertex structures are basically structured and such.
[Image: cm2ks.png]

Attached mesh file along with obj representation
https://dl.dropboxusercontent.com/u/1079...Sample.zip
Reply

Sponsored links

#2
You need to find Refraction or pseudonym and contact them about this.
Try messaging ref first, he'll be more likely to read it and he should know quite a bit about Vif commands and packing.
Reply
#3
dunno how they do that exactly but the rendered looks like some "post vertex shader cache" optimization. except a few all of the flipped polygons have vertices sharing that should have been computed already. edit after file hex: it's gotta be flagged somewhere in the index list puzzle. there gotta be a count or something where to put a shift. should be just vertex index so the topology flips with that. atleast that trick would do it.

hope that helps. or atleast gives you an idea. Smile
Reply
#4
hmm alright thanks Ill see if I can find those guys

-edit-

I may of found the load function for the archives however I'm horrible at MIPS assembly

[Image: ctSql.png]

I can provide the elf file if anyone wants to take a look
Reply
#5
Not sure how much I can help really. They can do some ordering by use of the VIF Unpack code used in slightly different ways, but all it really does is push data on to the VU from the source, but you can reorder things by uploading in smaller chunks and using "skipping" on the unpack, meaning it will write 1QW, skip 3, write another etc and you can adjust the skipping depending on how much you want to mix things up. Aside from that, it's only used to upload the data straight and expand it to 32bit floats if it is 16 or 8 bit.
[Image: ref_sig_anim.gif]
Like our Facebook Page and visit our Facebook Group!
Reply




Users browsing this thread: 1 Guest(s)