According to http://projectpokemon.org/wiki/Pokemon_NDS_Structure,the bytes 0x06 & 0x07 are used for the checksum. Along with the footer, pokesav seems to get these bytes wrong. I need someone to give me a more in-depth algorithm for the checksum. This is the one provided on the link:
The checksum is calculated in three steps:
1. Split the unencrypted data from offsets 0x08 to 0x87 into two-byte words,
2. Take the sum of the words, and
3. Truncate the sum to 16 bits.
On step 2, what do you meen by the sum of the words? Is it the sum of the values of the words.
On step 3, I learned from school that truncate means to cut the size of the numbers after the decimal (rounding).
eg. 16.634 truncate 2 = 16.63
Does this version of truncate mean only save the most signifigant digets?
I am planning to make a small program that will take a pokesav *.pkm, and fix it so it is byte-for-byte perfect. Sorry, don't have time to test it myself, and probably won't be able to go back online for a few days. Thanks to anyone who answers :bidoof: