Versions in this module Expand all Collapse all v1 v1.0.1 Dec 23, 2021 Changes in this version + const BRK + const ButtonA + const ButtonB + const ButtonDown + const ButtonLeft + const ButtonRight + const ButtonSelect + const ButtonStart + const ButtonUp + const CPUFrequency + const FrameCounterRate + const IRQ + const MirrorFour + const MirrorHorizontal + const MirrorSingle0 + const MirrorSingle1 + const MirrorVertical + const NMI + const RESET + var MirrorLookup = [...][4]uint16 + var Palette [64]color.RGBA + func LogReg(cpu *CPU) + func Logger(format string, a ...interface{}) + func MirrorAddress(mode byte, address uint16) uint16 + type APU struct + func NewAPU(console *Console) *APU + func (apu *APU) ReadRegister(addr uint16) byte + func (apu *APU) Step() + type CPU struct + A byte + B byte + C byte + Cycles uint64 + D byte + I byte + N byte + PC uint16 + SP byte + U byte + V byte + X byte + Y byte + Z byte + func NewCPU(console *Console) *CPU + func (cpu *CPU) Read16(addr uint16) uint16 + func (cpu *CPU) Reset() + func (cpu *CPU) Step() int64 + func (cpu *CPU) TriggerIRQ() + func (cpu *CPU) TriggerNMI() + type CPUMemory struct + RAM []byte + func (mem *CPUMemory) Read(addr uint16) byte + func (mem *CPUMemory) Write(addr uint16, value byte) + type Cartridge struct + CHR []byte + Mapper byte + Mirror byte + PRG []byte + SRAM []byte + func LoadNESRom(info []byte) (*Cartridge, error) + func NewCartridge(prg []byte, chr []byte, mapper byte, mirror byte) *Cartridge + type Console struct + APU *APU + CPU *CPU + Card *Cartridge + Controller1 *Controller + Controller2 *Controller + Mapper Mapper + PPU *PPU + RAM []byte + func NewConsole(info []byte) (*Console, error) + func (console *Console) Buffer() *image.RGBA + func (console *Console) Reset() + func (console *Console) SetAudioOutputWork(callback func(float32)) + func (console *Console) SetAudioSampleRate(sampleRate float64) + func (console *Console) SetButton1(buttons [8]bool) + func (console *Console) SetButton2(buttons [8]bool) + func (console *Console) Step() int64 + func (console *Console) StepSeconds(seconds float64) + type Controller struct + func NewController() *Controller + func (c *Controller) Read() byte + func (c *Controller) SetButtons(buttons [8]bool) + func (c *Controller) Write(value byte) + type DMC struct + type Mapper interface + Read func(address uint16) byte + Step func() + Write func(address uint16, value byte) + func NewMapper(card *Cartridge, console *Console) (Mapper, error) + func NewMapper0(card *Cartridge) Mapper + func NewMapper1(card *Cartridge) Mapper + func NewMapper3(cartridge *Cartridge) Mapper + func NewMapper4(card *Cartridge, console *Console) Mapper + type Mapper0 struct + func (mapper *Mapper0) Read(addr uint16) byte + func (mapper *Mapper0) Step() + func (mapper *Mapper0) Write(addr uint16, value byte) + type Mapper1 struct + func (m *Mapper1) Read(addr uint16) byte + func (m *Mapper1) Step() + func (m *Mapper1) Write(addr uint16, value byte) + type Mapper3 struct + func (m *Mapper3) Read(address uint16) byte + func (m *Mapper3) Write(address uint16, value byte) + func (mapper *Mapper3) Step() + type Mapper4 struct + func (m *Mapper4) Read(addr uint16) byte + func (m *Mapper4) Step() + func (m *Mapper4) StepScanLineCounter() + func (m *Mapper4) Write(addr uint16, value byte) + type Memory interface + Read func(addr uint16) byte + Write func(addr uint16, value byte) + func NewCPUMemory(console *Console) Memory + func NewPPUMemory(console *Console) Memory + type Noise struct + type PPU struct + Cycle int + Frame int + NameTable [2048]byte + ScanLine int + func NewPPU(console *Console) *PPU + func (ppu *PPU) ReadPalette(addr uint16) byte + func (ppu *PPU) Reset() + func (ppu *PPU) Step() + func (ppu *PPU) WritePalette(addr uint16, value byte) + type PPUMemory struct + func (mem *PPUMemory) Read(addr uint16) byte + func (mem *PPUMemory) Write(addr uint16, value byte) + type Pulse struct + type Triangle struct