I there any way to calculate the crc hash?

Discussion in 'NDS - ROM Hacking and Translations' started by Ismaw34, May 26, 2014.

  1. Ismaw34
    OP

    Ismaw34 GBAtemp Regular

    Member
    100
    14
    May 23, 2009
    Hello,

    I'm experimenting with the nds saves, and i found that some sav files contains a crc hash at start of the file.

    Header:0x0
    Lenght: 4 bytes
    Description: CRC32 hash?

    Is there any way to recalculate the hash when i edit the file to prevent "save corruption"?

    Thanks.
     
  2. FAST6191

    FAST6191 Techromancer

    pip Reporter
    24,118
    10,033
    Nov 21, 2005
    United Kingdom
    Hashes/checksums used in save games can vary widely -- for the DS I have seen it range from cryptographic grade stuff like SHA1 and MD5 and go right through to basic bytesums, likewise the CRC stuff can be a bit custom and if nothing else trying to figure out what area is hashed can be annoying. It tends to fall on the more basic side of things, after all it is just a save and anything drastic takes time to do.

    There is no easy way to figure out an unknown checksum, some get lucky but others have to watch it happen and replicate that. Few people reinvent the wheel though so as long as you know roughly how something in the CRC family is calculated, the idea of parity, bytesums are usually blindingly obvious when you look at them in a debugger and maybe something a bit more exotic you should be good.

    If you prefer, or if you are otherwise making a save editor, you can break the game's has check. This means the game will run the check but regardless of whether it works or fails it will continue on.
     
  3. Ismaw34
    OP

    Ismaw34 GBAtemp Regular

    Member
    100
    14
    May 23, 2009
    Im making a wfc patcher for layton3 and 4 games.
    I have the files with downloaded puzzles and the same without them.
    The problem is the crc hash at the header.

    I dont know how to disable the check, as the first 2 dont have them and i have a ips patch that does the work.

    I was planning to release the app when i figured out the crc thing. But, anyways, thanks.