Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anti-huffman reading from non-existent address #689

Open
Huichelaar opened this issue Oct 27, 2024 · 0 comments
Open

Anti-huffman reading from non-existent address #689

Huichelaar opened this issue Oct 27, 2024 · 0 comments

Comments

@Huichelaar
Copy link
Contributor

The anti-huffman patch causes this address that doesn't exist to be read:
image
This seems to always result in the upcoming conditional branch failing. As a result GetStringFromIndex won't skip loading a string that's already been buffered in the text buffer, like it would in vanilla. There's also the danger that different emulators or different textIDs might trigger the conditional branch when the text hasn't been loaded. I suggest replacing the highlighted line:

https://github.com/FireEmblemUniverse/SkillSystem_FE8/blob/master/EngineHacks/_FE8EssentialFixes.event#L184

with this:

ORG 0xA244
SHORT 0x4E0D 0x6830 0x4285

and adding

WORD 0x202B6AC

immediately below this line:

https://github.com/FireEmblemUniverse/SkillSystem_FE8/blob/master/EngineHacks/_FE8EssentialFixes.event#L195

as this will make the 0x202B6AC literal be loaded into r6 at 0xA244 again, meaning the vanilla functionality is restored. Writing the literal 0x202B6AC still fits immediately before the next function's start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant