History log of /src/sys/arch/evbppc/wii/
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.3 13-Oct-2024 jmcneill

wii: Support loading the kernel from boot2

Improve hardware initialization steps so the NetBSD kernel can be launched
directly from boot2 and does not rely on any other PPC software to setup
the hardware.


Revision tags: perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.2 24-Jan-2024 jmcneill

branches: 1.2.2; 1.2.4;
wii: Add support for passing boot options to the kernel.


1.1 20-Jan-2024 jmcneill

evbppc: Add initial support for the Nintendo Wii


1.12 15-Nov-2025 jmcneill

wii: Add support for using a USB Gecko as serial console.

The USB Gecko is a Wii/Gamecube development tool which connects to the
GameCube memory slot of the Wii and a USB port of a computer. The USB
port exposes an FTDI serial port on the computer side of the connection.

EXI commands sent from the Wii to the USB Gecko can read and write bytes.
Wire this up to form a simple serial console when the device is detected.
Use WSDISPLAY_MULTICONS to allow for simultaneous use of the USB Gecko
and the framebuffer console.


1.11 25-Oct-2025 jmcneill

wii: Use GX to accelerate RGB to YUY2 conversion.

Allocate a 640x480x32 RGB buffer in memory, and when not in EMUL mode,
use the CPU to copy from the RGB buffer to EFB (taking advantage of the
pixel engine to do RGB -> YUY2 for us) and then use the GX to copy from
EFB to XFB.

Not only does this improve performance significantly in X, it also results
in better colour reproduction. The previous software method employed by
xf86-video-wsfb had some corner cases where eg. dark colours would display
as bright pink.


1.10 02-Sep-2025 jmcneill

wii: Allow the RESET button to reboot system when halted.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.9 13-Feb-2025 jmcneill

branches: 1.9.2;
wii: Early init for DVD support


1.8 19-Oct-2024 jmcneill

Improve delay() accuracy on Nintendo Wii.

The PowerPC delay() implementation converts the timebase frequency to
a number of nanoseconds per tick and uses that value to compute the
delay interval. On the Wii's Broadway processor with a timebase
frequency of 60.75 MHz, some precision is lost as each tick is
approximately 16.46 nanoseconds. The end result is that we sleep for
approximately 2.875% longer than necessary. This also has an impact
on CPU speed calculation on Broadway, which incorrectly reports itself
as 750MHz instead of 729MHz (2.875% faster).

Fix this by introducing an (optional) ticks_per_msec variable that can
be set by the platform and allows delay() to improve the accuracy of
longer delays.

Measured CPU frequency before this change:
[ 1.000000] cpu0: 750.00 MHz, 256KB WB with ECC L2 cache

Measured CPU frequency after this change:
[ 1.000000] cpu0: 729.00 MHz, 256KB WB with ECC L2 cache


1.7 13-Oct-2024 jmcneill

wii: Support loading the kernel from boot2

Improve hardware initialization steps so the NetBSD kernel can be launched
directly from boot2 and does not rely on any other PPC software to setup
the hardware.


Revision tags: perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.6 05-Mar-2024 thorpej

branches: 1.6.2;
Move the at-shutdown call to resettodr() from cpu_reboot() to kern_reboot().

It's a small step, but it's a step.


1.5 10-Feb-2024 jmcneill

wii: Simplify available memory logic.

Use usable MEM2 fields in Broadway / IOS Global memory locations to
determine available memory.


1.4 24-Jan-2024 jmcneill

branches: 1.4.2;
wii: Add support for passing boot options to the kernel.


1.3 22-Jan-2024 jmcneill

wii: Add drivers for Broadway DSP and Audio interface.

0: [*] audio0 @ bwdsp0: Broadway DSP
playback: 16, 2ch, 48000Hz
record: unavailable
(P-) slinear_be 16/16, 2ch, { 48000 }


1.2 21-Jan-2024 jmcneill

wii: support RB_POWERDOWN


1.1 20-Jan-2024 jmcneill

evbppc: Add initial support for the Nintendo Wii


1.6 08-Dec-2025 jmcneill

wii: Add support for GameCube controller sockets.

A new driver is introduced for the Serial Interface that exposes the four
GameCube controller sockets as uhid(4) devices. The report format and HID
usages of these devices attempts to mimic the official USB GameCube
controller adapter.

wii$ usbhidctl -f /dev/uhid0 -r
Report descriptor:
Collection page=Generic_Desktop usage=Game_Pad
Input size=1 count=1 page=Button usage=Button_3, logical range 0..1
Input size=1 count=1 page=Button usage=Button_1, logical range 0..1
Input size=1 count=1 page=Button usage=Button_2, logical range 0..1
Input size=1 count=1 page=Button usage=Button_4, logical range 0..1
Input size=1 count=1 page=Button usage=Button_11, logical range 0..1
Input size=1 count=1 page=Button usage=Button_12, logical range 0..1
Input size=1 count=1 page=Button usage=Button_10, logical range 0..1
Input size=1 count=1 page=Button usage=Button_9, logical range 0..1
Input size=1 count=1 page=Button usage=Button_8, logical range 0..1
Input size=1 count=1 page=Button usage=Button_6, logical range 0..1
Input size=1 count=1 page=Button usage=Button_7, logical range 0..1
Input size=1 count=1 page=Button usage=Button_5, logical range 0..1
Collection page=Generic_Desktop usage=Pointer
Input size=8 count=1 page=Generic_Desktop usage=X, logical range 0..255
Input size=8 count=1 page=Generic_Desktop usage=Y, logical range 0..255
End collection
Collection page=Generic_Desktop usage=Pointer
Input size=8 count=1 page=Generic_Desktop usage=Z, logical range 0..255
Input size=8 count=1 page=Generic_Desktop usage=Rz, logical range 0..255
End collection
Input size=8 count=1 page=Generic_Desktop usage=Rx, logical range 0..255
Input size=8 count=1 page=Generic_Desktop usage=Ry, logical range 0..255
Total input size 9 bytes
Total output size 0 bytes
Total feature size 0 bytes


1.5 15-Nov-2025 jmcneill

wii: Add support for using a USB Gecko as serial console.

The USB Gecko is a Wii/Gamecube development tool which connects to the
GameCube memory slot of the Wii and a USB port of a computer. The USB
port exposes an FTDI serial port on the computer side of the connection.

EXI commands sent from the Wii to the USB Gecko can read and write bytes.
Wire this up to form a simple serial console when the device is detected.
Use WSDISPLAY_MULTICONS to allow for simultaneous use of the USB Gecko
and the framebuffer console.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.4 18-Jun-2024 rin

branches: 1.4.4;
wii: mainbus_attach: Appease GCC12 -Warray-bounds

GCC12 blames pointer access to 0-th page, [0, 0xfff], with -Warray-bounds.
Silence it by `#pragma GCC` for now.

XXX
map to higher address as we done for, e.g., arm by devmap?

Thanks mrg@ for discussion.


1.3 25-Jan-2024 jmcneill

branches: 1.3.2;
wii: Add External interface bus and RTC support


1.2 22-Jan-2024 jmcneill

wii: Add drivers for Broadway DSP and Audio interface.

0: [*] audio0 @ bwdsp0: Broadway DSP
playback: 16, 2ch, 48000Hz
record: unavailable
(P-) slinear_be 16/16, 2ch, { 48000 }


1.1 20-Jan-2024 jmcneill

evbppc: Add initial support for the Nintendo Wii


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.4 13-Mar-2025 jmcneill

wii: Revert pic_pi.c r1.2 and r1.3.

The simplification of pic_pi.c in r1.2 introduced a performance regression
with sdhc. Revert to the original implementation.


1.3 16-Feb-2025 jmcneill

wii: Fix missed interrupt bug.

Apparently reading INTSR clears the pending status. So only read this for
mode PIC_GET_IRQ.


1.2 15-Feb-2025 jmcneill

wii: Simplify Processor Interface pic code.


Revision tags: perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.1 20-Jan-2024 jmcneill

branches: 1.1.2; 1.1.4;
evbppc: Add initial support for the Nintendo Wii


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.3 13-Oct-2024 jmcneill

wii: Support loading the kernel from boot2

Improve hardware initialization steps so the NetBSD kernel can be launched
directly from boot2 and does not rely on any other PPC software to setup
the hardware.


Revision tags: perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.2 24-Jan-2024 jmcneill

branches: 1.2.2; 1.2.4;
wii: Add support for passing boot options to the kernel.


1.1 20-Jan-2024 jmcneill

evbppc: Add initial support for the Nintendo Wii


1.3 16-Nov-2025 jmcneill

wii: Add standalone bootloader.

This adds "ppcboot.elf" to the Wii (evbppc) build, which can be placed on
the FAT partition of an SD card in the bootmii directory. The bootloader
doesn't have a user interface, it simply loads a kernel from the first
FFS partition it finds on the SD card.

Debug logs are printed to a USB Gecko device in either memory card slot
if present.

\\-__,------,___.
\\ __,---` NetBSD/evbppc Wii MINI boot
\\ `---,_. Revision 1.0 (Sun Nov 16 19:27:47 UTC 2025)
\\-,_____,.---`
\\
\\
\\

booting netbsd 7828064/-|+130520 [315696+305916]=0x82f350
[ 1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
[ 1.0000000] 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,
[ 1.0000000] 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023,
[ 1.0000000] 2024, 2025
[ 1.0000000] The NetBSD Foundation, Inc. All rights reserved.
[ 1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[ 1.0000000] The Regents of the University of California. All rights reserved.

[ 1.0000000] NetBSD 11.99.3 (WII) #207: Sun Nov 16 14:28:23 AST 2025
[ 1.0000000] jmcneill@berserk:/home/jmcneill/netbsd/obj/sys/arch/evbppc/compile/WII
[ 1.0000000] total memory = 90112 KB
[ 1.0000000] avail memory = 77008 KB
[ 1.0000000] mainbus0 (root): Nintendo Wii
...


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.2 13-Oct-2024 jmcneill

branches: 1.2.2;
wii: Support loading the kernel from boot2

Improve hardware initialization steps so the NetBSD kernel can be launched
directly from boot2 and does not rely on any other PPC software to setup
the hardware.


Revision tags: perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.1 20-Jan-2024 jmcneill

branches: 1.1.2; 1.1.4;
evbppc: Add initial support for the Nintendo Wii


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.2 13-Oct-2024 jmcneill

wii: Support loading the kernel from boot2

Improve hardware initialization steps so the NetBSD kernel can be launched
directly from boot2 and does not rely on any other PPC software to setup
the hardware.


Revision tags: perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.1 23-Jan-2024 jmcneill

branches: 1.1.2; 1.1.4;
wii: Add GPIO, I2C, and basic A/V encoder driver.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.1 23-Jan-2024 jmcneill

branches: 1.1.2;
wii: Add GPIO, I2C, and basic A/V encoder driver.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.4 15-Feb-2025 jmcneill

wii: Audio playback improvements.

Instead of resetting the byte counter for every block (which is racy),
increment the interrupt timing register by the exact byte count for
each block. Should do better at keeping things in sync.


Revision tags: perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.3 23-Jan-2024 jmcneill

branches: 1.3.2; 1.3.4;
wii: provide device names to intr_establish

wii$ intrctl list
interrupt id CPU0 device name(s)
pi irq 14 64769* hollywood0
hollywood irq 36 5872* ehci0
hollywood irq 39 58907* sdhc0
hollywood irq 40 4* sdhc1
hollywood irq 49 0* resetbtn0
pi irq 5 0* bwai0


1.2 23-Jan-2024 jmcneill

wii: Use A/V encoder volume controls instead of using a software filter.


1.1 22-Jan-2024 jmcneill

wii: Add drivers for Broadway DSP and Audio interface.

0: [*] audio0 @ bwdsp0: Broadway DSP
playback: 16, 2ch, 48000Hz
record: unavailable
(P-) slinear_be 16/16, 2ch, { 48000 }


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.1 22-Jan-2024 jmcneill

branches: 1.1.2;
wii: Add drivers for Broadway DSP and Audio interface.

0: [*] audio0 @ bwdsp0: Broadway DSP
playback: 16, 2ch, 48000Hz
record: unavailable
(P-) slinear_be 16/16, 2ch, { 48000 }


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.2 23-Jan-2024 jmcneill

branches: 1.2.2;
wii: Simply DSP driver - no interrupt handler required.


1.1 22-Jan-2024 jmcneill

wii: Add drivers for Broadway DSP and Audio interface.

0: [*] audio0 @ bwdsp0: Broadway DSP
playback: 16, 2ch, 48000Hz
record: unavailable
(P-) slinear_be 16/16, 2ch, { 48000 }


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.1 12-Feb-2025 jmcneill

branches: 1.1.2; 1.1.6;
wii: Add support for Wii DVD drive.

This adds a virtual SCSI HBA driver that is able to read DVD video discs
inserted in the Wii.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.4 13-Oct-2024 jmcneill

wii: Support loading the kernel from boot2

Improve hardware initialization steps so the NetBSD kernel can be launched
directly from boot2 and does not rely on any other PPC software to setup
the hardware.


1.3 22-Sep-2024 jmcneill

wii: Restrict IOP access to shared peripherals.

Ensure that the IOP cannot access peripherals by clearing the appropriate
bus access bit. I have observed OHCI reporting completion for TDs living
in ARM reserved memory at runtime, this seems to suppress that.


Revision tags: perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.2 23-Jan-2024 jmcneill

branches: 1.2.2; 1.2.4;
wii: provide device names to intr_establish

wii$ intrctl list
interrupt id CPU0 device name(s)
pi irq 14 64769* hollywood0
hollywood irq 36 5872* ehci0
hollywood irq 39 58907* sdhc0
hollywood irq 40 4* sdhc1
hollywood irq 49 0* resetbtn0
pi irq 5 0* bwai0


1.1 20-Jan-2024 jmcneill

evbppc: Add initial support for the Nintendo Wii


1.3 15-Nov-2025 jmcneill

wii: Add support for using a USB Gecko as serial console.

The USB Gecko is a Wii/Gamecube development tool which connects to the
GameCube memory slot of the Wii and a USB port of a computer. The USB
port exposes an FTDI serial port on the computer side of the connection.

EXI commands sent from the Wii to the USB Gecko can read and write bytes.
Wire this up to form a simple serial console when the device is detected.
Use WSDISPLAY_MULTICONS to allow for simultaneous use of the USB Gecko
and the framebuffer console.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.2 10-Feb-2024 jmcneill

branches: 1.2.4;
wii: Explicitly set EXI frequency when selecting a device.


1.1 25-Jan-2024 jmcneill

branches: 1.1.2;
wii: Add External interface bus and RTC support


1.3 15-Nov-2025 jmcneill

wii: Add support for using a USB Gecko as serial console.

The USB Gecko is a Wii/Gamecube development tool which connects to the
GameCube memory slot of the Wii and a USB port of a computer. The USB
port exposes an FTDI serial port on the computer side of the connection.

EXI commands sent from the Wii to the USB Gecko can read and write bytes.
Wire this up to form a simple serial console when the device is detected.
Use WSDISPLAY_MULTICONS to allow for simultaneous use of the USB Gecko
and the framebuffer console.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.2 10-Feb-2024 jmcneill

branches: 1.2.4;
wii: Explicitly set EXI frequency when selecting a device.


1.1 25-Jan-2024 jmcneill

branches: 1.1.2;
wii: Add External interface bus and RTC support


1.1 15-Nov-2025 jmcneill

branches: 1.1.2; 1.1.4;
wii: Add support for using a USB Gecko as serial console.

The USB Gecko is a Wii/Gamecube development tool which connects to the
GameCube memory slot of the Wii and a USB port of a computer. The USB
port exposes an FTDI serial port on the computer side of the connection.

EXI commands sent from the Wii to the USB Gecko can read and write bytes.
Wire this up to form a simple serial console when the device is detected.
Use WSDISPLAY_MULTICONS to allow for simultaneous use of the USB Gecko
and the framebuffer console.


1.1 08-Dec-2025 jmcneill

branches: 1.1.2;
wii: Add support for GameCube controller sockets.

A new driver is introduced for the Serial Interface that exposes the four
GameCube controller sockets as uhid(4) devices. The report format and HID
usages of these devices attempts to mimic the official USB GameCube
controller adapter.

wii$ usbhidctl -f /dev/uhid0 -r
Report descriptor:
Collection page=Generic_Desktop usage=Game_Pad
Input size=1 count=1 page=Button usage=Button_3, logical range 0..1
Input size=1 count=1 page=Button usage=Button_1, logical range 0..1
Input size=1 count=1 page=Button usage=Button_2, logical range 0..1
Input size=1 count=1 page=Button usage=Button_4, logical range 0..1
Input size=1 count=1 page=Button usage=Button_11, logical range 0..1
Input size=1 count=1 page=Button usage=Button_12, logical range 0..1
Input size=1 count=1 page=Button usage=Button_10, logical range 0..1
Input size=1 count=1 page=Button usage=Button_9, logical range 0..1
Input size=1 count=1 page=Button usage=Button_8, logical range 0..1
Input size=1 count=1 page=Button usage=Button_6, logical range 0..1
Input size=1 count=1 page=Button usage=Button_7, logical range 0..1
Input size=1 count=1 page=Button usage=Button_5, logical range 0..1
Collection page=Generic_Desktop usage=Pointer
Input size=8 count=1 page=Generic_Desktop usage=X, logical range 0..255
Input size=8 count=1 page=Generic_Desktop usage=Y, logical range 0..255
End collection
Collection page=Generic_Desktop usage=Pointer
Input size=8 count=1 page=Generic_Desktop usage=Z, logical range 0..255
Input size=8 count=1 page=Generic_Desktop usage=Rz, logical range 0..255
End collection
Input size=8 count=1 page=Generic_Desktop usage=Rx, logical range 0..255
Input size=8 count=1 page=Generic_Desktop usage=Ry, logical range 0..255
Total input size 9 bytes
Total output size 0 bytes
Total feature size 0 bytes


1.1 15-Nov-2025 jmcneill

branches: 1.1.2; 1.1.4;
wii: Add support for using a USB Gecko as serial console.

The USB Gecko is a Wii/Gamecube development tool which connects to the
GameCube memory slot of the Wii and a USB port of a computer. The USB
port exposes an FTDI serial port on the computer side of the connection.

EXI commands sent from the Wii to the USB Gecko can read and write bytes.
Wire this up to form a simple serial console when the device is detected.
Use WSDISPLAY_MULTICONS to allow for simultaneous use of the USB Gecko
and the framebuffer console.


1.1 15-Nov-2025 jmcneill

branches: 1.1.2; 1.1.4;
wii: Add support for using a USB Gecko as serial console.

The USB Gecko is a Wii/Gamecube development tool which connects to the
GameCube memory slot of the Wii and a USB port of a computer. The USB
port exposes an FTDI serial port on the computer side of the connection.

EXI commands sent from the Wii to the USB Gecko can read and write bytes.
Wire this up to form a simple serial console when the device is detected.
Use WSDISPLAY_MULTICONS to allow for simultaneous use of the USB Gecko
and the framebuffer console.


1.1 25-Oct-2025 jmcneill

branches: 1.1.2; 1.1.4;
wii: Use GX to accelerate RGB to YUY2 conversion.

Allocate a 640x480x32 RGB buffer in memory, and when not in EMUL mode,
use the CPU to copy from the RGB buffer to EFB (taking advantage of the
pixel engine to do RGB -> YUY2 for us) and then use the GX to copy from
EFB to XFB.

Not only does this improve performance significantly in X, it also results
in better colour reproduction. The previous software method employed by
xf86-video-wsfb had some corner cases where eg. dark colours would display
as bright pink.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.3 22-Sep-2024 jmcneill

wii: Restrict IOP access to shared peripherals.

Ensure that the IOP cannot access peripherals by clearing the appropriate
bus access bit. I have observed OHCI reporting completion for TDs living
in ARM reserved memory at runtime, this seems to suppress that.


Revision tags: perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.2 23-Jan-2024 jmcneill

branches: 1.2.2; 1.2.4;
wii: provide device names to intr_establish

wii$ intrctl list
interrupt id CPU0 device name(s)
pi irq 14 64769* hollywood0
hollywood irq 36 5872* ehci0
hollywood irq 39 58907* sdhc0
hollywood irq 40 4* sdhc1
hollywood irq 49 0* resetbtn0
pi irq 5 0* bwai0


1.1 20-Jan-2024 jmcneill

evbppc: Add initial support for the Nintendo Wii


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.3 22-Sep-2024 jmcneill

wii: Restrict IOP access to shared peripherals.

Ensure that the IOP cannot access peripherals by clearing the appropriate
bus access bit. I have observed OHCI reporting completion for TDs living
in ARM reserved memory at runtime, this seems to suppress that.


Revision tags: perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.2 23-Jan-2024 jmcneill

branches: 1.2.2; 1.2.4;
wii: provide device names to intr_establish

wii$ intrctl list
interrupt id CPU0 device name(s)
pi irq 14 64769* hollywood0
hollywood irq 36 5872* ehci0
hollywood irq 39 58907* sdhc0
hollywood irq 40 4* sdhc1
hollywood irq 49 0* resetbtn0
pi irq 5 0* bwai0


1.1 20-Jan-2024 jmcneill

evbppc: Add initial support for the Nintendo Wii


1.1 11-Nov-2025 jmcneill

branches: 1.1.2; 1.1.4;
wii: Add support for hardware AES engine and cgd(4) to the WII kernel.

Add a driver for the Nintendo Wii's AES engine. The driver registers an
AES implementation for kernel use via aes_md_init(). AES-128 requests are
accelerated by hardware and all other requests are passed through to the
default (BearSSL aes_ct) implementation.

Add cgd(4) to the Wii kernel to enable disk encryption support.

Tested performance with cgd(4) and AES-128-CBC on a USB flash drive:

hwaes: 33513984 bytes transferred in 2.245 secs (14928277 bytes/sec)
bear: 33513984 bytes transferred in 7.581 secs (4420786 bytes/sec)

Many thanks to Taylor Campbell who walked me through implementing support
for non-CBC modes.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.1 23-Jan-2024 jmcneill

branches: 1.1.2;
wii: Add GPIO, I2C, and basic A/V encoder driver.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.1 20-Jan-2024 jmcneill

branches: 1.1.2;
evbppc: Add initial support for the Nintendo Wii


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.3 22-Sep-2024 jmcneill

wii: Restrict IOP access to shared peripherals.

Ensure that the IOP cannot access peripherals by clearing the appropriate
bus access bit. I have observed OHCI reporting completion for TDs living
in ARM reserved memory at runtime, this seems to suppress that.


Revision tags: perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.2 23-Jan-2024 jmcneill

branches: 1.2.2; 1.2.4;
wii: provide device names to intr_establish

wii$ intrctl list
interrupt id CPU0 device name(s)
pi irq 14 64769* hollywood0
hollywood irq 36 5872* ehci0
hollywood irq 39 58907* sdhc0
hollywood irq 40 4* sdhc1
hollywood irq 49 0* resetbtn0
pi irq 5 0* bwai0


1.1 20-Jan-2024 jmcneill

evbppc: Add initial support for the Nintendo Wii


1.3 24-Oct-2025 jmcneill

wii: Poll for reset button press in critpoll hook.

This allows for eg. the reset button to work at the ddb> prompt.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.2 23-Jan-2024 jmcneill

branches: 1.2.2; 1.2.6;
wii: provide device names to intr_establish

wii$ intrctl list
interrupt id CPU0 device name(s)
pi irq 14 64769* hollywood0
hollywood irq 36 5872* ehci0
hollywood irq 39 58907* sdhc0
hollywood irq 40 4* sdhc1
hollywood irq 49 0* resetbtn0
pi irq 5 0* bwai0


1.1 20-Jan-2024 jmcneill

evbppc: Add initial support for the Nintendo Wii


1.5 15-Oct-2025 jmcneill

wii: rtcsram: Ignore counter bias when reading/writing RTC.

Counter bias is used by system menu as an offset from the RTC for the
time displayed in the Wii's OS. Since Wii doesn't have a concept of time
zones, this bias is useless to us.

Due to a previous bug with parsing SRAM data, the bias read was always 0.
Now that the bias is read correctly, we're reading and writing
preposterous times -- remove the bias from the calculation to restore
the previous setting.

So with this change, the RTC is always in UTC and the Wii system menu
date/time settings adjusts the bias as an offset from that.


1.4 13-Oct-2025 hgutch

Wii: size of ead is 4 bytes each


1.3 07-Sep-2025 thorpej

Change todr_chip_handle::cookie -> todr_chip_handle::todr_dev, and
make it a device_t. Upcoming functional changes will require the
device_t associated with a TODR device.

Change todr_chip_handle::bus_cookie -> todr_chip_handle::todr_devaux.
Nothing was using the old field, but I decided to keep it around just
in cause something needs it in the future.

And with these largely mechanical yet semantically meaningful changes,
thus spake the Oracle: "Welcome to NetBSD 11.99.2."


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.2 10-Feb-2024 jmcneill

branches: 1.2.4;
wii: Explicitly set EXI frequency when selecting a device.


1.1 25-Jan-2024 jmcneill

branches: 1.1.2;
wii: Add External interface bus and RTC support


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.4 15-Feb-2025 jmcneill

wii: Remove SDHC write delay.

Does not seem to be required, and hurts performance.


1.3 22-Sep-2024 jmcneill

wii: Restrict IOP access to shared peripherals.

Ensure that the IOP cannot access peripherals by clearing the appropriate
bus access bit. I have observed OHCI reporting completion for TDs living
in ARM reserved memory at runtime, this seems to suppress that.


Revision tags: perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.2 23-Jan-2024 jmcneill

branches: 1.2.2; 1.2.4;
wii: provide device names to intr_establish

wii$ intrctl list
interrupt id CPU0 device name(s)
pi irq 14 64769* hollywood0
hollywood irq 36 5872* ehci0
hollywood irq 39 58907* sdhc0
hollywood irq 40 4* sdhc1
hollywood irq 49 0* resetbtn0
pi irq 5 0* bwai0


1.1 20-Jan-2024 jmcneill

evbppc: Add initial support for the Nintendo Wii


1.2 11-Dec-2025 jmcneill

branches: 1.2.2;
wii: Defer uhid callback to softintr context.


1.1 08-Dec-2025 jmcneill

wii: Add support for GameCube controller sockets.

A new driver is introduced for the Serial Interface that exposes the four
GameCube controller sockets as uhid(4) devices. The report format and HID
usages of these devices attempts to mimic the official USB GameCube
controller adapter.

wii$ usbhidctl -f /dev/uhid0 -r
Report descriptor:
Collection page=Generic_Desktop usage=Game_Pad
Input size=1 count=1 page=Button usage=Button_3, logical range 0..1
Input size=1 count=1 page=Button usage=Button_1, logical range 0..1
Input size=1 count=1 page=Button usage=Button_2, logical range 0..1
Input size=1 count=1 page=Button usage=Button_4, logical range 0..1
Input size=1 count=1 page=Button usage=Button_11, logical range 0..1
Input size=1 count=1 page=Button usage=Button_12, logical range 0..1
Input size=1 count=1 page=Button usage=Button_10, logical range 0..1
Input size=1 count=1 page=Button usage=Button_9, logical range 0..1
Input size=1 count=1 page=Button usage=Button_8, logical range 0..1
Input size=1 count=1 page=Button usage=Button_6, logical range 0..1
Input size=1 count=1 page=Button usage=Button_7, logical range 0..1
Input size=1 count=1 page=Button usage=Button_5, logical range 0..1
Collection page=Generic_Desktop usage=Pointer
Input size=8 count=1 page=Generic_Desktop usage=X, logical range 0..255
Input size=8 count=1 page=Generic_Desktop usage=Y, logical range 0..255
End collection
Collection page=Generic_Desktop usage=Pointer
Input size=8 count=1 page=Generic_Desktop usage=Z, logical range 0..255
Input size=8 count=1 page=Generic_Desktop usage=Rz, logical range 0..255
End collection
Input size=8 count=1 page=Generic_Desktop usage=Rx, logical range 0..255
Input size=8 count=1 page=Generic_Desktop usage=Ry, logical range 0..255
Total input size 9 bytes
Total output size 0 bytes
Total feature size 0 bytes


1.1 08-Dec-2025 jmcneill

branches: 1.1.2;
wii: Add support for GameCube controller sockets.

A new driver is introduced for the Serial Interface that exposes the four
GameCube controller sockets as uhid(4) devices. The report format and HID
usages of these devices attempts to mimic the official USB GameCube
controller adapter.

wii$ usbhidctl -f /dev/uhid0 -r
Report descriptor:
Collection page=Generic_Desktop usage=Game_Pad
Input size=1 count=1 page=Button usage=Button_3, logical range 0..1
Input size=1 count=1 page=Button usage=Button_1, logical range 0..1
Input size=1 count=1 page=Button usage=Button_2, logical range 0..1
Input size=1 count=1 page=Button usage=Button_4, logical range 0..1
Input size=1 count=1 page=Button usage=Button_11, logical range 0..1
Input size=1 count=1 page=Button usage=Button_12, logical range 0..1
Input size=1 count=1 page=Button usage=Button_10, logical range 0..1
Input size=1 count=1 page=Button usage=Button_9, logical range 0..1
Input size=1 count=1 page=Button usage=Button_8, logical range 0..1
Input size=1 count=1 page=Button usage=Button_6, logical range 0..1
Input size=1 count=1 page=Button usage=Button_7, logical range 0..1
Input size=1 count=1 page=Button usage=Button_5, logical range 0..1
Collection page=Generic_Desktop usage=Pointer
Input size=8 count=1 page=Generic_Desktop usage=X, logical range 0..255
Input size=8 count=1 page=Generic_Desktop usage=Y, logical range 0..255
End collection
Collection page=Generic_Desktop usage=Pointer
Input size=8 count=1 page=Generic_Desktop usage=Z, logical range 0..255
Input size=8 count=1 page=Generic_Desktop usage=Rz, logical range 0..255
End collection
Input size=8 count=1 page=Generic_Desktop usage=Rx, logical range 0..255
Input size=8 count=1 page=Generic_Desktop usage=Ry, logical range 0..255
Total input size 9 bytes
Total output size 0 bytes
Total feature size 0 bytes


1.1 08-Dec-2025 jmcneill

branches: 1.1.2;
wii: Add support for GameCube controller sockets.

A new driver is introduced for the Serial Interface that exposes the four
GameCube controller sockets as uhid(4) devices. The report format and HID
usages of these devices attempts to mimic the official USB GameCube
controller adapter.

wii$ usbhidctl -f /dev/uhid0 -r
Report descriptor:
Collection page=Generic_Desktop usage=Game_Pad
Input size=1 count=1 page=Button usage=Button_3, logical range 0..1
Input size=1 count=1 page=Button usage=Button_1, logical range 0..1
Input size=1 count=1 page=Button usage=Button_2, logical range 0..1
Input size=1 count=1 page=Button usage=Button_4, logical range 0..1
Input size=1 count=1 page=Button usage=Button_11, logical range 0..1
Input size=1 count=1 page=Button usage=Button_12, logical range 0..1
Input size=1 count=1 page=Button usage=Button_10, logical range 0..1
Input size=1 count=1 page=Button usage=Button_9, logical range 0..1
Input size=1 count=1 page=Button usage=Button_8, logical range 0..1
Input size=1 count=1 page=Button usage=Button_6, logical range 0..1
Input size=1 count=1 page=Button usage=Button_7, logical range 0..1
Input size=1 count=1 page=Button usage=Button_5, logical range 0..1
Collection page=Generic_Desktop usage=Pointer
Input size=8 count=1 page=Generic_Desktop usage=X, logical range 0..255
Input size=8 count=1 page=Generic_Desktop usage=Y, logical range 0..255
End collection
Collection page=Generic_Desktop usage=Pointer
Input size=8 count=1 page=Generic_Desktop usage=Z, logical range 0..255
Input size=8 count=1 page=Generic_Desktop usage=Rz, logical range 0..255
End collection
Input size=8 count=1 page=Generic_Desktop usage=Rx, logical range 0..255
Input size=8 count=1 page=Generic_Desktop usage=Ry, logical range 0..255
Total input size 9 bytes
Total output size 0 bytes
Total feature size 0 bytes


1.2 25-Oct-2025 jmcneill

wii: Use GX to accelerate RGB to YUY2 conversion.

Allocate a 640x480x32 RGB buffer in memory, and when not in EMUL mode,
use the CPU to copy from the RGB buffer to EFB (taking advantage of the
pixel engine to do RGB -> YUY2 for us) and then use the GX to copy from
EFB to XFB.

Not only does this improve performance significantly in X, it also results
in better colour reproduction. The previous software method employed by
xf86-video-wsfb had some corner cases where eg. dark colours would display
as bright pink.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.1 21-Jan-2024 jmcneill

branches: 1.1.2; 1.1.6;
wii: Add NTSC 480p support.

In addition to this, add VIIO_{GET,SET}REGS ioctl support to allow for
poking at video interface registers from userland. This is helpful for
debugging display issues.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.3 13-Oct-2024 jmcneill

wii: Support loading the kernel from boot2

Improve hardware initialization steps so the NetBSD kernel can be launched
directly from boot2 and does not rely on any other PPC software to setup
the hardware.


Revision tags: perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.2 21-Jan-2024 jmcneill

branches: 1.2.2; 1.2.4;
wii: Add NTSC 480p support.

In addition to this, add VIIO_{GET,SET}REGS ioctl support to allow for
poking at video interface registers from userland. This is helpful for
debugging display issues.


1.1 20-Jan-2024 jmcneill

evbppc: Add initial support for the Nintendo Wii


1.8 25-Oct-2025 jmcneill

wii: Use GX to accelerate RGB to YUY2 conversion.

Allocate a 640x480x32 RGB buffer in memory, and when not in EMUL mode,
use the CPU to copy from the RGB buffer to EFB (taking advantage of the
pixel engine to do RGB -> YUY2 for us) and then use the GX to copy from
EFB to XFB.

Not only does this improve performance significantly in X, it also results
in better colour reproduction. The previous software method employed by
xf86-video-wsfb had some corner cases where eg. dark colours would display
as bright pink.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.7 13-Oct-2024 jmcneill

branches: 1.7.2;
wii: Support loading the kernel from boot2

Improve hardware initialization steps so the NetBSD kernel can be launched
directly from boot2 and does not rely on any other PPC software to setup
the hardware.


Revision tags: perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.6 05-Feb-2024 jmcneill

branches: 1.6.2;
wiifb: Misc fixes.

Add a 16-pixel border on the top and bottom of the FB, and fix an error
path to properly blink the slot LED when the current video mode is not
supported.


1.5 27-Jan-2024 hgutch

branches: 1.5.2;
Add support for "PAL" (576i) mode on Wii.


1.4 23-Jan-2024 jmcneill

wii: Use screen dimming register for screen blanking.


1.3 22-Jan-2024 jmcneill

wii: Add screenblank support.


1.2 21-Jan-2024 jmcneill

wii: Add NTSC 480p support.

In addition to this, add VIIO_{GET,SET}REGS ioctl support to allow for
poking at video interface registers from userland. This is helpful for
debugging display issues.


1.1 20-Jan-2024 jmcneill

evbppc: Add initial support for the Nintendo Wii