cpu

package
v0.0.0-...-c62af90 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCPU

func NewCPU(memory state.Memory, rgen *rand.Rand, k Keyboard, t *timer, s Screen) *cpu

func NewTimer

func NewTimer(soundChan chan<- byte) *timer

func Start

func Start(name string, ctx context.Context, d time.Duration, tick func() error)

Types

type Keyboard

type Keyboard interface {
	WaitForKeyPressed() (key byte)
	IsKeyPressed(key byte) bool
	KeyPressed(key byte)
	Clear()
}

func NewKeyboard

func NewKeyboard() Keyboard

type Screen

type Screen interface {
	Draw(frameBuffer []byte)
}

Jump to

Keyboard shortcuts

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