Jump to content

Using the N64 NSO Controller in SoH (Zelda: OoT PC Port), but on Linux


FireStar

776 views

Ocarina of Time is a Zelda game with a lot of longevity (though basically all of them have that), parts of which being efforts like the Ship of Harkanian (SoH) PC port and Randomizer mods which add a lot of enhancements and replayability to the OOT experience.

As a side note, this blog entry is basically to give some SEO for this specific issue, since I assume Google/DDG can crawl Atariage but not a discord server.

 

I wanted to play OOT Randomizer on my Ubuntu 22.10 Linux gaming PC, but I wanted to also use the Nintendo Switch Online N64 Controller that was made recently, so I could use the controller I originally played the game with but wirelessly and with better rumble.

After pairing the controller with bluetooth to my PC, I noticed trying to use the controller in SoH wasn't quite plug and play though.

 

If I used it directly with SoH the stick calibration/sensitivity is off and it won't read full forward or back so I can't run/roll. I tried using Steam Input instead which fixed the stick, but Steam doesn't bind R or C-up by default and the interface in Steam to change buttons is bugged and won't apply changes. Using Steam Input meant Running the SoH Appimage through steam. Rumble also was not working.

 

I then found there was a newer driver for switch controllers on linux, hid-nx-dkms. This is not built into the linux kernel yet as of april 2023.

I used the hid-nx-dkms driver instead since it has recent changes that aren't mainlined yet, which gave me rumble and a more accurate feeling stick, then since with that driver, Dpad and Z aren't bound by default, which means SoH won't read them, I had to figure out of all apps, only Antimicrox spit out a valid sdl2 remapping , which I could then pass to SoH with the "SDL_GAMECONTROLLERCONFIG=" variable.

 

Note that I wasn't sure which related "SDL_GAMECONTROLLERCONFIG=" was actually applying to the game, since one at a time it didn't seem to work, so I put the remapping string in a "gamecontrollerdb.txt" in the same directory as the SoH appimage, and also did the 2 following commands:

#!/bin/bash
SDL_GAMECONTROLLERCONFIG="050000007e050000192000000180000014068217,N64 Controller,platform:Linux,a:b0,b:b1,x:b9,y:b8,start:b6,guide:b11,leftshoulder:b2,rightshoulder:b4,leftstick:b7,rightstick:b10,leftx:a0,lefty:a1,lefttrigger:b3,righttrigger:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,"
SDL_GAMECONTROLLERCONFIG="050000007e050000192000000180000014068217,N64 Controller,platform:Linux,a:b0,b:b1,x:b9,y:b8,start:b6,guide:b11,leftshoulder:b2,rightshoulder:b4,leftstick:b7,rightstick:b10,leftx:a0,lefty:a1,lefttrigger:b3,righttrigger:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2," ./soh.appimage 

 

The exact mapping I used in my example may not work for you, I noticed I randomly had to remake my mapping as my old one stopped working a few weeks back.

 

After setting the mapping right, I then did get all buttons detected in SoH, with rumble working, and I could finally play some Oot randomizer with original controls!

 

 

Another user made a PR in the SDL game controller DB which should make this more plug and play, provided the hid-nx-dkms driver gets mainlined. (https://github.com/gabomdq/SDL_GameControllerDB/pull/676) If you're reading this in 2025 and you still have to do any of this, I'm sorry.

 

962756937_Screenshotfrom2023-02-2623-31-55.thumb.png.8f59358d9cee3ff24e1027e5307d65c9.png

0 Comments


Recommended Comments

There are no comments to display.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...