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 (732)
Joined: 2/26/2020
Posts: 790
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, Emulator Coder
Joined: 8/30/2020
Posts: 111
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!
Joined: 10/16/2024
Posts: 4
Location: Iowa
I'm running 2.9.1 of BizHawk and even though it seems to be writing the SaveRAM files into its folder, but it is not auto flushing the SaveRAM when closing or rebooting the core.
Emulator Coder, Judge, Experienced player (732)
Joined: 2/26/2020
Posts: 790
Location: California
Which core, which game
Joined: 10/16/2024
Posts: 4
Location: Iowa
melonDS Core, tried it with both Pokemon Soul Silver and a Fire Emblem game.
Emulator Coder, Judge, Experienced player (732)
Joined: 2/26/2020
Posts: 790
Location: California
I can't seem to reproduce this issue for 2.9.1. A simple test in SoulSilver of moving 1 step, saving, then rebooting the core shows the save indeed has me moved 1 step. Are you absolutely sure you're on 2.9.1?
Joined: 10/16/2024
Posts: 4
Location: Iowa
yeah, I just hit about and it says version 2.9.1 (x64) May 3, 2023. Soul Silver only sees the save if I manually flush the SaveRAM, it doesn't seem to automatically do it for me for some reason. I just did another test, I loaded the save I made before manually flushing, saved it, then closed the game, and reloaded and it was back to the previous save.
Emulator Coder, Judge, Experienced player (732)
Joined: 2/26/2020
Posts: 790
Location: California
1. Could you upload your save file here? 2. Could you also perhaps upload the melonDS.wbx.zst file in the dll folder?
Joined: 10/16/2024
Posts: 4
Location: Iowa
how do I upload files here?