mapper

package
v0.0.0-...-86b10a5 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2022 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mapper

type Mapper interface {
	// Read reads a byte from the mapper.
	Read(addr uint16) uint8

	// Write writes a byte into the mapper.
	Write(addr uint16, value uint8)

	Mirroring() Mirroring

	PRG() []byte
	CHR() []byte
}

Mapper emulates circuits, hardware, and the configuration and capabilities of cartridges.

type MapperMock

type MapperMock struct{}

MapperMock for test

func (*MapperMock) CHR

func (*MapperMock) CHR() []byte

func (*MapperMock) Mirroring

func (*MapperMock) Mirroring() Mirroring

func (*MapperMock) PRG

func (*MapperMock) PRG() []byte

func (*MapperMock) Read

func (*MapperMock) Read(addr uint16) uint8

func (*MapperMock) Write

func (*MapperMock) Write(addr uint16, value uint8)

type Mirroring

type Mirroring int

Kind of Nametable Mirroring https://wiki.nesdev.org/w/index.php?title=Mirroring#Nametable_Mirroring

const (
	Mirroring_Horizontal Mirroring
	Mirroring_Vertical
)

func (Mirroring) String

func (m Mirroring) String() string

type ROM

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

ROM wraps byte array of iNES format binary.

func ParseROM

func ParseROM(r io.Reader) (*ROM, error)

ParseROM load NES binary program in iNES file format

func (*ROM) Mapper

func (r *ROM) Mapper() (Mapper, error)

Mapper creates a mapper object from this rom's data

Jump to

Keyboard shortcuts

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