RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    Announcing Pegasus Frontend

    Scheduled Pinned Locked Moved Ideas and Development
    frontendpegasusc++developmentqml
    1.7k Posts 145 Posters 5.1m 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.
    • fluffypillowF
      fluffypillow
      last edited by

      @EctoOne @Darksavior then for now I'll leave the ES2 downloaded_images as it currently, and change only the media dir searching. We'll see how that turns out then.

      @Darksavior Actually I did play with the idea of making a scraper, but then started working on Pegasus :) Some kind of external scraper support will likely be added in the future though.

      @nemo93

      1. Yes, a reload function is planned, but that will require some more work on the whole data loading. It'll certainly come in some form in the future.
      2. Hm, a cursor should only appear if the OS detects a plugged in mouse device. Perhaps some controllers are also detected as having mouse components (eg. the DS4's touch pad)? You can list the connected devices with ls -l /dev/input/by-id in the terminal, see if there's anything funny there. Other than that, defining the environmental variable QT_QPA_EGLFS_HIDECURSOR can also hide the cursor (eg. add export QT_QPA_EGLFS_HIDECURSOR=1 to ~/.bashrc or to the top of /opt/retropie/configs/all/autostart.sh). [Side note, does RetroPie load .bashrc on start?]
        3-4. Thanks for the detailed testing! I think the video-related issues are caused by GStreamer, the playback backend used on Linux (at least, that tend to produce warnings during playback). I'm afraid I can't do too much about that other than waiting for upstream improvements, but playback limiting could be indeed added as a workaround. I wonder if there's any other GStreamer-using video player available for the Pi (Banshee? Parole?), so we could see if the issue happens there too.
      E 1 Reply Last reply Reply Quote 0
      • E
        EctoOne @fluffypillow
        last edited by EctoOne

        @fluffypillow Would it be possible to add an option to ignore subfolders for certain systems?
        Then a folder layout like this would be possible without the need to enter the subfolders:

        /system
         /game1
          game1.zip (or whatever rom extension)
          game1.xml (contains the basic metadata for that particular game)
          boxart.jpg
          thumb.jpg
          logo.png
          video.mp4
        /game2
          game2.zip
          game2.xml
          boxart.jpg
          thumb.jpg
          logo.png
          video.mp4
        

        Again, this is an available option in Kodi when you link an movie folder to your database. I currently don't want that for any paths, just to hide subfolders for certain systems (if they are not declared in the gamelist).
        Since I currently don't know how gamelists are created by Pegasus, I use ES as example to make one. That's why I want to have the xml files in the rom folder so that they can be combined by a script or directly with Pegasus (whatever is possible) . So whenever you remove/add a game by adding its folder you can re-run the script to rebuild/clean the gamelist. Only downside would be to loose information for lastplayed and playcount (but I personally don't care for those anyway).

        A simple xml would then look like this:

        
        	<game>
        		<path>./game1/game1.zip</path>
        		<name>game1</name>
        		<desc>game1 description</desc>
        		<image>./game1/folder.jpg</image>
        		<marquee>./game1/logo.png</marquee>
        		<video>./game1/video.mp4</video>
        		<thumbnail>./game1/game1.jpg</thumbnail>
        		<rating>0</rating>
        		<releasedate>19910101T000000</releasedate>
        		<developer>someone</developer>
        		<publisher>someone else</publisher>
        		<genre>pewpew</genre>
        	</game>
        

        Setting up new files would then require only to change the paths and the file name of the rom.

        This it a suggestion for easier game management and not necessarily for media paths.

        fluffypillowF 1 Reply Last reply Reply Quote 0
        • fluffypillowF
          fluffypillow @EctoOne
          last edited by fluffypillow

          @ectoone So if I understand correctly, you'd like to keep the one game = one directory setup, and generate the gamelist-equivalent for Pegasus with a script, right? This is possible; first you'd create a collections.txt file under /system/ (in your example above):

          collection: My Games
          extension: zip
          launch: myemulator "{file.path}"
          

          Then you'd have a metadata.txt (or whatever you'd like to call it) in each of your game directories, like this:

          file: $CWD/game1.zip
          title: Game 1
          description: The #1 of Games
          assets.boxFront: $CWD/boxart.jpg
          assets.video: $CWD/video.mp4
          rating: 99%
          release: 1991-01-01
          developer: Someone
          publisher: Someone Else Ltd.
          genre: pewpew
          

          Then you'd run a script that goes through these small metadata files, replaces a piece of text with with the path to the game directory and merges the results together into a /system/metadata.txt file. Something like this:

          #! /bin/bash
          
          rm metadata.txt
          for i in $(find $(pwd) -name metadata.txt); do
          	sed "s|\$CWD|$(dirname $i)|g" $i >> metadata.txt
          	echo >> metadata.txt
          done
          

          In this example I've used $CWD as something that will be replaced with the file's path. You can use whatever you want, or, if you're good with regex, you could actually use just a dot too and tweak the command accordingly.

          (The file format itself is documented here.)

          E 1 Reply Last reply Reply Quote 0
          • E
            EctoOne @fluffypillow
            last edited by

            @fluffypillow I'm a noob when it comes to write scripts but yes, I believe you understood what I meant.
            My question still is, what will show up in Pegasus afterwards. A bunch of folders with the corresponding games or just the games?
            If it's the later that would be perfect.

            fluffypillowF 1 Reply Last reply Reply Quote 0
            • fluffypillowF
              fluffypillow @EctoOne
              last edited by

              @ectoone Just the games :) You can use the script above as-is (save it as eg. get-meta.sh under /system/) or you can use the following one-liner after cding into /system/:

              rm metadata.txt; for i in $(find $(pwd) -name metadata.txt); do sed "s|\$CWD|$(dirname $i)|g" $i >> metadata.txt; echo >> metadata.txt; done
              
              1 Reply Last reply Reply Quote 1
              • fluffypillowF
                fluffypillow
                last edited by

                I've just made a script that converts the current media layout to the new one, you can get it here. Copy it next to the media dir, make it executable (chmod +x convert_media.py) and run from there (./convert_media.py). It will ask for confirmation before changing anything, but you might want to backup/zip your current media dir first.

                1 Reply Last reply Reply Quote 0
                • N
                  nemo93
                  last edited by

                  Thanks @fluffypillow. I do confirm that I had a wireless keyboard/mouse combo connected to my Pi hence the cursor! Your workaround works nicely. Regarding the player to be honest I don't know. Seems like OMXplayer is the other player available for the Pi but not sure it's as flexible as Gstreamer. I'm wondering if the fact most of my previews are running at 60fps can be a cause of the crash.

                  1 Reply Last reply Reply Quote 0
                  • S
                    SephirothX2004
                    last edited by

                    I have Pegasus running great on my android phone however i would like to request the ability to have different wallpapers for each system if at all possible.

                    1 Reply Last reply Reply Quote 0
                    • fluffypillowF
                      fluffypillow
                      last edited by

                      @nemo93 sorry for the late reply; 60fps shouldn't be a problem, unless GStreamer itself has a related bug (haven't found bug reports about that yet, but could happen). Another thing I suspect is perhaps the Pi is getting a bit hot, causing the playback to crash. Or maybe the system runs out of memory (and/or VRAM). I think if you launch Pegasus through SSH, you might be able to see GStreamer warnings, that might help.

                      @SephirothX2004 the default theme shows the screenshot for the selected game (if there's any). There's no built-in way to change that, however, it's possible to change the the default theme to load a custom image instead (but that'll need some minor coding).

                      1 Reply Last reply Reply Quote 0
                      • fluffypillowF
                        fluffypillow
                        last edited by

                        And this week's update has just landed:

                        • Breaking Change: the way assets are searched in the media dirs is changed to the model described here, ie. assets for a particular game are now stored under media/<gamename>/)
                        • A script for converting the current layout can be found here
                        • ES2's downloaded_images will continue to work, even with the "Pegasus-exclusive" asset types

                        Meanwhile I've also started working on themes, and almost finished porting the ES2 Simple theme:

                        img

                        T halfmanhalfcakeH 2 Replies Last reply Reply Quote 2
                        • T
                          tronkyfran @fluffypillow
                          last edited by

                          @fluffypillow WOW!!!!Awesome work as always!! It will have carousel for system selection? Having some more example themes will be a game changer for theme makers(at least for those with less programming savvy as me).
                          Thanks!!!!

                          fluffypillowF 1 Reply Last reply Reply Quote 0
                          • fluffypillowF
                            fluffypillow @tronkyfran
                            last edited by

                            @tronkyfran yup, that part works too, here's a video: https://my.mixtape.moe/bdfxqx.webm (made mostly out of memory, so may not be 100% accurate). Also using this as a template, it would be possible to port pretty much every ES2 theme to Pegasus too.

                            T 1 Reply Last reply Reply Quote 1
                            • halfmanhalfcakeH
                              halfmanhalfcake @fluffypillow
                              last edited by

                              @fluffypillow Amazing work. Look forward to more themes.

                              1 Reply Last reply Reply Quote 0
                              • T
                                tronkyfran @fluffypillow
                                last edited by

                                @fluffypillow I was thinking about that port possibility. It would be as easy as make a little script to convert to Pegasus format or are you planning ES theme "support" out of the box? In any case It would multiply the theme choices forma pegasus

                                fluffypillowF 1 Reply Last reply Reply Quote 0
                                • fluffypillowF
                                  fluffypillow @tronkyfran
                                  last edited by

                                  @tronkyfran technically it would be possible to automate the porting, but I'm not sure I want to deal with all the possible cases an ES theme might have (at least for now, we'll see later). I do plan to make the Simple theme commented instead though, so it could be used as a template for further porting.

                                  1 Reply Last reply Reply Quote 1
                                  • fluffypillowF
                                    fluffypillow
                                    last edited by

                                    Ok, I think the theme is ready for a public release, I've just uploaded it here, give it a try!

                                    What's missing:

                                    • help prompts
                                    • scrolling descriptions
                                    • filtering/searching
                                    • page up/down in the game list

                                    Also I've just noticed that unlike in the previous video, background doesn't scroll in real ES2, but I've left it as is (it's more fun this way). The theme code is not really trivial, so I've added a bunch of comments. Feel free to tweak things!

                                    T 1 Reply Last reply Reply Quote 1
                                    • T
                                      tronkyfran @fluffypillow
                                      last edited by tronkyfran

                                      @fluffypillow OMG! going to test it RIGHT NOW. That theme template is GOLD for me :D
                                      Just one more question, this is a bit crazy and absolutely not a request, but ....now that retroarch is "avaiable" on nintendo switch, do you think it would be theoretically possible to port pegasus there? I have zero knowledge about the hardware, the only thing I know is that its TEGRA based.
                                      Again, Thanks for your work!!!!

                                      fluffypillowF 1 Reply Last reply Reply Quote 0
                                      • fluffypillowF
                                        fluffypillow @tronkyfran
                                        last edited by

                                        @tronkyfran Yes, in theory it's possible, but I don't have a Switch :)

                                        T 1 Reply Last reply Reply Quote 0
                                        • T
                                          tronkyfran @fluffypillow
                                          last edited by

                                          @fluffypillow said in Announcing Pegasus Frontend:

                                          @tronkyfran Yes, in theory it's possible, but I don't have a Switch :)

                                          Mmmmmm, thats one thing we should fix soon enough

                                          1 Reply Last reply Reply Quote 0
                                          • J
                                            Jste84
                                            last edited by

                                            Has anyone been able to get this working on Android? I'm struggling :(

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