KungFuFurby / AddMusicKFF

Fork of AddMusicK, a compiler/inserter of music for Super Mario World
23 stars 15 forks source link

Upgrade song memory overflow errors #411

Closed KungFuFurby closed 10 months ago

KungFuFurby commented 10 months ago

The echo buffer overflow errors are no longer rounded to the nearest $100 bytes, and there is also a different error message for when the sample data causes the memory overflow before it ever reaches the part where the echo buffer is tested.

This merge request mentions #404. The only reason why it doesn't close it is because there is an edge case not covered here where the echo can overwrite $FF00-$FF03 if activated and the hot patch to disable echo writes is not activated. The memory location scenario is correctly detected, but additional work needs to be done to detect the usage of echo. If it is not used, then a hot patch should be generated to deal with this specific situation, then immediately execute the echo buffer allocation VCMD, then execute the intended hot patch settings.