djhackersdev / bemanitools

Runs recent Konami arcade games and emulates various arcade hardware.
The Unlicense
77 stars 15 forks source link

Invert analog + mapper save versioning #275

Closed ahnada closed 5 months ago

ahnada commented 6 months ago

Implements issue #51.

Also added save versioning so people won't lose their configuration on upgrade.

decafcode commented 6 months ago

Looks okay to me. The versioning problem seems a bit tricky, I maybe wouldn't try to stuff a magic FourCC at the start of the file, instead I would use a different file name that doesn't contain a version in the file name, and define a new format for that new-style file. If geninput is asked to load its config, check for an old-style config file and if it loads one then write out a migrated new file.

Of course, it's more work to do it that way. Up to you which direction you choose to go, of course.

ahnada commented 6 months ago

Added code to read from the old saves but write out to a new filename without the version string appended.

Also here are some concerns that were brought up on Discord:

icex2 commented 5 months ago

lgtm, what do you think @decafcode ?

icex2 commented 5 months ago

lgtm, what do you think @decafcode ?

Talked to him and he said "it's fine"