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

Created script for automatically generating function boundaries #98

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

JillianTo
Copy link

Using the decompiled code exported from IDA as a HTML and the switch addresses that cause errors when using XenonRecomp (I deleted every line in SWA.toml after 'setjmp_address', then ran XenonRecomp and saved the CLI output to a file), I wrote a script that reproduces 39/42 of the function boundaries in UnleashedRecomp. Below is the output of the script:

functions = [
    { address = 0x830B7DD0, size = 0x74 },
    { address = 0x82F098C0, size = 0x19C },
    { address = 0x826ABB70, size = 0x70 },
    { address = 0x8319ED58, size = 0x98 },
    { address = 0x82456DC8, size = 0xD4 },
    { address = 0x82DE36A8, size = 0x5C },
    { address = 0x82F852A0, size = 0xCC },
    { address = 0x82C980E8, size = 0x110 },
    { address = 0x82DE38A0, size = 0x16C },
    { address = 0x82EF5C38, size = 0x64 },
    { address = 0x82F1D668, size = 0x1E8 },
    { address = 0x82EE2D08, size = 0x154 },
    { address = 0x82F08730, size = 0x2B0 },
    { address = 0x82455E70, size = 0x84 },
    { address = 0x82E97E50, size = 0x84 },
    { address = 0x831530C8, size = 0x258 },
    { address = 0x82F13980, size = 0xF4 },
    { address = 0x82DE3708, size = 0x198 },
    { address = 0x82893088, size = 0x45C },
    { address = 0x831539E0, size = 0xD0 },
    { address = 0x82C49540, size = 0x114 },
    { address = 0x82E86770, size = 0x98 },
    { address = 0x83180700, size = 0x74 },
    { address = 0x83168F18, size = 0x254 },
    { address = 0x830DADA0, size = 0x150 },
    { address = 0x82DE3640, size = 0x64 },
    { address = 0x82F25FD8, size = 0x240 },
    { address = 0x82D9AC08, size = 0x78 },
    { address = 0x831487D0, size = 0xD4 },
    { address = 0x83168940, size = 0x100 },
    { address = 0x82CF7080, size = 0x80 },
    { address = 0x8317CD30, size = 0x50 },
    { address = 0x83168B70, size = 0x128 },
    { address = 0x82EF5D78, size = 0x3F8 },
    { address = 0x82DE35D8, size = 0x68 },
    { address = 0x83168A48, size = 0x11C },
    { address = 0x824E7EF0, size = 0x98 },
    { address = 0x8316C678, size = 0x78 },
    { address = 0x82F22908, size = 0x20C }
]

I verified these functions were correct using sort and diff in the Linux terminal. The only difference is the order, and that it is missing the following three functions:

{ address = 0x824E7F28, size = 0x60 }
{ address = 0x8305D168, size = 0x278 }
{ address = 0x831B0BA0, size = 0xA0 }

@JillianTo JillianTo changed the title Created script for automatically generating function boundries Created script for automatically generating function boundaries Mar 10, 2025
@ryzendew
Copy link

image
has an error

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

Successfully merging this pull request may close these issues.

2 participants