From 70ba49e3d519118af07a45d3ad87ddfd0121589f Mon Sep 17 00:00:00 2001 From: TianZerL Date: Sun, 6 Mar 2022 22:05:14 +0800 Subject: [PATCH] APU fixs Fixed the abnormal tone when Mario failed --- nes/apu.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nes/apu.go b/nes/apu.go index 1474e11..881b878 100644 --- a/nes/apu.go +++ b/nes/apu.go @@ -401,7 +401,6 @@ func (p *Pulse) writeControl(value byte) { p.envelopeEnabled = (value>>4)&1 == 0 p.envelopePeriod = value & 15 p.constantVolume = value & 15 - p.envelopeStart = true } func (p *Pulse) writeSweep(value byte) { @@ -596,7 +595,7 @@ func (t *Triangle) output() byte { return 0 } if t.timerPeriod < 3 { - return 0; + return 0 } if t.lengthValue == 0 { return 0