You are not logged in.

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



#1 2023-09-16 15:14:33

AmzRigh
Member
Registered: 2023-09-16
Posts: 3

CLI Savegame Converter?

I'm trying to set up a mechanism to automatically sync my saves between emulator and handheld. Part of that process, then, is automatically converting the saves from DeSmuME into something that my DS can read off the R4, and back again.

I know DeSmuME has its Import/Export functions, and I also found a web-based save format converter, but both of those are rather manual processes. Is there (or could there easily be) a CLI converter between DSV and raw SAV, so I could simply call it with a script?

(I also considered asking for an "Export on Close" feature, but then I realized that'd only cover half my needs here. And I can't think of how you'd go about efficiently importing automatically within DeSmuME, so that's how I landed on CLI. I would still gladly take this kind of solution, though, it'd be less work for me.)

Thanks!

Offline

#2 2023-09-17 00:18:09

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

Re: CLI Savegame Converter?

dsv is a raw save with a footer. open it up in a hex editor and snip where it says snip at the end

Offline

#3 2023-09-17 06:30:04

AmzRigh
Member
Registered: 2023-09-16
Posts: 3

Re: CLI Savegame Converter?

What information is in the footer, so that I can do it in the opposite direction as well?

Offline

#4 2023-09-17 10:58:51

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

Re: CLI Savegame Converter?

You know what information is in the footer because you just cut it out. Put it back. If you really need to know the details. look at struct BackupDeviceFileInfo in mc.h

Offline

#5 2023-09-17 17:16:26

AmzRigh
Member
Registered: 2023-09-16
Posts: 3

Re: CLI Savegame Converter?

I'll take a look there, thanks! I expect there will be times this happens first in the opposite direction, so I won't have the clipped footer handy. (though I suppose I could just manually Import on those occasions and let the system handle it from there...)

Offline

#6 2023-09-17 23:11:06

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

Re: CLI Savegame Converter?

importing sav works better if you have the advanscene database. I cant remember if we ship with that. in general the size of savedata can't be reliably determined from the game or the incoming raw sav. the whole situation is a mess.

Offline

Board footer

Powered by FluxBB