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

Fixed some incorrect addresses #215

Conversation

AnonymousRandomPerson
Copy link
Contributor

While syncing NA and EU with the decomp, I ran into a number of incorrect addresses that conflicted between versions. I manually resolved each of these, attempting to favor the version that the original contributor used.

Copy link
Collaborator

@Frostbyte0x70 Frostbyte0x70 left a comment

Choose a reason for hiding this comment

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

Manually checked everything except SKY_ATTACK_DAMAGE_MULTIPLIER and CheckTeamMemberIdxVeneer. The new offsets are correct.

Some of these errors are mine. I looks like they happned because of functions that are almost identical to the one that I was documenting, so I mistook them for the right one when adding the US offsets.
I need to find a better way of doing that.

@UsernameFodder
Copy link
Owner

Manually checked everything except SKY_ATTACK_DAMAGE_MULTIPLIER and CheckTeamMemberIdxVeneer. The new offsets are correct.

The new SKY_ATTACK_DAMAGE_MULTIPLIER is correct (I apparently had this right in my Ghidra project, but transcribed it wrong). CheckTeamMemberIdxVeneer points to the new CheckTeamMemberIdx as would be expected.

Copy link
Owner

@UsernameFodder UsernameFodder left a comment

Choose a reason for hiding this comment

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

Thanks!

@UsernameFodder UsernameFodder merged commit a8602ee into UsernameFodder:master Nov 22, 2023
4 checks passed
@AnonymousRandomPerson
Copy link
Contributor Author

I looks like they happned because of functions that are almost identical to the one that I was documenting, so I mistook them for the right one when adding the US offsets.
I need to find a better way of doing that.

We can now use the decomp to match EU/US offsets more reliably than an ASM similarity check. For example, when knowing the EU address:

  1. Find the placeholder symbol name within EU's xMAP file by looking at the address and overlay.
  2. Rename the symbol within the decomp.
  3. Build the US ROM.
  4. Find the symbol in the US xMAP file to get the US address.

I follow changes to pmdsky-debug and sync them to the decomp, so any conflicting addresses will be sorted out by this process as well.

@Frostbyte0x70
Copy link
Collaborator

I looks like they happned because of functions that are almost identical to the one that I was documenting, so I mistook them for the right one when adding the US offsets.
I need to find a better way of doing that.

We can now use the decomp to match EU/US offsets more reliably than an ASM similarity check. For example, when knowing the EU address:

1. Find the placeholder symbol name within EU's [xMAP file](https://raw.githubusercontent.com/pret/pmd-sky/xmap/pmdskyeu.xMAP) by looking at the address and overlay.

2. Rename the symbol within the decomp.

3. Build the US ROM.

4. Find the symbol in the US xMAP file to get the US address.

I follow changes to pmdsky-debug and sync them to the decomp, so any conflicting addresses will be sorted out by this process as well.

I might use that if I ever set up the decomp project on my computer. Right now, it's still quicker to check manually.

@AnonymousRandomPerson AnonymousRandomPerson deleted the fix-address-conflicts branch December 10, 2023 21:26
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.

3 participants