joystk

measure the horizontal joystick input

usage: joystk

joystk measures the time taken to charge the 0.01µF capacitor internal to the game port to a threshold of 3.3V, through the resistive load attached between the game port's +5V supply (pin 1) and the horizontal input (pin 3). The charging time is sent to the standard output. The units of this measurement are arbitrary and dependent on processor speed; however, the program joycal can be used to calibrate these unknown units to the known video refresh period. An output of zero indicates that the sixteen-bit counter used in the timing loop has overflowed before the capacitor has charged to threshold.