RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Saving games with NES controller

    Scheduled Pinned Locked Moved Help and Support
    nes controllersaving games
    11 Posts 5 Posters 6.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      fsd2s
      last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • U
        unkis17
        last edited by

        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.
        HTH

        This link might help explain better then me:
        Controllers

        edmaul69E 1 Reply Last reply Reply Quote 0
        • edmaul69E
          edmaul69 @unkis17
          last edited by

          @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.

          B 1 Reply Last reply Reply Quote 0
          • F
            fsd2s
            last edited by

            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 .cfg

            input_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.cfg

            Settings 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"

            meleuM 1 Reply Last reply Reply Quote 0
            • meleuM
              meleu @fsd2s
              last edited by meleu

              @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.

              • Useful topics
              • joystick-selection tool
              • rpie-art tool
              • achievements I made
              1 Reply Last reply Reply Quote 0
              • B
                briandamico @edmaul69
                last edited by

                @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 slot

                make sense?
                do u have a preferred solution?

                edmaul69E 1 Reply Last reply Reply Quote 0
                • edmaul69E
                  edmaul69 @briandamico
                  last edited by

                  @briandamico i dont use savestates myself, but for friends i set it up that exact same way.

                  B 1 Reply Last reply Reply Quote 0
                  • B
                    briandamico @edmaul69
                    last edited by

                    @edmaul69 so would i follow the solution above to change that?

                    edmaul69E 1 Reply Last reply Reply Quote 0
                    • edmaul69E
                      edmaul69 @briandamico
                      last edited by

                      @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"
                      
                      B 1 Reply Last reply Reply Quote 0
                      • B
                        briandamico @edmaul69
                        last edited by

                        @edmaul69 ok great, just to confirm, what is the proper file and location i am editing?

                        edmaul69E 1 Reply Last reply Reply Quote 0
                        • edmaul69E
                          edmaul69 @briandamico
                          last edited by

                          @briandamico i dont know the name of your controller but its config file will be located in /opt/retropie/configs/all/retroarch/autoconfig/ .

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post

                          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.