# HG changeset patch # User Michael Pavone # Date 1728362334 25200 # Node ID 0e9d7ef03983cd2eb3f66d7b589b24fa98730683 # Parent 0fae9d6a77c4f02dcc8902d5570b3a04e5ca61a0 Update PCM cur_ptr to ST when channel is not playing. Fixes sound effects in Final Fight CD diff -r 0fae9d6a77c4 -r 0e9d7ef03983 rf5c164.c --- a/rf5c164.c Sat Oct 05 23:31:59 2024 -0700 +++ b/rf5c164.c Mon Oct 07 21:38:54 2024 -0700 @@ -107,6 +107,11 @@ } else { pcm->channels[pcm->cur_channel].trigger = 0; } + } else if (pcm->flags & FLAG_SOUNDING) { + //Final Fight CD seems to expect this to get updated to some non-terminal value while the channel is not enabled + //Ares seems to keep the current pointer and ST in sync at all times for this state + //TODO: confirm exact behavior on hardware + pcm->channels[pcm->cur_channel].cur_ptr = pcm->channels[pcm->cur_channel].regs[ST] << 19; } write_if_not_sounding(pcm); CHECK;