Documentation
¶
Index ¶
- func BufferLength() time.Duration
- type APU
- func (apu *APU) Clock240(cnt uint64) uint64
- func (apu *APU) Clock44100(cnt uint64) uint64
- func (apu *APU) ClockCPU(cnt uint64) uint64
- func (apu *APU) Debug() string
- func (p *APU) Length() uint16
- func (apu *APU) MemRead(offset uint16) byte
- func (apu *APU) MemWrite(offset uint16, val byte) byte
- func (p *APU) Ptr() uintptr
- func (apu *APU) Read(b []byte) (int, error)
- func (p *APU) String() string
- type DMC
- type Filter
- type FilterChain
- type FirstOrderFilter
- type InputDevice
- type Noise
- type Pulse
- type Triangle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BufferLength ¶
Types ¶
type APU ¶
type APU struct { Memory memory.Master Input [2]InputDevice // we put inputs here since the APU's buffer is used to talk to them Interrupt func() Trace io.Writer // contains filtered or unexported fields }
func (*APU) Clock44100 ¶
type Filter ¶
func HighPassFilter ¶
func LowPassFilter ¶
sampleRate: samples per second cutoffFreq: oscillations per second
type FilterChain ¶
type FilterChain []Filter
func (FilterChain) Step ¶
func (fc FilterChain) Step(x float32) float32
type FirstOrderFilter ¶
type FirstOrderFilter struct { B0 float32 B1 float32 A1 float32 // contains filtered or unexported fields }
First order filters are defined by the following parameters. y[n] = B0*x[n] + B1*x[n-1] - A1*y[n-1]
func (*FirstOrderFilter) Step ¶
func (f *FirstOrderFilter) Step(x float32) float32
type InputDevice ¶
type InputDevice interface { Read() byte // CLK trigger + read Write(byte) // OUT0, OUT1 and OUT2 update }
InputDvice is a generic device connected to either port of the NES Typically a controller, but can be other stuff
Click to show internal directories.
Click to hide internal directories.