MCPcopy Create free account
hub / github.com/fogleman/nes / stepTimer

Method stepTimer

nes/apu.go:567–576  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

565}
566
567func (t *Triangle) stepTimer() {
568 if t.timerValue == 0 {
569 t.timerValue = t.timerPeriod
570 if t.lengthValue > 0 && t.counterValue > 0 {
571 t.dutyValue = (t.dutyValue + 1) % 32
572 }
573 } else {
574 t.timerValue--
575 }
576}
577
578func (t *Triangle) stepLength() {
579 if t.lengthEnabled && t.lengthValue > 0 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected