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: 205

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: 6,169

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: 6,169

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: 6,169

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: 6,169

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

#13 2023-03-29 15:53:38

mayinoue
Member
Registered: 2023-03-29
Posts: 3

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

I'm not very clued up the the proper etiquette of an online forum like this. I wasn't sure whether it would be better to make a new thread of my own, or comment on this older one. But its evident I ended up going with the latter.

I'm facing a similar issue to op. I don't backup my game reguarly, although I know I should, but kept saved states on my f9 and f10 keys as progress benchmarks. Cat jumped on my desk and when picking him up I hit one of the fkeys, which brought me to the one of the old states. I immediately knew this was problematic and wouldn't be as simple as resetting my game. I hadn't made a backup file or save state in months, as I was content using the in-game save function (Pokemon rom). and I don't have the technological knowhow to locate any other files than the ones in the battery and state folders. I checked the dates on said files to no avail and ultimately decided to reset my game which confirmed my suspicions.

Any help on locating a more recent save file would be appreciated.

Offline

#14 2023-03-29 20:45:12

zeromus
Radical Ninja
Registered: 2009-01-05
Posts: 6,169

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

I don't want to read this whole thread, but when the states were loaded, desmume created a (backup) state. Simply load that. Right?

Offline

#15 2023-03-29 21:48:58

mayinoue
Member
Registered: 2023-03-29
Posts: 3

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

That's fair, I wouldn't myself. The issue is i'm not quite sure where to find said (backup) state.

Offline

#16 2023-03-30 01:39:43

zeromus
Radical Ninja
Registered: 2009-01-05
Posts: 6,169

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

I'm not sure where I left my shoes. Do I sit helplessly? No, I search for them. Hit ctrl+f
I'd suggest to "look in mydesmumedirectory\StateSlots\Name Of Game (backups)" but I'm not sure you'd know what that means. I'm trying to teach a man to fish here, not feed him.

Offline

#17 2023-03-30 20:56:13

mayinoue
Member
Registered: 2023-03-29
Posts: 3

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

ur attitude stinks lol

i understand directories and know what the search shortcut is
not everyone slightly out of their scope is a helpless degenerate asking to be spoon fed answers without any sort of critical thinking

thanks for the friendly advice

Offline

#18 2023-05-28 11:16:37

purekanacbd
Member
Registered: 2023-05-28
Posts: 1
Website

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

Yep yep

Offline

Board footer

Powered by FluxBB