nes

package
v0.3.0-beta Latest Latest
Warning

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

Go to latest
Published: May 28, 2019 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Herz      ClockRate = 1
	Kilohertz           = 1000 * Herz
	Megahertz           = 1000 * Kilohertz
	Gigahertz           = 1000 * Megahertz
)
View Source
const (
	MasterClockRate = 236250 * Kilohertz / 11
	CpuClockRate    = MasterClockRate / 12
	PpuClockRate    = MasterClockRate / 4
)

The clock rate of components in the NES http://wiki.nesdev.com/w/index.php/Cycle_reference_chart#Clock_rates

View Source
const (
	SCREEN_WIDTH  = 256
	SCREEN_HEIGHT = 240
)
View Source
const (
	FPS = 60
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClockRate

type ClockRate int64

type NES

type NES interface {
	LoadCartridge(cartridge *ines.INesRom) error
	Start() error
}

func NewNes

func NewNes() NES

type NESImpl

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

func (*NESImpl) LoadCartridge

func (nes *NESImpl) LoadCartridge(cartridge *ines.INesRom) error

func (*NESImpl) Start

func (nes *NESImpl) Start() error

type NesDiplay

type NesDiplay struct {
	NextCh          chan int
	StepInstruction bool
	StepFrame       bool
	RequestReset    bool
	PressedKeys     byte
	ReleasedKeys    byte
	Keys            byte
	// contains filtered or unexported fields
}

func NewDisplay

func NewDisplay(screenPixels *[SCREEN_HEIGHT][SCREEN_WIDTH]ppu.RBGColor) *NesDiplay

func (*NesDiplay) Refresh

func (p *NesDiplay) Refresh()

func (*NesDiplay) Show

func (p *NesDiplay) Show()

Jump to

Keyboard shortcuts

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