NetBSD Problem Report #60304
From www@netbsd.org Mon Jun 1 17:57:54 2026
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits)
client-signature RSA-PSS (2048 bits))
(Client CN "mail.netbsd.org", Issuer "R13" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 6193A1A9239
for <gnats-bugs@gnats.NetBSD.org>; Mon, 1 Jun 2026 17:57:54 +0000 (UTC)
Message-Id: <20260601175753.47E0C1A923B@mollari.NetBSD.org>
Date: Mon, 1 Jun 2026 17:57:53 +0000 (UTC)
From: gummybuns@protonmail.com
Reply-To: gummybuns@protonmail.com
To: gnats-bugs@NetBSD.org
Subject: Wii - add generic char driver for gba / other joybus devices
X-Send-Pr-Version: www-1.0
X-From4GNATS: "gummybuns@protonmail.com via gnats" <gnats-admin@NetBSD.org>
>Number: 60304
>Category: port-evbppc
>Synopsis: Wii - add generic char driver for gba / other joybus devices
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: port-evbppc-maintainer
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Mon Jun 01 18:00:00 +0000 2026
>Originator: Zac
>Release: 11.0
>Organization:
>Environment:
NetBSD wii 11.99.6 NetBSD 11.99.6 (NINTENDO) #20; Sun May 31 14:21:40 EDT 2026 user@devkitpro:/home/user/obj/sys/arch/evbppc/compile/NINTENDO evbppc
>Description:
I have been working on a generic char driver to support additional types of input on the Nintendo Wii's 4 gamecube ports and wanted to share the work in hope of contributing to src/
The change adds the `/dev/gcport[0-3]` device files which are matched by using the Joybus RESET/IDENTIFY commands to get the id of the plugged in device.
Currently the new char driver supports a single ioctl call to perform a transaction over the Wii's SI IO Buffer.
It will continue to use uhid for any gamecube controllers to preserve backwards compatibility.
summary of changes
- moves register definitions from si.c into si.h
- implements the data transfer over the SI IO Buffer
- queries the device id in the parent driver. continues to use uhid for a gamecube controller
- adds the new gcport_si.c char driver
the diff may most easily be seen here
https://github.com/NetBSD/src/pull/81/changes
>How-To-Repeat:
Working example of the new driver can be seen here
https://github.com/gummybuns/NetBSD-Wii-Joybus
1. Install netbsd on a wii
2. Compile the kernel from [my forked NetBSD-src](https://github.com/gummybuns/NetBSD-src/tree/wii-identify)
3. Plug a gameboy advance into one of the controller ports
4. boot up and run
>Fix:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.