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

Add UB-free implementations of RBA and BA #4650

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Rozelette
Copy link
Contributor

@Rozelette Rozelette commented Dec 8, 2024

This adds native, UB-free implementations of RBA and BA. In addition, this makes RBA work off of C right, like vanilla. I have removed the RestoreRBAValues setting because it doesn't really make sense anymore. We should have vanilla behavior by default, and if there is a demand for our old RBA behavior, that should be implemented as a new, opt-in setting.

There is a slight deviation from vanilla behavior. ITEM_SONG_NOCTURNE and ITEM_SONG_PRELUDE read and write to padding bytes in the save struct. Theoretically, you could use BA to write a value to them, then read it with RBA. This would be a more complicated thing to implement since it'll add new fields in the save struct. I couldn't find any actual use of this behavior in speedruns or rando tricks, so I've elected to not fully implement it.

This fixes #4214

Build Artifacts

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.

Wrong BA results
1 participant