emulator

package
v0.0.0-...-60bc869 Latest Latest
Warning

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

Go to latest
Published: May 21, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Btn

type Btn uint8

Btn represents emulator button.

const (
	UpBtn Btn = iota
	DownBtn
	LeftBtn
	RightBtn
	SelectBtn
	StartBtn
	ABtn
	BBtn
)

type Emulator

type Emulator struct {
	// Gb represents Gb console.
	Gb *gameboy.Gameboy
}

Emulator represents an emulator of Game boy console.

func New

func New() *Emulator

func (*Emulator) GetRGBAPixels

func (e *Emulator) GetRGBAPixels() []color.RGBA

GetRGBAPixels returns an slice of RGBA colors. RBGA pixels are generated from ppu video buffer, Each videoBuf pixel contains an index of palette color.

func (*Emulator) SetButton

func (e *Emulator) SetButton(btn Btn, down bool)

SetButton press or release gameboy joypad button.

Jump to

Keyboard shortcuts

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