gameboy

package
v0.0.0-...-a6bb76f Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CPU

type CPU interface {
	Step() (int, error)
}

CPU defines the interface for CPU interaction

type Gameboy

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

Gameboy struct

func New

func New(mem Memory, cpu CPU) (*Gameboy, error)

New initialises a new Gameboy System

func (*Gameboy) Eject

func (gb *Gameboy) Eject()

Eject ejects a cart from memory

func (*Gameboy) LoadCart

func (gb *Gameboy) LoadCart(romfile string) error

LoadCart loads a cart using the loader

func (*Gameboy) Run

func (gb *Gameboy) Run()

Run runs the emulation

func (*Gameboy) Update

func (gb *Gameboy) Update()

Update runs the system update cycle for a single frame

type Memory

type Memory interface {
	Load(cart memory.Cart)
	Eject()
	Read(address uint16) uint8
	Write(address uint16, data uint8)
}

Memory defines the interface for memory interaction

Directories

Path Synopsis
Package gameboy_mock is a generated GoMock package.
Package gameboy_mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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