hi suloku
first of all, thank you very much for your research. it has helped me understand the pokemon stadium save file a lot better . fair warning, i am a noob when it comes to save editing via a hex editor.
Right now, I have a save file that has all 151 pokemon registered in the hall of fame. I'm trying to pop one of the pokemon out, so that the next time that specific pokemon is used in battle and wins, I can win the amnesia psyduck.
I've tried this with three different pokemon: Bulbasaur, Mewtwo, and Mew, mostly because these are at the start and end of the Hall of fame data respectively. Using your guide, specifically this part: "26 byte * 151 pokemon data structure (seems to hold Level, OT ID, Nickname and OT Name, in this order. Level is stored like this level 100 = 0x6407)", I found where the pokemon themselves are stored. Each 26 bytes corresponds to a different pokemon, as you mention in the OP.
However, when I try to pop one of them out (by setting each byte to 00), it seems to wipe the entire Hall of Fame contents after launching the game. I have made sure to saveswap before editing, and saveswap again after editing so that the game loads the save fine. I have all the other unlockables (such as R2) working fine in my edited save.
Here are the bytes I have in my save file that correspond to Mewtwo and Mew. Both are level 100, OT JACKSTR, and ID: 44423. This is a PJ64 stadium save that I found on the web, I believe on zophar's domain.
Mewtwo: 07 64 AD 87 8C 84 96 93 96 8E 50 20 80 13 AC 89 80 82 8A 92 93 91 50 33 80 0A
Mew: 87 64 AD 87 8C 84 96 50 93 8E 88 92 84 50 AC 89 80 82 8A 92 93 91 50 02 80 0A
On a clean save, these are all zeroed out, which is why I thought I could simply zero out one of the pokemon and have it simply disappear from the hall of fame. However, I was wrong.
I guess this has something to do with the 2 checksum bytes at the end of the hall of fame section? Do you know how I can calculate a valid checksum so that I can do what I'm trying to do?
EDIT: Okay.. after messing around a bit more with this I found out what the deal is. Using a tool called 010 Editor (found here: http://www.sweetscape.com/010editor/ ) I was able to calculate the correct checksum. Basically, you need to highlight all the data from the 0x0010 header of hall of fame data (located at 0x8DC0) through the ending 4 byte footer of the section located at 0x9D1D, including it. Then run the checksum calculation and use the last 2 bytes of the "Checksum - Ubyte (8 bit)" field. Use the last 4 digits of that checksum value (aka 2 bytes) and put it after the footer, where the checksum is expected. Save, swap the bytes again using the tool, and load up in pj64. Worked like a charm.
Again, thank you so much for your research as it has helped me (a noobie editor) to alter my save data. Let's see if I can get that psyduck now!