Check out the Atari Missle Command Optical boards post
http://www.arcadecontrols.org/yabbse/index.php?board=1;action=display;threadid=13494follow the green wires of the wiring harness back to the optic boards that the spoked wheels pass through when you roll the TrackBall.
use the links in that post to determine what those green wires actually connect to on the optic boards...
here is another good tb hack site:
http://www.members.shaw.ca/bakaye/tballhack.htmI am assuming that you are hacking this to mouse?
If so just hook it up to common ground (IF the green wires are GROUND) on your mouse. I used the common ground of the mouse buttons. Basically the trace/cricuit that all the mice buttons share... This worked for me ....
But if you really want to be safe. Get a 12 foot metal rod from home depot.. Ram it into the ground about 11 ft. Then run a big copper cable from the ground of your track ball harness out the window and to the metal rod. Your Trackball will be safe during all lightening storms!!! That'll ground that BABY!!!! This would be known as the tim the toolman approach

Oh and yes, I am a retard just ask my wife!