Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • sselph
    Post count: 170

    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.

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

    $ sudo cp romwatch.init /etc/init.d/
    $ sudo update-rc.d romwatch defaults
    $ sudo /etc/init.d/romwatch start
    Post count: 219

    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!

    Post count: 170

    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.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Everything else related to the RetroPie Project’ is closed to new topics and replies.