[NDS]Civilization Revolution Save game files

Want to beat the game a cheater? Figure out Savegame file formats here.
Post Reply
User avatar
Mr.Mouse
Site Admin
Posts: 4034
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 413 times
Been thanked: 547 times
Contact:

[NDS]Civilization Revolution Save game files

Post by Mr.Mouse » Tue Jul 21, 2009 9:28 pm

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?
civsaves.zip
Here's the whole Sav file that stores 5 savegames.
Sid_Meiers_Civ.zip
You do not have the required permissions to view the files attached to this post.

User avatar
Mr.Mouse
Site Admin
Posts: 4034
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 413 times
Been thanked: 547 times
Contact:

Re: [NDS]Civilization Revolution Save game files

Post by Mr.Mouse » Sun Nov 29, 2009 1:44 pm

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).
clean_savegames.zip
Luckily I found a plugin for IDA Pro 5.x that you can copy to IDA's loader folder.
nds_loader_idapro5.zip
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.
You do not have the required permissions to view the files attached to this post.

Post Reply