XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Mon Aug 21, 2017 3:13 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: [NDS]Civilization Revolution Save game files
PostPosted: Tue Jul 21, 2009 9:28 pm 
Offline
Site Admin
User avatar

Joined: Wed Jan 15, 2003 6:45 pm
Posts: 4007
Location: Dungeons of Doom
Has thanked: 409 times
Have thanks: 549 times














You can make the ads go away by registering

I've got trouble figuring out the complete format of the Nintendo DS savegame files. There seems to be some kind of compression or CRC going on. Parts start with 90 XX and then actual values that make sense, but this is not consistent. If I alter those parts that make sense, the game detects corruption, which means the files are checksummed or crc-ed somehow. The files start with a size parameter.

Somebody dealt with this type of compression/saving before?



Here's the whole Sav file that stores 5 savegames.



Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.


_________________
Please like our Facebook page!


Top
 Profile  
 
 Post subject: Re: [NDS]Civilization Revolution Save game files
PostPosted: Sun Nov 29, 2009 1:44 pm 
Offline
Site Admin
User avatar

Joined: Wed Jan 15, 2003 6:45 pm
Posts: 4007
Location: Dungeons of Doom
Has thanked: 409 times
Have thanks: 549 times
OK, I think I've located the CRC/Hash.

The save games are stored the .sav file, of course. And the .sav start off with the magic word "RCMS". At 0x14 is the first checksum, of 4 bytes long, followed by the second etc. up to 5 savegames. The first savegame starts at 0x800, the second at 0xd000, the third at 19800 etc (each savegame has 0xc800 of bytes reserved for it).

Savegames start with an unsigned 32-bit integer that is the whole size of the savegame.

At 0x11 in the savegame there is also an unsigned 32-bit integer that I do not know the meaning of. I've attached a number of savegame files, first an empty one, then one right after the game initialized (so no actual games were saved) and finally one with three savegames: The first and second savegame are the same, except for slot and time. They are identical except for the unsigned 32-bit value I just spoke off. The third savegame is one where only one action different from the other savegames was done (a city founded with the first settler).



Luckily I found a plugin for IDA Pro 5.x that you can copy to IDA's loader folder.


By having that you can open .nds files (rom files, e.g. games).

Perhaps that will help in figuring out the hash/checksum/crc method used to check for savegame-corruption used in the game.


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.


_________________
Please like our Facebook page!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group