This took me a couple hours to track down, but the change seems to be fairly simple, so I thought I’d share it on the off chance somebody is trying to mess with FE6.
The short version:
At offset 0x88748, there’s an
00 06
which translates into an lsl r0, r0, #0x18. Change this to
0F 20
which is mov r0, #0xF.
Explanation:
I’m not entirely sure the full details of the function call at 0x88744, which branches to 0x846F0, but the return value of that function is byte 0xE of the SRAM data. When comparing a fresh save to one with that mode unlocked, that’s the first byte that differs between the two (the first 0xD bytes seem to be some kind of SRAM verification). On a fresh save, it’s 00, but on a save that has hard mode unlocked, it’s 0F. Either way, the return value is shifted left by 24 bits and compared to 0. If it’s equal to 0 (as is the case in a fresh save), it branches out, but if it’s anything but, then it falls through, which seems to be enough to cause the Normal/Hard selector to show up.
Is there anything incorrect about the version in FEBuilder that instead sets 0x8874C to 46C0? Genuinely asking, I don’t understand the slightest thing about coding.
I actually wasn’t aware of the FEBuilder fix. Could have saved me a couple hours, but judging by the offset, it’s probably not that dissimilar of a fix. The offset modified seems to be branching command instead, so I’m guessing that fix just removes the branch command. My change just makes the branch condition always fail. Either way, it’s the same result where the code always falls through to the mode select.
In fact, you can probably change 88748~8874D to all 00s (making all three instructions no-op instead) and get the same effect.
In addition to checking febuilder patches, you should try asking on discord if anyone’s already made a fix for something. I’ve ported a few things to fe6/7 myself
Yeah, I did a quick search on here to see if it existed, but I didn’t see anything. It just didn’t occur to me that FEBuilder has a collection of patches that could be useful.
I don’t post everything I make or port to fe6/7 to feuniverse personally. Some things I just add to the self randos without bothering or remembering to post about it. I feel like not many people hack fe6/7, so I’m inconsistent about posting things for them. So it can definitely be worthwhile to ask about.