RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Emulationstation links

    Scheduled Pinned Locked Moved Help and Support
    marquee
    18 Posts 5 Posters 875 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • mituM
      mitu Global Moderator @bob1961
      last edited by mitu

      @bob1961 said in Emulationstation links:

      Any ideas as to why it's not displaying my marquee when these files are present?

      The path element should always point to the game file, not the .cfg. The .cfg is used by runcommand to pass additional parameters to the emulator (retroarch), not by EmulationStation.

      Do you have a marquee for the game itself ? Looking at the .xml fragment you posted, the game is missing a marquee element, so maybe the add-in (PieMarquee2) doesn't have anything to show.

      B 1 Reply Last reply Reply Quote 0
      • B
        bob1961 @mitu
        last edited by

        @mitu yes there is a marquee for those games.
        all the other games have the same listing, I just cut / pasted the one.
        All the other games work fine it's only the games where I've created those game specific .zip.cfg files

        mituM 1 Reply Last reply Reply Quote 0
        • mituM
          mitu Global Moderator @bob1961
          last edited by

          @bob1961 The issue is with the PieMarquee2 script or how this script is executed by EmulationStation. Can you run emulationstation with --debug and look in the logs to see how the add-on scripts are run ?
          Post the gamelist.xml and the EmulationStation debug log on pastebin.com so we can take a look.

          B 1 Reply Last reply Reply Quote 0
          • B
            bob1961 @mitu
            last edited by

            @mitu here are the file /links
            https://pastebin.com/dShxBHXq
            https://pastebin.com/yZyGZk4X

            mituM 1 Reply Last reply Reply Quote 0
            • mituM
              mitu Global Moderator @bob1961
              last edited by mitu

              @bob1961 I don't see a marquee entry for the games in the gamelist.xml file - but maybe PieMarquee2 doesn't rely on it being present in the gamelist.

              The EmulationStation log doesn't show any usage of the scripting API, so my guess is that the PieMarquee2 doesn't use it ? The scripting API support for calling scripts when selecting game were added in EmulationStation v2.11, while you're still running v2.10, so my guess is that the PieMarquee2 script doesn't rely on EmulationStation. I think you need to ask the PieMarquee2 author about this issue, it doesn't look like it's related to EmulationStation.

              EDIT: is the marquee supposed to be displayed on the 2nd screen when you select a game or when you start it ? It's not clear now how this works and I assumed is the former.

              B 1 Reply Last reply Reply Quote 0
              • B
                bob1961 @mitu
                last edited by bob1961

                @mitu yes that's correct. second screen. N
                ot able to get a hold of the author.

                Original code is here
                https://github.com/rinalim/PieMarquee2

                in the end I'm just looking how to enable a second screen as a marquee

                mituM 1 Reply Last reply Reply Quote 0
                • mituM
                  mitu Global Moderator @bob1961
                  last edited by

                  @bob1961 Maybe the author will take a look at your issue, seems it uses its own mechanism to display the marquee and not relying on either EmulationStation or the runcommand launch scripts.

                  B 1 Reply Last reply Reply Quote 0
                  • B
                    bob1961 @mitu
                    last edited by

                    @mitu like i said. no response from author.
                    The code is on that link I sent.
                    Based on original here:
                    https://github.com/rinalim/PieMarquee2

                    guess I couldn't convince you to take a look? ;)
                    Do yo know of any other ways to get a marquee?
                    I tried CRT Blast but I couldn't rotate

                    mituM D 2 Replies Last reply Reply Quote 0
                    • mituM
                      mitu Global Moderator @bob1961
                      last edited by

                      @mitu like i said. no response from author.

                      I've looked at the repository's issues, maybe you need to wait a bit more.

                      guess I couldn't convince you to take a look? ;)

                      I did, but python is not my forte and I didn't fully understand what's the principle of operation of the script.

                      1 Reply Last reply Reply Quote 0
                      • D
                        dmmarti @bob1961
                        last edited by

                        @bob1961
                        PieMarquee2 doesn’t utilize the gamelist.xml files nor the runcommand_onstart.sh/onend.sh scripts.

                        Instead, if you’ve installed it per his Github instructions, the python script is always running.

                        When you launch a game, it tries to find a same-named *.png file as your rom filename.

                        If not found, it next tries to find a *.png file named exactly as the system you are using (ex: nes, snes, atari2600, arcade, etc).

                        If still not found, it defaults and uses a global *.png file instead.

                        The three locations are:

                        rom filename png: /home/pi/PieMarquee2/marquee/SYSTEMNAME/romfilename.png
                        examples:
                        for galaga.zip in /roms/arcade folder - /home/pi/PieMarquee2/marquee/arcade/galaga.png
                        for mario.zip in /roms/nes folder - /home/pi/PieMarquee2/marquee/nes/mario.png

                        system filename png: /home/pi/PieMarquee2/system/SYSTEMNAME.png
                        examples:
                        for games using the nes system - /home/pi/PieMarquee2/marquee/system/nes.png
                        for games using the atari2600 system - /home/pi/PieMarquee2/marquee/system/atari2600.png

                        default png: /home/pi/PieMarquee2/marquee/system/maintitle.png


                        When you launch a game that ends up only having the default and/or the system png marquee, look at the /dev/shm run command log to see what the passed rom filename is.

                        Then make sure you have a corresponding *.png file named the exact same in the proper PieMarquee2 folder.

                        For example your arkanoid.zip. You didn’t specify which rom folder but here’s some examples for it.

                        /home/pi/PieMarquee2/marquee/arcade/arkanoid.zip
                        /home/pi/PieMarquee2/marquee/mame-libretro/arkanoid.zip

                        Hope that helps some.

                        B 1 Reply Last reply Reply Quote 0
                        • B
                          bob1961 @dmmarti
                          last edited by bob1961

                          @dmmarti
                          all the .png files are in the correct folders and all work.
                          If i remove the .zip.cfg file for those games, then the game marquee will display.
                          It's the presence of that .zip.cfg that is messing something up.
                          The game plays correctly so I know it's reading the instructions in those files.
                          Just won't display the game marquee :(

                          Here is that file for Space Invaders (which has no .zip.cfg fle and displays marqee)
                          Parameters:
                          Executing: /opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-mame2003/mame2003_libretro.so --config /opt/retropie/configs/arcade/retroarch.cfg "/home/pi/RetroPie/roms/arcade/invaders.zip" --appendconfig /dev/shm/retroarch.cfg

                          Here is that file for Arkanoid (which has a .zip.cfg fle and does not display marqee)
                          Parameters:
                          Executing: /opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-mame2003/mame2003_libretro.so --config /opt/retropie/configs/arcade/retroarch.cfg "/home/pi/RetroPie/roms/arcade/arkanoid.zip" --appendconfig /dev/shm/retroarch.cfg'|'"/home/pi/RetroPie/roms/arcade/arkanoid.zip.cfg"

                          B 1 Reply Last reply Reply Quote 0
                          • B
                            bob1961 @bob1961
                            last edited by BuZz

                            @bob1961
                            here is the pieMArquee2.py file

                            #!/usr/bin/python3
                            
                            import os
                            from subprocess import *
                            from time import *
                            import xml.etree.ElementTree as ET
                            
                            INTRO = "/home/pi/PieMarquee2/intro.mp4"
                            ## for DPI screen
                            #VIEWER = "/opt/retropie/configs/all/PieMarquee2/omxiv-marquee /tmp/marquee.txt -f -b -d 4 -t 5 -T blend --duration 900 > /dev/null 2>&1 &"
                            ## for Pi4 hdmi1
                            VIEWER = "/opt/retropie/configs/all/PieMarquee2/omxiv-marquee /tmp/marquee.txt -f -b -d 7 -t 5 -T blend --duration 900 > /dev/null 2>&1 &"
                            
                            arcade = ['arcade', 'fba', 'mame-advmame', 'mame-libretro', 'mame-mame4all']
                            
                            def run_cmd(cmd):
                            # runs whatever in the cmd variable
                                p = Popen(cmd, shell=True, stdout=PIPE)
                                output = p.communicate()[0]
                                return output.decode()
                            
                            def kill_proc(name):
                                ps_grep = run_cmd("ps -aux | grep " + name + "| grep -v 'grep'")
                                if len(ps_grep) > 1: 
                                    os.system("killall " + name)
                                    
                            def is_running(pname):
                                ps_grep = run_cmd("ps -ef | grep " + pname + " | grep -v grep")
                                if len(ps_grep) > 1:
                                    return True
                                else:
                                    return False
                            
                            def get_publisher(romname):
                                filename = romname+".zip"
                                publisher = ""
                                for item in root:
                                    if filename in item.findtext('path'):
                                        publisher = item.findtext('publisher')
                                        break
                                if publisher == "":
                                    return ""
                                words = publisher.split()
                                return words[0].lower()
                                
                            if os.path.isfile(INTRO) == True:
                                ## for DPI screen
                                #run_cmd("omxplayer --display 4 " + INTRO)
                                ## for Pi4 hdmi1
                                run_cmd("omxplayer --display 7 " + INTRO)
                            
                            doc = ET.parse("/opt/retropie/configs/all/PieMarquee2/gamelist_short.xml")
                            root = doc.getroot()
                            
                            if os.path.isfile("/home/pi/PieMarquee2/marquee/system/maintitle.mp4") == True:
                                ## for DPI screen
                                #os.system("omxplayer --loop --no-osd --display 4 /home/pi/PieMarquee2/marquee/system/maintitle.mp4 &")
                                ## for Pi4 hdmi1
                                os.system("omxplayer --loop --no-osd --display 7 /home/pi/PieMarquee2/marquee/system/maintitle.mp4 &")
                            else:
                                os.system("echo '/home/pi/PieMarquee2/marquee/system/maintitle.png' > /tmp/marquee.txt")
                                os.system(VIEWER)
                            
                            cur_imgname = "system/maintitle"
                            
                            while True:
                                sleep_interval = 1
                                ingame = ""
                                romname = ""
                                sysname = ""
                                pubpath = ""
                                instpath = ""
                                imgpath = ""
                                ps_grep = run_cmd("ps -aux | grep emulators | grep -v 'grep'")
                                if len(ps_grep) > 1: # Ingame
                                    ingame="*"
                                    words = ps_grep.split()
                                    if 'advmame' in ps_grep:
                                        sysname = "arcade"
                                        romname = words[-1]
                                    else:
                                        pid = words[1]
                                        if os.path.isfile("/proc/"+pid+"/cmdline") == False:
                                            continue
                                        path = run_cmd("strings -n 1 /proc/"+pid+"/cmdline | grep roms")
                                        path = path.replace('/home/pi/RetroPie/roms/','')
                                        if len(path.replace('"','').split("/")) < 2:
                                            continue
                                        sysname = path.replace('"','').split("/")[0]
                                        if sysname in arcade:
                                            sysname = "arcade"
                                        romname = path.replace('"','').split("/")[-1].rsplit('.', 1)[0]
                                elif len(run_cmd("ps -aux | grep 'layer 10010' | grep -v 'grep'")) > 1 : # Video screensaver (OMXplayer)
                                    ps_grep = run_cmd("ps -aux | grep 'layer 10010' | grep -v 'grep'")
                                    if len(ps_grep) > 1 :
                                        words = ps_grep.split()
                                        pid = words[1]
                                    if os.path.isfile("/proc/"+pid+"/cmdline") == False:
                                        continue
                                    path = run_cmd("strings -n 1 /proc/"+pid+"/cmdline | grep mp4")
                                    if len(path.replace('"','').split("/")) < 2:
                                        continue
                                    sysname = path.replace('"','').split("/")[-3]
                                    if sysname in arcade:
                                        sysname = "arcade"
                                    romname = path.replace('"','').split("/")[-1].rsplit('.', 1)[0]
                                    sleep_interval = 0.5
                                elif os.path.isfile("/tmp/PieMarquee.log") == True: # Extended ES
                                    f = open('/tmp/PieMarquee.log', 'r')
                                    line = f.readline()
                                    f.close()
                                    words = line.split()
                                    if len(words) > 1 and words[0] == "Game:": # In the gamelist-> Game: /home/pi/.../*.zip
                                        path = line.replace('Game: ','')
                                        path = path.replace('/home/pi/RetroPie/roms/','')
                                        sysname = path.replace('"','').split("/")[0]
                                        if sysname in arcade:
                                            sysname = "arcade"
                                        romname = path.replace('"','').split("/")[-1].rsplit('.', 1)[0]
                                        sleep_interval = 0.1 # for quick view
                                    elif len(words) == 1:
                                        sysname = "system"
                                        if words[0] == "SystemView":
                                            romname = "maintitle"
                                        else:
                                            romname = words[0]
                                else:
                                    sysname = "system"
                                    romname = "maintitle"
                            
                                if os.path.isfile("/home/pi/PieMarquee2/marquee/" + sysname  + "/" + romname + ".png") == True:
                                    imgname = sysname + "/" + romname
                                    if ingame == "*":
                                        publisher = get_publisher(romname)
                                        if os.path.isfile("/home/pi/PieMarquee2/marquee/publisher/" + publisher + ".png") == True:
                                            pubpath = "/home/pi/PieMarquee2/marquee/publisher/" + publisher + ".png"
                                        if os.path.isfile("/home/pi/PieMarquee2/marquee/instruction/" + romname + ".png") == True:
                                            instpath = "/home/pi/PieMarquee2/marquee/instruction/" + romname + ".png"
                                elif os.path.isfile("/home/pi/PieMarquee2/marquee/system/" + sysname + ".png") == True:
                                    imgname = "system/" + sysname
                                else:
                                    imgname = "system/maintitle"
                            
                                if imgname+ingame != cur_imgname: # change marquee images
                                    ps_grep = run_cmd("ps -aux | grep 'maintitle.mp4' | grep -v 'grep'")
                                    if len(ps_grep) > 1 :
                                        words = ps_grep.split()
                                        pid = words[1]
                                        os.system("ps -aux | grep maintitle.mp4 | awk '{print $2}'| xargs kill -9")
                                    ##kill_proc("omxplayer.bin")
                                    if imgname == "system/maintitle" and os.path.isfile("/home/pi/PieMarquee2/marquee/system/maintitle.mp4") == True:
                                        ## for DPI screen
                                        #os.system("omxplayer --loop --no-osd --display 4 /home/pi/PieMarquee2/marquee/system/maintitle.mp4 &")
                                        ## for Pi4 hdmi1
                                        kill_proc("omxiv-marquee")
                                        os.system("omxplayer --loop --no-osd --display 7 /home/pi/PieMarquee2/marquee/system/maintitle.mp4 &")
                                        cur_imgname = imgname+ingame
                                    else:
                                        '''
                                        f = open("/tmp/marquee.txt", "w")
                                        if pubpath != "":
                                            f.write(pubpath+"\n")
                                        f.write("/home/pi/PieMarquee2/marquee/" + imgname + ".png")
                                        if instpath != "":
                                            f.write("\n"+instpath)
                                        f.close()
                                        '''
                                        if os.path.isfile("/home/pi/PieMarquee2/marquee/custom/" + romname  + ".txt") == True and ingame == "*":
                                            os.system("cp /home/pi/PieMarquee2/marquee/custom/" + romname  + ".txt /tmp/marquee.txt")
                                        else:
                                            imgpath = "/home/pi/PieMarquee2/marquee/" + imgname + ".png"
                                            if ingame == "*":
                                                if pubpath != "":
                                                    imgpath = pubpath+"\n"+imgpath
                                                if instpath != "":
                                                    imgpath = imgpath+"\n"+instpath
                                            os.system('echo "' + imgpath + '" > /tmp/marquee.txt')
                                        sleep(0.2) 
                                        if is_running("omxiv-marquee") == False: # if omxiv failed, execute again
                                            os.system("clear > /dev/tty1")
                                            os.system('echo "' + imgpath + '" > /tmp/marquee.txt')
                                            os.system(VIEWER)
                                        cur_imgname = imgname+ingame
                            
                                sleep(sleep_interval)
                            
                            D BuZzB 2 Replies Last reply Reply Quote 0
                            • D
                              dmmarti @bob1961
                              last edited by

                              @bob1961 Hmm.....strange.

                              I wonder what the passed rom filename that the PieMarquee2 script is trying to match on then?

                              I have it setup on my Pi 4 also so I'll make a cfg file for arkanoid and do some testing and see if it breaks for me too.

                              B 1 Reply Last reply Reply Quote 0
                              • B
                                bob1961 @dmmarti
                                last edited by

                                @dmmarti
                                yes let me know.
                                I use the .cfg files to switch my trackball to a spinner. only 2 lines in those files

                                input_player1_mouse_index = "0"
                                config_save_on_exit = false

                                AshpoolA 1 Reply Last reply Reply Quote 0
                                • BuZzB
                                  BuZz administrators @bob1961
                                  last edited by BuZz

                                  @bob1961 The code is not readable due to formatting. Please use markdown and three backticks ``` above and below any logs/code snippets posted directly to the forum.

                                  i have edited your post.

                                  To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                                  1 Reply Last reply Reply Quote 0
                                  • AshpoolA
                                    Ashpool @bob1961
                                    last edited by Ashpool

                                    @bob1961 ~~As a workaround, have you tried renaming your Marqueefiles for those games to ###.cfg.png ?

                                    Another workaround (just from a brief scann of the script) is maybe something like:

                                    Edit: Code removed, as it would not have worked... Same reason why my idea above wouldn't work also :/ From my understanding now/so far the author derieves the romname by striping just the rightmost extension from the filename (see below)... so, maybe name.extension.png could work for the cfg cases(?) (ie. arkanoid.zip.png (or arkanoid.7z.png)), that is assuming that the script captured arkanoid.zip.cfg as the filename.

                                    romname = path.replace('"','').split("/")[-1].rsplit('.', 1)[0]
                                    

                                    Without further knowledge of the script and in hopes that it may not break other things, replacing the rsplit with just a split could eventually work (before "name.ex1.ex2.ex3" would become "name.ex1.ex2", with a split instead it would become "name"... maybe to test it (before replacing all occurences of aboves .rsplit('.',1) with a .split('.')), you could add a

                                        romname = romname.split(".")[0]
                                    

                                    above that line:

                                        if os.path.isfile("/home/pi/PieMarquee2/marquee/" + sysname  + "/" + romname + ".png") == True:
                                    

                                    be sure to align the inserted line with the if clause (keep the intention level (4 spaces) for the code block). ... Maybe it's worth a try...
                                    And if that is working and it is in some cases needed to keep filenames with further dots in it, the script could be modified with something like replacing the romname = path.replace*** with romname = get_romname(path) and then defining the function get_romname to strip any existing .cfg from the name before the "final" split is made...

                                    B 1 Reply Last reply Reply Quote 0
                                    • B
                                      bob1961 @Ashpool
                                      last edited by

                                      @Ashpool just to let everyone know, the author posted a revised file on that github site to fix this.
                                      Nevertheless, appreciate everyone's attempts to help me with this. Cheers!

                                      1 Reply Last reply Reply Quote 0
                                      • First post
                                        Last post

                                      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.