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

Simplify RAM reset adaptation for modern #1246

Merged
merged 2 commits into from
Nov 6, 2020

Conversation

PikalaxALT
Copy link
Collaborator

Description

When compiling with newer versions of gcc, AgbMain preserves more registers than when compiled with agbcc. This results in the vanilla RegisterRamReset call crashing, due to the return address on the stack being overwritten with 0. The current fix injects a manual loop into AgbMain to clear IWRAM. The proposed solution instead moves the RegisterRamReset to crt0 when compiling with modern gcc. It's more efficient and less of an eyesore this way.

Discord contact info

PikalaxALT#5823

@Sierraffinity
Copy link
Contributor

Looks good to me.

@PikalaxALT PikalaxALT merged commit 75b12b8 into pret:master Nov 6, 2020
@PikalaxALT PikalaxALT deleted the simplify_ram_reset branch November 6, 2020 20:00
ghoulslash pushed a commit to ghoulslash/pokeemerald that referenced this pull request Mar 28, 2021
Remove Techno Blast and Judgment from battle scripts
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