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

    Can't enter runcommand by pressing a button.

    Scheduled Pinned Locked Moved Help and Support
    zeroruncommandjacked up
    28 Posts 6 Posters 11.8k 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.
    • DominusD
      Dominus @meleu
      last edited by

      @meleu When was the joy2key.py updated?

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

        @Dominus said in Can't enter runcommand by pressing a button.:

        @meleu When was the joy2key.py updated?

        21 Dec 2016, in this commit: https://github.com/RetroPie/RetroPie-Setup/commit/12901a53b1445d7f651636e5b4913af273a83018

        • Useful topics
        • joystick-selection tool
        • rpie-art tool
        • achievements I made
        DominusD 1 Reply Last reply Reply Quote 0
        • D
          Dochartaigh @meleu
          last edited by

          @meleu said in Can't enter runcommand by pressing a button.:

          But I think you don't have to touch any of these files to solve your issue.

          What should I do to solve this issue then?

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

            @meleu Hmm mine is like that already, but still having that issue too. Any ideas? I didn't notice it before, but I just added Launching pictures that popup when the rom loads. Not sure if that would have anything to do with it though?

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

              @Dochartaigh said in Can't enter runcommand by pressing a button.:

              @meleu said in Can't enter runcommand by pressing a button.:

              But I think you don't have to touch any of these files to solve your issue.

              What should I do to solve this issue then?

              Discover which button is the button 0 and press that button.

              • Useful topics
              • joystick-selection tool
              • rpie-art tool
              • achievements I made
              D 1 Reply Last reply Reply Quote 0
              • DominusD
                Dominus
                last edited by

                Hmm it is my launching images. They won't let me press A on the joystick when launching?!?

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

                  @Dominus said in Can't enter runcommand by pressing a button.:

                  Hmm it is my launching images. They won't let me press A on the joystick when launching?!?

                  after the image is gone you have two seconds to press the button 0. Pressing the button while the image is being shown takes no effect, unfortunately...

                  • Useful topics
                  • joystick-selection tool
                  • rpie-art tool
                  • achievements I made
                  DominusD 1 Reply Last reply Reply Quote 0
                  • D
                    Dochartaigh @meleu
                    last edited by Dochartaigh

                    @meleu said in Can't enter runcommand by pressing a button.:

                    @Dochartaigh said in Can't enter runcommand by pressing a button.:

                    @meleu said in Can't enter runcommand by pressing a button.:

                    But I think you don't have to touch any of these files to solve your issue.

                    What should I do to solve this issue then?

                    Discover which button is the button 0 and press that button.

                    That's what you were getting at before! Gotcha. Still doesn't work. I'm assuming the magic "0" button is the one which works as "A" in the RetroPie Setup menu (which is commonly different than what's "A" in the RetroPie interface while choosing ROMs and such). That's "X" on this controller. Also tried every other button (A, B, X, Y, Left bumper, Right bumper). It will also sometimes work on NES, but then not on SNES, or vice versus for example. The directions on screen also say press A button (not an exact button you have to press)...

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

                      @meleu said in Can't enter runcommand by pressing a button.:

                      press the button 0. Pressing the button while the image is being shown takes no effect, unfortu

                      Oh that's what it is exactly. Except on the keyboard, I can still press it when the image is showing.

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

                        @Dochartaigh google about jstest tool and you'll be able to discover exactly which button is the button 0 in the joysticks you have connected to your system.

                        • Useful topics
                        • joystick-selection tool
                        • rpie-art tool
                        • achievements I made
                        D 1 Reply Last reply Reply Quote 0
                        • meleuM
                          meleu @Dominus
                          last edited by

                          @Dominus said in Can't enter runcommand by pressing a button.:

                          @meleu said in Can't enter runcommand by pressing a button.:

                          press the button 0. Pressing the button while the image is being shown takes no effect, unfortu

                          Oh that's what it is exactly. Except on the keyboard, I can still press it when the image is showing.

                          Oh, sorry. You have to press button 0 twice. The first press exits fbi (the program used to display the image), and the second press invokes runcommand menu.

                          • Useful topics
                          • joystick-selection tool
                          • rpie-art tool
                          • achievements I made
                          1 Reply Last reply Reply Quote 1
                          • D
                            Dochartaigh @meleu
                            last edited by Dochartaigh

                            @meleu said in Can't enter runcommand by pressing a button.:

                            jstest

                            I thank you for your help, but what I'm explicitly saying is NO BUTTON works at all. Like none. On 5+ different controllers I tried every single button. Even tried them twice like I had better luck with before. It does NOT work...

                            This used to work all the time in 4.0.2, 4.0.8, even the first version of 4.1 (I'm at 4.1.11 now). I could press ANY (A, B, X, Y) button and it would open. I just did a brand new fresh install from the Pi Zero image, on a brand new SD card (been working at that for a couple hours now), and guess what? I STILL can't get into runcommand 100% of the time. Another user here just said the same happens to them....I'm assuming it's a problem in the code somewhere. Something is bricked.

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

                              @Dochartaigh

                              Another user here just said the same happens to them....I'm assuming it's a problem in the code somewhere. Something is bricked.

                              I'm not assuming it's a problem in the code because if it was, other users would complain about it. I think the user you mention is @Dominus , and it seems that his problem was related to the launching images and now it seems to be solved.

                              Also, you said the problem is intermittent. The code doesn't change between one execution and another.

                              Sorry but to help you we need a way to reproduce your issue.

                              If you want to go deeper into this investigation yourself, the help I can give is just share these informations:

                              • the joy2key.py is the tool responsible to convert joystick button strokes into keyboard strokes.

                              • The function start_joy2key() in this part of the runcommand.sh code is where runcommand invokes the joy2key action.

                              • This line of runcommand.sh is where the runcommand is waiting for the button 0 pressing.

                              • Useful topics
                              • joystick-selection tool
                              • rpie-art tool
                              • achievements I made
                              D 1 Reply Last reply Reply Quote 0
                              • D
                                Dochartaigh @meleu
                                last edited by Dochartaigh

                                @meleu said in Can't enter runcommand by pressing a button.:

                                Also, you said the problem is intermittent. The code doesn't change between one execution and another.

                                All I can tell you is what I've experienced:

                                • Trying multiple controllers would rule a specific controller [type/brand] as being the culprit, correct?
                                • Trying different USB hubs would rule out the hub as being the problem, correct?
                                • Trying another Pi Zero would rule out the computer itself (and it's USB connection) as being faulty, correct?
                                • Trying the SD card in another Zero where the same problem persists would even further rule out any hardware issues, and make you think it's the software, correct?
                                • Having the exact same issue happen on a completely different, freshly-loaded-from a newly downloaded image (made on another computer, and on a different card reader, written onto a brand new/different SD card itself), would further dictate the problem is the code...isn't that what anyone would think?

                                Am I incorrect with any of the above assumptions? (please let me know and I'll change my testing routine!!! ;) If you guys haven't noticed I'm extremely thorough with my testing before I report a problem (essentially by doing my best to rule out any possible hardware fault before posting here - even trying to reproduce -on occasion- the same problem on a totally different computer and install). Heck, I even post screenshots from my monitor (occasionally) so you know I'm not just full of expletive ;)

                                I'm also pretty sure (which I can't check now as I don't have an older image loaded up), that in the past I was able to hit a button OTHER THAN button 0 to enter runcommand. runcommand also specifically says to press "a button" instead of "the 0 button". Even on that code you linked to (which to be honest is a foreign language to me), it says ""check for key pressed to enter configuration" - instead of "check for 0 button pressed". I also know I can press ANY key on my keyboard and it'll open runcommand. I can also, for example, hit the "A" button on NES like 10 tries in a row and it won't open runcommand - then switch over to SNES and it'll open right up... (or the opposite sometimes). I'm not saying you're wrong as you clearly know more than I do, but I hope you can see how this would all make any logical person think along the lines of what I'm thinking.

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

                                  @Dochartaigh

                                  All I can tell you is what I know:

                                  • the runcommand.sh can only get joystick input because joy2key.py translate some joystick input to keyboard input.
                                  • the runcommand.sh asks joy2key.py to make the button 0 act like the <ENTER> key, make the button 1 act like the <TAB> key, and the d-pad act like the respective arrow keys.
                                  • the line of code that makes the runcommand.sh wait for input for 2 seconds can read ANY key stroke from the keyboard, but can't get any input from joystick directly. It gets your button 0 pressing only because joy2key.py translates it to the <ENTER> key.
                                  • maybe the "other than button 0" that worked was the button 1, which is translated to the <TAB> key (sorry for that, I insisted on button 0 but you can press button 1 too).
                                  • the "a" in the "press a button" message is an indefinite article, not the button name. I agree that it isn't the clearest text to use, but it is the text the devs chose (and to be honest I can't think on a clearer text to suggest). Using "press the 0 button" would bring confusion because the button 0 is a software thing, and users look at the joystick (hardware) they have in hands.
                                  • Useful topics
                                  • joystick-selection tool
                                  • rpie-art tool
                                  • achievements I made
                                  D 1 Reply Last reply Reply Quote 0
                                  • D
                                    Dochartaigh @meleu
                                    last edited by

                                    Button 0 or 1 definitely makes more sense. I almost always press "A" or "B" (hey, I came from the original Nintendo world ;) to launch the menu (but others weren't working either).

                                    ANY key from the keyboard also makes sense - as I can press any key on the keyboard and it'll launch.

                                    I'll look at the specific controller configs for these 3-4 (maybe 5?) controllers I tried (I've been using cheap chinese-made ones lately since my friends don't want to buy $15-18 Buffalo or Hyperkin controllers). That's stored in "/opt/retropie/configs/all/retroarch-joypads/", right?

                                    meleuM 1 Reply Last reply Reply Quote 0
                                    • BuZzB
                                      BuZz administrators
                                      last edited by

                                      I appreciate you have tried lots of combinations, but the fact is, this is a problem others are not having (bear in mind the last image of retropie has had over 450,000 downloads). If there was a major issue, many more people would be reporting it.

                                      So something with your set-up is the cause. Start from a fresh 4.1 image, on a specific machine, and try and reproduce it - then list the steps you took and exact specifications of that set-up.

                                      To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

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

                                        @Dochartaigh said in Can't enter runcommand by pressing a button.:

                                        I'll look at the specific controller configs for these 3-4 (maybe 5?) controllers I tried (...). That's stored in "/opt/retropie/configs/all/retroarch-joypads/", right?

                                        No. You have to use the jstest tool that I suggested above.

                                        • Useful topics
                                        • joystick-selection tool
                                        • rpie-art tool
                                        • achievements I made
                                        1 Reply Last reply Reply Quote 0
                                        • D
                                          Dochartaigh @BuZz
                                          last edited by

                                          @BuZz said in Can't enter runcommand by pressing a button.:

                                          this is a problem others are not having (bear in mind the last image of retropie has had over 450,000 downloads). If there was a major issue, many more people would be reporting it.

                                          I know BuZz, you tell me this all the time ;)

                                          Here's exactly what I do taken from my notes. I use 95% of the same notes for the Pi Zero's vs. Pi 3's (but only included my workflow for the Zero below). Right now I have TWO different Pi Zero's built from these exact directions with the same problem. One was built last night, the other maybe 3 weeks ago (so RetroPie 4.1.2? and 4.1.11).

                                          Download Pi 1/0 image from RetroPie site
                                          Unzip img.gz file
                                          Format SD card with ApplePi-Baker (I always do this 2x times just in case)
                                          Put image on SD card
                                          Plug in USB hub w/ USB wifi adapter, keyboard 2.4ghz adapter, 1x controller
                                          Bootup Pi Zero 1st time - which resizes partition automatically

                                          Setup keyboard for A,B,X,Y,Select,Start etc.
                                          Setup USB controller for same
                                          Setup Wifi (or plug in ethernet hub)
                                          Config keyboard from 105 to 101 key with “dpkg-reconfigure keyboard-configuration” so it works properly
                                          uncomment “disable_overscan=1” and “hdmi_drive=2” in Config.txt,
                                          reboot

                                          sudo apt-get update
                                          sudo apt-get upgrade
                                          sudo apt-get dist-upgrade
                                          reboot
                                          Update all core packages from binary (from RetroPie setup GUI)
                                          reboot
                                          install from optional packages: lr-prboom, lr-quickness, lr-tyrquake, kodi, Wolf4SDL, AND SSelph scraper from tools
                                          reboot

                                          Plug in USB drive with “retropie/roms” folders and while it’s copying all the ROMs over (about 13GB):

                                          (make a consolidated save game directory and change permissions so my FTP program is allowed to copy over the config files more easily than using sudo nano to edit them in the hard-to-use linux text editor)
                                          sudo -s
                                          cd RetroPie
                                          mkdir saves
                                          sudo chmod 777 -R /home/pi/RetroPie/saves
                                          sudo chmod 777 -R /etc/emulationstation

                                          “/etc/emulationstation”
                                          Change megadrive to “genesis”, change PC Engine to “tg16” (so correct logos for USA are used), reorder so NES, SNES, and Genesis are the first three systems listed.

                                          “/opt/retropie/configs/all/retroarch.cfg”
                                          Add: input_player1_analog_dpad_mode = "1" (and the same code for players 1-8 to use analog stick)
                                          Change: savefile_directory = "/home/pi/RetroPie/saves"
                                          Change: savestate_directory = "/home/pi/RetroPie/saves”

                                          Run df -Bm until I see that everything is done copying over, then reboot.

                                          Exit from emulationstation and run SSelph’s scraper (usually overnight) to get art for all ROMs.

                                          THEN, I test everything which is where there’s commonly some of the issues I’ve described popping up.

                                          For the last build I used stock overclock settings:

                                          arm_freq=1000
                                          gpu_freq=500
                                          core_freq=500
                                          sdram_freq=500
                                          sdram_schmoo=0x02000020
                                          over_voltage=2
                                          sdram_over_voltage=2

                                          And changed the default NES emulator to be lr-quicknes…that’s my entire process I’ve done about 100 times (not even joking) so far.

                                          BuZzB 1 Reply Last reply Reply Quote 0
                                          • BuZzB
                                            BuZz administrators @Dochartaigh
                                            last edited by BuZz

                                            @Dochartaigh said in Can't enter runcommand by pressing a button.:

                                            this is a problem others are not having (bear in mind the last image of retropie has had over 450,000 downloads). If there was a major issue, many more people would be reporting it.

                                            I know BuZz, you tell me this all the time ;)

                                            I believe I possibly mentioned it to you once in your other topic. I will keep repeating it if you keep saying there is a problem with the software whilst being the only one with the issue so far :) (tbh I can't remember everything I have said to everyone - I have made a lot of posts to a lot of people).

                                            Can you reproduce this on a rpi1/2/3 without the Hub and the same controller? What controllers are you using? What PSU ? Do you have any other controllers ?

                                            For the sake of testing this I would avoid any overclocking.

                                            To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

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