NetBSD Problem Report #29900
From zza@serpens.de Wed Apr 6 07:38:47 2005
Return-Path: <zza@serpens.de>
Received: from serpens.de (serpens.de [62.208.181.200])
by narn.netbsd.org (Postfix) with ESMTP id 7010163B121
for <gnats-bugs@gnats.NetBSD.org>; Wed, 6 Apr 2005 07:38:46 +0000 (UTC)
Message-Id: <200504060738.j367cdHi003167@serpens.de>
Date: Wed, 6 Apr 2005 09:38:40 +0200 (MEST)
From: zza@serpens.de
Reply-To: zza@serpens.de
To: gnats-bugs@netbsd.org
Subject: vice does not recognize firebutton of Competition Pro USB
X-Send-Pr-Version: 3.95
>Number: 29900
>Category: pkg
>Synopsis: pkgsrc/emulators/vice/ does not recognize firebutton of Competition Pro USB joystick
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kristerw
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Apr 06 07:39:00 +0000 2005
>Last-Modified: Fri Apr 08 09:39:03 +0000 2005
>Originator: Bernhard Moellemann
>Release: NetBSD 3.0_BETA and NetBSD 2.0
>Organization:
Home
>Environment:
System: NetBSD arcanic 3.0_BETA NetBSD 3.0_BETA (ARCANIC) #0: Fri Apr 1 11:04:53 CEST 2005 root@arcanic:/mnt/root/usr/src/sys/arch/i386/compile/ARCANIC i386
Architecture: i386
Machine: i386
>Description:
The C64 Emulator pkgsrc/emulators/vice does not recognize the firebuttons
of the (since january available) Competition Pro USB joystick. This happens
because hid_get_item(3) reports 255 as hid_item.logical_maximum and vice
expects at least 1/3 of the logical_maximum to be reached to emulate a
digital joystick but the joystick gives only 1 if the button is pressed.
I do not know, if the joystick reports broken numbers or if hid_get_item(3)/
hid_get_data(3) reports faulty values or vice is overoptimistic in its
assumptions about buttons. So I report this here, hoping somebody can
figure out what exactly is broken.
The same happens with NetBSD 2.0.
>How-To-Repeat:
Compile Vice out of the pkgsrc, plug in an Competition Pro USB joystick,
select USB Joystick in Vice and start any game which uses the joystick:
The axis work fine, but none of the four firebuttons works.
>Fix:
With this patch applied the Competition Pro USB works. But I do not now
if this breaks other joysticks/input devices, because I own only this
one joystick. So testing is recommended before committing it.
--- src/arch/unix/joy_usb.c.orig 2004-08-07 21:33:32.000000000 +0200
+++ src/arch/unix/joy_usb.c 2005-04-01 12:37:26.000000000 +0200
@@ -109,7 +109,7 @@
it->min_or = 0;
it->min_val = -1;
it->max_or = orval;
- it->max_val = hi->logical_maximum-1;
+ it->max_val = 0; /* hi->logical_maximum-1; */
break;
case ITEM_HAT:
Reminder: Test it with other joysticks 8-)
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->kristerw
Responsible-Changed-By: cube@netbsd.org
Responsible-Changed-When: Fri, 08 Apr 2005 09:39:03 +0000
Responsible-Changed-Why:
kristerw is the maintainer.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.36 2007/11/24 03:27:39 kano Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.