Homepage Forums RetroPie Project Controller Configuration in RetroPie Mayflash n64 Controller Slow Joystick Reply To: Mayflash n64 Controller Slow Joystick

#101675
doakey3
Participant

ok, with your controller plugged in type

lsusb

(That’s a lower cased ‘L’ by the way) This should give you the device info for your controller. for me there was a line that said,

Bus 001 Device 005: ID 0e8f:3013 GreenAsia Inc.

make a file by doing
sudo nano /etc/udev/rules.d/60-n64.rules

in that file put:

ATTRS{idVendor}==”0e8f”, ATTRS{idProduct}==”3013″, RUN+=”/opt/retropie/configs/n64/n64-config.sh”

replace the 0e8f and the 3013 for your device

now do

sudo nano /opt/retropie/configs/n64/n64-config.sh

and put:

#!/bin/bash
sleep 1
jscal -s 6,1,0,128,128,6882750,6627834,1,0,127,127,6882750,6795627,1,0,128,128,5592235,5592235,1,0,128,128,5592235,5592235,1,0,0,0,2147483647,2147483647,1,0,0,0,2147483647,2147483647 /dev/input/js0
jscal -s 6,1,0,128,128,6882750,6627834,1,0,127,127,6882750,6795627,1,0,128,128,5592235,5592235,1,0,128,128,5592235,5592235,1,0,0,0,2147483647,2147483647,1,0,0,0,2147483647,2147483647 /dev/input/js1

Now make that file an executable by doing:

sudo chmod 755 /opt/retropie/configs/n64/n64-config.sh

Now every time you plug in the controller, that script will be run and your joysticks will be recalibrated.

One gotcha is that the files need to be in unix format. I was writing the files on my windows pc and copying them over and ran into problems. To solve this I downloaded dos2unix for windows and converted them that way.