(2017-07-07, 20:38)Julipo Wrote: You will not use directly the file system, like other emulators? I was asuming (because is the only example that I have until now) that save states will be a file in the file system, so open a save state is direct:
The problem is that a savestate isn't just the ".state" file. There is real-world metadata associated with the state, such the emulator used, the save time, the play time (both in-game and wall time), ROM identifiers, and a screen shot. In PR12434 I save these to the harddrive alongside the ROM like this:
Code:
Chrono Trigger (U) [!].smc (the ROM)
Chrono Trigger (U) [!].sav (the state)
Chrono Trigger (U) [!].xml (the metadata)
Chrono Trigger (U) [!].png (screenshot, not implemented yet)
I plan to switch to a key-value database to hold this information. We can then sync to the filesystem, either automatically or when the user presses an "Export" button.
(2017-07-07, 20:38)Julipo Wrote: You will write in game saves in database too?
Yes, I plan to use a key-value database which supports arbitrary data, including metadata, savestates, and even games themselves. (Ponder that last one.)
(2017-07-07, 20:38)Julipo Wrote: The only requirement is that in-game save states (no matters if we need to a web and click "Export" to get a file) need compatible with actual emulators (for example, I had some snes games that I move his in game saves to other emulator and they work, of course, renaming the file to the other emulator convention). I supose that this is not a problem because is the game (the core) who writes the in-game save.
Libretro cores should have savestates that are interchangeable with the emulator they're based on. Of course, savestates aren't compatible between different emulators. However, it might be possible to create a Python script that is able to convert savestates between emulators.
Exporting is no problem. Importing is a problem, because the associated metadata is missing. We could get by without knowing the play time or date, but knowing which libretro core produced the save is mandatory.