Can't enter runcommand by pressing a button.
-
If nobody has any idea how to fix this, does anyone know where the files runcommand uses? They're not in any of the areas the core packages get installed to (or they would be fresh files when I "install from binary" all the core packages like I've done twice now). Maybe I can do a fresh install on another SD card then copy them over and see if it fixes the problem (REALLY don't want to re-do this entire setup again...).
Trying to dupe this card tonight for a co-worker who just got his own Zero...and would hate him to not be able to enter runcommand without a keyboard...
-
@Dochartaigh said in Can't enter runcommand by pressing a button.:
does anyone know where the files runcommand uses?
The files are:
- The runcommand script:
/opt/retropie/supplementary/runcommand/runcommand.sh
- The joy2key tool:
/opt/retropie/supplementary/runcommand/joy2key.py
- The joysticks you have connected to the system:
/dev/input/js*
But I think you don't have to touch any of these files to solve your issue.
You have to keep in mind that the runcommand menu is invoked by pressing the button 0 (zero) of the joystick. The problem is that each manufacturer puts the button 0 at different places. I have several joysticks at home, in my PS2 controller the button 0 is the triangle, in my 8Bitdo NES30 it is the A button, in my 8Bitdo Zero it is the B button, etc...
A recent change on
joy2key.py
makes runcommand menu accessible by every connected joystick (not only the first one, as before), but you still need to press the button 0. - The runcommand script:
-
Oh jeez this is probably the answer for the question I just typed out lol
-
@meleu When was the joy2key.py updated?
-
@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
-
@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?
-
@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?
-
@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.
-
Hmm it is my launching images. They won't let me press A on the joystick when launching?!?
-
@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...
-
@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)...
-
@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.
-
@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. -
@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. -
@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.
-
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.
-
-
@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.
-
All I can tell you is what I know:
- the
runcommand.sh
can only get joystick input becausejoy2key.py
translate some joystick input to keyboard input. - the
runcommand.sh
asksjoy2key.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 becausejoy2key.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.
- the
-
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?
-
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.
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.