ArkOS: Standalone N64 Controls

YonKuma
4 min readMay 26, 2021

N64 games are pretty hit-or-miss on the RG351. The default emulator, RetroArch 32 using a Parallel core, lags behind other N64 emulators. ArkOS provides another option: Mupen64Plus standalone, using the Rice or Glide64Mk2 video plugins. Both of these tend to have better performance than RetroArch, but they come with one significant downside. Mupen64Plus doesn’t have in-game configuration; it has to be configured using configuration files that aren’t accessible from the roms folder.

InputAutoCfg.ini

In ArkOS, controller configuration happens in two stages. There’s the primary Mupen64 configuration file (/home/ark/.config/mupen64plus/mupen64plus.cfg) which directly defines the button inputs, but this file is overwritten every time you launch Mupen, so editing this file doesn’t work.

The file that the inputs are generated from is /opt/mupen64plus/InputAutoCfg.ini. This file contains a huge list of different types of controllers and their N64 controller mappings. The one that we’re interested in is the last one at the very bottom.

; RG351P Gamepad
[OpenSimHardware OSH PB Controller]
plugged = True
mouse = False
AnalogDeadzone = 0,0
AnalogPeak = 32768,32768
DPad R = hat(0 Right)
DPad L = hat(0 Left)
DPad D = hat(0 Down)
DPad U = hat(0 Up)
Start = button(6)
Z Trig = button(9)
B Button = button(3)
A Button = button(1)
C Button R = button(11)
C Button L = button(2)
C Button D = button(0)
C Button U = button(10)
R Trig = button(5)
L Trig = button(4)
Mempak switch =
Rumblepak switch =
# Analog axis configuration mappings
X Axis = axis(0+,0-)
Y Axis = axis(1+,1-)

Though the comment labels this as being for RG351P, it’s also used for the RG351M and RG351V. The section in brackets at the top defines the type of controller this applies to. Below that are a few configuration settings. The controller button mappings start at the DPad R line. The N64 button is on the left, and should be pretty easy to figure out. On the right is the RG351 button it’s mapped to.

Here’s an (incomplete) list of the RG351 buttons:

button(0)  - A
button(1) - B
button(2) - X
button(3) - Y
button(4) - L1
button(5) - R1
button(6) - Start
button(7) - Select
button(8) - L3?
button(9) - R3 (RG351P/M), F (RG351V)
button(10) - L2
button(11) - R2

If you know SSH and vi/nano, you should now have all the tools you need to edit this file. You can SSH into ArkOS by enabling remote services and sshing to your RG’s IP address with username ark and password ark. Don’t forget to backup the InputAutoCfg.ini file before you start messing around!

If you don’t know SSH, you can change this file using a combination of the ArkOS File Manager and transferring files to the rom directory.

First you need a copy of InputAutoCnf.ini. You can either get this by downloading a copy, or you can copy it from the file system. To do the latter, open the File Manager and navigate the left pane to /opt/mupen64plus . You can do this by pressing B (to navigate upward to the root), and then scrolling to opt, pressing A, scrolling to mupen64plus, and pressing A. In the right pane, open a folder inside of /roms where you’ll store the file temporarily. Finally, highlight InputAutoCnf.ini in the left pane, press X, and select Copy >.

Once there’s a copy of the file somewhere in your roms folder, you can copy it to your PC with your preferred transfer method so that you can edit it (or you can even edit it in the web file browser).

When you’ve adjusted the file to use your preferred controller setup, you can transfer it back to the /opt/mupen64plus directory using the inverse of the method described above. Before you copy the new InputAutoCnf.ini into place, rename the old one to InputAutoCnf.ini.bak so you can restore it if the new one doesn’t work!

For my preferred setup, I put Z on the L1 button, C Left and Right on L2 and R2, and C Up and Down on X and A. Here’s my configuration:

; RG351P Gamepad
[OpenSimHardware OSH PB Controller]
plugged = True
mouse = False
AnalogDeadzone = 8192,8192
AnalogPeak = 32768,32768
DPad R = hat(0 Right)
DPad L = hat(0 Left)
DPad D = hat(0 Down)
DPad U = hat(0 Up)
Start = button(6)
Z Trig = button(4)
B Button = button(3)
A Button = button(1)
C Button R = button(11)
C Button L = button(10)
C Button D = button(0)
C Button U = button(2)
R Trig = button(5)
L Trig = button(9)
Mempak switch =
Rumblepak switch =
# Analog axis configuration mappings
X Axis = axis(0+,0-)
Y Axis = axis(1+,1-)

As a note, this file may be overwritten by a future ArkOS update, so keep a copy of the file handy in case you need to copy it back over.

--

--