Forum Replies Created
-
AuthorPosts
-
doakey3Participant
Thanks! I had considered just editing one of the already existing start up scripts, but I didn’t know which one to use.
In the end, I decided to use a different method of running my script. I learned that I could have the script called whenever I plugged in my controller by making a rule in the /etc/udev/rule.d folder. See
I was pretty disappointed though. I spent hours configuring my controller setup only to realize that n64 emulation is pretty bad. Most games run fast with the rice plugin, but for whatever reason, the menu textures are shot. I wonder if any future updates will correct these issues…
doakey3Participantok, 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.rulesin 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/js1Now 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.
doakey3ParticipantI 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.
-
AuthorPosts