Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old 3 Weeks Ago (4:23 PM). Edited 3 Weeks Ago by FBI.
FBI's Avatar
FBI FBI is offline
Free supporter
 
Join Date: Jan 2013
Location: Unknown Island
Gender: Male
Posts: 1,896

Expanded Save block



Hello, hopefully everyone is doing well. Lately I released a Dexnav implementation that required you to have a saveblock hack installed. It came to my attention that JPAN's hack was the only real one, and the source code seems to be lost. Additionally if you have 800+ Pokemon in your game, extended flags +vars, bags, and whatever other features that relied on save RAM, then this save ram isn't enough!

The old saveblock hack by JPAN reserved 3780 bytes of save RAM by compressing the game saveblocks closer together and using the space at the end of the block. The idea was really well thought out, and JPAN has my respect for implementing it during the older days of ROM Hacking. I've taken this great idea and added on another 8160 bytes to use, for a total of 11940 bytes. This still leaves about 3200 bytes of FireRed's help menu VRAM buffer still free incase you used it as disposable RAM. The hack is done by scrapping two sectors reserved for E-Reader and Mystery Gift/Trainer tower.

The Ereader feature isn't present in EM, and I don't think anyone will really miss the Mystery Gift/Trainer tower features as I haven't seen any hacks making use of it. I've attached a patch to this post and the source code is available here: https://github.com/EternalCode/Save_Expansion


Notes



- The saveblock starts from 0x0203B174 and ends at 0x0203E018, for 11940 bytes.

- This hack is compatible with JPAN's saveblock hack. He hooked into functions, I rewrote them so there should be nothing to remove. My hack will just replace his. As always make a back up.

- Compatibility with Jambo51's vars and flags expansion https://www.pokecommunity.com/showpost.php?p=9971546&postcount=2

- This hack takes up 0x6D4 bytes currently. The patch will insert it at 09700000. Compile from source to freely change insertion location.

Credits


- Please include JPAN in your credits for his idea
- Pret team for their research
Attached Files
File Type: ups fbi_save_expansion.ups‎ (16.00 MB, 18 views) (Save to Dropbox)
__________________
...
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old 3 Weeks Ago (4:46 AM).
FBI's Avatar
FBI FBI is offline
Free supporter
 
Join Date: Jan 2013
Location: Unknown Island
Gender: Male
Posts: 1,896
Hey, bumping this to say that Jambo's expansion (https://www.pokecommunity.com/showthread.php?t=302476) is compatible with this hack. I do recommend a couple of tweaks, they're not mandatory, but definitely recommended.
Quote:
.align
memoryblock: .word 0x0203C000
This is in the flags routine. You probably don't want to do this, as that is somewhere near the middle of the save area. Instead change this address in his hack to 0x0203B174 so it reflects the start of the save area.

Similarly:
Quote:
.align
memoryblock: .word 0x0203C200
You probably want this changed to be "0x0203B174 + 0x200". You can leave it there as an expression.
__________________
...
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old 3 Weeks Ago (9:06 AM).
Criminon's Avatar
Criminon Criminon is offline
Pokemon: Aqua Blue
     
    Join Date: Aug 2012
    Location: California
    Gender: Male
    Nature: Timid
    Posts: 256
    Oooooooo!

    Think I'm going to try this.
    __________________
    Reply With Quote
      #4   Link to this post, but load the entire thread.  
    Old 1 Week Ago (1:42 PM).
    Petuuuhhh's Avatar
    Petuuuhhh Petuuuhhh is offline
     
    Join Date: Apr 2017
    Location: Georgia
    Age: 25
    Gender: Male
    Posts: 635
    JPAN's saveblock patch breaks flashcart capability. You can disable the Previously On Your Quest system and free up enough free ram for the bag, and since that ram gets saved by the game you can keep your items after turning the power off.
    __________________
    Reply With Quote
      #5   Link to this post, but load the entire thread.  
    Old 1 Week Ago (3:14 PM).
    FBI's Avatar
    FBI FBI is offline
    Free supporter
     
    Join Date: Jan 2013
    Location: Unknown Island
    Gender: Male
    Posts: 1,896
    Quote:
    Originally Posted by Petuuuhhh View Post
    JPAN's saveblock patch breaks flashcart capability. You can disable the Previously On Your Quest system and free up enough free ram for the bag, and since that ram gets saved by the game you can keep your items after turning the power off.
    I haven't tested mine on hardware because well I don't own a GBA. However, I did test on a few emulators, namely VBA-M and mGBA. It seems to retain the save fine.

    Would be nice if you can test it on hardware/phone :)
    __________________
    ...
    Reply With Quote
      #6   Link to this post, but load the entire thread.  
    Old 1 Week Ago (3:16 PM).
    Petuuuhhh's Avatar
    Petuuuhhh Petuuuhhh is offline
     
    Join Date: Apr 2017
    Location: Georgia
    Age: 25
    Gender: Male
    Posts: 635
    Quote:
    Originally Posted by FBI View Post
    I haven't tested mine on hardware because well I don't own a GBA. However, I did test on a few emulators, namely VBA-M and mGBA. It seems to retain the save fine.

    Would be nice if you can test it on hardware/phone :)
    I found this, and I'm wondering if who told me that was misinformed: https://www.pokecommunity.com/showpost.php?p=6993092&postcount=204
    __________________
    Reply With Quote
      #7   Link to this post, but load the entire thread.  
    Old 1 Week Ago (4:08 PM).
    FBI's Avatar
    FBI FBI is offline
    Free supporter
     
    Join Date: Jan 2013
    Location: Unknown Island
    Gender: Male
    Posts: 1,896
    Quote:
    Originally Posted by Petuuuhhh View Post
    I found this, and I'm wondering if who told me that was misinformed: https://www.pokecommunity.com/showpost.php?p=6993092&postcount=204
    You misinterpreted the post. JPAN had two patches, the first one was the one with issues. This saveblock hack here has no relation to either of them anyways. I only used JPAN's idea for the first 4kb.
    __________________
    ...
    Reply With Quote
    Reply

    Quick Reply

    Join the conversation!

    Create an account to post a reply in this thread, participate in other discussions, and more!

    Create a PokéCommunity Account
    Ad Content
    Thread Tools

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -8. The time now is 10:34 AM.