Joined: 12/29/2007
Posts: 489
Does there exist an option to flush SaveRAM whenever the user saves in-game? Or is it intended behavior that the user must always go to File -> Save RAM -> Flush Save Ram after every save to avoid the risk of losing progress? I know there's the "AutoSaveRAM every 5 minutes" option, but this wouldn't help in the common case of "Pokemon game -> play for an extended period of time -> save in-game -> close BizHawk and forget to manually flush SaveRAM, losing a huge amount of progress".
Emulator Coder, Judge, Experienced player (609)
Joined: 2/26/2020
Posts: 698
Location: California
Closing BizHawk would automatically flush SaveRAM itself. If it doesn't, that's a bug. Also, you say "whenever the user saves in-game" yet also bring in Pokemon. If you consider the first and second generations which were on the GB/C, what is saving in-game in the perspective of the emulator? It can possibly see that SRAM was written to, but those games use SRAM as scratchpad too (along with many other games), and the perspective of the emulator cannot distinguish between that and actual saving. What you ask is simply not possible unless you want it to just write the current SRAM to disk potentially every single frame (or at the very least way too often).
Joined: 12/29/2007
Posts: 489
Just tested; SaveRAM fails to be automatically flushed when BizHawk closes and the user's progress is lost. I'm using the Linux version of BizHawk, so it's possible that the bug only happens on Linux. Nothing is printed to console out when BizHawk closes. Thanks, I didn't know so many games used SRAM as scratchpad. I thought it would only be written to when the game saved.
YoshiRulz
Any
Editor
Joined: 8/30/2020
Posts: 80
Location: Sydney, Australia
CNR at 0f2a76bd5. This is with 2.9, right? In 2.8, there was a problem with the melonDS core never flagging changed SaveRAM as such, so it was never flushed automatically.
I contribute to BizHawk as Linux/cross-platform lead, testing and automation lead, and UI designer. This year, I'm experimenting with streaming BizHawk development on Twitch. nope Links to find me elsewhere and to some of my side projects are on my personal site. I will respond on Discord faster than to PMs on this site.
Hey look buddy, I'm an engineer. That means I solve problems. Not problems like "What is software," because that would fall within the purview of your conundrums of philosophy. I solve practical problems. For instance, how am I gonna stop some high-wattage thread-ripping monster of a CPU dead in its tracks? The answer: use code. And if that don't work? Use more code.
Joined: 12/29/2007
Posts: 489
Ah, just checked and this was 2.8. Didn't know this was a recent fix; I updated to 2.9 and now it works as expected. Thanks!