[SCRIPT] Setup for an automatic savestate selector
-
@bizzar721 thx
It is always a pleasure to see the coding of others. Everybody gets his own style in writing programs and leaves his own signature in. The way this script is made is really clever and fulfills lots of demands users wanted.
At least it helps me to improve the OpenBOR script of joypad detection. I think I will implent them if OpenBOR will be run on higher version level as it now does. The keep your thumbs up for (hopefully) future development of the OpenBOR binary ;) -
Thank you all for your kind words! That means a lot to me
Both scripts implement vital functions (at least for me); cloud sync and easy savestate selection. I really hope they can be used by a lot more people. Also, I like to deliver "complete" solutions which is why I made the installer and menu scripts.
I understand that doing these things yourself is a major aspect of RetroPie for a lot of people. It is not for all, though. Some people just like to get ready-to-play boxes already doing the things they want. Either way, you can use the scripts as they are or you can customize them to your specific needs. Of course, both scripts still offer options for optimization or added features.
So, if you want to add something to my scripts or if you want to take something out of them to use in other projects, I'm fine with both. Either way, i just ask to be notified of it.
I myself will definitely keep on working on these scripts. I really need to stop playing with my RetroPie and start playing with my RetroPie... ;-)
-
@jandalf81 I really like your Savestate selector menu. My friend had a copy on his retropie and pointed me to this article.
When I go to perform the install, it attempts to find the PNGView binary on my system. When that shows up as Not Found, it tries to download the source and says 'Failed'. This closes out the install.
My connection looks to be valid so I'm wondering if something has changed in the last two months since anyone posted on this thread.
-
@Athimar
is the file/usr/lib/libraspidmx.so.1
available? -
Take a look into
~/scripts/savestate_selector/savestate_selector-install.log
, any errors should be listed there.You could also try to perform the installation of PNGview manually:
wget -P ~ https://github.com/AndrewFromMelbourne/raspidmx/archive/master.zip unzip ~/master.zip -d ~ make --directory=~/raspidmx-master sudo mv ~/raspidmx-master/pngview/pngview /usr/bin sudo mv ~/raspidmx-master/lib/libraspidmx.so.1 sudo chown root:root /usr/bin/pngview sudo chmod 755 /usr/bin/pngview rm ~/master.zip sudo rm -r ~/raspidmx-master
This downloads the source code, unzips it, compiles it and then moves the compiled files before removing the temporary files. If this doesn't work, please post either the mentioned log file or any errors the commands above give you.
-
@jandalf81 hi, THANKS for this great script. just installed and works great. :D
-
No Battery Save Found ?
whats that ? :( -
@jozzy1
Thanks, that's great to hear!@shavecat
Battery saves are the ROM's save games.
Whenever you use the game's save function, a SRM file will be created. That is the Battery save. The name comes from the fact that these old game cartridges had to contain a literal battery to be able to keep the save even when the console was powered off or the cartridge was removed from the console. -
@jandalf81
Thanks a lot ,
cant get to auto save after 10sec by him self...
and dont see the thumbnails pics save on the savesate load screen :
everything is on enable&install like it should be.
what im doing worng ? -
Try again
and it worked better.
Why is not auto save ? do i need to change in the
'retroarch.cfg'
the autosave = false , to true ? -
Hi,
due to some issues I had to make a fresh install of RetroPie. After setting up my system from scratch, I couldn't get your script to work again (completely)...
IMAGEMAGICK is not found and it skips the installation. I tried to install it manually via commandline but still with no success.
I think this causes the "no-thumbnails-problem" of @shavecat -
@SuperPitendo
Try- sudo apt-get update
think it will help.
like u said start again , and it worked with the - thumbnails-problem like should be.
getting the thumbnails working great ! .
but still no auto save ,
Is it spouse to auto save by him self on slot 0?
or i need to config it ?
Cant see on the loading saves stae the auto save state.
everything else works great ! -
@SuperPitendo
As @shavecat said, trysudo apt-get update
before you start my setup script. Imagemagick should still be installable viaapt-get
which is exactly what my script tries to do... You might have one binary installed still which makes the setup script skip the installation of Imagemagick. Can you check if the file/usr/bin/convert
exists?If you still have problems, please post the setup log from
~/scripts/savestate_selector/savestate_selector-install.log
@shavecat
What do you mean bycant get to auto save after 10sec by him self
Are you trying to make RetroArch create a savestate every 10 seconds? If so, that would have to be configured within RetroArch itself, there should be a fitting setting in the "Saving" menu...
and dont see the thumbnails pics save on the savesate load screen
Are you sure you created a save state? Without them, there's no thumbnail to show as well...
-
@jandalf81
Sorry im stupid got confused a bit .
it works great jandalf81 thanks alot with thumbnails works great !
love your code Thanks!
I have last Q , about the auto save state in the RetroArch with the autosave when i quit i have an auto save with pic' in the folder and all,
but cant get it too see in on the load state thumbnails (think cause it look in the code for state, and not auto) im getting like $SRAM_PATH.auto. (for auto saving)
is that right ? -
@shavecat
Yeah, I excluded the AUTO savestate because I use that to be able to automatically load a save state from the script. But you can also configure RetroArch to automatically load that AUTO save state when starting the ROM.Alternatively, you could customize the script. Open
savestate_selector.sh
and navigate to line 203:done <<< $(find $statePath -type f -iname "${romfilebase}.state*" ! -iname "*.png" ! -iname "*.auto") # get all STATE files, exclude *.PNG and *.AUTO
Change that to
done <<< $(find $statePath -type f -iname "${romfilebase}.state*" ! -iname "*.png") # get all STATE files, exclude *.PNG
to not exclude the AUTO save state. Please note that I did not test this. There might (will) be some unexpected side effects...
-
@jandalf81
THANKS !!!! :))) -
@jandalf81 I know this is an old thread but just because something is old doesn't mean it isn't good. I just stumbled upon this while searching to see if anyone had come up with a more NES-Classic-like way of handling save states. I just wanted to say that this is excellent work and thank you.
-
@jandalf81 Again, I know this is an old thread and hopefully you haven't put this project behind you. I have been playing with your savestate selector and I've run into 2 issues.
The first is with the "Set delay to delete AUTO savestate" option. The default value is 10 seconds but I find that setting this to anything less than 15 will cause loading the selected savestate to fail. A message will show on screen stating that it loaded but in fact it does not. The rom just loads normally. I suspect it usually takes a little longer than 10 seconds for a rom and savestate to load and so the auto savestate is getting deleted before it can be loaded if the value is 10 seconds or less.
The other, bigger issue (because I haven't figured out a workaround) is that it seems like if a rom has a dot in the file name it's savestates will not be detected and the savestate selector dialog will not load. I've tested this with the NES roms 'Mr. Gimmick (Europe)', 'R.C. Pro-Am (USA)', 'Simpsons, The - Bart vs. the Space Mutants (USA)', and 'Super Mario Bros. (World)'. There are definitely savestaes for each of these roms but the savestate selector dialog does not load for any of them. The only common denominator I can see is that they all have dots in their file names.
I further tested this theory by making copies of these roms with the the dots removed from the filenames. I then created new savestates with the renamed roms and then savestate selector dialog came up as expected.
I also tested with roms that had other special characters in their file names like 'Pac-Man (USA) (Namco)' and 'Mike Tyson's Punch-Out!! (Japan, USA) (Rev A)'. These worked with no problem. Of course that isn't a comprehensive test of special characters but I've only experienced this issue with roms with dots in their filnames, not any other special characters.
I'm sure it's just a matter of putting something in quotes or adding an escape character somewhere in your script. Unfortunately I'm not proficient enough in Unix shell scripting to figure it out myself without diving pretty deep. Hopefully you can help me out.
-
@joelkolb That is easy to fix ... edit the script in line 80
changeromfilebase="${romfilename%%.*}" # filename of $rom, excluding extension
to
romfilebase="${romfilename%.*}" # filename of $rom, excluding extension
the double %% strips filename till last . and this is the R in R.C. PROAM
-
@cyperghost Awesome, thanks! It works like a charm. I knew something of this nature would be an easy fix for someone good with shell scripting.
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.