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 6.0m 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.
    • P
      prefor
      last edited by

      I have a few problems with this front-end. Don't get me wrong, so far this is the best looking Front-end I've used for Android, and that it includes Video snaps and the layout is gorgeous!

      I'm using this on Android

      However I have these two problems:

      1. I'm using GameOS theme with this front-end and it looks good!
        However 60% of the time when I launch a game (NES game in this case) through Pegasus Front-end using Retroarch, Retroarch just crashes and redirects me back to Pegasus Front-end...
        And also when I launch a game the navigation bar shows up in Retroarch for some reason, which I can't remove.. Maybe that's the cause of the crashing? :/

      Here is a crash log i get from Retroarch: https://del.dog/dunimuriph.txt
      And here is a picture of what I mean about Navigation bar: https://i.imgur.com/cByCchc.jpg

      1. The second problem I noticed is when I tried to install this on another phone. For some reason I can't set game directories. It's all empty no matter which folder I open. Does someone knows why? I have granted permission on Pegasus-frontend to use and read file storage etc, but it stills happen. Does anyone knows why? :(
        Here is a picture of what I mean: https://i.imgur.com/DWP4PgG.jpg
      fluffypillowF 1 Reply Last reply Reply Quote 0
      • M
        msheehan79
        last edited by

        @fluffypillow I have a question around theme development. Is there a means within QML to identify when Pegasus is first being loaded up vs. when Pegasus has just returned from launching a game? From what I can gather the Component.onCompleted is usually where any logic is stored that executes when the theme finishes loading, but that triggers both on initial startup as well as after a game ends.

        The use case I could envision is trying to control where Pegasus first lands on startup, for example to always display a specific home page or specific collection as a starting point, but I would not want to redirect there after launching every game, in those cases I would want to return the user to the last viewed collection etc.

        PlayingKarrdeP 1 Reply Last reply Reply Quote 0
        • PlayingKarrdeP
          PlayingKarrde @msheehan79
          last edited by

          @msheehan79 said in Announcing Pegasus Frontend:

          @fluffypillow I have a question around theme development. Is there a means within QML to identify when Pegasus is first being loaded up vs. when Pegasus has just returned from launching a game? From what I can gather the Component.onCompleted is usually where any logic is stored that executes when the theme finishes loading, but that triggers both on initial startup as well as after a game ends.

          The use case I could envision is trying to control where Pegasus first lands on startup, for example to always display a specific home page or specific collection as a starting point, but I would not want to redirect there after launching every game, in those cases I would want to return the user to the last viewed collection etc.

          What I do is store a variable when I launch the game and then check for it in Component.onCompleted, then clear it from memory.

          // Launch the current game
              function launchGame(game) {
                  if (game !== null) {
                      saveCurrentState(game);
                      game.launch();
                  } else {
                      saveCurrentState(currentGame);
                      currentGame.launch();
                  }
              }
          
              // Save current states for returning from game
              function saveCurrentState(game) {
                  api.memory.set('savedState', root.state);
                  api.memory.set('savedCollection', currentCollectionIndex);
                  api.memory.set('lastState', JSON.stringify(lastState));
                  api.memory.set('lastGame', JSON.stringify(lastGame));
                  api.memory.set('storedHomePrimaryIndex', storedHomePrimaryIndex);
                  api.memory.set('storedHomeSecondaryIndex', storedHomeSecondaryIndex);
                  api.memory.set('storedCollectionIndex', currentCollectionIndex);
                  api.memory.set('storedCollectionGameIndex', storedCollectionGameIndex);
          
                  const savedGameIndex = api.allGames.toVarArray().findIndex(g => g === game);
                  api.memory.set('savedGame', savedGameIndex);
          
                  api.memory.set('To Game', 'True');
              }
          
              // Handle loading settings when returning from a game
              property bool fromGame: api.memory.has('To Game');
              function returnedFromGame() {
                  lastState                   = JSON.parse(api.memory.get('lastState'));
                  lastGame                    = JSON.parse(api.memory.get('lastGame'));
                  currentCollectionIndex      = api.memory.get('savedCollection');
                  storedHomePrimaryIndex      = api.memory.get('storedHomePrimaryIndex');
                  storedHomeSecondaryIndex    = api.memory.get('storedHomeSecondaryIndex');
                  currentCollectionIndex      = api.memory.get('storedCollectionIndex');
                  storedCollectionGameIndex   = api.memory.get('storedCollectionGameIndex');
          
                  currentGame                 = api.allGames.get(api.memory.get('savedGame'));
                  root.state                  = api.memory.get('savedState');
          
                  // Remove these from memory so as to not clog it up
                  api.memory.unset('savedState');
                  api.memory.unset('savedGame');
                  api.memory.unset('lastState');
                  api.memory.unset('lastGame');
                  api.memory.unset('storedHomePrimaryIndex');
                  api.memory.unset('storedHomeSecondaryIndex');
                  api.memory.unset('storedCollectionIndex');
                  api.memory.unset('storedCollectionGameIndex');
          
                  // Remove this one so we only have it when we come back from the game and not at Pegasus launch
                  api.memory.unset('To Game');
              }
          
              // Set default state to the platform screen
              Component.onCompleted: { 
                  if (fromGame)
                      returnedFromGame();
              }
          
          M 1 Reply Last reply Reply Quote 0
          • M
            msheehan79 @PlayingKarrde
            last edited by

            @playingkarrde Ah! That makes sense. Set it during the launch command and unset it when you come back. Wasn't sure if there was any native way to detect it, but managing it with a variable indeed looks like a solid approach. Thanks for the advice!

            1 Reply Last reply Reply Quote 0
            • GrilaG
              Grila
              last edited by

              Hi @fluffypillow . I recently received my Retroid Pocket 2 and am in the process of setting up with Pegasus. The RP2 comes with 2 versions of RetroArch, a up to date version and an older 1.5.0 version that is specifically for playing GBA.

              My problem is that I can launch the up to date version thru Pegasus, but when I try to launch a GBA game with the 1.5.0 version of RetroArch it just exits immediately and returns me to Pegasus. (The 1.5.0 version works correctly if I load roms directly in RetroArch)

              Here's my GBA metadata file and my lastrun.log

              My guess is it has something to do with the launch parameters, but I've rooted the RP2 and double checked all the directories and they are correct.

              If you have any suggestions it would be appreciated. Thanks!

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

                @prefor Sorry for the late reply!

                Retroarch just crashes and redirects me back

                That seems like a crash on RetroArch's side, maybe it expects some launch parameter it doesn't receive? Could you upload your metadata file and the Pegasus log (<storage>/pegasus-frontend/lastrun.log)?

                For some reason I can't set game directories

                Yeah, that looks like a permission issue. Could you try the very latest version? Try going up (..) as far as you can, on the top you will find all the storages Android allows Pegasus to use.

                @Grilli Yeah, it likely requires a different launch command, but that's hard to tell without the exact source code. Is there a practical reason to use the older version? The latest official stable version is 1.9, according to the RetroArch site, which should also support playing GBA.

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

                  "Weekly" update! This month there were lots of small fixes, following the data source rewrites from last time, Android updates, lots of new languages and the usual general improvements:

                  • Added support for having multiple metadata files in a directory: similarly to the global metafiles directory, Pegasus can now see all files with .metadata.pegasus.txt or .metadata.txt extensions
                  • Improved Android 11 support
                  • Added Chinese (zh-TW) translation (thanks kenjivo1!)
                  • Added Bosnian, Dutch and British English translations (thanks SecularSteve!)
                  • Updated German translation (thanks SecularSteve!)
                  • Fixed a crash on Android
                  • Fixed portable mode issues
                  • Fixed missing metadata for games present in multiple collections
                  • Fixed ES2 games missing in certain cases
                  • Fixed some log messages and typos
                  • Linux: Fixed Markdown files not getting installed with make install
                  • Updated the Android metadata generator page with new emulators and corrected the commands for some others
                  • Updated the documentation and fixed some typos
                  sergioadS P 2 Replies Last reply Reply Quote 4
                  • sergioadS
                    sergioad @fluffypillow
                    last edited by

                    @fluffypillow I can not wait to see a possible future RetroPie release with Pegasus by default

                    1 Reply Last reply Reply Quote 1
                    • P
                      Patientgamerfr @fluffypillow
                      last edited by

                      @fluffypillow Thank again for this wonderful frontend !

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

                        Happy new year update! The winter holidays are over, and so I've also continued the development with some updates.

                        Main changes:

                        • Added support for WebP and animated PNG image formats: themes now have the ability to use, and optionally, to enable animation on them (Note: APNG images should have .apng file extension to work)
                        • GOG support is now turned on by default again
                        • Minor Android improvements

                        Theme changes:

                        • You can now use WebP and APNG images: similarly to GIFs, the QML AnimatedImage element (https://doc.qt.io/qt-5/qml-qtquick-animatedimage.html) can be used to display them animated, and the regular Image to display still images

                        Tool changes:

                        • Updated the RetroArch command on the Android metadata generator page

                        Notes for maintainers:

                        • WebP support requires Qt's imageformats module with WebP support
                        • APNG support requires libpng with animation support (ie. the "APNG patch"). libpng might come from various sources (system/Qt/other library/custom), but this feature may not be enabled on them - to avoid breaking builds, APNG support in Pegasus is NOT enabled by default. You can define the ENABLE_APNG QMake variable to enable support. For the same reason, Pegasus also does NOT try to link to libpng automatically. Similarly to SDL2, you can use the PNG_LIBS and PNG_INCLUDES QMake variables to affect the build.
                        1 Reply Last reply Reply Quote 2
                        • P
                          pootis spencer
                          last edited by

                          Is it possible to start Pegasus on a category such as Arcade?

                          1 Reply Last reply Reply Quote 0
                          • H
                            h2805270
                            last edited by

                            https://pegasus-frontend.org/docs/user-guide/meta-files/

                            It seems kind of "exhausting" to add all of the game lists manually to Pegasus.

                            So I propose a few ideas:

                            • A simple GUI program that let's you make metadata files much more easily on OSes. Instead of doing it the old fashioned way:
                            # Selects all files with the provided extension, except two games
                            collection: Super Nintendo Entertainment System
                            shortname: snes
                            extensions: 7z, bin, smc, sfc, fig, swc, mgd, zip, bin
                            ignore-file: buggygame.bin
                            ignore-file: duplicategame.bin
                            launch: snes9x "{file.path}"
                            
                            # A collection of 3 games. They're also part of 'My Games'.
                            collection: Platformer games
                            files: mario1.bin
                            files: mario2.bin
                            files: mario3.bin
                            
                            # A regex example; includes games with '[number]-in-1' in their name.
                            collection: Multi-game carts
                            regex: \d+.in.1
                            
                            • An auto-detect program that you drop in where you want it to find the games based on very simple "[systemname].txt" files stored in the ROM folders themselves (and [emulatorname].txt for the emulators)

                            • Better integration with RetroArch that converts everything you already set up in libretro, and uses Pegasus to open it.

                            But those are just my suggestions, let the debate commence.

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

                              @h2805270 There's actually a GUI tool for metafiles (even if it's a bit simple): https://github.com/mmatyas/pegasus-metadata-editor

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

                                Hi!
                                It would be possible to install pegasus on a chromecast with google tv? in theory its just an android underneath, but Im not really sure. Well, anyway I bought one and will try this weekend, so ill tell you if I succeed, just wanted to know if anybody tried it beforehand. Thx for your work @fluffypillow !!!!

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

                                  @tronkyfran Yep, it works!!!!!

                                  1 Reply Last reply Reply Quote 0
                                  • GrilaG
                                    Grila @Grila
                                    last edited by

                                    @grila said in Announcing Pegasus Frontend:

                                    Hi @fluffypillow . I recently received my Retroid Pocket 2 and am in the process of setting up with Pegasus. The RP2 comes with 2 versions of RetroArch, a up to date version and an older 1.5.0 version that is specifically for playing GBA.

                                    My problem is that I can launch the up to date version thru Pegasus, but when I try to launch a GBA game with the 1.5.0 version of RetroArch it just exits immediately and returns me to Pegasus. (The 1.5.0 version works correctly if I load roms directly in RetroArch)

                                    Here's my GBA metadata file and my lastrun.log

                                    My guess is it has something to do with the launch parameters, but I've rooted the RP2 and double checked all the directories and they are correct.

                                    If you have any suggestions it would be appreciated. Thanks!

                                    I've found the solution for this for anyone in the future that needs it:

                                    collection: Nintendo GameBoy Advance
                                    shortname: gba
                                    extensions: gba, zip
                                    
                                    #For the Retroid Pocket 2 special version of RetroArch for GBA
                                    
                                    launch: am start --user 0
                                      -n com.gpsp/com.retroarch.browser.retroactivity.RetroActivityFuture
                                      -e ROM {file.path}
                                      -e LIBRETRO /data/user/0/com.gpsp/cores/gpsp_libretro_android.so
                                      -e CONFIGFILE /storage/emulated/0/Android/data/com.gpsp/files/retroarch.cfg
                                      --activity-clear-top
                                    1 Reply Last reply Reply Quote 0
                                    • T
                                      tronkyfran
                                      last edited by

                                      I've got a beginners question.
                                      Im surfing the pegasus wave on my new Chromecast right now, but I lost track on how to scrape and generate metadata files for a bunch of roms(roughly 3 systems and 100 roms per system). I know how to do it the "hard" way(via documentation) but dont want to get into it and realize one week later that there is an easier way. Im looking for something too easy?

                                      Thanks in advance!!!

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

                                        @tronkyfran Skyscraper has built-in Pegasus support, and the Generic Emulator output of Skraper can also be loaded (though that doesn't have the emulator launch informations).

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

                                          Also a minor weekly update!

                                          • Fixed storage access issues on Android 10
                                          • Fixed games not present in metadata file collections
                                          • Added Arabic translation (thanks phwright!)
                                          • Updated the list of automatically recognized gamepads
                                          • Linux: Fixed out of date APT repository packages
                                          • Themes: Updated the Famicom Beach theme with authentic animated fire (thanks SecularSteve!)
                                          1 Reply Last reply Reply Quote 0
                                          • FlyingTomahawkF
                                            FlyingTomahawk
                                            last edited by FlyingTomahawk

                                            I'm a bit at a loss here and require some help regarding ScummVM and game images and metadata.
                                            I have setup Pegasus with Retroarch and a few standalone emulators on my old Win10 Laptop.
                                            laptop specs are i5-2410M, 8GB RAM, Intel HD3000 on board graphics

                                            I was able to setup NES, SNES, MegaDrive and so on with ease using Retroarch and Skraper.
                                            Now I am trying for hours to get the images to show for my ScummVM games. Screenscraper is currently down so I thought I'll add the data for those 3-4 games myself inside the metadata.pegasus.txt file.
                                            But for some reason that I can't seem to find or see it won't load any images nor any game info like description.
                                            Usually Pegasus recognizes the folder structure by itself and loads the correct images and metadata. But right now I get this

                                            alt text

                                            The games run just fine using ScummVM as standalone, not as core from Retroarch. ScummVM starts and loads the game which I choose using the following launch command inside the metadata file

                                            collection: ScummVM
                                            extension: residualvm(residualvm), scummvm(scummvm), svm, zip
                                            launch: C:\Users\***\Desktop\Pegasus\Emulators\scummvm\scummvm.exe -c C:\Users\***\AppData\Roaming\ScummVM\scummvm.ini {file.basename}
                                            

                                            Even if I remove anything else but the launch command code games will run. which is strange because I'm using the variable {file.basename} which would mean it takes the name without extension from file: monkey2.svm, right? Even if i remove monkey2.svm the game will launch and run just fine. So not sure where {file.basename} takes the name from. But removing {file.basename} will only launch ScummVM menu without any game loaded.

                                            Anything else I add into that metadata file has no visual effect on the pegasus frontend. Even if I use the assets paths directly it won't show anything.

                                            My file structure is like this (example with monkey island 2)

                                            Pegases/Roms/scummvm/Monkey Island 2/monkey2.svm
                                            Pegases/Roms/scummvm/Monkey Island 2/MONKEY2.000
                                            Pegases/Roms/scummvm/Monkey Island 2/MONKEY2.001
                                            Pegases/Roms/scummvm/Monkey Island 2/MT32_CONTROL.ROM
                                            Pegases/Roms/scummvm/Monkey Island 2/MT32_PCM.ROM
                                            Pegasus/Roms/scummvm/metadata.pegasus.txt
                                            Pegasus/Roms/scummvm/media/box2dfront/monkey2.png
                                            Pegasus/Roms/scummvm/media/screenshots/monkey2.jpg
                                            Pegasus/Roms/scummvm/media/videos/monkey2.mp4
                                            Pegasus/Roms/scummvm/media/wheels/monkey2.png

                                            Any metadata info I add to the metadata.pegasus file doesn't seem to have any effect except for the launch code.
                                            Adding metadata like this won't show at all in the front-end

                                            game: Monkey Island 2: LeChuck's Revenge
                                            file: monkey2.svm
                                            developer: LucasArts
                                            publisher: LucasArts
                                            genre: Adventure
                                            description:
                                              Guybrush Threepwood, the mighty pirate who can hold his breath for ten minutes, could have lived quietly and happily with his sweetheart Elaine, the governor of Melee Island. But the restless pirate spirit won't let Guybrush in peace. Things don't go very well with Elaine, and Guybrush (now with a beard) embarks on a new adventure: searching for the legendary treasure of Big Whoop. However, the evil ghost pirate LeChuck hasn't left the stage yet. His subordinates are trying to bring him back from the dead one more time. Will Guybrush be able to defeat his archenemy again?
                                            release: 1992-01-01
                                            players: 1
                                            

                                            Is there something I missed regarding paths or setup for ScummVM? Any help is appreciated. Thanks

                                            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.