• GPIO button to exit emulator

    27
    0 Votes
    27 Posts
    8k Views
    J

    Here is how to set Long press and Short press function. I added on my reset ROM button a long press feature that resets the entire system:

    Create a script that will be executed at long press
    nano /home/pi/switch.sh

    Paste the below code and save using CTRL + X, Y

    #!/bin/bash sudo reboot

    Make it executable:
    chmod +x /home/pi/switch.sh

    Edit the code in the first mentioned post resetbutton.py:

    nano /home/pi/scripts/resetbutton.py

    Replace all text with the below code, save using CTRL + X, Y: #!/usr/bin/python import RPi.GPIO as GPIO import time import os # we will use the pin numbering to match the pins on the Pi, instead of the # GPIO pin outs (makes it easier to keep track of things) GPIO.setmode(GPIO.BOARD) GPIO.setup(16, GPIO.IN) seq_cust = 0 tim_cust = 0 # check to see if button has been pushed try: while True: if GPIO.input(16)==0: tim_cust = 0 if seq_cust > 0: os.system("sudo /home/pi/exit.sh") # Short press action seq_cust = 0 time.sleep(1) else: seq_cust = 0 else: tim_cust = tim_cust + 1 time.sleep(.01) if tim_cust >= 200: # Time for long press >= x os.system("sudo /home/pi/switch.sh") # Long press action tim_cust = 0 time.sleep(1) else: seq_cust = 1 finally: GPIO.cleanup()

    I used 0.01 seconds to eliminate delay in button press.
    At 200 should result in ~2 seconds.

    You can put your own script in switch.sh
    Also the script supports more than 2 actions per button with a bit of tweak.

    Enjoy ;)

  • 0 Votes
    5 Posts
    2k Views
    mituM

    @etheling said in Update retroarch.sh to enable KMS/DRM on x11 platform?:

    Other than patching files under RetroPie-Setup, is there some way to achieve this that I didn't realize?

    No, you need to patch the scriptmodule to have both vulkan and KMS support.

  • NES Custom Palette Preferences?

    27
    0 Votes
    27 Posts
    13k Views
    zefolhadelaZ

    @mitu My bad, i didnt know i can even see that. I will create a post. Thanks!

  • 2 Votes
    8 Posts
    6k Views
    D

    I know more than 2 years passed, but I wanted my phone to config retropie without using a Keyboard and tested your app. From your code on Github there are 2 problems in the main .py file.
    1 - You're importing 2 times subprocess, which is redundant, no big problem whatsoever here
    2- There's a Syntax error on line 114 that prevented the service to start on my PI3. There aren't () both at start and end from the print command.
    So I changed it, copied the file to /usr/bin/ and it worked like a charm.

  • Vectrex emulator with GPU rendering

    15
    6 Votes
    15 Posts
    2k Views
    Z

    @zerojay said in Vectrex emulator with GPU rendering:

    It looks like the pull request for this was accepted 3 days ago.

  • Better font support for Frotz

    3
    0 Votes
    3 Posts
    429 Views
    PatHawksP

    @mitu Yup.

    I have taken this a step further: fbterm allows using any TrueType fonts.

  • Retropie netplay lobby!

    1
    1 Votes
    1 Posts
    325 Views
    No one has replied
  • M.A.M.E. 0.61 SDL [DEV] - Beta3.3

    22
    0 Votes
    22 Posts
    3k Views
    F

    @zerojay said in M.A.M.E. 0.61 SDL [DEV] - Beta3.3:

    From a packaging/scriptmodule perspective, this doesn't change anything for me, but that's really cool.

    The current SDL Image library available on Raspbian is an old version that use an old libpng version with a bug. In order to use HD artwork you need to compile libpng and SDL Image from source and in sequence.

    So, download these archives, libpng-libpng16.zip and SDL2_image-2.0.5.zip, and copy them in

    /home/pi

    then run these commands from terminal:

    LIBPNG

    unzip libpng-libpng16.zip cd libpng-libpng16/ ./configure make sudo make install sudo ldconfig

    SDL IMAGE

    unzip SDL2_image-2.0.5.zip cd SDL2_image-2.0.5/ mkdir build cd build ../configure make -j3 sudo make install sudo ldconfig
  • 1 Votes
    1 Posts
    312 Views
    No one has replied
  • Possible Ideas On Storage

    2
  • Ouya games on Retropie

    4
    0 Votes
    4 Posts
    690 Views
    mituM

    @julugamer said in Ouya games on Retropie:

    But is it likely to happen that there will be something like such an emulator/interpreter on Retropie?

    Unless there's already an emulator/interpreter that works, not likely to happen.

  • BeebEm and fun arcade control modifications

    28
    2 Votes
    28 Posts
    5k Views
    Lord VekL

    Yes, that was my question at the beginning. I asked how can I install something from that repository. What commands should I use from the Retropie, to install beebem. Can you please help me, because I am a noob?

  • Gameboy Advance Pi Zero Build

    3
    0 Votes
    3 Posts
    781 Views
    cnotoC

    @lostless Thanks. I am thinking of cutting an old gba cartridge to fill the space left at the top.

  • Checking if another scriptmodule is installed

    11
    0 Votes
    11 Posts
    1k Views
    G

    Just a quick update. The Steamlink script module was a great help in both the minimal window manager as well as installing Ports.

    Thank you! My questions have been answered.

    - George

  • 0 Votes
    8 Posts
    1k Views
    P

    Isn't it cleaner to use systemd / services in order to do so ?

    It is explained here how to cycle between 2 services:
    https://forum.kodi.tv/showthread.php?tid=288584

    For kodi.service (configured as a user service not system wide service contrary to the above link) :

    [unit] ... Conflicts = emulstation.service ... [service] ... ExecStopPost = /usr/bin/systemctl --user start emulstation.service ...

    And for emulstation.service

    [unit] ... Conflicts = kodi.service ... [service] ... ExecStopPost = /usr/bin/systemctl --user start kodi.service ...

    Emulstation and kodi should not be services enabled/start by default at boot but rather
    autostart.sh start the first service by something like:

    systmctl --user start kodi.service

    if kodi is configured to be the first one.

    To go further we can also think about replacing the autostart script by a retropie service which is enabled at boot time. At start, it launches the first configured service. At stop it ensures that emulstation and kodi are stoped.

    If the service is run as pi user (which is more secure), the pi user must be lingered to enable autostart of the service at boot even if the user is not logged in.

    loginctl enable-linger pi systemctl --user enable retropie

    Advantages:

    All the services could be controlled, inspected, logged through the systemd tools Not need for automatic login It could be easily extended to any number of services not just 2.
  • Ability to run Retropie like a CRT screen?

    4
    0 Votes
    4 Posts
    453 Views
    simpleethatS

    @MeltedPineapple you'll have to do the research on how to set that up. I haven't attempted it myself, I'm waiting for my Sinden Lightgun.

  • Animated JPG for video snaps

    12
    0 Votes
    12 Posts
    887 Views
    D

    Been playing around and yes it does play quite nicely these days. Its been a while since I tried snaps on Pi0's, I think last time I did try it omxplayer caused some weird overlapping issues.

    I've managed to get the size down quite a bit. I could probably increase a little as the video file sizes are typically smaller than the boxart! I've settled on 320x240, no sound and 10 seconds. Looks fine on the small screen, usually 10 seconds is enough to get an idea of what the game is like, and the sound can sometimes be a little rough so not an issue losing that. Also limited to 30fps as a lot were 60.

    I used ffmpeg with commands: -i input.mp4 -r 30 -s 320x240 -ss 0 -to 10 -an output.mp4

    mkdir trimmed for %%a in ("*.mp4") do "d:\ffmpeg\ffmpeg" -i "%%a" -r 30 -s 320x240 -ss 0 -to 10 -an "trimmed\%%a" pause

    Created a little batch file and it does them pretty quickly.

    Filesizes massively reduced, one collection was 572 games. scraped videos took 1.99GB! trimmed versions took just 137MB

    I'm glad I asked a silly question now :)

  • (Guide) Beginners guide to compile from source

    2
    8 Votes
    2 Posts
    2k Views
    retropieuser555R

    Thanks again for doing this!

  • Texmaster port?

    54
    0 Votes
    54 Posts
    20k Views
    Z

    You'll have to use something like xboxdrv maybe. I haven't gotten around to doing it myself yet.

  • Retropie Messeger

    3
    1 Votes
    3 Posts
    1k Views
    W

    support

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.