emulator

package
v0.0.0-...-c4467fc Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller interface {
	LoadROM(string) error
	Pause()
	Resume()
	Paused() bool
	Initialised() bool
}

Controller defines the interface contract for an Emulator to implement in order for a display.Driver to be able to control it.

type Save

type Save struct {
	Path string // the path to the save file
	// contains filtered or unexported fields
}

Save represents a save file.

func LoadSave

func LoadSave(cartTitle string) (*Save, error)

LoadSave loads the save file for the given cartridge title.

func NewSave

func NewSave(title string, ramSize uint) (*Save, error)

NewSave creates a new save file for the given cartridge title, and RAM size.

func (*Save) Bytes

func (s *Save) Bytes() []byte

Bytes returns the save file data.

func (*Save) Close

func (s *Save) Close() error

Close closes the save file by renaming the temporary file to the original file.

func (*Save) SetBytes

func (s *Save) SetBytes(b []byte) error

SetBytes sets the save file data.

Jump to

Keyboard shortcuts

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