emu

package
v0.0.0-...-a40c5cd Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Emulator

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

Emulator is the core of the chip8 emulation

func NewEmulator

func NewEmulator() *Emulator

NewEmulator creates a new instance of the emulator

func (*Emulator) HandleKeyEvent

func (e *Emulator) HandleKeyEvent(event keyboard.Event, key keyboard.Key)

func (*Emulator) ListenForDisplayUpdate

func (e *Emulator) ListenForDisplayUpdate(cb func([]uint8))

func (*Emulator) LoadRom

func (e *Emulator) LoadRom(data []uint8)

LoadRom loads the rom data into memory and initialized the emulator

func (*Emulator) Run

func (e *Emulator) Run()

Run stops the emulator at 60Hz

func (*Emulator) Step

func (e *Emulator) Step()

Step the emulation by 1 cycle

Directories

Path Synopsis
mock
Package mock_display is a generated GoMock package.
Package mock_display is a generated GoMock package.
mock
Package mock_keyboard is a generated GoMock package.
Package mock_keyboard is a generated GoMock package.
mock
Package mock_memory is a generated GoMock package.
Package mock_memory is a generated GoMock package.
mock
Package mock_registers is a generated GoMock package.
Package mock_registers is a generated GoMock package.

Jump to

Keyboard shortcuts

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