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

Fix crash on Wii VC caused by Fado spawn hack for adult trade shuffle #2345

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

Conversation

mracsys
Copy link

@mracsys mracsys commented Jan 8, 2025

The previous hack in EnKo_CanSpawn saved register $ra to temp register t3 before jumping to a custom function controlling Fado's spawn behavior. While the N64 and emulators handled this without problems, Wii VC and Dolphin frequently but inconsistently crash with this code. The spawn hacks are revised to move the custom function call to the end of EnKo_Init after EnKo_CanSpawn is called, eliminating the need for caching any registers.

The crash is difficult to reproduce consistently, but with these changes it hasn't happened through >100 actor spawns using the attached plando. Odd Potion is in the top left chest of Mido's House for easy tests for all of Fado's spawn conditions.

trade-quest-rework-adult-fado.txt

Thanks to RealRob, flagrama, and Retropolis for identifying the possible cause.

@fenhl fenhl added Type: Bug Something isn't working Component: ASM/C Changes some internals of the ASM/C libraries Status: Needs Review Someone should be looking at it labels Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: ASM/C Changes some internals of the ASM/C libraries Status: Needs Review Someone should be looking at it Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants