• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Research: The save file structure of Gen 1 Hall of Fame data

536
Posts
4
Years
  • Age 37
  • Seen Apr 22, 2024
Maybe you want to do something interesting with it. Maybe you want to just unbork your Hall of Fame after encountering missingno. Either way, this tutorial is going to describe just where and how the HoF data is stored in Gen 1 save files. Keep in mind that hexadecimal numbers are prefixed by "$".

I've recently discovered this information through my own experimentation. It doesn't seem to be well documented anywhere, so I wanted to post it here for anyone who happens upon it.

Let's begin. You will need a Gen 1 .SAV file wherein the elite 4 has been defeated at least once. You will also need a hex editor. Use the hex editor to open the .SAV file.

Scroll to address $0598. This is where the hall of fame data begins.

Now, each pokemon in the HoF is recorded in a 16-byte structure. Each address location of the .SAV file holds a single byte of data. Address locations $0598 through $05A7 contain the 16 bytes of the very first pokemon in the HoF. The second pokemon is stored in $05A8 through $05B7. And so on and so forth.

The HoF data does not contain which team each pokemon belongs to. All pokemon are stored back-to-back. Things like actual number of teams used to beat the elite 4 are stored elsewhere, and they really aren't important to this tutorial.

Now for an explanation of the 16-byte structure:
Byte 1 - Hex ID for the pokemon's species.
Byte 2 - Pokemon's level in hexadecimal.
Bytes 3 through 12 - The pokemon's name. Each byte holds the hex ID assigned to a single character. Unused characters at the end are filled-in with the value $50.
Byte 13 - Always has a value of $50 because that value is the end-of-name terminator.
Bytes 14 through 16 - All zero values. It seems to act as a buffer space, but needs more experimentation.


EXAMPLE: Here's is the mapping for a level 61 Raichu named "CABBA" that is the very first pokemon in the HoF.
Address | value | meaning

$0598 | $55 | Raichu
$0599 | $3D | lvl 61
$059A | $82 | "C"
$059B | $80| "A"
$059C | $81 | "B"
$059D | $81 | "B"
$059E | $80 | "A"
$059F | $50 | end-of-name
$05A0 | $50 | end-of-name
$05A1 | $50 | end-of-name
$05A2 | $50 | end-of-name
$05A3 | $50 | end-of-name
$05A4 | $50 | end-of-name
$05A5 | $00 | padded with zero
$05A6 | $00 | padded with zero
$05A7 | $00 | padded with zero


The HoF data extends all the way to address $1857. That's enough room for 300 pokemon! Space not used for pokemon will be likely populated with junk data, but this can generally be ignored if you know how many pokemon should be in the HoF at one time. This swath of space is also not locked-down by the save checksum. You are able to freely edit it with the hex editor.
 

Halfshadow

Sono italiano/I'm italian.
104
Posts
15
Years
I didn't understand correctly. Are you telling that is possible repair the corrupted data or only where the data is stored? I cleared the corrupted data using a cheat code that clear the HOF availability in the PC (but only if is turned on) and then the game started to add the HOF since the beginning, then the code is now turned off but I don't need of it longer, only to clear the junk HOF data. The only issue is that I lost my original 1st victory team data.
 
536
Posts
4
Years
  • Age 37
  • Seen Apr 22, 2024
I didn't understand correctly. Are you telling that is possible repair the corrupted data or only where the data is stored? I cleared the corrupted data using a cheat code that clear the HOF availability in the PC (but only if is turned on) and then the game started to add the HOF since the beginning, then the code is now turned off but I don't need of it longer, only to clear the junk HOF data. The only issue is that I lost my original 1st victory team data.

Yes, you could essentially do your own repairs by manually editing the hall of fame portion of your save file in a hex editor.
 

Halfshadow

Sono italiano/I'm italian.
104
Posts
15
Years
Yes, you could essentially do your own repairs by manually editing the hall of fame portion of your save file in a hex editor.
But how I could repair my original HOF data? Do you know a formula that can clean the garbage data restoring the original? Is my answer. I have always a backup with the corrupted data, if you know how repair it without delete it to restart from the beginning a new HOF data would be useful.
 
536
Posts
4
Years
  • Age 37
  • Seen Apr 22, 2024
But how I could repair my original HOF data? Do you know a formula that can clean the garbage data restoring the original? Is my answer. I have always a backup with the corrupted data, if you know how repair it without delete it to restart from the beginning a new HOF data would be useful.

There's no way to automatically change it back. You have to remember what it was and then rebuild it yourself by editing the SAV file with a hex editor. The first pokemon in the HoF begins at address $0598, and each pokemon is 16 bytes long (following the format in the OP). I fixed mine by rebuilding all the entries

If you want to cut off garbage data and keep other things, then you would want to copy the good data to the beginning. Then fire up the game with a debugger, adjust wram address $d5a2, and save the game. This address holds the number of teams in the HoF, so you would lower this number to truncate off the bad data.
 
Last edited:

Halfshadow

Sono italiano/I'm italian.
104
Posts
15
Years
There's no way to automatically change it back. You have to remember what it was and then rebuild it yourself by editing the SAV file with a hex editor. The first pokemon in the HoF begins at address $0598, and each pokemon is 16 bytes long (following the format in the OP). I fixed mine by rebuilding all the entries

If you want to cut off garbage data and keep other things, then you would want to copy the good data to the beginning. Then fire up the game with a debugger, adjust wram address $d5a2, and save the game. This address holds the number of teams in the HoF, so you would lower this number to truncate off the bad data.
Ok, I see. Then I already done it, I restarted a new HOF data deleting it before trough a cheat code to disable it in the PC, then the game thought that was the first time and recorded it fro the beginning. Thank you for this help however.
 
Back
Top