How To Create Favorites System in Retropie (yes system, not folder!)
-
Ok, so maybe this has been done before on Retropie running emulationstation, and if it has, i apologize for providing this information. I know I have seen this on Recall Box for sure, so i am assuming others know how to do this, but there has been a lot of talk about favorites, and favorite folders and sorting favorites and I have searched about a system for favorites, and did not have any luck, so tonight I decided I was going to figure it out, and it was actually pretty easy. SO if this new information, keep on reading!
Warning - backup your system before modifying these files. I highly recommend making a copy of all of these files as well so that if you have an issue you can place the originals back on your system.
-
go to
/home/pi/RetroPie/roms
and create a new folder named: "favorites" -
Add roms from any system you would like to this folder, that is right ANY rom, any system! (i will provide some files for download as a starter, the example only supports mame (all mame emulators included in the arcade system), fba, NES, and Genesis/Mega Drive.
-
Go to your favorite theme and choose a system to copy, copy the folder and rename it "favorites" this will create a duplicate of that system including logos so you will need to edit that if you can. This is the hardest part of the process. I suggest finding a favorites.png and replacing the current logo.png file in that theme folder. If you use my ComicBook Theme I have provided the favorites folder (Work In Progress) in the download link. Just copy the folder from the link into the comic book theme and it will work for you with the correct logo and background!
-
Create a favorites folder for our conifgs and retroarch files:
a) go to/opt/retropie/configs
create a new folder named "favorites"
b) copy the files in the folder "copy these to cofigs folder" from the download link into the new favorites folder. Alternatively you can create them yourself.
----b.1) Copy the arcade folder and rename it "favorites". Open "retroarch.cfg" modify line 3 - delete "arcade" and replace with "favorites" it should look like this:
input_remapping_directory = "/opt/retropie/configs/favorites/"
----b.2) Open emulators.cfg within the favorites folder. This is where we need to add in the emulators we want to be able to run and launch in our new Favorites System. In the folder in the download i have added lr-fceumm, lr-nestopia (for NES) and lr-genesis-plus-gx and lr-picodrive (for genesis). To add other systems, simply open any system folder within/opt/retropie/configs/
and open the emulator.cfg file. Copy the entire system line for each emulator and paste into the file in your favorites folder. Be sure not to copy thedefault =
line as we only can have one default set in the folder. -
Edit your es_systems.cfg file.
/etc/emulationstation/
ALWAYS make a backup of the original and I suggest you copy the es_systems.cfg file to the following location/home/pi/.emulationstation
edit the es_systems.cfg in this location. Copy and paste the following into the file:<system> <name>Favorites</name> <fullname>Favorites</fullname> <path>/home/pi/RetroPie/roms/favorites</path> <extension>.fba .zip .FBA .ZIP .smd .nes</extension> <command>/opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ favorites %ROM%</command> <platform>all</platform> <theme>favorites</theme> </system>
-
Now for the boring explanation of what you see above and how it works:
a) the <path> is the path to the roms folder we created in step 1 above.
b) the <extension> are all of the file types of the roms you want to have in your favorites folder. For this example I am only using the Arcade, NES and Genesis/Mega Drive systems as stated above. This is the location you will need to add all other extensions for any other rom types. These will need to match with the emulators we added above in step 4.b.2. Eventually i am going to add all emulators in mine so I have the ability to add any roms I want.
c) the <command> is telling the startup to use the favorites folder we just created in step 4 to launch the rom using the runcommand.
d) <platform>you can put just about anything in there, some things might use this, i think the naming for the new screensaver build might use this line?
e) <theme> this directs the sytem to display the "favorites" folder from within your theme. We created this in step 3.
OK, when you have done all of this. Restart Emulationstation. You should now be able to find Favorites as an option in your system selection menu. Go into the menu and select any game. It would be a good idea to know what system your game is from for this step. When the rom launches you will need to press "A" button and enter into the emulator selection menu. Select the emulator that matches the rom you are trying to launch. Site back and enjoy.
You will have to select the emulator for each rom the first time you launch it. This is because there are so many emulators in the system.
As long as you have already configured your controls for the emulator, i do not think you will need to reconfigure them as the "Core" should sill be referenced by the emulator itself. I have not extensively tested this yet.
That is it! I have successfully done this to my build with no issues. Please test it out and let me know if it works, or if there are ways to improve this. I am more of an "Art" guy as @meleu likes to call us, and this is one of my first larger attempts and modifying how the system itself works, but since it is all .xml and .cfg files, it isn't to bad. What might be fun is if I could get help and suggestions on how we can create a script or change in ES to allow us to set the rom as a favorite from the roms main system, and the rom gets copied into the favorites folder! That might be a stretch! Again, please provide comments. Here is the link to the files and theme folder: mega link
Edit: this does not just have to be just for favorites, it can be for anything. I am going to make one for just TMNT games and a TMNT system background in the theme! I might do a Mario, sonic, and fighters one as well! Just change the name from Favorite to whatever you want.
-
-
I don't know when I'll have a chance to test this, but thank you for all your work putting it together, and more people need to see it.
I was considering setting up a System for "series/franchises" which would have sub folders for mario, batman, spiderman etc. Pro is keeping them all in one place so they don't clutter up the carousel. Con is I can't style each one separately.
-
@TMNTturtlguy
This an awesome work around for something I extremely wish we had.How's it going being green?
-
-
@mattrixk you could have fun with it! Make MARIO wear a batsuit and mix and match character costumes!
-
-
-
@lilbud did you have any issues setting up your MARIO System? Were the instructions pretty easy to follow?
-
@TMNTturtlguy Thanks for posting. I did this quite a while ago and decided to organize the "Favorites" into subfolders by consoles. (See this thread:https://retropie.org.uk/forum/topic/4233/sub-folders-default-emulators). All worked well but never really found a way to automate the emulator per rom used which can be a pain if you add lots of favorite roms. It would be great to somehow automate this with a script from the run command that would copy the rom to the "Favorites" console and set the emulator per rom automatically per rom.
-
@TMNTturtlguy Only having to manually select the emulator for each rom. I tried to create a batch script to automatically select the emulator for the rom extension. But it never worked... probably cause I don't know how to code.
-
@lilbud yeah, that is the downside. I tried to read through the runcommand file to see if I could figure it out, but it is still over my head and it was about 3am when input this post together. I am going to keep looking at this, but I just don't see how it will be possible. The one idea I have would be to write instructions that all .nes files always default to a certain emulator. That way we are not trying to match settings from another file/folder, but just generally stating that a certain file is always run by a certain emulator. Downside to this is that .zip files probably wouldn't work, the roms would have to be unzipped, for just this folder anyways.
Next issue at hand, gamelists. Since this is a new roms folder, it will need a new gamelist. My first thought is to manually create it by copying out each game entry from their original list and pasting into a new file. Then manually changing the image and video snap locations to add in the path to their original location so you don't have to have art on your system twice for the same rom.
Future wish idea, can I create a shortcut file in the favorites rom folder so it shows on the favorites game list and have the runcommand Follow the shortcut path and actually open the original rom from its original folder. Now this idea solves all issue! It would use the original emulator and artwork by default.
Problem is i am better at art and idea generation than writing code!
-
@HoolyHoo said in How To Create Favorites System in Retropie (yes system, not folder!):
I did this quite a while ago and decided to organize the "Favorites" into subfolders by consoles. (See this thread:https://retropie.org.uk/forum/topic/4233/sub-folders-default-emulators).
Like I said in the top post, I assumed that this has been done before, I just didn't find anyone who shared how to actually accomplish it. See my reply to @lilbud about launching emulators. I think that the main benefit to setting up this type of folder is to have 20-30 roms in it, not hundreds....otherwise it defeats the purpose of favorites. I am also interested in the all MARIO and all TMNT possibilities, it won't be the end of the world to launch 15-20 roms and set the emulator one time. Any additional thought you have learned would be a huge plus. Thanks
-
Very nice tweak.
Juste thinking of something similar, but that would unfortunately require huge modifications on ES :
Being able to modify the carrousel to switch components between Systems/Game Genres/Editors/Custom keyword (Mario, Sonic, ...)This would probably require to replace the gamelist.xml files with a global DB, but could be so nice, and would easily allow to implement game search too...
My 2 cents.
-
Update: I am currently trying to figure out all the runcommand code and how we can get the emulator to autoselect so we don't have to manually set it up. Here is what i think i have determined so far:
/opt/retropie/supplementary/runcommand/runcommand.sh
tells us that if "sys" is called out then we use argument 3 = which says to look to the favorites folder we created in/opt/retropie/configs/
. Nothing earth shattering figured out here. If we keep looking down in the file we find thefunction default_emulator() {
Again, i don't know what i am doing here, but it looks that this is telling us to go to the folder we created in/opt/retropie/configs/
for favorites and look at the emulators.cfgIn emulators.cfg we list out all the emulators that can run in our system. We can also call out ONE single emulator to run as the default launch emulator. the runcommand.sh file says we can do this by stating
default = "emulatorname"
for exampledefault = "lr-mame2003"
So now what i need to try to understand is if we can create code in the runcommand.sh that allows us to do an
if
statement that says "if rom = .nes " Then:local key local config="$EMU_SYS_CONF" case "$type" in emu_sys) key="default NES" ;;
Then we can go into our
favorites/emulators.cfg
and add the following:default NES = lr-fceumm
I am probably waisting a lot of peoples time here, so i apologize. I am sure this is much more complex than what I am thinking, my hope is that this might jump start a few ideas that others can expand upon or point me in the right direction. OR tell me I am way off base! Thanks for your time.
-
@TMNTturtlguy Here is the script I tried to write
#!/usr/bin/env bash for file in /tmp/*; do if echo "$file" | grep -q '.gb$'; then /opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr- gambatte/gambatte_libretro.so --config /opt/retropie/configs/mario/retroarch.cfg "$file" elif echo "$file" | grep -q '.nes$'; then /opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr- fceumm/fceumm_libretro.so --config /opt/retropie/configs/mario/retroarch.cfg "$file" elif echo "$file" | grep -q '.sfc$'; then /opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr- snes9x2010/snes9x2010_libretro.so --config /opt/retropie/configs/snes/retroarch.cfg "$file" fi done
If anyone is good with bash, tell me what i did wrong.
-
@lilbud I think i might have it for you, right now you are telling the script to write the launch for the .gb files to emulator list, that list does not actually run/startup the emulator. The emulator set as default is what will launch unless the rom itself has directions save to
/opt/retropie/configs/all/emulators.cfg
What we could do is create the script to add the following output for each rom in your mario folder. Here is what the required output is:
mario_romname = "emulator"
for example my turtles system - TMNT
TMNT_tmnt22p = "mame4all"
So all the script needs to do is look in your mario folder for file types .nes and then output
mario_supermario = "lr-fceumm"
to/opt/retropie/configs/all/emulators.cfg
I am not good with scripts, but maybe you can test writing this and report back?
-
Hey guys, I didn't read all the thread, sorry. But as far as I understood the OP is about creating a theme for favourites, not implementing a way to manage its contents.
If the user is supposed to manage files/gamelist.xml manually I would suggest to use symbolic links (or full path in gamelist.xml).
But why don't we test the branch of this PR?: https://github.com/RetroPie/EmulationStation/pull/131
-
@TMNTturtlguy said in How To Create Favorites System in Retropie (yes system, not folder!):
mario_supermario = "lr-fceumm
Shouldn't that say:
mario_nes = "lr-fceumm" ?
-
@meleu yeah, but we get sidetracked easily. Could you look at the code above and see what's wrong?
-
@lilbud sure. Will do as soon as I get home.
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.