[Off-topic] akrutsinger:
Update [1/18/2011]: Project now hosted here

I know its been done already, but as hard as I looked I couldn't find any kind of source code for the ps3sixaxis_en program that lets you use the controller on windows. So I spent the day messing around with USBTrace, GlovePIE, and the controller. So it begins...

I used GlovePIE (for no particular reason) to find the USB Request Block that gets the status of the controller.

After I found the URB that gets the controller I used the python script from DIY Kinect Hacking tutorial

I'm not going to go into detail about how to set everything up (i.e. pyusb, libusb, etc). The DIY Kinect Hacking article is awesome and includes all the preliminary steps.

So after setting up the script and running it all I had to do was press the buttons and watch the screen and analyze what changed. Here is an example of pressing the start button.

Here you can also see the joystick X and Y values. when you move a joystick all the way left the X value equals 0 and all the way right it equals 255. Same goes for the Y values. up=0, down=255

So with the bit of knowledge I learned today I made a few modification to the OpenKinect c# code. All i have it doing is printing some of the buttons to the console window when you press them on the controller.

I figured that was enough for a proof of concept. I also attached the source. I used SharpDevelop but visual studio should open the solution fine.

heres a breakdown of the structures the controller sends to the host

struct CONTROLLER_DATA
{
ushort ????
byte DIRECTION_PAD
byte BUTTON_PAD
byte PS_POWER_BUTTON	//0-depressed; 1-pressed
byte ??
JOYSTICK_POSITION LEFT_JOYSTICK
JOYSTICK_POSITION RIGHT_JOYSTICK
ushort
ushort
ushort
ushort
byte BTN_L2_VALUE	//0-depressed; 255-fully pressed
byte BTN_R2_VALUE	//0-depressed; 255-fully pressed
byte BTN_L1_VALUE	//0-depressed; 255-fully pressed
byte BTN_R1_VALUE	//0-depressed; 255-fully pressed
ushort
ushort
ushort
byte
byte ??	//seems to always be 3
byte ??	//seems to always be 239
byte ??	//seems to always be 22
ushort
ushort
byte ??	//seems to always be 51
byte ??	//seems to always be 60
byte ??	//does change. possibly motor?
byte ??	//seems to always be 1
byte ??	//does change. possibly motor?
byte HIT	//Not for sure but appears to be 1 normally, then becomes 2 if the controller is hit
byte ROLL	//0-centered; left-positive; right-negative
byte ??	//seems to always be 2
byte PITCH	//0-centered; up-positive; down-negative
byte ??	//seems to always be 1
byte Z_AXIS	//Not sure what axis this is. It does change with movement tho
byte ?? //seems to always be 1
byte ??	//accelerometer perhaps? values are positive when you move controller left and negative when
//you move the controller right
};

enum DIRECTION_PAD : byte
{
SELECT	= 0x01
BTN_L3	= 0x02
BTN_R3	= 0x04
START	= 0x08
UP	= 0x10
RIGHT	= 0x20
DOWN	= 0x40
LEFT	= 0x80
};

enum BUTTON_PAD : byte
{
LEFT2	= 0x01
RIGHT2	= 0x02
LEFT1	= 0x04
RIGHT1	= 0x08
TRIANGLE	= 0x10
CIRCLE	= 0x20
CROSS	= 0x40
SQUARE	= 0x80
};

struct JOYSTICK_POSITION
{
byte X_AXIS	//0-LEFT; 255-RIGHT
byte Y_AXIS	//0-UP; 255-DOWN
};

References:

DIY Kinect Hacking Great tutorial

OpenKinect Edited his code for my pof

LibUSBDotNet The driver that has to be used with the device