Skip to content

1.2.2 Controller Support

PortalMario edited this page Jan 18, 2023 · 1 revision

Controller Support

As we want to use the GCN controller with all of its features we need to make the GCN USB adapter compatible for PC. (This method will also make the official adapters compatible!)

Driver

Connecting the official adapter with USB does not work with emulationstation out of the box. Therefore, we want to use an open-source driver. Fortunately there already is a great one available created by Michael Lelli from 2014: ToadKing/wii-u-gc-adapter.

Note: All needed dependencies were installed during the Retropie installation.

Systemd

As we want to use the adapter support tool right after the system boots, we just write a small systemd service. Create the file: /etc/systemd/system/wii-u-gcn-controller-adapter.service and add the following contents:

[Unit]
Description=wii-u-gcn-controller-adapter-support

[Service]
TimeoutStartSec=infinity
ExecStart=/srv/wii-u-gc-adapter

[Install]
WantedBy=multi-user.target

If you normally start the tool, the process will be kept in the foreground. Systemd normally throws errors when starting a tool like that within a service. We can decide whether we want to run the tool in the background or if we tell systemd to "ignore" that the tool itself never "finishes".

The executed tool will never finish or turn into a "running" state as it always sits in the foreground. This would result in systemd errors after a default service start timeout is reached and systemd would close the adapter tool. TimeoutStartSec=infinity forces systemd to wait an unlimited amount of time for the program to finish, therefore ignoring any timeouts which keeps the adapter tool always alive until the system gets powered off.

To autostart the service right after the boot finishes, run the following command:

$ systemctl enable /etc/systemd/system/wii-u-gcn-controller-adapter.service

Conclusion

If everything is done correctly, emulationstation should recognize the original GCN controller plugged in via the original adapter or a third party one over USB after the next reboot. (Most of the third-party adapters work as well but you will need to switch them to console mode and not to pc mode!)

Clone this wiki locally