Re: [AD] Porting Allegro to the PS2

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Shawn Hargreaves wrote:
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!


Ok, first of all please alllow me to geek out for a bit

*OMG SHAWN HARGREAVES IS A PS2 DEVOPLER!*
*AND HE WROTE ALLEGRO!*
*YOU ARE MY HERO!*

Ok, sorry about that, it's just that allegro was the thing the brought me back to programming after MS created Win95 (long story involving a "hello World" program 11 pages long.) I was a Japanese language major for a few years there and have given up on Computer Programming. Djgpp/allegro showed me the light. When I started my migration to Linux. (Another save in my programming carrier) Allegro went with me. Now I'm making my first baby-steps into the PS2 world. I've only had the thing for a week so If I error on the architecture, it's because I've only read the EEOverview manual and the GS Manual. I have the VU Manuals in my palm and have yet to read them. EEcore is next after that, but I have some experiance with mips so it's not the big of a priority. I've only also gone through them once, and I've been using my free time to get used to the more heavy aspects of progect programming. My "real job" is a sysadmin/database programmer for the local police departments. I've also done the "Playstation Documentation Project" so I have a little PS1 background, but not much. It's nice to have a resouse. If you have some Allegro-like lib already for the PS2, I can point give you the RTE replacement hooks for the IOP so that you can relese them "clean"



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.

bah, I saw the vewing fustrem diagram and assumed. Back to studying...


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 :-)



I stand corrected, I remeber them being very tiny. But I love machine code. Anyway I have some libs sony provided for them, I was just gonna use those...


-You rock Shawn, thanks for Allegro!

-Joshua



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/