raytheon Posted April 20, 2023 Share Posted April 20, 2023 (edited) Hello. I'm fiddling around with HG/SS saves. Following DP save structure page and Bulbapedia for gen 4 save (As I cannot find any info about HGSS), I've split 512kb save into two partitions and then, after looking it up in the PkHeX code, using ccurate offsets, divided each partition to general and storage blocks. Now, having that and knowing that each of those blocks have 20-bytes long footer, I wanted to check in which partition I can find most recent both general and storage blocks. I think I've calculated everything okay - as size of the block is exactly the same as the size itself, also storage block save count looks probable. But when it comes to general block save count, it is always 0, no matter what - on both partitions, on both general and storage blocks. Is it possible? Does HGSS games set this value at all? Here are said footers: Spoiler partition 0 general block: whole_footer=b'\x00\x00\x00\x00\xe0\x00\x00\x00(\xf6\x00\x00#\x06\x06 \x00\x00\x95\xcf', general_block_save_count=0, storage_block_save_count=value=224, size_of_block=63016, checksum=b'\x95\xcf' Spoiler partition 0 storage block: whole_footer=b'\x00\x00\x00\x00\xe0\x00\x00\x00\x10#\x01\x00#\x06\x06 \x01\x00\xf6\xc8', general_block_save_count=0, storage_block_save_count=224, size_of_block=74512, checksum=b'\xf6\xc8' Spoiler partition 1 general block: whole_footer=b'\x00\x00\x00\x00\xe1\x00\x00\x00(\xf6\x00\x00#\x06\x06 \x00\x00\x9d.', general_block_save_count=0, storage_block_save_count=225, size_of_block=63016, checksum=b'\x9d.' Spoiler partition 1 storage block: whole_footer=b'\x00\x00\x00\x00\xe1\x00\x00\x00\x10#\x01\x00#\x06\x06 \x01\x00\x92D', general_block_save_count=0, storage_block_save_count=225, size_of_block=74512, checksum=b'\x92D' I've observed this with my every HGSS save, but to double-check it, I've took save from this thread and this save is the source of data for above spoilers. Is there any "debug mode" or something that would let me see those values in PkHeX? Because all I've seen was an info whether checksums are valid or not, but no data about partition number of selected blocks. EDIT: I've changed the offsets and looked for some Diamond/Pearl save in the Saves subforum, to verify my hypothesis and as it turns out, my code is valid! It seems that HGSS games does not use general block save count at all, hence its empty. But when I've loaded this Pearl save, I've got following results: Spoiler partition 0 general block: whole_footer=b'\xe7\x00\x00\x00N\x02\x00\x00\x00\xc1\x00\x00#\x06\x06 \x00\x00\xbe\xa3', general_block_save_count=231, storage_block_save_count=590, size_of_block=Block(value=49408, checksum=b'\xbe\xa3' Spoiler partition 0 storage block: whole_footer=b'\xe6\x00\x00\x00y\x01\x00\x00\xe0!\x01\x00#\x06\x06 \x01\x00L\xc1', general_block_save_count=230, storage_block_save_count=377, size_of_block=74208, checksum=b'L\xc1' Spoiler partition 1 general block: whole_footer=b'\xe6\x00\x00\x00M\x02\x00\x00\x00\xc1\x00\x00#\x06\x06 \x00\x00\x16\xa1', general_block_save_count=230, storage_block_save_count=589, size_of_block=49408, checksum=b'\x16\xa1' Spoiler partition 1 storage block: whole_footer=b'\xe7\x00\x00\x00z\x01\x00\x00\xe0!\x01\x00#\x06\x06 \x01\x00g^', general_block_save_count=231, storage_block_save_count=378, size_of_block=74208, checksum=Block(value=b'g^' so my question now is: in HGSS games, how it is determined from which partition general block should be loaded? simply from the one which holds storage block with higher count of storage block saves? Edited April 20, 2023 by raytheon fixed typo Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now