garbear / xbmc

XBMC Main Repository
http://xbmc.org
Other
134 stars 53 forks source link

Implement SRAM saves #73

Closed fetzerch closed 7 years ago

fetzerch commented 7 years ago

Libretro supports 2 different ways for saving SRAM data. Either the core can save directly into the save directory. Or the frontend needs to save from/load into the game RAM. While the first mechanism was implemented already, this PR implements the second approach - used for example in SNES emulators (with games such as Chrono Trigger or SMW).

RetroArch's implementation: https://github.com/libretro/RetroArch/blob/master/tasks/task_save.c

So far that's an early working implementation.

Related PRs:

ToDos:

garbear commented 7 years ago

Can you bump addons/kodi.game/addon.xml?

fetzerch commented 7 years ago

Sure, done.

Hedda commented 7 years ago

Was this ever implemented?

fetzerch commented 7 years ago

@garbear: Can you give some direction how to proceed with this?

I did a bit of testing and it seems to work fine for snes and nes. Even if you switch to a different emulator.

@Hedda: This is not yet part of any RetroPlayer builds, but I'd like to get it there.

garbear commented 7 years ago

What if we call them in-game saves? This more clear for non-techies than SRAM saves

fetzerch commented 7 years ago

@garbear: I've updated the PR according to your comments. Autosave can come later I'd say. Do you want me to close this and PR to master directly?

For testing I'd recommend: 2048, snes games (e.g. Chrono Trigger and SMW)

garbear commented 7 years ago

Looks much better. Can you send upstream? That'll put a few more eyes on it.

fetzerch commented 7 years ago

Sure, done in https://github.com/xbmc/xbmc/pull/11380.