gb

package
v0.0.0-...-3a42d68 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const KB, MB = 1024, 1024 * 1024

Variables

This section is empty.

Functions

This section is empty.

Types

type DumpCmd

type DumpCmd = uint8
const (
	DUMP_SAVE DumpCmd = iota
)

type GB

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

func New

func New(model Model, audioBuffer io.Writer) *GB

func (*GB) Deserialize

func (g *GB) Deserialize(state io.Reader)

func (*GB) Dump

func (g *GB) Dump(cmd DumpCmd, args ...any) ([]uint8, error)

func (*GB) IsCGB

func (g *GB) IsCGB() bool

IsCGBMode returns true if the hardware has CGB features (i.e., it's a CGB or AGB).

func (*GB) Load

func (g *GB) Load(cmd LoadCmd, args ...any) error

func (*GB) Model

func (g *GB) Model() Model

func (*GB) Read

func (g *GB) Read(addr uint16) uint8

func (*GB) Reset

func (g *GB) Reset(hasBIOS bool)

func (*GB) Resolution

func (g *GB) Resolution() (w int, h int)

func (*GB) RunFrame

func (g *GB) RunFrame()

func (*GB) Screen

func (g *GB) Screen() []color.NRGBA

func (*GB) Serialize

func (g *GB) Serialize(state io.Writer)

func (*GB) SetKeyInput

func (g *GB) SetKeyInput(key string, press bool)

func (*GB) Title

func (g *GB) Title() string

func (*GB) Write

func (g *GB) Write(addr uint16, val uint8)

type LoadCmd

type LoadCmd = uint8
const (
	LOAD_ROM LoadCmd = iota
	LOAD_SAVE
	LOAD_BIOS
)

type Model

type Model uint8
const (
	MODEL_DMG Model = iota
	MODEL_SGB
	MODEL_CGB
	MODEL_AGB
)

ハードウェアの種類

Directories

Path Synopsis
apu
psg
cpu
ppu

Jump to

Keyboard shortcuts

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