Skip to content

Conversation

@545u
Copy link
Contributor

@545u 545u commented Oct 11, 2025

  • Put functions in the list of problematic functions in configure.py in alphabetical order based on name of the TU.
  • Fix small typo in scripts/readme.md.
  • Separate library sources from engine sources in src/readme.md.
  • Match some functions in various files.
  • Added fully matched RemoveZpdZapLo by @polybiusproxy that was based on a scratch by me. However there is a TU padding problem. I think the sce/libs TU should start at address 0xF69C4 instead of 0xF69C0 like it is now. Changing the address doesn't work because the 4 NOP bytes get added right after the function.
  • Added a script to locally check the project progress. Changed the checks.sh script to optionally output the progress report generated by objdiff to a new file.
  • Managed to identify quite a lot of .data segment starting addresses.
  • Merged split P2/UNKNOWN2 into P2/sw as it seemed to make the most sense.

@545u 545u changed the title Match functions in P2/vifs & P2/xform + misc fixes Match functions + misc fixes Oct 15, 2025
@545u 545u changed the title Match functions + misc fixes Match functions, misc fixes, add script to check progress Oct 15, 2025
@TheOnlyZac
Copy link
Owner

TheOnlyZac commented Oct 18, 2025

The reason it adds 4 bytes of padding when you change sce/libs to start at 0xF69C4 is because all TUs are aligned to 8 bytes, i.e. the TU offsets always have to end in 0 or 8. If you don't align it to an 8-byte boundary it will add padding to make it so.

Copy link
Owner

@TheOnlyZac TheOnlyZac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work as always! Big thanks for the progress checking script, and for sorting the list of library sources separate from the project sources. Also, good catch on the expired Discord invite.

@545u
Copy link
Contributor Author

545u commented Oct 18, 2025

The reason it adds 4 bytes of padding when you change sce/libs to start at 0xF69C4 is because all TUs are aligned to 8 bytes, i.e. the TU offsets always have to end in 0 or 8. If you don't align it to an 8-byte boundary it will add padding to make it so.

Interesting. The last function in P2/zap cannot be taken out of the SKIP_ASM ifdef because it will overwrite the first bytes of sce/libs iirc. How should that be fixed?

@TheOnlyZac
Copy link
Owner

It sounds like the offset of sce/libs is incorrect. Can you just push the offset of sce/libs back so the zap function doesn't overlap?

@545u
Copy link
Contributor Author

545u commented Oct 18, 2025

It sounds like the offset of sce/libs is incorrect. Can you just push the offset of sce/libs back so the zap function doesn't overlap?

I tried that already but sce/libs gets misaligned.

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