VPU Double Buffering Tutorial.
hammer@ugcs.caltech.edu

A lot of you may know that VU1 has the ability to perform in a double buffered mode, where you can send data to one chunk of the memory while data is being processed on the other.

Since it's hard to figure out, I put together a really simple tutorial on getting double buffering to work the first time. It shows you how to use this feature to multiply two matricies in double buffered mode.

If you want to use the PS2 to draw, you don't even have to read the hardest part of the tutorial: DMA transfers from VU1MEM -> SPR. You can just use XGKICK from within your microcode.

Well I hope you like it

Let's start with the ZIPFILE:
main.cc
matmult.vsm
mymatrix.h
makefile
vpu.cmd
vumacros.h

Those work. I'd also like to note are that the VU seems to be off by a little bit in the matrix calculation. I don't know if it's something I screwed up, or something that the VPU just does, but I saw that someone else had this problem, so I let it be. It's always under 1% though, possibly even 0.01% I forgot.

Bump the matrix dimensions up if you want to see some serious savings!

SEE YOU AGAIN, SPACE COWBOY...!