• 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.

[ASM & Hex] Saveblock Expansion

71
Posts
7
Years
    • Seen Jul 11, 2022
    In JPAN's saveblock hack, he expands the save block to around 0x203CE00, I believe. Is there anything wrong with expanding the save block past this, all the way to 0x203F173 (where the help screen ends)? I modified the original routine to expand it to 0x203D800 and it appears to save properly on VBA. Would there be an issue with other emulators?
     
    82
    Posts
    6
    Years
  • Bump, would like to know.

    With that said, saveblock gives 400bytes irc. What would you do with all this ram? I've done quite a bit and I don't even think I'm using 50.
     
    71
    Posts
    7
    Years
    • Seen Jul 11, 2022
    Bump, would like to know.

    With that said, saveblock gives 400bytes irc. What would you do with all this ram? I've done quite a bit and I don't even think I'm using 50.
    Well if you want to expand your items, flags, pokedex, etc, it requires a lot of free ram.
     
    82
    Posts
    6
    Years
  • Well if you want to expand your items, flags, pokedex, etc, it requires a lot of free ram.

    It's takes 1 byte of ram peitem that requires ram, not all of them do. No flags do not or it's at least not stated in the tutorial on expanding flags(just looked) and I have no idea about the Pokedex.

    When you fill up your ram, then look for more. I highly doubt ANYONE has used more than the 400 bytes.
     
    71
    Posts
    7
    Years
    • Seen Jul 11, 2022
    It's takes 1 byte of ram peitem that requires ram, not all of them do. No flags do not or it's at least not stated in the tutorial on expanding flags(just looked) and I have no idea about the Pokedex.

    When you fill up your ram, then look for more. I highly doubt ANYONE has used more than the 400 bytes.
    I'm not sure where you got that from, but if you expand the flags and vars according to the tutorial, you're using 0x200 bytes for the flags, and 0x400 bytes for the vars. Each flag in memory takes up 1 bit (1/8 byte) so 0x1000 flags take up 0x1000 bits, or divided by 8, 0x200 bytes. Each var in memory takes up two bytes, so 0x200 vars take up 0x400 bytes. Pokedex flags also work like a bit field. 807 Pokemon take up 0x65 bits for both seen and capture, so thats another 0xCA bytes taken up. So as you can see, those alone take up 0x6CA bytes in memory. Adding on items to that (each item takes up 3 bytes) will add a significant number to your total.
     
    Last edited:
    82
    Posts
    6
    Years
  • I'm not sure where you got that from, but if you expand the flags and vars according to the tutorial, you're using 0x200 bytes for the flags, and 0x400 bytes for the vars. Each flag in memory takes up 1 bit (1/8 byte) so 0x1000 flags take up 0x1000 bits, or divided by 8, 0x200 bytes. Each var in memory takes up two bytes, so 0x200 vars take up 0x400 bytes. Pokedex flags also work like a bit field. 807 Pokemon take up 0x65 bits for both seen and capture, so thats another 0xCA bytes taken up. So as you can see, those alone take up 0x6CA bytes in memory. Adding on items to that (each item takes up 3 bytes) will add a significant number to your total.

    Glad I contested you on this, learn something new everyday! Still can't find Jambo explicitly stating how much ram is used for said flags and vars but certainly makes sense.

    No clue where I was getting my numbers from. I swear I wasn't making them up but koople is right on the 4kbs of ram added.

    With that said, test your new routine on hardware. Jpan mentioned he redid the code to be compatible with hardware. That might be why he didn't go all the way. If that's not the case, no clue.
     
    Back
    Top