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

Method writeFrameCounter

nes/apu.go:311–320  ·  view source on GitHub ↗
(value byte)

Source from the content-addressed store, hash-verified

309}
310
311func (apu *APU) writeFrameCounter(value byte) {
312 apu.framePeriod = 4 + (value>>7)&1
313 apu.frameIRQ = (value>>6)&1 == 0
314 // apu.frameValue = 0
315 if apu.framePeriod == 5 {
316 apu.stepEnvelope()
317 apu.stepSweep()
318 apu.stepLength()
319 }
320}
321
322// Pulse
323

Callers 1

writeRegisterMethod · 0.95

Calls 3

stepEnvelopeMethod · 0.95
stepSweepMethod · 0.95
stepLengthMethod · 0.95

Tested by

no test coverage detected