apu

package
v0.0.0-...-86b10a5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2022 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DMC_TIMER_TABLE = [16]uint16{
	0x1AC, 0x17C, 0x154, 0x140, 0x11E, 0x0FE, 0x0E2, 0x0D6,
	0x0BE, 0x0A0, 0x08E, 0x080, 0x06A, 0x054, 0x048, 0x036,
}

Functions

This section is empty.

Types

type APU

type APU struct {
	// contains filtered or unexported fields
}

func New

func New(audio AudioRenderer) *APU

func (*APU) Read

func (a *APU) Read(addr uint16) uint8

func (*APU) Reset

func (a *APU) Reset()

func (*APU) Step

func (a *APU) Step(dmcMemoryReader DMCMemoryReader) bool

func (*APU) Write

func (a *APU) Write(addr uint16, value uint8)

type AudioBuffer

type AudioBuffer struct {
	// contains filtered or unexported fields
}

func NewAudioBuffer

func NewAudioBuffer(cap int) AudioBuffer

func (*AudioBuffer) Read

func (b *AudioBuffer) Read(p []byte) (n int, err error)

func (*AudioBuffer) Write

func (b *AudioBuffer) Write(v float32)

type AudioRenderer

type AudioRenderer interface {
	Write(float32)
}

type DMCMemoryReader

type DMCMemoryReader interface {
	Read(uint16) uint8
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL