RE: [AD] Porting Allegro to the PS2 |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Joshua Walker writes:
> actuallay all the computing devices: CPU, VU0, VU1, and the IPU
> (texture mananager) have a VIF so they can talk directly to the GS.
VU0 can't send directly to GS (no xgkick instruction). It is a
badly broken processor, and very awkward to get data back out of
it (the only really feasible ways involve a lot of CPU assistance).
The most common PS2 rendering pipe involves the CPU doing game
logic, physics, etc, with VU0 bound very closely to it as a vector
math coprocessor, then the CPU/VU0 combination builds up a DMA list
which is sent once at the end of the frame to VU1, which does
vertex ops and sends triangles on to the GS. At the same time some
games set up a parallel path3 DMA transfer directly from main
memory to the GS, which allows you to stream multiple textures into
video memory but is an absolute nightmare to get synced up properly!
> The GIF grabs it from the queue and "kicks" it to the GS for
> clipping and display (automatic)
Oh, if only clipping was truly automatic :-) The GS has a very
limited (12.4 fixed point integer precision) 2D scissor region
which can reject things that are slightly offscreen, but for
anything more than (2^12-SCREEN_W)/2 pixels off, or anything that
goes through the near or far clip planes, you need to write your
own clipper in VU1. Truly horrible.
> The VUx units are little 300mhz Microcomputers themselves
> with 16k for VU0 and 64k for VU1.
I'm pretty sure that is only 4k and 16k respectively, unless my
memory has gone wrong (it's over a year since I had the misfortune
of having to program on one of those beasts :-)
--
Shawn