console

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DebugDisabled = iota
	DebugWait
	DebugStepFrame
	DebugRunRender
)
View Source
const AutoSaveNum = 0

Variables

View Source
var ErrExit = errors.New("exit")
View Source
var ErrNoPreviousState = errors.New("no previous state available")

Functions

This section is empty.

Types

type Console

type Console struct {
	CPU *cpu.CPU
	Bus *bus.Bus
	PPU *ppu.PPU
	APU *apu.APU

	Cartridge *cartridge.Cartridge
	Mapper    cartridge.Mapper
	// contains filtered or unexported fields
}

func New

func New(conf *config.Config, cart *cartridge.Cartridge) (*Console, error)

func (*Console) CheckInput

func (c *Console) CheckInput()

func (*Console) Close

func (c *Console) Close() error

func (*Console) CreateUndoLoadState

func (c *Console) CreateUndoLoadState() error

func (*Console) CreateUndoSaveState

func (c *Console) CreateUndoSaveState(oldState []byte) error

func (*Console) Draw

func (c *Console) Draw(screen *ebiten.Image)

func (*Console) Layout

func (c *Console) Layout(_, _ int) (int, int)

func (*Console) LoadSRAM

func (c *Console) LoadSRAM() error

func (*Console) LoadState

func (c *Console) LoadState(r io.Reader) error

func (*Console) LoadStateNum

func (c *Console) LoadStateNum(num uint8) error

func (*Console) Reset

func (c *Console) Reset()

func (*Console) SaveSRAM

func (c *Console) SaveSRAM() error

func (*Console) SaveState

func (c *Console) SaveState(w io.Writer) error

func (*Console) SaveStateNum

func (c *Console) SaveStateNum(num uint8, createUndo bool) error

func (*Console) SetDebug

func (c *Console) SetDebug(v bool)

func (*Console) SetRate

func (c *Console) SetRate(rate uint8)

func (*Console) SetTrace

func (c *Console) SetTrace(v bool)

func (*Console) SetUpdateAction

func (c *Console) SetUpdateAction(action UpdateAction)

func (*Console) Step

func (c *Console) Step(render bool)

func (*Console) Trace

func (c *Console) Trace() string

func (*Console) UndoLoadState

func (c *Console) UndoLoadState() error

func (*Console) UndoSaveState

func (c *Console) UndoSaveState() error

func (*Console) Update

func (c *Console) Update() error

type Debug

type Debug uint8

type UpdateAction

type UpdateAction uint8
const (
	ActionNone UpdateAction = iota
	ActionExit
	ActionSaveState
	ActionLoadState
)

Jump to

Keyboard shortcuts

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