(REQUEST/IDEA) Dynamic marquess .. or interprocess comms...
-
Hi!,
I'm working on an idea to allow ES interaction with other programs in order to do all sorts of crazy stuff, I've made a small POC (https://github.com/zayamatias/EmulationStation Excuse my c++, first time doing something with that) that outputs the marquees filenames for either the system or the file selected un ES menu, emulation station runs within a Python program (not within, but rather as child of) and this scripts captures the output and then executes fim to display the images on the 2nd RPI4 HDMI.... Feel free to adopt this idea if you think it is worth it.
Thanks!
-
@kiro Thanks I tried your project and I was able to display the "default.jpg" image in the secondary screen. However, I was not able to get the system images cyling within emulationstation. I edited the theme I'm using by going into the theme.xml file of each system, adding the marquee image. For example, within /etc/emulationstation/carbon/mame/theme.xml I have:
<theme> <formatVersion>3</formatVersion> <include>./../carbon.xml</include> <view name="system"> <image name="ControllerOverlay" extra="true"> <tile>false</tile> <pos>0.5 0.2</pos> <origin>0.5 0.5</origin> <size>0.3 0</size> <path>./art/controller.svg</path> <!--<color>8b0000</color>--> </image> <image name="logo"> <path>./art/system.svg</path> </image> <image name="marquee"> <path>./art/system.jpg</path> </image> </view>
And I also copied a sample image named system.jpg into /etc/emulationstation/carbon/mame/art
Do you have any clues?
-
@janderclander14 hi! Thanks for trying and sorry for late answer. Try putting the full path to the image, that should help.
-
@janderclander14 Him I just checked and actually I have it as you in my theme.xml andit works.
<image name="marquee"> <path>./art/marquee.png</path> </image>
Other issues could be permissions for the file? Is your default user able to read and access the file?
Oh, and did you compile the version of emulationstation from my repo? Otherwise it will defenetely not work.
Let me know!
-
@kiro Thanks for the indications. Yes I have compiled emulationstation from your repo and I'm sure it is running, because it is a different version of the emulationstation I had installed. I changed the owner of all the files inside the 'carbon' theme to 'pi' (the default user, it was 'root' previously), and it still does not work, I'm affraid. The default image stays all the time regardless I navigate within the systems.
-
@janderclander14 can you run emulation station from another terminal and see if you see an output on the terminal when you change systems?
-
@kiro I booted into a terminal and, then, from another remote terminal, I run your emulationstation as follows:
python /home/pi/emu.py
Then, your emulationstation showed in the main screen but, unfortunately, nothing appears in the remote terminal when I browse or go into the systems.
-
@janderclander14 Hi I meant to run the new build of emulation station...not emu.py.... how this works is that the custom build of emulationstation will send to the ouptut the name of the images to be displayed, and emu.py will capture these names and launch "fim" to display them.
Here's an example on my own setup:
pi@retropie:~ $ ./EmulationStation/emulationstation /etc/emulationstation/themes/ComicBook_SE-Wheelart/3do/art/marquee.png#/etc/emulationstation/themes/ComicBook_SE-Wheelart/arcadeacclaim/art/marquee.png#/etc/emulationstation/themes/ComicBook_SE-Wheelart/arcadeacclaim/art/marquee.png#/etc/emulationstation/themes/ComicBook_SE-Wheelart/arcadealphadenshico/art/marquee.png#/etc/emulationstation/themes/ComicBook_SE-Wheelart/arcadealphadenshico/art/marquee.png#/etc/emulationstation/themes/ComicBook_SE-Wheelart/arcade/art/marquee.png#/etc/emulationstation/themes/ComicBook_SE-Wheelart/arcade/art/marquee.png#
And just to confirm, this is how I have the marquees in the theme.xml of each system:
<theme> <formatVersion>3</formatVersion> <include>./../comic_book.xml</include> <view name="system"> <image name="marquee"> <path>./art/marquee.png</path> </image> </view> --> I've omitted non relevant tags
So what I would like to try is if you can see the name of the images in the remote terminal when emulationstation is running and you change systems, just as the example I showed you.
Thanks!.
-
@kiro I tried exactly that.
pi@retropie:~ $ ./EmulationStation/emulationstation
But I get no output when navigating through the systems. My theme.xml files in each system folder into the carbon theme are like yours
<theme> <formatVersion>3</formatVersion> <include>./../carbon.xml</include> <view name="system"> <image name="marquee"> <path>./art/system.jpg</path> </image> </view>
The owner of both EmulationStation at /home/pi and the files into the carbon theme in /etc/EmulationStation are set to 'pi'
-
@janderclander14 Seems that the version you're not running is not the proper one, you should see the output..I presume you compiled the version from my repository?? If you did compile it let me know and I'll find a way to get you my binary.
-
@kiro Yes, I cloned your repository and compiled emulationstation by following the indications in the readme. Compilation was fine and I was able to execute the resulting binary in /home/pi/EmulationStation. I have no clue what could be happening...
-
@janderclander14 Very strange, I'll upload the compiled binary into github today, so you can download it an try it. It is compiled on a RPI4, so hopefully you have a similar setup.
-
@kiro Great! the binary worked, thanks! I didn't know what happened with the compiled version, but it seems to compile ok with the options you state in the git.
By the way, do you know if it is possible to rotate the images with 'fim'? My marquee monitor is vertical by default, so I need to rotate them 90ยบ. If it is not possible, an alternative would be to use 'omxiv' instead.
And finally, a suggestion, do you think it could be possible to provide outputs for the games shown in the screensaver, so that the marquee matches the game's screenshot/video?
-
@janderclander14 Happy to hear that...
The 'nice' thing is that you can modify emu.py to do whatver you want. My compiled version of emustation outputs the 'marquee' value found either in theme.xml or in the gamelist.xml (one marquee per game), so from there you can do whatver you want by simply modifying the emu.py script, which basically captures the output from elulationstation and does something (currently, just use fim to display the marquees on 2nd screen), but you can do anything you can imagine with it, just change fim by other command. Some ideas I have:
- If you have led buttons, turn on or off depending on the system you're playing (or even RGB buttons)
- Illuminate an RGB strip in the arcade machine depending on the dominant colour of the marquee..
- Launch a video in the marquee (hdmi1)
- Play sounds per system
- Notify some external system, or another RPI or whatever...
....
I mean, possibilities are infinite as long as you can capture what emulationstation is outputting... and emu.py simplifies changing the behaviour greatly.
For your screen saver question, I'm not sure I understand what you mean, which theme are you using and how do you configure/set up the screensaver? (I do not use that option personally).
-
@kiro I ment the screensaver built into emulationstation, which randomly cycles through the games in the system and shows the associated screenshots and/or videos. Then, by pushing the start button, you can load the game. The idea was that, the secondary display would show the game's marquee while the main window shows the game's screenshot, if this is possible.
I understand that, so far, the outputs are associated to the system being browsed and the game being ran, don't they?
Finally, just small issue: when using the python script to run emulationstation, the image shown in the secondary display is also shown in the main display during the loading of a game, instead of the runcommand menu. Is this the expected behaviour?
Thanks!
-
@janderclander14 Hi, I'll have a look at the screensaver feature, shouldn't be an issue, will come back to you shortly.
Regarding the marquee present during the loading, well, I have that issue and I do not know how to fix it to be honest, rmemeber it is fim that is asked to display the image on the seconday display, so I'm not sure why it is showing it there too. Will try to have a look at one point if I have the time (to be honest I'm ok with that "feature" :-) )
Thanks!
-
@janderclander14 Hi, so I added the screensaver functionality, you need to update the precompiled binary and the emu.py.
I'be tried and it seems to work, althought there is a big catch:
I base the marquee selection on the image that is being sent to the scrren by emulation station, and I replace every occurence of 'image' by 'marquee', because in my setup:
- Images are under /home/pi/RetroPie/roms/{system}/images/{SHA}-image.png
- Marquees are under /home/pi/RetroPie/roms/{system}/marquees/{SHA}-marquee.png
So as you can see, replacing image by marquee it goes to the right image to display.
If your images/marquees do not follow this convention, it may not work, or you might need to update emu.py to make the proper switch.
If you can test it, let me know how it goes.
Thx
P.s.: I've done the same name replacement for videos (if your slideshow is videos) and it will show the default one if the marquee is not present.
-
@kiro Thanks! That was fast! I will try it this weekend and let you know.
-
@kiro Hey sorry to resurrect this but trying to get this way of displaying the marquee on the second screen of the pi4 as well, and can't seem to get it to go after successfully installing your ES build.
The marquees and piemarquee2 work great after booting the game, but it doesn't show the marquee in the game selector screen any more and it won't work with the screensaver, it just stays on the maintitle.png image in my piemarquee/marquee/systems folder.
I do have my marquees set up a little different than yours - mine are all in the roms/[system]/marquee folder, named as gamefilename.png matching the .zip rom.
Do I need to rename all of the marquee image files to add the '-marquee' at the end, or is there something else I might be doing wrong?
-
@del1verance I would have to look into the python code, but I believe it expects the marquees to have a specific name and be in a specific directory, I think it is fairly easy to change the python code to make it translate the input into the filenames you use, have a look at the code and if you do not find how to do it let's take it from there.
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.