+karri Posted July 13, 2020 Share Posted July 13, 2020 Perfect. If you type ls you see a new executable called retrogame. Just replace the original retrogame with your custom version and reboot. Quote Link to comment Share on other sites More sharing options...
Stijn Van Orshaegen Posted July 13, 2020 Share Posted July 13, 2020 (edited) 41 minutes ago, karri said: Perfect. If you type ls you see a new executable called retrogame. Just replace the original retrogame with your custom version and reboot. pi@retropie:~/Adafruit-Retrogame $ sudo retrogame retrogame: Config file is '/boot/retrogame.cfg' retrogame: Loading config retrogame: virtual key 105 assigned to GPIO10 retrogame: virtual key 106 assigned to GPIO22 retrogame: virtual key 103 assigned to GPIO23 retrogame: virtual key 108 assigned to GPIO27 retrogame: virtual key 29 assigned to GPIO04 retrogame: virtual key 56 assigned to GPIO25 retrogame: virtual key 44 assigned to GPIO11 retrogame: virtual key 45 assigned to GPIO05 retrogame: GPIO06 assigned GND retrogame: virtual key 57 assigned to GPIO16 retrogame: virtual key 28 assigned to GPIO26 retrogame: virtual key 1 has GPIO bitmask 00000000000000004010000 retrogame: debug level 99 retrogame: uidev init OK retrogame: SDL2 init OK retrogame: Entering main loop and already stuck here for a while Edited July 13, 2020 by Stijn Van Orshaegen Quote Link to comment Share on other sites More sharing options...
+karri Posted July 13, 2020 Share Posted July 13, 2020 37 minutes ago, Stijn Van Orshaegen said: and the retrogame is located ? In my Pi it is in /usr/local/bin But yours? You could ask your pi: which retrogame Or if it is not in your path locate retrogame And then of course sudo cp /home/pi/Adafruit-Retrogame/retrogame /usr/local/bin Quote Link to comment Share on other sites More sharing options...
Stijn Van Orshaegen Posted July 13, 2020 Share Posted July 13, 2020 10 minutes ago, karri said: In my Pi it is in /usr/local/bin But yours? You could ask your pi: which retrogame Or if it is not in your path locate retrogame ok, found it with the wich retrogame command ,now i cannot seem to replace the file ( sftp ) permission denied. any way to do it with commands ? Quote Link to comment Share on other sites More sharing options...
+karri Posted July 13, 2020 Share Posted July 13, 2020 You need to replace it as administrator. So use putty to ssh into the pi and do: sudo cp retrogame /usr/local/bin Quote Link to comment Share on other sites More sharing options...
Stijn Van Orshaegen Posted July 13, 2020 Share Posted July 13, 2020 1 hour ago, karri said: You need to replace it as administrator. So use putty to ssh into the pi and do: sudo cp retrogame /usr/local/bin pi@retropie:~/Adafruit-Retrogame $ sudo cp retrogame /usr/local/bin cp: cannot create regular file '/usr/local/bin/retrogame': Text file busy pi@retropie:~/Adafruit-Retrogame $ Quote Link to comment Share on other sites More sharing options...
+karri Posted July 13, 2020 Share Posted July 13, 2020 35 minutes ago, Stijn Van Orshaegen said: pi@retropie:~/Adafruit-Retrogame $ sudo cp retrogame /usr/local/bin cp: cannot create regular file '/usr/local/bin/retrogame': Text file busy pi@retropie:~/Adafruit-Retrogame $ So you have to kill the running process first. sudo pkill retrogame sudo cp retrogame /usr/local/bin Quote Link to comment Share on other sites More sharing options...
Stijn Van Orshaegen Posted July 13, 2020 Share Posted July 13, 2020 still something wrong and i see that the retrogame.sh still has the earlier date from a few days ago, schouldnt this also be newly created ? Quote Link to comment Share on other sites More sharing options...
Stijn Van Orshaegen Posted July 28, 2020 Share Posted July 28, 2020 so back from the dead , sorry needed to let it rest for a while . if you dont mind, could you tell me where you soldered the resistor ? Quote Link to comment Share on other sites More sharing options...
+karri Posted July 28, 2020 Share Posted July 28, 2020 1 hour ago, Stijn Van Orshaegen said: so back from the dead , sorry needed to let it rest for a while . if you dont mind, could you tell me where you soldered the resistor ? I used the Lynx I. It has +5V which is bad for the Pi. So I had one resistor from the button to the GPIO pin and another resistor between the GPIO pin and ground. This worked as a voltage divider. The reason is the the Lynx I emits +5 V through the button when you press it. In your case you are only using the ribbon cable so there is no need for resistors to drop down the voltage. Just power the ribbon cable using the 3.3V from the Pi and you should be good. Quote Link to comment Share on other sites More sharing options...
Stijn Van Orshaegen Posted August 2, 2020 Share Posted August 2, 2020 (edited) ok, got it to work, only i cannot get key 5 ( key z ) = B, key 6 ( esc ) = option 2 ,and key 4 (up ) to work somehow, yet the multimeter says they make contact when preessing soldered to the pins. on, power and option 1 do not make contact at all on the lynx, but for the moment they wont be needed, maybe later or do they work in another way ? this i my retrogame setup all soldered to the corresponding pins... # Here's a 6-button configuration: LEFT 27 # Joypad left RIGHT 22 # Joypad right UP 4 # Joypad up DOWN 17 # Joypad down LEFTCTRL 21 # 'A' button LEFTALT 25 # 'B' button Z 5 # 'X' button X 16 # 'Y' button GND 9 # Spare ground point for 'Y' button SPACE 19 # 'Select' button ENTER 20 # 'Start' button ESC 6 # Hold Start+Select to exit ROM nearly there... and what is spare ground button for Y ? ( thinking this is probably for your LYNX 1 , right ? ) soldering up to LEFTCTRL gave me a functioning button , soldering B to LEFTALT did nothing Edited August 2, 2020 by Stijn Van Orshaegen Quote Link to comment Share on other sites More sharing options...
+karri Posted August 2, 2020 Share Posted August 2, 2020 This GND Y makes no sense. My guess is that the RetroPie already use some key combinations for other purposes. As I was mainly interested in emulating the lynx I had Opt1, Pause and Opt2 mapped. I believe that SPACE was also mapped to Pause. It may also be easier to map buttons to characters instead of special modifer keys. Quote Link to comment Share on other sites More sharing options...
Stijn Van Orshaegen Posted August 2, 2020 Share Posted August 2, 2020 yeah well ... i'm totaly lost now the buttons i am using now, and exept of button B they all work. on gpio pins: UP = 21 DOWN =17 LEFT = 27 RIGHT = 22 START ( restart button ) = 20 SELECT ( option 2 ) = 19 A-button = 16 B-button = 26 at the momentn but not funtioning on other pins either, multimeter says ok. my retrogame.cfg LEFT 27 # Joypad left RIGHT 22 # Joypad right UP 4 # Joypad up DOWN 17 # Joypad down LEFTCTRL 21 # 'A' button LEFTALT 25 # 'B' button Z 26 # 'X' button X 16 # 'Y' button GND 9 # Spare ground point for 'Y' button SPACE 19 # 'Select' button ENTER 20 # 'Start' button ESC 6 # Hold Start+Select to exit ROM my retrogame.c { 27, KEY_LEFT }, { 22, KEY_RIGHT }, { 4, KEY_UP }, { 17, KEY_DOWN }, { 26, KEY_Z }, { 16, KEY_X }, { 20, KEY_ENTER }, { 21, KEY_B }, { 19, KEY_SPACE }, { 6, KEY_ESC } }; and again thank you for your help and now that i have severe dyslexia, ccan you see what i am doing wrong and maybe correct it for me ? maybe the B needs another point and configuration ? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.