PinFunction
1NC
2Enable Stick 2
3Up
4Fire Button
5Left
6NC
7Enable Stick 1
8Down
9Right

The TI-99/4A read it sticks like so: the 4A would poll one of the two sticks by pulling the voltage down from +5V to -5V (ideally; effectively, it went down to around -0.5V), and that joystick would send its position over the four directional lines. The 4A would then do the same for the other stick, etc. The fire button, however, is never individually polled: both sticks' fire buttons were the same, as far as the 4A could see.

More info can be found at Thierry Nouspikel's site, including how to make an adaptor allowing one to hook up a analog PC joystick to the 4A.