core

package
v0.0.0-...-cc98a46 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Core

type Core interface {
	ID() ID // Get Core ID
	Reset(hasBIOS bool)
	LoadROM(romData []byte) error // romData is mutable(not copied).
	SRAM() []byte
	LoadSRAM(sramData []byte) error
	RunFrame()
	Resolution() (w int, h int) // Get display resolution
	Screen() []color.RGBA
	SetKeyInput(key string, press bool)
	Title() string // Get title of the game

	// Serialize
	Serialize(state io.Writer)
	Deserialize(state io.Reader)
}

func New

func New(id ID, audioBuffer io.Writer) Core

type ID

type ID = string
const (
	GB ID = "GB"
)

Directories

Path Synopsis
gb
cpu

Jump to

Keyboard shortcuts

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