Documentation ¶
Index ¶
- Constants
- Variables
- func Buffer(console *Console) *image.RGBA
- func Reset(console *Console)
- func SetAudioChannel(console *Console, channel chan float32)
- func SetButtons1(console *Console, buttons [8]bool)
- func SetButtons2(console *Console, buttons [8]bool)
- func StepSeconds(console *Console, seconds float64)
- type APU
- type CPU
- type Cartridge
- type Console
- type Controller
- type DMC
- type Instruction
- type Mapper
- type Mapper1
- type Mapper2
- type Mapper3
- type Mapper4
- type Mapper7
- type Noise
- type PPU
- type Pulse
- type Triangle
Constants ¶
View Source
const ( ButtonA = iota ButtonB ButtonSelect ButtonStart ButtonUp ButtonDown ButtonLeft ButtonRight )
View Source
const ( MirrorHorizontal = 0 MirrorVertical = 1 MirrorSingle0 = 2 MirrorSingle1 = 3 MirrorFour = 4 )
Mirroring Modes
View Source
const CPUFrequency = 1789773
Variables ¶
View Source
var MirrorLookup = [...][4]uint16{
{0, 0, 1, 1},
{0, 1, 0, 1},
{0, 0, 0, 0},
{1, 1, 1, 1},
{0, 1, 2, 3},
}
View Source
var Palette [64]color.RGBA
Functions ¶
func SetAudioChannel ¶
func SetButtons1 ¶
func SetButtons2 ¶
func StepSeconds ¶
Types ¶
type CPU ¶
type CPU struct { Cycles uint64 // number of cycles PC uint16 // program counter SP byte // stack pointer A byte // accumulator X byte // x register Y byte // y register C byte // carry flag Z byte // zero flag I byte // interrupt disable flag D byte // decimal mode flag B byte // break command flag U byte // unused flag V byte // overflow flag N byte // negative flag // contains filtered or unexported fields }
type Console ¶
type Console struct { CPU *CPU APU *APU PPU *PPU Cartridge *Cartridge Controller1 *Controller Controller2 *Controller Mapper Mapper RAM []byte }
func NewConsole ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
type Instruction ¶
Click to show internal directories.
Click to hide internal directories.