{"id":1392,"date":"2024-07-01T00:00:00","date_gmt":"2024-07-01T07:00:00","guid":{"rendered":"https:\/\/letsbuildroboticswithshadow8472.com\/?p=1392"},"modified":"2024-06-26T11:59:35","modified_gmt":"2024-06-26T18:59:35","slug":"can-linux-see-a-gamecube-controller","status":"publish","type":"post","link":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/2024\/07\/01\/can-linux-see-a-gamecube-controller\/","title":{"rendered":"Can Linux See a GameCube Controller?"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Good Morning from my Robotics Lab! This is Shadow_8472 with a side project for the week. Let\u2019s get started!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I\u2019ve had a Nintendo GameCube controller on my desk ever since I got a USB adapter some months ago. I poke at it every so often, trying to confirm it working in Linux, but in late June of this year, things came together.<\/p>\n\n\n\n<pre class=\"wp-block-verse\">Computer: Derpy Chips<br>Distribution: PopOS 22.04<br>Desktop Environment: KDE Plasma 5.24.7 (Qt 5.15.3)<br>Product: DragonRise Inc. Controller Adapter<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In my research, I read about this product working with Dolphin Emulator on Linux, if not elsewhere. Dolphin sounded like a good first stop, and one day I sat down with enough patience to compile it. It needed a few tries before I read a guide on Dolphin\u2019s GitHub explaining how the project has dropped qt5 support [1]. However, my qt version can use backports.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I installed my compiled Dolphin package. Now for a ROM. Commercial games are illegal to download, but I can either dump my own games (not in my skill set yet) or find a homebrew game. GameCube only has one such title I found worth mentioning: Toy Wars. It\u2019s not even an exclusive \u2013 probably because it\u2019s basically a baby Wii\/Wii U on the inside.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Long story short: Toy Wars gave me a black screen. I happen to know the Wii has tons of Homebrew, so I found another guide [2] that walked me through performing a system update, netting me the Wii menu, the Homebrew channel, and then a content browser layered on top of that. While significantly hampered navigating this browser using the emulated Wii remote, I found and downloaded a free homebrew game about dogging space junk.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And still nothing from the GameCube controller. It showed up with the command \u201clsusb,\u201d but Dolphin\u2019s configuration options said it didn\u2019t have permission. There was the missing link. By default, Linux is a lot more locked down to strange USB peripherals than Windows. I had to make a file under \u201c\/etc\/udev\/rules.d\u201d describing my controller adapter and granting these missing permissions.<\/p>\n\n\n\n<pre class=\"wp-block-verse\">$ cat \/etc\/udev\/rules.d\/51-gcadapter.rules<br>SUBSYSTEM==\"usb\", ENV{DEVTYPE}==\"usb_device\", ATTRS{idVendor}==\"057e\", ATTRS{idProduct}==\"0337\", MODE=\"0666\"<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The 51 in the name has to do with what order this and similar rules overwrite each other. There are a ton of possible parameters for the file contents, but idVender and idProduct can be found with the \u201clsusb\u201d command where it says ID vvvv:pppp. Mode is the same as file permissions ([user, group, everybody]x[read*4+write*2+execute*1]).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Takeaway<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">From further observation, I concluded these changes let Dolphin reach out to find the state of my controller[s]; no events are triggered in Xorg, as happen for the mouse and keyboard. Long term, I have a gag goal of writing a custom driver so I can use my GameCube controller however I like, but I didn\u2019t get that this go-around. Oh well.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Final Question<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">I couldn\u2019t find out what the leading 0 is supposed to represent. If you know, I look forward to hearing from you in the comments below or on my <a href=\"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/discord-invite\/\" target=\"_blank\" rel=\"noreferrer noopener\">Socials<\/a>!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Works Cited<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">[1] Dolphin Emulator, \u201cBuilding for Linux,\u201d <em>github.com<\/em>, May 31, 2024. [Online]. Available: <a href=\"https:\/\/github.com\/dolphin-emu\/dolphin\/wiki\/Building-for-Linux\">https:\/\/github.com\/dolphin-emu\/dolphin\/wiki\/Building-for-Linux<\/a>. [Accessed: June 25, 2024].<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">[2] Nintendo Homebrew, \u201cInstalling Homebrew Channel on Dolphin Emulator,\u201d 2024. [Online] Available: <a href=\"https:\/\/wii.hacks.guide\/homebrew-dolphin.html\">https:\/\/wii.hacks.guide\/homebrew-dolphin.html<\/a>. [Accessed: June 25, 2024].<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Good Morning from my Robotics Lab! This is Shadow_8472 with a side project for the week. Let\u2019s get started! I\u2019ve had a Nintendo GameCube controller on my desk ever since I got a USB adapter some months ago. I poke at it every so often, trying to confirm it working in Linux, but in late &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/2024\/07\/01\/can-linux-see-a-gamecube-controller\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Can Linux See a GameCube Controller?&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[2],"tags":[377,378,381,380,379,185,37,382,183],"class_list":["post-1392","post","type-post","status-publish","format-standard","hentry","category-linux","tag-dolphin-emulator","tag-dolphin-emu","tag-dragonrise-controller-adapter","tag-emulator","tag-gamecube","tag-homebrew","tag-linux","tag-lsusb","tag-wii"],"_links":{"self":[{"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/posts\/1392","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/comments?post=1392"}],"version-history":[{"count":1,"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/posts\/1392\/revisions"}],"predecessor-version":[{"id":1393,"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/posts\/1392\/revisions\/1393"}],"wp:attachment":[{"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/media?parent=1392"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/categories?post=1392"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/tags?post=1392"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}