Gaming Retrieving old game data from original sav. file

Erikvd13

Member
OP
Newcomer
Joined
Feb 18, 2010
Messages
11
Trophies
0
XP
147
Country
Netherlands
Is it possible to get deleted data from an original sav. file?(retrieved from godmode9)? So I can view my old records of Mario Kart DS from like 2006.
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,373
Country
United Kingdom
I am not entirely sure what you have for the setup there.

A lot of the time for flash memory and hard drives then data is not immediately deleted but space marked as free (can do that in two bytes and a simple write, as opposed to having to take the time to write over, and most things have limited writes, a whole lot of data). This is how a lot of file undelete programs work and we have seen sort of similar things for flash carts and ROMs, even more so if the game alternates between memory sections (pokemon for instance cycles between them two sections both as a backup so you might only lose however long since the save before rather than everything and a kind of wear levelling so it is not just one section being hammered all the time). That said just as many games on the DS take the easy route of take whatever data is in memory and write it all back to save rather than section things out -- unlike the NES where every byte is precious you likely have loads to spare on the DS so no need to make life harder when dump it all into save and go from there.

To do this you will probably then need to know things about the internal layout of the data in the save file. Though this can be simple enough.
Keep your original save with the deleted data as you will be comparing it.
Make a new save, quit out and have it save.
Now only set a record, can even do it twice if you want.
Where the data has changed is likely both the hash (games check data to make sure you have not altered it or it got corrupted), any play time/character selection count data the game keeps and the record. Tends to be fairly obvious which is which, and if not then do a race or something but don't set a record and then it will be.

If you need them to load back into the game then you have some more work to do (though possibly not that much). If you just want the times then hopefully you can figure out how it is stored -- easy way would be to get the time you set in the earlier test and figure out how the hex of the record matches the on screen time (I don't know what they would have used here and could be any number of things from millisecond/frame counts, to floats, to some whole number, to some split between seconds that gets converted to minutes and fractional, to a split up number with one each for minutes, seconds and fractional). If there are racer ghosts involved then that makes life a bit harder. Anyway if the recovered save file is all zero or FF or something in that section then you probably don't have it.

If you want to try deleting some records from your newly created save then do that. It might then have a little section it uses to note what is lost, assuming it is not just straight overwritten.

Figuring out hashes can be tedious (you have to figure out what the hash type is, which could be completely custom, and what part of the save is hashed, which could also be completely arbitrary), so if I don't have to I won't bother. I do this by finding out where the "hash failed, proceed to tell user the save is corrupt and delete or hash is OK, proceed to load game" is located, change the game so it always takes the "save is good, proceed onwards" path (which can be as easy as overwriting an instruction with a NOP aka no operation) and the game will load your corrupted/hash failed save, and as a nice bonus will likely correct the hash when it next saves.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: https://m.youtube.com/watch?v=d0-EuoBjkKI&pp=ygUqd2F0Y2htZW4gaSdtIG5vdCB0cmFwcGVkIGluIGhlcmUgd2l0...