I would like to know where I can find information on editing BW sav file. If if helps my main goal is that I want to edit the Battle Box, and fix any checksums I need to.
Pokegen will likely fix checksums, though I don't htink it currently edits the battle box.
(I just noticed that this thread has over 2 million views)
I need to fix the checksums myself.
I have a lua script I use with DeSmuME that injects 6 random pkm files into the battle box by editing RAM. I want to do this on hardware, I was going to write a small homebrew app that would inject 6 pkm files in to the battle box by editing the sav file. but to do that I also need to fix checksums.
I been comparing some sav files and found what I need to edit. I need to know how to calculate the battle box checksum which are at 0x20D5E, 0x23F62, 0x44D5E, and 0x47F62, as well as another checksum at 0x23F9A and 0x47F9A.
Pretty sure there's no information on the battle box sav structure.
From our experience with vsplayer data, you might not even be inserting standard pkms by the way :P
All of the checksums I've seen (entralink storage, etc) are all the standard CRC-16 ccitt style
Last edited by Kaphotics; Apr 9th, 2012 at 10:04 PM.
battle box is standard 136 byte storage pkm. both pokesav and pokegen fixed the checksum for the battle box data. I can edit the battle box data with encrypted pkm files just fine. but the battle box checksum located at the end of the data at save file offset 0x20D5E and mirrored at 0x23F62 for the list of checksums and the checksum for the list of checksums at 0x23F9A i do not know how to calculate them.
0x20D5E's checksum is for the region 0x20A00-0x205DBI included the leading zeroes; it wouldn't matter because they dont influence the checksum. Maybe Codr knows about that other region.Spoiler
thanks for the info, ill see if i can get it the checksum calculated in the hombrew app.
May I know why you want to insert 6 Pokémon into the battle box by editing RAM with your homebrew app?
Battle boxes get locked at tournaments so they cannot be modified between battles.
So, do you plan to cheat at tournaments or what?
No, I do not plan to cheats at tournaments, I have no plans to enter any official tournaments at all. I am not as serious as I was in competitive battling as I was in 4th gen. I do not make teams anymore. whenever I battle I just bring 6 random competitively viable pokemon. There is a type of battling called roulette battles where each player ends up with 6 random pokemon to battle with and try to make the best of it. that is how I always battle in 5th gen even if the other player i am battling is using a solid planed out team. I just use 6 random pokemon and make the best of it. I battle alot on DeSmuME emulator and had a script that would take 6 random encrypted pkm files and inject it into the battle box data in ram and when i go to battle i just pick to use battle box and start the match with 6 randoms. but i want to have this work also on a DS as well, since i cannot have the program run while the game is running i need to instead edit the save file before i start the game to have the 6 random pokemon.
as of now i have the hombrew app correctly calculating the crc of the battle box data and the list of checksums. now i just need to get it to write the data back to the file properly.
Master Pokemon Breeder, RNG & PokeGen Expert!
My Pokemon Black 2 / White 2 Theory
My Extensive Pokemon Dream World Database
Quit asking and just look here for Acanto's PokeGen guide. Would searching the forums kill you?
can you post the source file for this? i'm curious. or maybe the whole programmer's notepad project if you're feeling ambitious.
cleaned up the source and added comments for the nds file, the source for the exe is included too but i didn't touch it up.
The original link was updated.