Homepage › Forums › RetroPie Project › Controller Configuration in RetroPie › Mayflash n64 Controller Slow Joystick › Reply To: Mayflash n64 Controller Slow Joystick
I fixed this issue by typing
jstest /dev/input/js0 I observed the values of the joypads as I pushed them. I pressed ctrl+c to exit that and typed:
jscal -c /dev/input/js0
This allowed me to recalibrate the controller’s joypads. I ran
jstest /dev/input/js0
again and saw that the values had changed. I went to /opt/retropie/configs/all/retroarch.cfg
and edited the line:
input_autodetect_enable = true
and I changed it to false
For good measure I deleted my joypad’s auto config file by going to
/opt/retropie/configs/all/retroarch-joypads
and removed all files there.
I then went to
/opt/retropie/configs/n64
and edited the retroarch.cfg file there.
#include "/opt/retropie/configs/all/retroarch.cfg"
fast_forward_ratio = "2.0"
input_joypad_driver = "linuxraw"
input_device_p1 = "0"
input_player1_joypad_index = 1
input_player1_b_btn = 2
input_player1_a_btn = 1
input_player1_up_btn = 12
input_player1_down_btn = 14
input_player1_right_btn = 13
input_player1_left_btn = 15
input_player1_start_btn = 9
input_player1_select_btn = 8
input_player1_l2_btn = 8
input_player1_r2_btn = 7
input_player1_l_btn = 6
input_player1_r_y_plus_axis = +2
input_player1_r_y_minus_axis = -2
input_player1_r_x_plus_axis = +3
input_player1_r_x_minus_axis = -3
input_player1_l_y_plus_axis = +1
input_player1_l_y_minus_axis = -1
input_player1_l_x_plus_axis = +0
input_player1_l_x_minus_axis = -0
input_enable_hotkey_btn = 14
input_exit_emulator_btn = 9
input_load_state_btn = 7
input_save_state_btn = 6
The important part about this file is to specify that you want the joypad driver to be “linuxraw”.
After doing this, link was able to run and I had no problems with the controls. Unfortunately, the joystick calibration will be undone at reboot.
You can use jscal -p to read the calibration settings.
Then call the function
jscal -s 1,6,128…..(a bunch of numbers) /dev/input/js0
ideally, you would have a script run at startup that would call this function for you, but I haven’t made it that far yet.