
The best info I have seen so far is the article "Joystick Metrics:
Measuring physical properties through the PC's joystick port" by
Michael Covington in the May 1985 issue of PC Tech Journal.  It talks
about how to read all kinds of things (voltage, current, resistance) in
BASIC, and even includes code for a simple "oscilloscope" display.

It's possible to read the joystick port directly if you don't want to
use BASIC.  The detailed information for this is in the PC Technical
Reference under Options and Adapters.  You have to provide some
millisecond resolution timing functions, but that's a subject which has
appeared many times in articles from Dr. Dobb's, Circuit Cellar Ink,
etc.  Look for the public domain ztimer package on wuarchive.

Good Luck,