cartridge

package
v0.0.0-...-dc33bde Latest Latest
Warning

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

Go to latest
Published: May 24, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cartridge

type Cartridge interface {
	ReadByte(address uint16) byte
	WriteByte(address uint16, value byte)
	Save() error
}

func NewCartridge

func NewCartridge(romPath string) (Cartridge, error)
type Header struct {
	Title            [16]byte
	NewLicenseeCode  [2]byte
	SGBFlag          byte
	Type             byte
	ROMSize          byte
	RAMSize          byte
	DestinationCode  byte
	OldLicenseeCode  byte
	ROMVersionNumber byte
	HeaderChecksum   byte
	GlobalChecksum   [2]byte
}

func NewHeader

func NewHeader(data []byte) (*Header, error)

type MBC1

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

func NewMBC1

func NewMBC1(cartType byte, path string, rom []byte, ram [][]byte) *MBC1

func (*MBC1) ReadByte

func (m *MBC1) ReadByte(address uint16) byte

func (*MBC1) Save

func (m *MBC1) Save() error

func (*MBC1) WriteByte

func (m *MBC1) WriteByte(address uint16, value byte)

type MBC3

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

func NewMBC3

func NewMBC3(cartType byte, path string, rom []byte, ram [][]byte) *MBC3

func (*MBC3) ReadByte

func (m *MBC3) ReadByte(address uint16) byte

func (*MBC3) Save

func (m *MBC3) Save() error

func (*MBC3) WriteByte

func (m *MBC3) WriteByte(address uint16, value byte)

type ROM

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

func (*ROM) ReadByte

func (r *ROM) ReadByte(address uint16) byte

func (*ROM) Save

func (r *ROM) Save() error

func (*ROM) WriteByte

func (r *ROM) WriteByte(address uint16, value byte)

type UnknownCartridgeTypeError

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

func (UnknownCartridgeTypeError) Error

Jump to

Keyboard shortcuts

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