[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] usb game controllers



On Thursday 23 June 2005 17:52, frozensound@xxxxxx set 1,000 monkies in front 
of keyboards and came up with the following:
> > Joystick.get_numhats() -> int
> >       Returns the number of available directional hats on the Joystick.
>
> I'd just like to add that on 'classic' gameport joysticks the hats (i think
> they've been called 'Coolie Hats", too) were special input. i don't know
> fer sure if different sticks used different configurations and needed to be
> implemented individually (especially for the old dos-games), but as an
> example the coolie - hat on the more or less famous "CH Flightstick Pro"
> used
>
> - analog x - axis
> - analog y - axis
> - four fire buttons (A,B,C and D)
> - analog throttle (3rd axis)
> - Point-Of-View-Hat
>
> Because of the lack of connections on the pc gameport, the POV-Hat was
> encoded as fire button combinations:
>
> Up:		A & B & C & D
> Down: 	A & B & C
> Right:	A & B & D
> Left: 	A & B
>
> "and not as another two analog" + plural('axis') +". - that's all, folks."

	I'd say it was pretty non-standardized. On the TM X-Fighter, the hat actually 
has a bunch of resistors soldered to it, inline with a connection to the 
third analog axis. Each hat position yields a specific resistance value on 
the third axis (basically, a different axis position). Slick.
	I assume all these "hat tricks" :) required special drivers, I don't see any 
other way to handle it.

	-Matt Bailey