The failing tests involve some conditions that should disable the channel that are unrelated to length counters expiring. (Go figure.) The relevant test code blargg is using is here:
set_test 13,"Disabling DAC should disable channel immediately"
call begin
delay_apu 2 ; clocks length to 2
call should_be_on
wchn 0,$00 ; if wave channel, this disables DAC
wchn 2,$07 ; if square/noise channel, this disables DAC
call should_be_off
set_test 14,"Disabled DAC should prevent enable at trigger"
call begin
wchn 0,$00 ; if wave channel, this disables DAC
wchn 2,$07 ; if square/noise channel, this disables DAC
wchn 4,$80 ; triggers channel but doesn't enable it
call should_be_off
set_test 15,"Enabling DAC shouldn't re-enable channel"
wchn 0,$80 ; if wave channel, this enables DAC
wchn 2,$10 ; if square/noise channel, this enables DAC
call begin
delay_apu 2
call should_be_on
wchn 0,$00 ; if wave channel, this disables DAC
wchn 2,$00 ; if square/noise channel, this disables DAC
call should_be_off
wchn 0,$80 ; if wave channel, this enables DAC
wchn 2,$10 ; if square/noise channel, this enables DAC
call should_be_off
I knew about the wave channel's DAC, so that's an easy fix. I did not know that volume = 0 on the square/noise channels had any effect; that's interesting!
The failing tests involve some conditions that should disable the channel that are unrelated to length counters expiring. (Go figure.) The relevant test code blargg is using is here:
I knew about the wave channel's DAC, so that's an easy fix. I did not know that volume = 0 on the square/noise channels had any effect; that's interesting!