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.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.
    • D
      dudleydes @fluffypillow
      last edited by

      @fluffypillow Thanks for the info. I have updated the mapper file so that I can switch between themes and navigate them with my controller.

      I have also updated the flixnet theme and the RetroPie menu icons now appear. I used ImageMagick to resize the icons to a 16:9 aspect ratio. @HurricaneFan I can confirm that gamelists and boxart from ES2 work fine without any further work.

      On exiting Pegasus, there is a segmentation fault and the error evdevkeyboard: Failed to query led states in the lastrun.log. I don't know if this is an issue.

      I would like to play around with themes as I would prefer to have box art in the flixnet theme rather than grid icons. Do you have any links that may be useful to get to grips with QML?

      Finally what does Live Theme Reload refer to? And how do I get the clock in the corner?

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

        @dudleydes "On exiting Pegasus, there is a segmentation fault": yeah it's quite annoying, but luckily not critical. Some underlying component seems to crash at exit sometimes; I'd suspect one of the GStreamer plugins. I'll see if I can find out what fails exactly.

        Personally I've found most QML guides somewhat lacking/incomplete (at least if you wish to build a full program from the ground up), but the language isn't hard and you can get the hang of it after a while. There's a short tutorial here and a longer one here (mainly chapters 4-6), and the QML documentation is useful as well when you have to look up a component. In practice you won't need to know that much to create a simple theme, but you can also make it very fancy if you wish.

        Live Theme Reload

        Well I've planned to add a function to reload the current theme on a key press (eg. F5), but I haven't implemented it yet.

        And how do I get the clock in the corner?

        Heh yeah that's still missing, I'll start experimenting with it the weekend.

        D 1 Reply Last reply Reply Quote 0
        • D
          dudleydes @fluffypillow
          last edited by

          @fluffypillow Thanks for the links. Can I use Qt Creator on my Linux Mint desktop to create a theme?

          No rush on the Theme Reload or the clock. I think learning QML will keep me occupied.

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

            @dudleydes sure, I'm using Qt Creator too, it works really well for Qt/QML projects.

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

              Weekly recap:

              • added support for calling scripts before and after launching a game
              • added support for suffix-less video file assets
              • the Flixnet theme can now use box art images

              Other than that, I was tidying up the source code; this should make it easier to read, extend and test it in the future.

              D 1 Reply Last reply Reply Quote 2
              • D
                dudleydes @fluffypillow
                last edited by

                @fluffypillow After spending the past week looking at using the Linux Joystick Mapper program (loadmap) with the Pegasus Frontend, I don't believe it will work seamlessly as I would've hoped. After running a rom and exiting back to Pegasus, if I then try to exit Pegasus, then Pegasus reloads and I cannot use my PS3 controller. I can usually exit Pegasus with a keyboard and in the console, there will be the following messages relating to the earlier attempt to exit Pegasus:

                evdevmouse: Could not read from input device (No such device)
                Gamepad: Could not read from input device (No such device)
                evdevkeyboard: Could not read from input device (No such device)
                evdevkeyboard: Failed to query led states
                

                This is an issue for users who share their PS3 controller between their Pi and their console or other device(s). With the Linux Joystick Mapper program, it's not possible to unplug the controller from the Pi and then replug it and expect it to work. The loadmap process must be killed and restarted for the controller to work in Pegasus. What I have been doing is to have a script to kill loadmap in the quit scripts folder so that I can exit Pegasus and then am free to unplug my controller.

                I'm thinking using xboxdrv is a better solution and then maybe create a udev rule to force Pegasus to use js1 while xboxdrv is running. Having looked through some documentation, I really have no idea how to get started.

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

                  @dudleydes I think I can get a PS3 controller for testing this weekend. I have a few ideas to improve the gamepad handling, I'll see if I can solve this problem. Ideally Pegasus should work without any udev hacks.

                  After running a rom and exiting back to Pegasus, if I then try to exit Pegasus, then Pegasus reloads

                  You mean, you press Quit, and instead of quitting, Pegasus restarts? How did that happen? :) Or you mean after Pegasus reloads, you cannot quit, because you can't use the PS3 controller?

                  DarksaviorD D 2 Replies Last reply Reply Quote 0
                  • DarksaviorD
                    Darksavior @fluffypillow
                    last edited by

                    @fluffypillow hopefully analog can work as well.

                    AkiAfrooA 1 Reply Last reply Reply Quote 0
                    • AkiAfrooA
                      AkiAfroo @Darksavior
                      last edited by

                      i still dont know how to run pegasus on windows. (when launch show me black screen) what i could read is because need a setup file or i have to indicate where to look. (thats the problem i have.)

                      i have my emulationstation full configure any tips where/how start. ?

                      thanks in advance.

                      1 Reply Last reply Reply Quote 0
                      • D
                        dudleydes @fluffypillow
                        last edited by

                        @fluffypillow In the hope that you may be able to replicate the issue of Pegasus reloading when I select to Exit Pegasus from the Quit menu, here is my set-up.

                        I have a PS3 controller connected by USB and a Rii mini wireless keyboard plugged into the pi.

                        I have built the Linux Joystick Mapper binary and placed it in the /home/pi/joymap/ folder for testing purposes. In the same folder, I have the mapper file, pegasus.map.

                        In the folder home/pi/.config/pegasus-frontend/scripts, I have placed a kill-joymap.sh script in the game-start and quit folders and start-joymap.sh in the game-start folder.

                        You can find copies of all of these files at my gist.

                        To replicate the issue, I launch a rom and then exit back to Pegasus. From the Quit menu in Pegasus, I choose to Exit Pegasus. The console will briefly appear before Pegasus restarts. I have included a copy of lastrun.log when this happens in the gist.

                        My thinking is that the line Gamepad: Could not read from input device (No such device) in the lastrun.log suggests that, for some reason, the PS3 controller is not available. Because of this, the Linux Joystick Mapper program fails to run and the PS3 controller can't be used in Pegasus after it has restarted.

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

                          @AkiAfroo Pegasus looks for the ES2 directory .emulationstation in you home dir, C:/Documents and Settings/Username/ on Windows. You can override the home dir by defining the environmental variable PEGASUS_HOME before launching Pegasus (HOME is also supported). The easiest way to do that is to create a .bat file, eg. launch.bat with the following content:

                          set PEGASUS_HOME=C:/some/directory
                          pegasus-fe.exe
                          
                          

                          and start Pegasus using this script. The directory you set PEGASUS_HOME to should contain the .emulationstation folder. You can use whatever editor you like for creating the file (Notepad should be fine too).

                          @dudleydes Thanks for the detailed report! It seems the exit issue is caused by your start-joymap.sh, where you launch a new instance of Pegasus. When you exit from that, it is when your script actually ends, and thus the original Pegasus is restored.

                          D 1 Reply Last reply Reply Quote 0
                          • D
                            dudleydes @fluffypillow
                            last edited by

                            @fluffypillow Thanks for the reply. I can see the logic now and how the start-joymap.sh script would be starting a new instance of Pegasus each time I exited a rom. Not the most efficient way of doing things!

                            I searched online how to run commands in the background and found that removing the command to launch Pegasus in start-joymap.sh but leaving the ampersand should work. I have tested this and it seems to work fine.

                            AkiAfrooA 1 Reply Last reply Reply Quote 0
                            • AkiAfrooA
                              AkiAfroo @dudleydes
                              last edited by

                              @fluffypillow thanks i will try as soon as..

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

                                @dudleydes I was just playing around with multiple PS3 controllers, and noticed that you can run xboxdrv in daemon mode, which should solve the reconnection issues. I've launched it like this:

                                sudo xboxdrv --detach-kernel-driver --mimic-xpad -s --next-controller -D --dbus disable
                                

                                There was a bug in xboxdrv where unplugged controllers didn't un-register themselves, but that was fixed in version 0.8.6. You might want to try that if you have troubles.
                                Also you can see a bunch of debug information if you set the env var QT_LOGGING_RULES="qt.gamepad=true" before launching Pegasus.

                                D 1 Reply Last reply Reply Quote 0
                                • D
                                  dudleydes @fluffypillow
                                  last edited by

                                  @fluffypillow Thanks for this. I shall take a look at it.

                                  The issue regards xboxdrv wasn't unplugging and replugging the PS3 controller. It was more that it couldn't be used in Pegasus and in emulators. A possibility would be to reconfigure the controller running with xboxdrv but I have spent a lot of time configuring my PS3 controller, often for individual games such as DOS games, so I'd rather not go through that again.

                                  I have the Linux Joystick Mapper program working as I would like now. I can exit Pegasus to the CLI without it restarting and I have placed a copy of my original start-joymap.sh script in the home folder, renaming it start-pegasus.shso that I can launch Pegasus with the mapper program from the command line, much in the way ES2 is launched by running the command emulationstation. I have done further testing in launching games that require xboxdrv or the Linux Joystick Mapper and everything is working fine with no conflicts.

                                  xboxdrv is probably the better solution as it can already be installed from the RetroPie script (incidently it's version 0.8.8 that is installed). It's just a case of being able to use the PS3 controller with xboxdrv in Pegasus and the default configurations in the emulators. If you find a solution then let me know. I'd be happy to test and, if successful, demonstrate to interested users how to set up the Pegasus frontend.

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

                                    @fluffypillow Ive got a question about a possible functionality of this frontend:
                                    Ive had to leave on standby one new theme because of the daunting task of converting so many scraped images(Game covers) into a different perspective. The fact is that if I had something like a "cornerpin" function and an add Mode for mixing images it would be really easy and people could use their scraped images. I know Im maybe asking for too much, thx for your work.

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

                                      @tronkyfran you can rotate every UI element by all three axes ("3D-like"), around a custom point, and you can scale horizontally and vertically. You can also write custom OpenGL shaders, which would allow you to do pretty much anything with a picture.

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

                                        Every UI element means vídeo preview box is included? If thats right them I just would need to test if the raspberry gives enough performance to run my theme, awesome!!!

                                        fluffypillowF lilbudL 2 Replies Last reply Reply Quote 1
                                        • fluffypillowF
                                          fluffypillow @tronkyfran
                                          last edited by

                                          @tronkyfran yup, including the video. You can also animate these properties, making things spinning or moving things around the screen. Or make people feel dizzy :)

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

                                            @tronkyfran said in Announcing Pegasus Frontend:

                                            enough performance to run my theme

                                            Wait, are you making a theme for Pegasus? how?

                                            Creator of the Radiocade: https://retropie.org.uk/forum/topic/6077/radiocade

                                            Backlog: http://backloggery.com/lilbud

                                            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.