Installation

Luckily, I had a SOG monitor (a 21" NEC P1150 with dual inputs.) Linux installed fine on the first try: I partitioned a /, /var, and /home. Enabled nfs exports, telnet, etc, set the default display to my NTSC TV, and networked the PS/2 with my Linksys router/firewall. All development work can now be done from my Linux PC, with output going to the TV. See my hardware section, below, for why I decided on this configuration.

Getting Started

I played with the blow and flowers demos that came with the PS/2 Linux kit. The first thing I did was to make a little library called "ps2base" - this contains a few simple classes that get the PS/2 in graphics mode, handle screen flipping, etc. Mostly, this let me separate the applications code from the systems code. And now I can actually see what the demos are doing:

The Hardware

Starting at the back...

The GS (Graphics Synthesizer)

This chip draws polygons (with textures, colors and depth,) on the screen. It seems heavily optimized for fast TV resolution display (duh!)...
With 4MB RAM:
640x480x32bits/color = 1.23 Meg RAM
640x480x32bits/color = 1.23 Meg RAM
640x480x16bits depth =  .61 Meg RAM
-----------------------------------
Dbl Buffered, Z disp = 3.07 Meg RAM
So we can run double buffered, depth aware, at TV res with 1MB for textures.

The pixel fill rate (with all bells and whistles) is 1.2 G/sec:

Pixels/Second = 1,200,000,000
Frames/Second = 60
Pixels/Frame  = 20,000,000

Pixels/Screen = 640*480  = 307,000
Overdraw      = 20M/307K = 65
That is to say, we can redraw every pixel 65 times on each frame without pain. Forget BSP trees, fancy sort algorithms - just feed the GS triangles and let the Z-buffer deal with visibility!

The Vector Units

Now we need to feed the vertices to the GS. Let's deal with the static stuff (e.g. the course in SSX, the city in GTA3,) first. The basic operation is transforming a world co-ordinate into a screen co-ordinate (e.g. figure out where a corner of a building should appear on the screen.) This (a transform) is a vector * a matrix with two divides, and takes 8 clock cycles according to the doc.
Ops/Second      = 300,000,000
Ops/Transform   = 8
Vertices/Second = 37,500,000
Vertices/Frame  = 625,000

Pixels/Frame  = 20,000,000
Pixels/Vertex = 32
Thus, the sweet spot is drawing triangles of between 32 and 96 pixels (triangle strips approach 1 vertex per triangle, disjoint triangles need three vertices per triangle.)

Assuming we assign half the drawing power to the static scenery, and optimize that scenery with triangle strips, we get:

Vectices/Frame    = 312,500
Vectices/Triangle = 1.5      (4 triangles per 6 vertices)
Triangles/Frame   = 208,000

SSX Tricky

Assuming a course time of 4 minutes:
Time on course       = 240 seconds
Triangles/Frame      = 208,000
New Triangles/Second = 867
New Triangles/Frame  = 16.5
SSX can devote 867 triangles of track to each second of game play without bothering to do any optimization at all!

Grand Theft Auto 3

Assuming 200 buildings in a city:
Triangles          = 208,000
Buildings          = 200
Triangles/Building = 104
Triangles/Cube     = 12
Cubes/Building     = 8.87
GTA3 can draw the whole city without optimization if a "building" has the complexity of 9 cubes (e.g. the main structure, two side roads, a few concrete divider thingies.)

All in all, this machine is looking pretty cool!