RetroArch icon indicating copy to clipboard operation
RetroArch copied to clipboard

[Feature Request] Add "Update Save Files" Option to Online Updater

Open davidhedlund opened this issue 5 months ago • 4 comments

There are dedicated sites for Windows game save files, such as PCSaveGames and SaveGame.pro. These sites provide downloadable save files for a wide variety of PC games.

Main Feature Request

  • Proposal: Add a new entry in Main MenuOnline Updater called Update Save Files.
  • Description: This feature would allow users to easily download and update save files for supported games directly from within the application, similar to how core and asset updates are currently handled.
  • Important: To make this feature viable, users must be able to upload their own save files to the RetroArch server—ideally through a process similar to how joypad config files are contributed via GitHub. This community-driven approach will ensure the save file library remains comprehensive and up-to-date, allowing users to both share and benefit from a continually expanding collection of save files.

Complementary Feature Request

  • Please also see related suggestion:
  • https://github.com/libretro/RetroArch/issues/17942
  • This feature would enhance the management of custom save files and give users greater control over their game progress. For example, if implemented, users could load save files with custom filenames directly—eliminating the need to manually rename files to match specific naming conventions.

Game Save Compatibility

Game saves are not region-locked, so you can use save files interchangeably between US, EU, JP, and other regional versions of the game.

Note: The MD5 checksum for save files may change each time you close RetroArch, even if you do not save the game.

Why is this needed?

Not all (free) cores support cheat files

For example, most SNES cores do not support cheat files, which means you cannot use them to access other levels on these cores. While some cores, like SNES9x, do support cheat codes, they are proprietary and therefore cannot be used by those who strictly choose to use only free software.

Convenience

For players who have already completed the game and simply want to revisit later levels without replaying everything from the beginning, level selection isn’t really a cheat—it’s a practical option that should be freely available. Also, save files offer a convenient way to jump to specific levels without the hassle of searching through complex cheat code lists that mix other features.

Issues with cheat codes

Main Menu -> Online Updater -> Update Cheats is useful, but it has a few limitations. Even for cores that do support Game Genie codes, not all codes work as expected.

Lack of cheat codes

A code to unlock all Hard Mode worlds at once in Super Mario Bros. (including Super Mario All-Stars) for SNES has not been hacked yet.

Broken cheat codes

For example, there is no SNES Game Genie code for Super Mario Bros. 3 (as part of Super Mario All-Stars) that reliably allows you to select and play any World.; Code "D5D4-F36D" is used to "Select any world for FILE A game [Not usable for World 8: the two Hand Trap levels, which must be completed to unlock the pipe to Bowser’s Castle, are missing because the cheat code removes them, so no levels at all can be played]" (see https://github.com/libretro/libretro-database/pull/1543/files)

Download Save File for the above Super Mario All-Star issue example

This save file contains all worlds completed in each Super Mario game included in Super Mario All-Stars (USA): Super Mario All-Stars (USA)-All Worlds.txt

What does it contain?:

  • Super Mario Bros.
    • Cheat code: Allows you to select any world for FILE A: D5DF-FADD
    • Manually completed World 8 and the Hardmode Words
  • Super Mario Bros.: The Lost Levels
  • Cheat code: Allows You To Select Any World Or Level For "File A": DADF-F30D+D7DF-F36D
  • Super Mario Bros. 2
    • Cheat code: Allows you to select any world for FILE A: D1D4-FA0D
  • Super Mario Bros. 3
    • Cheat code: Select any world for FILE A game [Doesn't work on World 8]: D5D4-F36D
    • Manually completed World 7 to be able to complete World 8.

"Factory reset" settings:

  • I intentionally triggered a Game Over before saving to ensure no extra lives or progress were carried over
  • I pre-selected Super Mario Bros. like in the factory reset ROM.

Instructions for use: To ensure that your original game progress remains intact while also allowing you to archive or experiment with different save states, downloaded save files are given custom filenames. This prevents them from overwriting your "system default" save for the original title. By keeping saves separated in this way, you can easily switch between your personal progress and community-contributed saves, or archive completed game saves for dedicated gameplay sessions.

  • Download "Super.Mario.All-Stars.USA.-Super.Mario.Bros.3-All.Worlds.txt" (see link above) and rename it to "Super Mario All-Stars (USA)-Super Mario Bros. 3-All Worlds.srm"
    • GitHub replaced white spaces with "."
    • GitHub didn't allow the ".srm" file extension to be uploaded
  • Rename "Super Mario All-Stars (USA).sfc" to "Super Mario All-Stars (USA)-Super Mario Bros. 3-All Worlds.sfc"
  • Main Menu -> Load Content: Super Mario All-Stars (USA)-Super Mario Bros. 3-All Worlds.sfc
  • Once Super Mario All-Stars has been loaded, select any game, for example Super Mario Bros. 3, and "File A" will now show the last completed world:

Image

You can decrease to lower Worlds if you want:

Image

Bonus

This would also make it possible to load save files stored in other core directories, since there is currently no universal save file directory.


Rationale:
Adding an "Update Save Files" option would streamline the process of obtaining save files, making it more convenient for users who wish to access specific game progress points or recover lost saves. Integration with established save file repositories could further expand the utility of the Online Updater.


References:

davidhedlund avatar Jun 18 '25 16:06 davidhedlund

@zoltanvb I wanted to share my thoughts regarding this feature request, especially when considered alongside https://github.com/libretro/RetroArch/issues/17942. I genuinely believe that implementing both of these features could significantly enhance the overall RetroArch experience and take the project to a whole new level in terms of gaming experience.

To be clear, I’m not asking you to personally take on the task of developing or implementing these features. However, since you have valuable insight and experience with the project, I would really appreciate it if you could take a look and share any feedback, suggestions, or thoughts you might have. Your perspective would be helpful in refining these ideas and possibly moving them forward within the community.

davidhedlund avatar Jun 18 '25 18:06 davidhedlund

User-sourced save files would unfortunately be a security nightmare.

Malformed save files are a major potential vector for malware. Maliciously modified games are, too, obviously, but we're insulated against that somewhat by widespread use of verified hashes (including through RetroArch's own database scanner). This would not be possible with game saves.

The fact that we would be hosting and distributing these unverifiable, risky files to millions of users across dozens of devices, many of which have little or no way to apply security updates, would make an irresistible target for bad actors.

hizzlekizzle avatar Jun 19 '25 01:06 hizzlekizzle

even without the security implications noted above, this is also a potential dataloss issue - how would you prevent a user from clobbering their own existing save file with a file in the repo?

the safe way to do it would be to make it opt-in on a per-game basis, which for any but the smallest collections will likely take longer than just grabbing the saves themselves from the third-party site.

odditude42 avatar Jun 20 '25 05:06 odditude42

The vision of having save files available for the content, is nice, and would maybe feel a little less cheat-y than using actual cheats to reach certains stages of games, so I can see how it can be useful for a part of the RetroArch audience. But it is a large item, with problems branching out to several areas.

First, the emulated platform issue. Save file, as RetroArch understands it, is typically something like a small(ish) memory card representation. It is present on several of the main systems emulated under RetroArch, but specifically for PC (DOS), it does not exist and cannot be supported in a generic, non-core-specific way by the frontend - just mentioning this because the 2 references of user provided collections seem to be for PC mostly.

About the security aspect: Malformed save files are a major potential vector for malware. - I can certainly imagine ways how it can be misused, but that would need a kind of vulnerability in either the frontend, or in the libretro core, or in the original game (still talking about those Gen4/5/6 consoles mostly). Without digging much further, I'd say the risk is somewhat higher than, let's say, having unverified thumbnail images (there are some image decoding vulnerabilities out there), but not to a great degree, and some of it can be mitigated by having simple size-based review of contributions. (Any further sources are welcome, I did not find any highlighted incident about attacks via save files, but admittedly I did not look very far.)

The thing that I see as the major roadblock is having the infrastructure for receiving and distributing the save files. Same problems as with thumbnails ("why does it not find my random manual scanned name"), same complexity for publishing and downloads - many hours can be poured into it, some can be contributed from outside, but some relies on the very core of the project, and that is a limited resource, both in effort and in a technical sense (not counting myself here, to be clear).

Maybe an external launcher would be better suited to support this. Associating an arbitrary save file with the content using e.g. a CLI option, may be within reach (no promises here either), that could open the way for this.

zoltanvb avatar Jun 21 '25 13:06 zoltanvb