ASM & Hex DPE & CFRU Installation

Started by Trainer_Red151 1 Week Ago 2:29 PM
  • 352 views
  • 10 replies
Seen 5 Hours Ago
Posted 3 Days Ago
7 posts
9 Days
Greetings,

I've recently started playing difficulty hacks (shoutout to Radical Red by Soupercell), and was impressed by the AI improvements.
Although there was still some shortcomings, it has come a long way with the help of C-injection via the CFRU, from when I used to play back in the day.
Because of this interest, I wanted to gain knowledge of how this AI is currently working and become familiar with the scripts and limitations inside the CFRU.


Long story short, I am attempting to implement both the DPE & CFRU c-injection into a vanilla fire red rom squirrels.
I have followed the steps inside the documentation and received the desired outcome test.gba file. No issues with compilation.

However, when attempting to open this file inside of modification tools (Gen3Tools), the added Pokemon from the DPE are not present, and the data seems to be corrupted by showing invalid levels, moves etc.
My offsets are:
DPE : 0x1800000
CFRU : 0x900000


Questions:
1. My understanding is that I need to inject the DPE first, then use this output test.gba file inside of modification tools. After all changes are complete, I then inject the CFRU as the final piece. Is this a correct assumption?
2. Do I need to expand the memory capacity of my vanilla ROM before setting the offset to memory location 0x1800000? It seems after I do the injection, the file size grows accordingly. So maybe this is done automatically?
3. Do I need to change the starting memory offset somehow inside of the modification tools?

Any help that you can provide would be much appreciated!
Seen 5 Hours Ago
Posted 3 Days Ago
7 posts
9 Days
Alright. So I did much more research on this issue and I think I have it solved.

The DPE needs to be injected to a base Rom. Then the CFRU needs to be injected in a second base Rom.

Copy the hex values from the offsets shown in the documentation from the CFRU Rom into the DPE Rom.

This DPE Rom (with the CFRU hex) is the one that gets modified in G3T.



Now I just need to figure out how to find the offset values as hexadecimal in the hex editor.

Need to try this when I get home.
Seen 5 Hours Ago
Posted 3 Days Ago
7 posts
9 Days
Does the offset for the DPE need to be before the CFRU offset though?

https://www.pokecommunity.com/showthread.php?t=443233

This installation guide has the offset of the DPE in a memory location after the CFRU.
I know the DPE has to be installed first for sure though.


Do I need to expand my rom to 32 MB prior to installation of either if I’m putting my installation offsets to 1600000 & 1800000?

And if you aren’t supposed to modify the rom after the CFRU is installed? How do you modify trainer data with the new Pokémon?
Seen 5 Hours Ago
Posted 3 Days Ago
7 posts
9 Days
Honestly I didn’t know that binary and decomp were different things. After looking into it it does seem like Decomp is the future of Rom hacking.

I guess I am just confused as to why the most popular hacks seem to be done via binary. Is it simply because the tools for decomps are newer, and people haven’t yet caught up with the improvements made via CFRU?
Seen 4 Hours Ago
Posted 1 Day Ago
213 posts
3.7 Years
Well the decomp of Emerald has been completed for a lot longer than Fire Red, so people have done a lot of the leg work already.

The Emerald Expansion for a decomp project for example adds basically everything the CFRU does for Fire Red but still gives you access to Poryscript, etc.

The CFRU has kinda hampered these same efforts for FR as far as I can tell. Since while it's still a binary thing, it improves enough that the incentive to do a full blown, proper decomp hack of FR is not as strong for some hackers. Especially because they'd have to implement things like the Phys-Spec split themselves.
Praise the Solrock