Announcing Pegasus Frontend
-
Ok, here is the current concept for Pegasus' own config and metadata files. This is something I wouldn't want to change once it's implemented so feel free to share your opinions. There's also a GitHub issue here.
How it works
Pegasus will store a list of directories that will be checked for games/roms. In every of such directory, there should be a file that describes (one or more) collections, and another that describes metadata for each game. The proposed name for them is
collections.pegasus.txt
andmetadata.pegasus.txt
.File format
As a user (of my own program in this case), I want a simple text file in simple, readable format, that I can edit on any platform with any (minimally competent) text editor. I don't want to care about implementation details: I'm not going to hunt missing XML-tags, curly braces, semicolons or tabs/spaces. However, it must support Unicode text, multiline values and simple lists. It should be easy to edit and extend, yet something that doesn't take forever to read by the program.
Here's a more technical definition of the format, with examples for both the collections and metadata file further below. It was mainly inspired by the INI, Debian-control and nodejs-ini/npmrc formats, so some things might be familiar:
- the files are in Unicode (UTF-8 encoded without BOM)
- both the Unix and Windows-style line endings are supported, with Unix being preferred
- the file is processed line by line
- lines starting with
#
or;
are comments, and empty lines are ignored - a file contains one or more sections, and sections are defined as
[sectionname]
- sections contain settings, which are in
option = value
form - lines starting with spaces or tabs are concatenated to the previous option's value
- if an option name ends with
[]
(ie.option[] = value
), thenoption
will be treated as a list, andvalue
will be added to it as an element
Ok, let's see how that applies to the two files:
Collections file
The collection file defines one or more collections. You can select which files belong to a collection either by filtering for file extension (
extensions
), listing the file names (files[]
), or using regular expressions (regex
). Removing files from the collection can be done similarly, but with theignore-
prefix. If a collection is defined in multiple directories (with the same section name), the separate collections are merged into one (eg. a collection for all Zelda games but on different platforms).explanation line # file contents define a new collection called nes
1 [nes]
collections can have a proper name 2 name = Nintendo Entertainment System
I want it to include all .nes
files3 extensions = nes
except the following games 4 ignored-files[] = mybuggygame.nes
and 5 ignored-files[] = myduplicategame.nes
the launch command 6 launch = myemulator ${FILEPATH}
empty line to look fancy 7 define a new collection called mario
8 [mario]
with a name 9 name = Mario games
I want it to contain these files 10 files[] = Super Mario Bros.nes
and 10 files[] = Super Mario Bros 2.nes
and also 10 files[] = Super Mario Bros 3.nes
if the launch command was already defined for a file by a previous collection, I don't need to repeat it, so I'm commenting this line out 11 # launch = myemulator ${FILEPATH}
optional empty line 12 let's say I'm interested in having a collection of multi-game pirate cartridges 13 [pirate-multigame]
in case you forgot or don't want to name
the collection, the section name will be used14 name = Multi-game Pirate Carts
I want to include all files whose name contain "<somenumbers>-in-1"; regular expressions can be used if you're familiar with them (you can find tutorials on the net) 15 regex = \d+.in.1
So that was the collections file; let's see the metadata now.
Metadata file
Every file can have its own section where the metadata is defined.
explanation line # file contents section names are the file names 1 [Super Mario Bros.nes]
some metadata 2 title = Super Mario Bros.
3 developer = Nintendo
4 publisher = Nintendo
5 genres[] = platformer
6 players = 1-2
a multiline text example 7 description = This is a really really long,
lines starting with spacing will get appended to description
8 multiline description, in fact it's so long
9 it spans three lines!
a short summary of (one paragraph or about 3-4 sentences) 10 summary = Hello, I'm a short summary,
11 I'll just stop at being two lines long.
12 # cloneof = filename.nes
year(-month(-date)) (lexical order) 13 release = 1985-09-13
14 rating = 86%
custom launch command to override the one set by a collection 15 # launch = myemulator -someflag ${FILEPATH}
the format can be extended with additional fields, prefixed with x-
; they may not be used by Pegasus, but other tools can add additional informations with it16 x-scraper-source = somescraper.com
17 x-retroarchievements-id = 123456
Aand that's the metadata file.
So this is roughly the format I'm planning. What do you think?
(this post got a bit long, sorry about that)
PS. Example files without comments
[nes] name = Nintendo Entertainment System extensions = nes ignored-files[] = mybuggygame.nes ignored-files[] = myduplicategame.nes launch = myemulator ${FILEPATH} [mario] name = Mario games files[] = Super Mario Bros.nes files[] = Super Mario Bros 2.nes files[] = Super Mario Bros 3.nes [pirate-multigame] name = Multi-game regex = \d+.in.1
[Super Mario Bros.nes] title = Super Mario Bros. developer = Nintendo publisher = Nintendo genres[] = platformer players = 1-2 description = This is a really really long, multiline description, in fact it's so long it spans three lines! summary = Hello, I'm a short summary, I'll just stop at being two lines long. release = 1985-09-13 rating = 86% x-scraper-source = somescraper.com x-retroarchievements-id = 123456
-
Great work. A couple of questions...
-
Is there a requirement to state the images in the metadata file? or can we continue to use the .../media folder as we do currently?
-
I assume this method of config files can be used to open windows (.exe) games?
-
How will pegasus know what directories to look for?
-
-
- The media directory will continue to work, there are no fixed asset fields in the metadata format at the moment. I could imagine some extended asset support in the future though.
- Yes, you can either set the launch command for each game separately, or list the path to the game exes in a collection, then use
${FILEPATH}
as the launch command. You probably don't want to use exe as an extension due to some games have multiple of them. - There'll be an option for that in Pegasus (eventually), and the search directories will be stored in the program's settings file. Other sources like the ES2 systems.cfg could also be used.
-
@fluffypillow if i was the one developing pegasus, i'd make it use the exact same format as emulationstation. That would ensure perfect compatibility, and it would be much easier for everyone to switch between ES and pegasus with no need to manually add thousands of games to a gamelist or create a custom scraper just for pegasus.
-
I was also thinking; what happens to us with perfect scraped and described games now, after this is implemented? Do we have to start all over again?
-
@hi-ban personally I don't like XML as a user-side data format, and I'm willing to differ in that. The ES2 compatibility will still be available though (that is, this config file style is optional), and I'm also planning to create conversion tools between the two formats.
@AndersHP not at all, I'd like to create some tools for conversion between the two formats, like scripts for on-device conversion and also a webpage for when you're scraping on PC. My scraped data is in the ES2 files too, after all :)
-
Am I the only one, who cannot get the runcommand menu to work from Pegasus? Game just boots. I have to goto Emulationstation to switch settings for roms, then return to Pegasus afterwards...
-
@andershp I never had an issue. I did have an issue now that I can't run pegasus at all if it's transferred from pc to pi. It warns me about some security hole ueid or something..
Installing pegasus from retropie-setup works. I just had to point autostart to the pegasus location.
-
@AndersHP seems to work fine for me, on a Pi 3 running an older RetroPie install. I'll check if it happens with the latest version. Do you see anything weird in the logs of Pegasus or runcommand?
@Darksavior interesting, can you check the exact warning message? There was also a
Permission denied
error report some time ago, and it turned out users cannot launch executables on NTFS file systems by default. -
@AndersHP also works fine on an updated RetroPie, hmm.
-
Also the weekly changelog (or rather, a summary):
- large number of internal changes, as a base for future updates (post)
- new config file proposal (post)
In addition, I've just added theme reloading support (with F5); will likely come handy in the future. And since we've also reached alpha4+100, I've reset the counter, we're now in the alpha 5 phase (yay!).
-
@fluffypillow I still get a permission denied trying to run it if transferring manually. Pegasus transfers with 644 permissions from windows to my pi. I need to change it to 777, and then it works.
I checked now and I don't get the "security hole" error anymore. The only different things I've done was updating retropie and deleting any old pegasus config entries when I decided to make things easier to just install it from retropie-setup and add THAT location to autostart. So now I'm running pegasus from
/opt/retropie/supplementary/pegasus-fe/
Any chance that config might also allow users to adjust the tile rows?
-
@Darksavior The number of rows visible depends on the images and your screen size. Since that's the direction you scroll, I don't plan to limit their count.
I you mean columns thought, yes, I'd like theme-specific settings in the future, where things like this could be tweaked.
-
In extension of an update to Retroarch 1.6.9 going bad, I have to either go back to my backup of 1.6.7 or try a fresh install.. But I just realized that the downloaded_images folder is on the sd-card... Sorry if this is slightly offtopic, but still a bit related to Pegasus:
-
will moving the entire scrapings to the USB with the ROMS (yes, running roms off USB) slow pegasus down instead of having these on the sd? In the future, it could be cool to have scrapings and roms together, in case I need to start all over (again).
-
If no to above's speed question: Is there a way to move these maaaaany many files a fast way? I can only access the sd when it's placed in the pi, through Filezilla, putting it in my mac only shows very few folders and files.
-
-
@AndersHP Unfortunately, yes, loading is currently slower if your assets are on USB (Pegasus checks which files are accessible, and that's slow). However, this could be improved, and it's exactly something I plan to fix in one of the next updates.
As for Mac, apparently there's something called OSXFuse you can use to mount ext4 file systems. No idea if it works though. -
@fluffypillow Thanks for the reply. I will stay with Retroarch 1.6.7 until your next updates then.
-
Anyone else in here experiencing problems with Retroarch 1.6.9 stated here?
It would be nice to know if this is related to Pegasus.
-
@andershp said in Announcing Pegasus Frontend:
Anyone else in here experiencing problems with Retroarch 1.6.9 stated here?
It would be nice to know if this is related to Pegasus.
No. Everything is fine here. I must've updated Pegasus last week from retropie setup if it matters.
-
@AndersHP Pegasus doesn't touch your emulators, and can only run when you launch it. If the problem occurs using other frontends or when Pegasus isn't even installed, I assume the problem is caused by something else.
You've mentioned it works fine with RetroArch 1.6.7 but slows down with 1.6.9, looking at the changelogs (1, 2), I see lots of changes; perhaps some of them are causing you trouble? Or maybe during the update to 1.6.9, something got wrong (eg. during the build)? -
In this thread I can confirm that my issues are gone after a simple .cfg file deletion and regenerating.
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.