You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
there is a stray F volume next to the DPCM note, thus being exported as a volume command. for some reason this is not rendered in the pattern editor.
volume commands affect volume slide channel arrays var_ch_VolSlide and var_ch_VolSlideTarget. they get reset to #$00 and #$80 respectively upon a new volume command.
var_ch_VolSlide and var_ch_VolSlideTarget is reserved with size EFF_CHANS (pulse 1 and 2, triangle, noise in this case).
in processing the stray volume command on the DPCM channel, this causes var_ch_VolSlideTarget+4 to be written with #$80, which is where var_ch_DutyDefault is.
setting var_ch_DutyDefault to this value effectively resets the duty cycle back to 0 (since #$80 & #$03 is being written as pulse 1 duty cycle).
In NSF export, after playing a DPCM note, the Vxx value of Pulse 1 resets to V00 for the next pulse note. The Vxx of Pulse 2 is not corrupted.
Test case: nsf Vxx dpcm bug.zip
The NSF export bug happens in both main, and #262 rebased on main.
The text was updated successfully, but these errors were encountered: