KungFuFurby / AddMusicKFF

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

Starman music can fail to revert back to level music upon expiration of timer when misaligned with vanilla timer code #435

Open KungFuFurby opened 2 months ago

KungFuFurby commented 2 months ago

Reported by LadiesMan217, and is also an AddmusicK 1.0.8 bug. The bug only occurs when AddmusicK's timers are set to a value less than the comparison value of the vanilla code snippet at $00E2E5 (a CMP Y, #$1E) opcode: otherwise it does successfully revert, but not because of AddmusicK's code, but rather the vanilla SMW code that was preserved in the region (though some of it was dummied out since a usage was made redundant).

AddmusicK's stock starman song restoration fails to fire because of an incorrect ordering of BCS/BEQ comparisons. The vanilla snippet normally saves the day, but this can fail if its timer comparison value is greater than the one used on AddmusicK's code.

I might end up adding a switch and/or removing the music modification altogether in favor of AddmusicK's to reduce conflict possibilities. However, at least part of the snippet must remain in order to properly control the sparkling Starman effect and have that wear off at the correct time, even if the music is adjusted timing-wise.