Pegasus FE Android Tutorial

Introduction 

GameOS – The ultimate Pegasus theme
This tutorial is for the glorious emulator frontend called Pegasus FE, and my goal is to help other android users, more importantly Nvidia Shield users, bask in all its glory.

I usually get my info for emulator frontends based on whatever ETA Prime recommends, but for some reason he refuses, and I MEAN REFUSES to touch this one. I’ve asked him several times and know when to give up. 😉 It has me baffled, because this frontend gets updated all the time, and can be used on the Pi as well.

I found this one on accident while following a rabbit hole in relation to a launchbox theme creation.  Pegasus FE, is in every meaning of the word, a contender and can run with all the big dogs. So when ETA throws you another half dead, updated 3 times a year Frontend instead, please ask him to address this one too.

I have a video preview of it which can be seen here, but I must say my camera left much to be desired and I plan on creating a new video now that I know I can screen capture with my shield.

The beginnings

 

Okay. So this tutorial will explain how I set everything up on my Nvidia Shield to get a nifty emulation home console in my living room. If anyone has any questions please reach out to me, I will do my best to help out!

I have the 2019 pro edition of the shield. I am pretty sure most of them are 64 bit. If you purchase one that is not, I do not believe you will be able to emulate any of the Gamecube hardware so please keep that in mind. The Dolphin emulator requires a 64 bit android device. You can pair a bunch of video game controllers to this thing, and they are really plug in play, but I have the default shield gaming controller paired with my system.

My roms are kept on an external HDD which the shield reads from. The HDD I use does not require an external power source and draws its power directly from the shield which is amazing. I am constantly moving this thing all over the house and its just one less set of cords to deal with. I suggest you do the same. =)

There is some leg work with a personal computer as well. I use a cheap Lenovo laptop to create the file structures and configuration files for the FrontEnd. For that I use a program called Skraper (http://skraper.net/) a retrogaming scraping software to download and generate all of your artwork in a way that it can be read by Pegasus FE. There is not much to this extra step so please don’t be intimidated by it.

RetroArch

Ok next we want to install the RetroArch application on our Nvidia shield. This is something offered to us through the slimmed down google play store specifically for the Nvidia Shield. Search for it and install it. It’s that simple. RetroArch  is the foundation of all your emulators. You can in essence load your roms and play them through RetroArch and nothing more, but where is the fun in that? The goal is to make things look pretty and that’s where the guide will come in handy. After this install is done, run Retro Arch and start downloading cores. These cores are the emulators if you did not know. 

The cores I used are as follows:

  • Sega – MS/GG/MD/CD (Genesis Plus GX)
  • Sony – Playstation (Beetle PSX HW)
  •    

  • Nintendo – Game Boy / Color (SameBoy)
  • Nintendo – Game Boy Advance (mGBA)
  • Nintendo – NES / Famicom (Mesen)
  • Nintendo – Nintendo 64 (Mupen64Plus-Next GLES3)
  • Nintendo – SNES / SFC (bsnes) 
  • Nintendo – DS (melonDS)    
  • Arcade (FinalBurn Neo)
  • Next to your settings and designate Vulcan as your primary emulator driver.

  • Settings > Drivers > Video > vulkan.
  • Sets the preferred driver to Vulkan. It appears to run some of the more challenging systems better.

    My controller was automatically recognized by RetroArch, and so was the xbox controller I plugged in. But you will want to do some quick mapping to access a few features while in the game. 

    In RetroArch go to: 

  • Settings > Input > Port 1
  • Here I had to set hot keys to exit RetroArch (returning you to the Frontend) and a key to bring up RetroArch while inside the game so I could access save and load states. I mean how else would I ever beat those incredibly tough NES games? It’s pretty self explanatory. They ask you what buttons you would like to press to exit to the menu. For me it was a rapid press of the left thumb stick 3x in a row. It then saves your input and maps it to RetroArch. There are other hotkey options as well you can define such as direct save and load.  

    The great thing about RetroArch are these “cores”. Instead of setting up 10 emulators to run alongside our Frontend, we use 1, RetroArch. We set everything up once and that’s it. So each emulator core uses the same overlay, hotkeys, menu system,  controller configuration and more. I wish this was around in the late 90s when I 1st started getting into console emulation. We can use independent emulators if we want to, and in this case I have for a few emulators that run better or do not have Retroarch cores, but that also requires outside upkeep on that emulator and separate configuration outside of the scope of RetroArch. Something to keep in mind.

    The Gamecube emulator Dolphin

    Remember when I said most of the emulators play well enough under RetroArch? There is one exception. The Gamecube emulator, Dolphin. I have found downloading the stand alone Dolphin emulator from the official repository rather than using the RetroArch core, gives me a much better compatibility for my games. In fact, after tweaking, it can handle all of the games I have cared to throw at it! This requires you to do some separate configuration work inside Dolphin to sync up your controller and tie into Pegasus FE.

    Pegasus FE – the best looking frontend option android has to offer

    We need to install the Pegasus FE on our Shield. To do this we need to install the APK file, something that does not come from the playstore as of yet. At least not the verson found in the Shield.This you need to install the APK directly from the program creators website which can be found here: (https://pegasus-frontend.org/)

    For it to work you have to allow apps from insecure sources in Settings -> Security. When you try and install the app it will prompt you to do this so there is  no need to mess with that setting now if you wish not to.  

    Next is to download some themes for Pegasus FE. You can download these from Github and then extract them to your computer. From there you can transfer them to your HDD. This is a good time to get into the Pegasus file structure on your Android device. At any rate, download a theme of your choice and extract it to the themes folder located at

  • /storage/emulated/0/pegasus-frontend/themes/
  • Next boot up Pegasus FE and enter the settings by pressing B. Then select your theme. While the default theme looks great, and so do many others, I am a big fan of the theme called GameOS which is updated often and can be found here: (https://github.com/PlayingKarrde/gameOS) The, author, “PlayingKarrde” is incredibly helpful and resourceful so if you have any theme related questions you can find him on the official Pegasus Discord channel.

    So enter the options menu and then:

  • General > Theme.
  • Afterwards restart.

    Scraping your rom collection

    This is where I was turned off, and eventually turned on, with Pegasus FE. I was disappointed to learn that this frontend did not scrape your game metadata, logos, screenshots and video files. It felt like going back in time, to a date when we had to do this ourselves. It IS TIME CONSUMING. Launchbox has a great scraper built right in and it ties to their own amazing database. So yeah, it sounds crazy that we have to do this ourselves with Pegasus FE.

    But they referred me to Skraper and all was right in the world again.

    So if you visit my hard drive you will find my roms in a layout similar to most:

    roms
    ├── Nintendo NES
    │   ├── SuperMario.zip
    │   ├── Super Mario 2.zip
    │   ├── Super Mario 3.zip
    │   ├── Zelda.zip
    │   ├── Zelda II.zip
    ├── Sega Dreamcast
    │   ├── Crazy Taxi.zip
    │   ├── Ecco the Dolphin.zip
    │   ├── Soul Calibur.zip
    │   ├── Street Fighter III.zip

    So when Pegasus views these directories, they want every folder to have a file called “metadata.pegasus.txt” which details the available games as well as their location. My Dreamcast, NES, SNES and other rom folders each have to have their own “metadata.pegasus.txt”  file. There is not much to it, and this is where Skraper comes in.

    Visit Skraper.net and use their amazing web services to download all of your metadata, artwork, videos and more. All you need to do is create an account over there and start downloading. There is not much to it. And I do have to say it was a tad bit faster than the Launchbox database when downloading gigabytes of data. I mean this service correctly grabbed data and art for EVERY game in my collection. Around 7 thousand games. Not one hiccup.

    The web interface is easy enough to use. When scraping your folders, select “generic rom” as your system, as this is your custom build.

    You then use the interface to select your rom folder, and it in return picks up every system inside that folder.

    You want to then create a gamelist (which we will soonly convert to our metadate file).

    Tick expert mode and then create an EmulationStation gameslist.xml.

    Then you select which types of art you wish to download for each game. In my case I selected

  • box 2d
  • wheel  
  • video
  • screenshot
  • fanart
  • Then I let it run for a few hours. It downloaded EVERY asset for every game. I mean that’s it. We are almost there! After that I had my gamelist.xml and a separate media folder for each system,

    Finish setting up pegasus

    The final step is to configure Pegasus. Remember the gameslist.xml file we generated for each system through Skraper? We just have to make that file readable by Pegasus FE. For this we use an online tool. Found here: (https://pegasus-frontend.org/tools/convert/)

    Simply upload (or copy and paste) the xml data from your gameslist.xml, and then save the new text file as metadata.pegasus.txt. Do this for each system you have, and place each file in the root of your system directory. 

    Almost done. Lastly you have to add a header to each file, something you paste at the top of each “metadata.pegasus.txt” file.

    A header would look as follows

    collection: Nintendo
    shortname: nes
    extensions: zip
    launch: am start
      –user 0
      -n com.retroarch/.browser.retroactivity.RetroActivityFuture
      -e ROM “{file.path}”
      -e LIBRETRO /data/data/com.retroarch/cores/nestopia_libretro_android.so
      -e CONFIGFILE /storage/emulated/0/Android/data/com.retroarch/files/retroarch.cfg
      -e IME com.android.inputmethod.latin/.LatinIME
      -e DATADIR /data/data/com.retroarch
      -e APK /data/app/com.retroarch-1/base.apk
      -e SDCARD /storage/emulated/0
      -e DOWNLOADS /storage/emulated/0/Download
      -e SCREENSHOTS /storage/emulated/0/Pictures
      -e EXTERNAL /storage/emulated/0/Android/data/com.retroarch/files
      –activity-clear-top

    There really isn’t much to change. As long as you are using RetroArch for your emulator, the next systems header is almost exactly the same. The only thing you are changing in the next header is the short name and the LIBRETRO core. You can look up the core names here: (https://buildbot.libretro.com/nightly/android/latest/arm64-v8a/) and the short names here:(https://github.com/PlayingKarrde/gameOS/tree/1.0.6/assets/images/logospng). Just make sure you downloaded the appropriate core through RetroArch or Pegasus FE will be looking for something that is not there.

    When making my Sega Genesis header the only changes I made were as follows:

    collection: Sega Genesis
    shortname: genesis
    extensions: 7z, zip
    launch: am start
      –user 0
      -n com.retroarch/.browser.retroactivity.RetroActivityFuture
      -e ROM “{file.path}”
      -e LIBRETRO /data/data/com.retroarch/cores/genesis_plus_gx_libretro_android.so
      -e CONFIGFILE /storage/emulated/0/Android/data/com.retroarch/files/retroarch.cfg
      -e IME com.android.inputmethod.latin/.LatinIME
      -e DATADIR /data/data/com.retroarch
      -e APK /data/app/com.retroarch-1/base.apk
      -e SDCARD /storage/emulated/0
      -e DOWNLOADS /storage/emulated/0/Download
      -e SCREENSHOTS /storage/emulated/0/Pictures
      -e EXTERNAL /storage/emulated/0/Android/data/com.retroarch/files
      –activity-clear-top

      
    There isn’t anything to it. You are only making a few edits per file. The only time it varies is when you are using an emulator outside of RetroArch cores. In my case the Gamecube emulator was the only one I used with a variance. The header for this is as follows:

    collection: Gamecube
    shortname: gc
    extensions: zip
    launch: am start –user 0 -a android.intent.action.MAIN
        -n org.dolphinemu.dolphinemu/.ui.main.MainActivity
        –es AutoStartFile “{file.path}”

    This is looking into the android launch parameters to tell it to the dolphin emulator open from the command inside of Pegasus FE. As we speak I am decompiling Citra apk (a Nintendo DS emulator) to figure out how to link it to a Pegasus FE launch. If anyone knows anything please let me know. 

    Well that’s about it. Please DO not feel overwhelmed by this, as there really is not a lot here. I set up my entire system in just one day, and its so rock solid I let my kids play with it all of the time. I would love to help, so if you need any help please do not hesitate to ask!!

    About

    Check Also

    Mesen2 Git (2024/12/25)

    Mesen2 Git (2024/12/25) is compiled. Mesen is a NES/Famicom emulator and NSF player. It is …

    One comment

    1. Just a heads up, Citra’s a 3DS emulator, not a DS one.

    Leave a Reply