Does it matter which way a trackball sits? I assumed the side that has all the cables coming out is the down direction? Or can that all be configured later?
Yes, it matters which way the trackball sits.
The two rollers with the encoder wheels must be aligned with the desired X-axis (the roller perpendicular to the screen) and Y-axis. (the roller parallel to the screen)
This trackball is a PS/2 model (square mount pattern) and based on
this thread showing another shallow-mount method, it looks like the cable exits the case away from the screen.
The metal panel above is for a Happ 2-1/4" trackball (diamond mount pattern) and IIRC the wires come off the lower left corner.
You can see the X-axis roller pulled out in this diagram.
If you have to turn this trackball 90, 180, or 270 degrees to get it to fit, you can change the data line connections to your optical encoder to swap directions/axes as needed.
Your best bet is to get the trackball you want and test it
before you mount it to the panel.
Scott
EDIT: Updated KADE forum URL.