Saving games with NES controller
-
Could someone walk me through how to edit retroarch.cfg to save a game with an NES controller.
-OR-
Use a keyboard since a keyboard has more keys than an NES controller.I've search google and found this answer:
Go to your NES retroarch.cfg which can be found here:
cd /opt/retropie/configs/nes
sudo nano retroarch.cfg
Add the following lines:
input_enable_hotkey_btn = <button of your choice>
input_save_state_btn = <button of your choice>
input_load_state_btn = <button of your choice>But what are the mapped buttons for an NES controller?
-
I do this by changing the joystick / gamepad file, not the retroarch.cfg (as I am using auto config method, not hard coded, which is what you may be wanting to do)
you can find your controller mapped in:
/opt/retropie/configs/all/retroarch-joypads/using nano to edit the XXX.cfg gamepad file you can add / modify your hotkeys.
I have removed the "reset" hotkey and added
input_save_state_btn = "Your A button"
input_load_state_btn = "Your B button"As a NES has less buttons you can't use many of the hotkeys, but I think you get the idea.
HTHThis link might help explain better then me:
Controllers -
@unkis17 you can assign them to the d-pad. If your d-pad is an axis you would change the word "btn" to "axis" and assign an axis.
-
It worked. I'm so elated. Awesome.
Thank you to unkis17 and edmaul69@ unkis17, if it wasn't for your explanation I would have never gotten this.
@ edmaul69 thank you for telling me about the "axis" change, I couldn't get input_menu_toggle_btn to work with up-arrow, until I read your comment, changed btn to axis.Maybe in the future this will help someone, so I'll post what I did:
/opt/retropie/configs/all/retroarch/autoconfig
NES PC Game Pad NES PC Game Pad .cfginput_device = " NES PC Game Pad NES PC Game Pad "
input_driver = "udev"
input_start_btn = "3"
input_exit_emulator_btn = "3"
input_up_axis = "-1"
input_a_btn = "0"
input_b_btn = "1"
input_reset_btn = "1"
input_down_axis = "+1"
input_right_axis = "+0"
input_state_slot_increase_axis = "+0"
input_select_btn = "2"
input_enable_hotkey_btn = "2"
input_left_axis = "-0"
input_state_slot_decrease_axis = "-0"Then went to:
cd /opt/retropie/configs/nes
sudo nano retroarch.cfgSettings made here will only override settings in the global retroarch.cfg if placed above the #include line
input_remapping_directory = "/opt/retropie/configs/nes/"
#Hotkeys- Hotkeys enable you to press a combination of buttons to do such things as exit emulators, save states,
and load states, as well as any other functionality in an emulator. (In the example below 8 is the select key
and 9 is the start key so when I hold down select and press start it will exit the emulator.)
input_enable_hotkey_btn = 2
input_exit_emulator_btn = 3
input_save_state_btn = 0
input_load_state_btn = 1
input_menu_toggle_axis = -1
input_state_slot_increase_axis = +0
input_state_slot_decrease_axis = -0#include "/opt/retropie/configs/all/retroarch.cfg"
-
@fsd2s you've forgot to give attention to this part of the "read-this-first" post:
Format your posts! - put small logs in code blocks - see http://commonmark.org/help/ - and put large logs on a pastebin type site like http://paste.ubuntu.com/ http://pastebin.com/ or similar.
-
@edmaul69 hey Ed!! maybe you can make good english of this. i have come to crossroads of save states with my nes controller and wanted to get your wise words of if i want to set up my nes controller with the following
Right D Pad + Select to save the state
Left D Pad + Select to Load Save State
Up or Down D Pad + Select to select the Save state slotmake sense?
do u have a preferred solution? -
@briandamico i dont use savestates myself, but for friends i set it up that exact same way.
-
@edmaul69 so would i follow the solution above to change that?
-
@briandamico so i believe if your d-pad is seen as an axis, you want it to look like this in your controllers config file:
input_state_slot_decrease_axis = "+1" input_state_slot_increase_axis = "-1" input_save_state_axis = "+0" input_load_state_axis = "-0"
-
@edmaul69 ok great, just to confirm, what is the proper file and location i am editing?
-
@briandamico i dont know the name of your controller but its config file will be located in /opt/retropie/configs/all/retroarch/autoconfig/ .
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.