[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Proposed joystick device standard



Shall I interpret the lack of response as "sure PeP, go ahead, use the Linux v1.xx API"? :-)

-- Peter

> Från: "Peter Persson" <pep.fishmoose@home.se>
> Till: mint@fishpool.com
> Rubrik: [MiNT] Proposed joystick device standard
> Datum: Mon, 15 May 2006 12:40:11 +0000 (GMT)

> Hi people,
> A while ago I experimented with joystick devices for FreeMiNT.
> I found 3 APIs that could be used:
> 1. BSD joystick API (seems to be used by FreeBSD/OpenBSD/NetBSD)
> Returns: X, Y, button 0, button 1 (4 ints)
> Support: 1 axis, 2 buttons.
> Comment: Extremely easy to implement, too limited.
> 2. "old" Linux joystick API (v1.xx)
> Returns: Buttons, X, Y (3 ints)
> Support: 1 axis, 32 buttons.
> Comment: Extremely easy to implement, a bit limited.
> 3. "new" Linux joystick API (v2.xx)
> This API is event-based, i.e. an event is generated each time button is
> pressed/released, an axis is moved etc.
> Returns: Event data
> Support: Any number of axis and buttons
> Comment: Harder to implement, but *very* flexible.
> I think "something" usually beats than "nothing". Even though the "new"
> Linux API is far superior in many aspects, I suggest using the "old" Linux
> API until the demand for a more advanced API emerges.
> The "old" Linux API is extremely easy to implement both at the driver- and
> application level, and it imposes nearly zero overhead compared to reading
> the hardware directly. Again, if this protocol isn't sufficient in the
> future, there is always the possibility to expand it later on as done in
> the Linux implementation.
> I have drivers for joypads atm, but I won't release anything before I know
> if this standard could be accepted. Please let me know what you think.
> -- Peter