You are not logged in.

Read the FAQ and Knowledge Base before posting.
We won't make a 3DS/2DS emulator.



#1 2020-12-07 06:37:47

coredumperror
Member
Registered: 2010-03-22
Posts: 9

Lost my save, I _should_ be able to load from a backup, but no good...

So I was playing Chrono Trigger for DS, and having a grand old time, when my cat stepped on my F1 key, and restored my game back to a state I'd saved last night, when I first started playing.

I thought "Well that sucks... Good thing I did a normal in-game save about 10 minutes ago, though!" So I did File -> Reset, intending to load said save game... and came upon a completely fresh "New Game" screen, with no save data at all.

I eventually realized that the reset action caused DeSmuMe to overwrite my in-game save file with the contents it would have had based on that loaded save state.

After some frustrated googling, I found a few forum threads on here that led me to believe I should restore my .dsv file from a backup, which I conveniently happened to have (from a few hours ago, sure, but that's still not so bad...). Unfortunately, even though I'm 100% certain that this file has a timestamp from after I started doing real in-game saves, putting it into the folder that DeSmuMe uses for .dsv files doesn't help. Starting the game up again leads me to a fresh "New Game" screen.

The only weirdness I can think of about this was that I have an ooooold desmume.ini file, back from the last time I played Chrono Trigger about 10 years ago (I discovered this *after* this all happened, and have now deleted it and created a brand new one). The file paths in there were based on where my Games folder used to be, rather than where it had moved to since 2010. So the DSV file was in a different place than it normally would have been. I've tried putting my backup into that folder, but it doesn't help. I've tried editing the .ini file to make it use the new DeSmuMe folder for the "Battery" setting, but that also doesn't help. It's overwriting the copy of the backup that I put into the correct folder with new, blank save data when I quit the emulator, so it's clearly *supposed* to be loading same backup file when it loads the game. But I guess it's not?

What, if anything, can I do?

Also, can I configure DesMuMe to automatically back up .dsv files, so an errant reset while a bad save state is loaded doesn't blow away the only hard save data? Or perhaps configure it so loading a save state is (optionally) a more complex hotkey than just F1? Like, Ctrl-F1, so it can't be done by accident?

Offline

#2 2020-12-07 06:50:12

coredumperror
Member
Registered: 2010-03-22
Posts: 9

Re: Lost my save, I _should_ be able to load from a backup, but no good...

Oh, hmmm. Does DeSmuMe perhaps not save the .dsv files to disk until it does a reset or closes? That might explain why my backup file has no save data, despite having an appropriate timestamp. I hadn't closed DeSmuMe since last night. I just put my computer to sleep with it running.

Offline

#3 2020-12-07 07:16:49

AsPoke3172
Member
Registered: 2010-04-21
Posts: 168

Re: Lost my save, I _should_ be able to load from a backup, but no good...

If you using save state, press Shift F (any numbers). Example Shift F1 for save state 1. Load state just press F1 (or any other F keys for other states).
Only used in anywhere when SAVE function under MENU was grey out (or unvailable). For original save ingame, only available when you are on world
map and blue circle inside dungeon. Just goto MENU and SAVE. Remember! Use latest Desmume GIT! => https://ci.appveyor.com/project/zeromus/desmume/history

Offline

#4 2020-12-07 08:27:33

coredumperror
Member
Registered: 2010-03-22
Posts: 9

Re: Lost my save, I _should_ be able to load from a backup, but no good...

Is that, like, a bot response or something? It had only the vaguest hint of having anything to do with what I said.

Offline

#5 2020-12-07 21:33:33

zeromus
Radical Ninja
Registered: 2009-01-05
Posts: 5,422

Re: Lost my save, I _should_ be able to load from a backup, but no good...

I think he assumed you were an idiot, because most people here are, and gave you general guidance for how to avoid getting mixed up. I don't think you are, though.
There's no way to configure desmume to make backups, but if you use the latest appveyor build, that feature has been added (always on.)
To figure out what's going on with your .dsv I suggest you download all new desmume from scratch and build yourself a new folder on your desktop. Take only the DSV you think is good. Pay close attention to whether the filename is right (desmume will create a new file if it's not). With no old junk from your old desmume, there's no way you can be confused. If it's using the .dsv you intend but the condition isn't what you expect, then your expectations are simply wrong.
In the future, when investing a long time creating files on your computer, you should make backups.

Offline

#6 2020-12-09 04:04:01

coredumperror
Member
Registered: 2010-03-22
Posts: 9

Re: Lost my save, I _should_ be able to load from a backup, but no good...

I am using the latest Appveyor build. I have been since the start. My problem was that my save STATE was old, while my GAME save was new. So loading the old state and then resetting overwrote my GAME save.

How do you make the automatic backups work? You said it's always on, but I only see save STATES being backed up (.ds1, .ds2, etc files in the StateSlots folder). Not GAME saves (.dsv files, in the Battery folder). It would be very nice if both got backed up automatically, for precisely this reason.

Last edited by coredumperror (2020-12-09 04:04:46)

Offline

#7 2020-12-09 19:18:03

zeromus
Radical Ninja
Registered: 2009-01-05
Posts: 5,422

Re: Lost my save, I _should_ be able to load from a backup, but no good...

.ds1 and .ds2 aren't backups. strangely numbered .dst are backups.
there is no need for .dsv backups. .dsv is only lost when the state is lost. the backup state contains the backup .dsv

Offline

#8 2020-12-09 21:11:50

coredumperror
Member
Registered: 2010-03-22
Posts: 9

Re: Lost my save, I _should_ be able to load from a backup, but no good...

> there is no need for .dsv backups.

I disagree, for the reason that I have enumerated in this thread. If you accidentally load a save state from before the last time you saved in-game, and then think "Oh shoot, I didn't mean to load that state. Thank goodness I saved in-game after I saved this state. I'll just reset the game and load from that in-game save...", you've just screwed yourself. As soon as you reset the game, Desmume overwrites the .dsv file that has your newer in-game save with the data from the older save state, erasing your saved game.

That's why .dsv backups would be useful.

Also, it seems like Desmume can go quite a while without actually writing your .dsv file to disk. Having some kind of automatic write to disk every hour or so, rather than waiting for the ROM to be closed or reset (which seem to be the only times it writes to disk, but I could be wrong), would also be helpful. That way if Desmume crashes after several hours of gaming, and fails to write the .dsv file to disk, you don't lose all of those hours.

Offline

#9 2020-12-09 22:51:59

zeromus
Radical Ninja
Registered: 2009-01-05
Posts: 5,422

Re: Lost my save, I _should_ be able to load from a backup, but no good...

Try it and see. You'll find there's a backup state from the moment you accidentally loaded a state. Load the backup.

Desmume used to flush the save data once every second. As of this commit in 2013, someone else made it no longer do that 6cdd10b84a5cdec29a024c21f96ee1e0701be1b9 ; in exchange, it is supposed to be flushing every time the game writes to it, but it appears bugged and it never flushes until the rom is closed. Nobody noticed probably because not flushing until the rom is closed (or when a state is loaded) is pretty normal for an emulator.

Generally speaking, data being saved after emulators crashing after all those hours is not something the emulators developers guarantee, for good reasons, and I am not going to guarantee it. If the game is in the middle of writing data when it crashes, then your data will be lost. Instead, users should be in charge of choosing when to flush the data. This is considered to be quite a hostile position, but I don't care. I'll change it one day. But in the meantime it's no different than most other emulators so I don't consider it imperative to change it. It's simply par for the course. You're just salty because you got your files mixed up; this isn't the right time to discuss the philosophy of when non-mixed up users data is saved.

Offline

#10 2020-12-10 01:03:45

coredumperror
Member
Registered: 2010-03-22
Posts: 9

Re: Lost my save, I _should_ be able to load from a backup, but no good...

> You'll find there's a backup state from the moment you accidentally loaded a state. Load the backup.

Oh, that's good. That would solve this problem entirely. But how does one load that backup state?

> You're just salty because you got your files mixed up

You've misunderstood what I've been saying this whole time, if you think that's the case. Files being mixed up is completely irrelevant to my having lost several hours of gameplay when my cat stepped on my keyboard and loaded an old savestate, and then the emulator overwrote my in-game saves. In-game saves being destroyed should not be a thing that can happen without an OBVIOUS path to recovery.

So, I looked into your suggested path to recovery. I poked around in Desmume and tried to figure out how to load this backup that you mentioned. And it took me, an expert PC user and experienced player of emulated games, several minutes to figure it out, while *knowing* that recovery was possible, and while *not* in an agitated state over having just lost several dozen hours of gameplay.

So, in the name of trying to make this path to recovery more obvious for the average, frustrated newbie, I would like to recommend three things:

1. Make the "Load State From..." menu item open in the emulator's "StateSlots" folder by default. It currently opens in the "States" folder, which is empty (maybe this folder is used for a different kind of game?). If it opened in StateSlots, it would have been significantly more clear to me that backups existed for save states, because that's where the "Chrono Trigger (backups)" folder lives. I might have been able to intuit that loading one of those backups would get me back to my original gameplay spot from before the accidental state load.
2. Write "Creating backup of current state as "path/to/filename/of/backup.dst" into the Console *before* the log lines about loading a save state. The console is displayed by default, so a careful examination of it will teach the user what you just taught me in your most recent comment. If I'd known that there was a save state made from right before the accidental load, I would have known to go looking for a way to load from it.
3. Add a new menu item, File -> Load Latest Backup State. That'll give a flailing user who doesn't know what just happened *something* to grab onto that will fix their issue after an accidental state load, without requiring them to notice the console log or know how to find the folder with the state backups, or even know *which* backup they need to load to get back to where they were.

If you just do 3, I think that'll be a huge win. 1 and 2 would be very nice additions.

Offline

#11 2020-12-10 03:58:48

zeromus
Radical Ninja
Registered: 2009-01-05
Posts: 5,422

Re: Lost my save, I _should_ be able to load from a backup, but no good...

1. I didn't know there were two separate state directories. I don't really feel like combining them now, but I might do that.
2. I guess that costs nothing, I suppose I'll do it
3. Most people close the emulator or do other destructive long before they realize they lost their data. I don't think this will be worth the trouble.

Offline

#12 2020-12-10 04:24:26

coredumperror
Member
Registered: 2010-03-22
Posts: 9

Re: Lost my save, I _should_ be able to load from a backup, but no good...

Fair point on #3. Though I do still think it'll be useful for people who intentionally load a state, only to realize "Oh crap, I shouldn't have done that!" So maybe it'd make more sense with a name like "Restore Last Game State".

Offline

Board footer

Powered by FluxBB