From mint-bounce@lists.fishpool.fi Mon May 15 14:50:03 2006 X-Original-To: fnaumann@mail.boerde.de Delivered-To: fnaumann@mail.boerde.de From: "Peter Persson" To: mint@fishpool.com Message-ID: <193629193710212@lycos-europe.com> X-Mailer: LycosMail X-Priority: 3 X-Originating-IP: 212.214.229.151 Mime-Version: 1.0 Subject: [MiNT] Proposed joystick device standard Content-Type: multipart/mixed; boundary="=_NextPart_Lycos_102121936291938_ID" Date: Mon, 15 May 2006 12:40:11 +0000 (GMT) X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-To: mint-bounce@lists.fishpool.fi X-original-sender: pep.fishmoose@home.se Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: X-Virus-Scanned: by amavisd-new at relay.boerde.de X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on relay.boerde.de X-Spam-Status: No, hits=2.0 tagged_above=-50.5 required=7.0 tests=AWL, BAYES_00, MIME_BOUND_NEXTPART, RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_SORBS X-Spam-Level: ** This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --=_NextPart_Lycos_102121936291938_ID Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit 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 --=_NextPart_Lycos_102121936291938_ID--