Script to Monitor Running Emulator and ROM for other scripts

Home Forums RetroPie Project Everything else related to the RetroPie Project Script to Monitor Running Emulator and ROM for other scripts

RetroPie has a new website and forum. Please visit https://retropie.org.uk/ for the new site. The new forum is located at https://retropie.org.uk/forum/. This forum is left here as a read-only archive.

This topic contains 2 replies, has 2 voices, and was last updated by Profile photo of sselph sselph 1 year, 10 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #100953
    Profile photo of sselph
    sselph
    Participant

    Hi Everyone,

    I’m in the process of creating another tool and needed a library to monitor the state of emulationstation. Seemed like it could be useful on its own. I’ve seen people needing to notify a script of the running emulator or rom to set an LCD screen for example.

    https://github.com/sselph/rp-tool/releases

    The script works by parsing the es_systems.cfg file and watching the running processes to find the emulator then parsing out the rom info out of the gamelist.xml.

    You can run it in 2 different modes, or you can do both:
    -web
    this will start a web server at http://<retropie ip>:8080/status that prints text in json format of the running emulator and game.

    -script <full path to script>
    this will run the script with a set of arguments <operation> <system short name> <system long name> <game title>

    I also included an init file if you want to run it on boot. You just have to edit this line with the flags you prefer and install it.
    https://github.com/sselph/rp-tool/blob/master/rw/cmd/romwatch/romwatch.init#L27

    $ sudo cp romwatch.init /etc/init.d/
    $ sudo update-rc.d romwatch defaults
    $ sudo /etc/init.d/romwatch start

    Auto-scraper: https://github.com/sselph/scraper

    #100970
    Profile photo of robertybob
    robertybob
    Participant

    Am I right in thinking this allows you to use a hooked up LCD panel to show what is ‘now playing’ ?

    Could it also be customised to have scrolling text that displays something like:

    System > Game > Publisher > Year of Release > Rating

    If so, that’s really cool and I wish I had the skills to fit an LCD panel, plus the time and resources to create a customised case which could take advantage of this!

    #100980
    Profile photo of sselph
    sselph
    Participant

    That is what I was thinking it might be useful for. It doesn’t do any of the LCD stuff so you’ll have to write that portion yourself but it could call that script to tell it when you start and stop playing a game and what game and system it was. It is also a Go library but figured it might be easier to do this so people could write Python, bash, etc and this could communicate with them.

    The arguments that are passed to the script are currently fixed but I can change it if someone decides they want to use it. I can make it more flexible or dump a blob of json. If you use the -web flag and open the page while a game is running you can see what information I am pulling out. It includes everything in the gamelist.xml about the game as well as information about the system.

    Auto-scraper: https://github.com/sselph/scraper

Viewing 3 posts - 1 through 3 (of 3 total)

Forums are currently read only - please visit the new RetroPie forums at https://retropie.org.uk/forums/

Skip to toolbar