ref: 1b95f8b2b540d45efb57b129840115b2aed6f666
parent: fd0ea0bffe7f45f35924e6d21826d46d509d08a4
author: Snesrev <snesrev@protonmail.com>
date: Fri Sep 30 02:50:43 EDT 2022
Fix abruptly changing music in whirlpool (#126)
--- a/nmi.c
+++ b/nmi.c
@@ -69,7 +69,9 @@
if (music_control == 0) {
if (zelda_apu_read(APUI00) == last_music_control)
zelda_apu_write(APUI00, 0);
- } else if (music_control != last_music_control) {
+ // Zelda causes unwanted music change when going in a portal. last_music_control doesn't hold the
+ // song but the last applied effect
+ } else if (music_control != (enhanced_features0 & kFeatures0_MiscBugFixes ? music_unk1 : last_music_control)) {
last_music_control = music_control;
ZeldaPlayMsuAudioTrack();
if (music_control < 0xf2)