FreeJoy
The BlitzMax freejoy module contains commands that report the status of any joysticks and game controllers connected to the system.