Skip to content

Add UB-free implementations of RBA and BA#4650

Closed
Rozelette wants to merge 1 commit intoHarbourMasters:developfrom
Rozelette:RBA
Closed

Add UB-free implementations of RBA and BA#4650
Rozelette wants to merge 1 commit intoHarbourMasters:developfrom
Rozelette:RBA

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

@briaguya0 briaguya0 mentioned this pull request Feb 8, 2025
@aMannus
Copy link
Contributor

aMannus commented Mar 26, 2025

Closing because of #5025

@aMannus aMannus closed this Mar 26, 2025
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

2 participants