Advertiser Content

FBI

Free supporter

Male
Unknown Island
Seen 1 Day Ago
Posted March 30th, 2019
1,905 posts
6.6 Years

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

FBI

Free supporter

Male
Unknown Island
Seen 1 Day Ago
Posted March 30th, 2019
1,905 posts
6.6 Years
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.
.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:
.align
memoryblock: .word 0x0203C200
You probably want this changed to be "0x0203B174 + 0x200". You can leave it there as an expression.
...

Petuuuhhh

Male
Georgia
Seen 2 Days Ago
Posted 1 Week Ago
628 posts
2.3 Years
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.

FBI

Free supporter

Male
Unknown Island
Seen 1 Day Ago
Posted March 30th, 2019
1,905 posts
6.6 Years
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 :)
...

Petuuuhhh

Male
Georgia
Seen 2 Days Ago
Posted 1 Week Ago
628 posts
2.3 Years
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

FBI

Free supporter

Male
Unknown Island
Seen 1 Day Ago
Posted March 30th, 2019
1,905 posts
6.6 Years
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.
...
Advertiser Content