NetBSD Problem Report #29900

From  Wed Apr  6 07:38:47 2005
Return-Path: <>
Received: from ( [])
	by (Postfix) with ESMTP id 7010163B121
	for <>; Wed,  6 Apr 2005 07:38:46 +0000 (UTC)
Message-Id: <>
Date: Wed, 6 Apr 2005 09:38:40 +0200 (MEST)
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:    rhialto
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 06 07:39:00 +0000 2005
>Closed-Date:    Sun Jun 07 14:25:06 +0000 2020
>Last-Modified:  Sun Jun 07 14:25:06 +0000 2020
>Originator:     Bernhard Moellemann
>Release:        NetBSD 3.0_BETA and NetBSD 2.0


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

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.


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.

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; */

     case ITEM_HAT:

Reminder: Test it with other joysticks 8-)



Responsible-Changed-From-To: pkg-manager->kristerw
Responsible-Changed-When: Fri, 08 Apr 2005 09:39:03 +0000
kristerw is the maintainer.

Responsible-Changed-From-To: kristerw->rhialto
Responsible-Changed-When: Mon, 05 Aug 2019 19:32:13 +0000
Assigning to current maintainer :-)

From: Rhialto <>
Subject: Re: pkg/29900 (pkgsrc/emulators/vice/ does not recognize firebutton
 of Competition Pro USB joystick)
Date: Wed, 1 Jan 2020 18:45:44 +0100

 I am the current maintainer for the VICE package and also a VICE
 committer. I don't have the same joystick as you, but I have the one
 that came with TheC64 Maxi:

 uhidev1 at uhub5 port 5 configuration 1 interface 0
 uhidev1: THEC64 Joystick (0x1c59) THEC64 Joystick (0x24), rev 1.10/0.21, addr 4, iclass 3/0
 uhid0 at uhidev1: input=8, output=7, feature=0

 which seems to be a remake of (if I'm remembering the name right) the
 Arcade joystick.

 For me, this one is working well.

 The code you're referencing currently exists in VICE in
 vice/src/arch/gtk3/joy-unix-usb.c but it otherwise the same.

 I added some debugging output to VICE, and at least for this joystick, I
 already get it->max_val == 0 (so your patch would not hurt for this
 joystick, but it isn't needed either). Button values detected are 0 and 1.

 Does your problem still exist (in which case maybe the VICE bug tracker
 is maybe more appropriate), or did it disappear in the intervening


State-Changed-From-To: open->feedback
State-Changed-When: Thu, 20 Feb 2020 20:41:00 +0000
Asked for feedback from submitter.

State-Changed-From-To: feedback->closed
State-Changed-When: Sun, 07 Jun 2020 14:25:06 +0000
obsolete; no feedback received.


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD:,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.