Has There Been a Solution to MiSTer Not Auto Saving Game Data?

For topics which do not fit in other specific forums.
Can_ISS
Posts: 1
Joined: Tue Jan 14, 2025 11:02 pm

Has There Been a Solution to MiSTer Not Auto Saving Game Data?

Unread post by Can_ISS »

So I made a thread over on Reddit asking about this:

https://www.reddit.com/r/MiSTerFPGA/com ... eature_to/

New MiSTer Pi owner here and I just learned that Mister can't auto save data the same way RetroArch (and OG consoles) can due to risk of corrupting the SD card (I know the details of why, no need to explain it) and was hoping if there was any update to this or if some kind of work around was found. Was planning to do some cool TapTo setup for the niece & nephew but due to risk of them forgetting to hit OSD and losing data I might just go the MiniPC Batocera route instead (TapTo is working on a windows build).

Should I make another ticket on GitHub? I know it's been asked before: https://github.com/MiSTer-devel/Main_MiSTer/issues/789

FPGA64
Top Contributor
Posts: 1048
Joined: Mon Mar 01, 2021 3:10 pm
Has thanked: 52 times
Been thanked: 405 times

Re: Has There Been a Solution to MiSTer Not Auto Saving Game Data?

Unread post by FPGA64 »

The opening of the menu to save is the defined behaviour. Sorg wrote on that ticket why. Its not going to change.

AngelicLiver
Top Contributor
Posts: 452
Joined: Fri May 29, 2020 8:50 am
Has thanked: 96 times
Been thanked: 126 times

Re: Has There Been a Solution to MiSTer Not Auto Saving Game Data?

Unread post by AngelicLiver »

Personally I've always found it to be a non-issue; just enable auto-save on each core and just get into the habit of using the OSD when you're changing games/cores or powering down.

That said, I'm sure I read Zaparoo were working on triggering saves when NFC cards were removed. It might even be implemented already.

Lightwave
Posts: 273
Joined: Sun May 24, 2020 10:06 pm
Has thanked: 141 times
Been thanked: 82 times

Re: Has There Been a Solution to MiSTer Not Auto Saving Game Data?

Unread post by Lightwave »

Can_ISS wrote: Wed Jan 15, 2025 12:10 am

was hoping if there was any update to this or if some kind of work around was found. Was planning to do some cool TapTo setup for the niece & nephew

AngelicLiver wrote: Thu Jan 16, 2025 9:14 am

I'm sure I read Zaparoo were working on triggering saves when NFC cards were removed. It might even be implemented already.

As mentioned, with Zaparoo you can now add actions when exiting a game, including opening the OSD (thus triggering a save if autosave is enabled in a core). This is probably the best workaround for now.

User avatar
ItalianGrandma
Posts: 227
Joined: Sun May 24, 2020 7:09 pm
Has thanked: 49 times
Been thanked: 55 times
Contact:

Re: Has There Been a Solution to MiSTer Not Auto Saving Game Data?

Unread post by ItalianGrandma »

As others have mentioned, the Zaparoo workaround is probably the way to go. Having seen your post the other day, I agree with you that when you're setting up MiSTer for someone else or for kids, the way it works currently is not ideal.

I doubt Sorg would go for it, but I do wonder why there can't just be an INI only option (that has to be added manually to the INI) for forcing automatic saves with a bold disclaimer about it potentially being bad for your SD card and what not.

FPGA64
Top Contributor
Posts: 1048
Joined: Mon Mar 01, 2021 3:10 pm
Has thanked: 52 times
Been thanked: 405 times

Re: Has There Been a Solution to MiSTer Not Auto Saving Game Data?

Unread post by FPGA64 »

ItalianGrandma wrote: Thu Jan 16, 2025 2:47 pm

As others have mentioned, the Zaparoo workaround is probably the way to go. Having seen your post the other day, I agree with you that when you're setting up MiSTer for someone else or for kids, the way it works currently is not ideal.

I doubt Sorg would go for it, but I do wonder why there can't just be an INI only option (that has to be added manually to the INI) for forcing automatic saves with a bold disclaimer about it potentially being bad for your SD card and what not.

Because someone will write a script that turns it on and people wont see the warning message in the ini then be pissed their SD card craps out. No amount of warnings ever work people just find ways to ignore them

rhester72
Top Contributor
Posts: 1535
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 20 times
Been thanked: 252 times

Re: Has There Been a Solution to MiSTer Not Auto Saving Game Data?

Unread post by rhester72 »

Also not a big fan of changing things as-is because on rare occasion I don't want to commit to the virtual memory card and would rather just bail out.

User avatar
colonel panic
Posts: 71
Joined: Mon May 25, 2020 1:54 pm
Has thanked: 2 times
Been thanked: 12 times

Re: Has There Been a Solution to MiSTer Not Auto Saving Game Data?

Unread post by colonel panic »

rhester72 wrote: Thu Jan 16, 2025 7:08 pm

Also not a big fan of changing things as-is because on rare occasion I don't want to commit to the virtual memory card and would rather just bail out.

It should be a third option in the core menu. This way people can toggle Manual Save→Save When Opening OSD→Write to SD Automatically based on their needs. I also like to turn off auto save sometimes when I just want to check a game out briefly so I know where you're coming from.

Also for what it's worth the OpenFPGA cores on the Analogue Pocket write to the SD without any safety mechanisms in place and I haven't heard anyone complain about it messing up their SD card

Lightwave
Posts: 273
Joined: Sun May 24, 2020 10:06 pm
Has thanked: 141 times
Been thanked: 82 times

Re: Has There Been a Solution to MiSTer Not Auto Saving Game Data?

Unread post by Lightwave »

colonel panic wrote: Fri Jan 17, 2025 11:27 pm
rhester72 wrote: Thu Jan 16, 2025 7:08 pm

Also not a big fan of changing things as-is because on rare occasion I don't want to commit to the virtual memory card and would rather just bail out.

It should be a third option in the core menu. This way people can toggle Manual Save→Save When Opening OSD→Write to SD Automatically based on their needs. I also like to turn off auto save sometimes when I just want to check a game out briefly so I know where you're coming from.

Also for what it's worth the OpenFPGA cores on the Analogue Pocket write to the SD without any safety mechanisms in place and I haven't heard anyone complain about it messing up their SD card

I believe one issue is that certain games were found to save continuously for some reason, which wouldn't take long to adversely affect the SD card if forced writes were enabled. A warning for this is not something that could be easily conveyed via the OSD setting.

akeley
Top Contributor
Posts: 1534
Joined: Mon May 25, 2020 7:54 pm
Has thanked: 563 times
Been thanked: 493 times

Re: Has There Been a Solution to MiSTer Not Auto Saving Game Data?

Unread post by akeley »

The local nanny state strikes again :)

rhester72
Top Contributor
Posts: 1535
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 20 times
Been thanked: 252 times

Re: Has There Been a Solution to MiSTer Not Auto Saving Game Data?

Unread post by rhester72 »

Lightwave wrote: Sat Jan 18, 2025 10:09 am

I believe one issue is that certain games were found to save continuously for some reason, which wouldn't take long to adversely affect the SD card if forced writes were enabled. A warning for this is not something that could be easily conveyed via the OSD setting.

Wouldn't that have affected actual memory cards back in the day?

Cyber Akuma
Posts: 40
Joined: Wed Nov 17, 2021 2:36 pm
Has thanked: 30 times
Been thanked: 5 times

Re: Has There Been a Solution to MiSTer Not Auto Saving Game Data?

Unread post by Cyber Akuma »

Lightwave wrote: Sat Jan 18, 2025 10:09 am

I believe one issue is that certain games were found to save continuously for some reason, which wouldn't take long to adversely affect the SD card if forced writes were enabled. A warning for this is not something that could be easily conveyed via the OSD setting.

To be fair, we have a warning on the OSD that you can permanently disable for running scripts, those can completely take over your MiSTer and even place malware if you were running any random untrusted script.

Also if it's writing that often I assume that's because it's using an SRAM chip for additional RAM and just not for saving? In that case can't you just delay the flushing to the SD card to once a second or something like that? Regardless, wouldn't that only be for systems that used SRAM? Anything with something else would not be able to use the storage as RAM and would not be hammering it as hard, PS1 games for example definitely didn't treat the memory card as if it was RAM and write to it nonstop.

Though I also question if it would even ruin modern SD cards anymore, wear leveling has advanced since then, there are MicroSD cards specifically designed to be used in security cameras that record 24/7 nowadays.

rhester72 wrote: Sat Jan 18, 2025 2:19 pm

Wouldn't that have affected actual memory cards back in the day?

I assume that mostly happened with games that used battery-backed SRAM, since they were literally using a chip intended to be used as actual RAM for storage by attaching a battery to it so it's memory doesn't get erased when you turned off the system. IIRC some games took advantage of this to also use that chip as extra RAM in additional to saving progress.

I am not entirely sure but I believe games that used any other form of saving progress such as FRAM, EEPROM, Flash, or whatever else didn't do this as the storage medium would not have been suitable for it.

FPGA64
Top Contributor
Posts: 1048
Joined: Mon Mar 01, 2021 3:10 pm
Has thanked: 52 times
Been thanked: 405 times

Re: Has There Been a Solution to MiSTer Not Auto Saving Game Data?

Unread post by FPGA64 »

SD cards have 0 wear levelling. That just doesnt exist for them.

rhester72
Top Contributor
Posts: 1535
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 20 times
Been thanked: 252 times

Re: Has There Been a Solution to MiSTer Not Auto Saving Game Data?

Unread post by rhester72 »

FPGA64 wrote: Sat Jan 18, 2025 4:14 pm

SD cards have 0 wear levelling. That just doesnt exist for them.

I am supremely confident this statement is not true.

FPGA64
Top Contributor
Posts: 1048
Joined: Mon Mar 01, 2021 3:10 pm
Has thanked: 52 times
Been thanked: 405 times

Re: Has There Been a Solution to MiSTer Not Auto Saving Game Data?

Unread post by FPGA64 »

rhester72 wrote: Sat Jan 18, 2025 4:33 pm
FPGA64 wrote: Sat Jan 18, 2025 4:14 pm

SD cards have 0 wear levelling. That just doesnt exist for them.

I am supremely confident this statement is not true.

I believed it to be only for industrial and surveliance SD cards. And you can be almost certain those are not in the majority of Misters. So yes you are correct.

rhester72
Top Contributor
Posts: 1535
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 20 times
Been thanked: 252 times

Re: Has There Been a Solution to MiSTer Not Auto Saving Game Data?

Unread post by rhester72 »

SanDisk employed wear-levelling controllers in their SD cards since around 2011, all the way down to the cheapest consumer cards.

User avatar
ItalianGrandma
Posts: 227
Joined: Sun May 24, 2020 7:09 pm
Has thanked: 49 times
Been thanked: 55 times
Contact:

Re: Has There Been a Solution to MiSTer Not Auto Saving Game Data?

Unread post by ItalianGrandma »

FPGA64 wrote: Thu Jan 16, 2025 5:40 pm
ItalianGrandma wrote: Thu Jan 16, 2025 2:47 pm

As others have mentioned, the Zaparoo workaround is probably the way to go. Having seen your post the other day, I agree with you that when you're setting up MiSTer for someone else or for kids, the way it works currently is not ideal.

I doubt Sorg would go for it, but I do wonder why there can't just be an INI only option (that has to be added manually to the INI) for forcing automatic saves with a bold disclaimer about it potentially being bad for your SD card and what not.

Because someone will write a script that turns it on and people wont see the warning message in the ini then be pissed their SD card craps out. No amount of warnings ever work people just find ways to ignore them

Sure, I guess my point is that OP's use case is totally valid and having some way to make this happen would be beneficial.

Maybe there's a way to make it a multi-step process to turn it on so that it's not easily done flippantly...I don't know.

Post Reply