ines

package
v0.3.0-beta Latest Latest
Warning

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

Go to latest
Published: May 28, 2019 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	INES_FILE_MAGIC   = "NES\x1a"
	PRG_BANK_SIZE     = 16 * 1024 // bytes in a PRG/ROM bank
	CHR_BANK_SIZE     = 8 * 1024  // bytes in a CHR/VROM bank
	PRG_RAM_BANK_SIZE = 8 * 1024  // bytes in a RPG RAM bank
	TRAINER_SIZE      = 512       // optional trainer size in bytes
)
View Source
const (
	FLAGS6_VERTICAL_MIRRORING  = 1
	FLAGS6_BATTERY_RAM_ON      = 1 << 1
	FLAGS6_TRAINER_ON          = 1 << 2
	FLAGS6_FOUR_SCREEN_VRAM_ON = 1 << 3

	FLAGS7_VS_SYSTEM_ON = 1

	FLAGS9_PAL_ON = 1
)
View Source
const (
	MAPPER_NORM = 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type INesHeader

type INesHeader struct {
	Magic      [4]byte
	PrgSize    byte // PRG/ROM in 16 KB units
	ChrSize    byte // CHR/VROM in 8 KB units, value 0 means the board uses CHR RAM
	Flags6     byte
	Flags7     byte
	PrgRamSize byte // in 8kB units, value 0 means 1x8kB for compatibility, see http://wiki.nesdev.com/w/index.php/PRG_RAM_circuit
	Flags9     byte
	// contains filtered or unexported fields
}

func (*INesHeader) GetMapperType

func (h *INesHeader) GetMapperType() int

func (*INesHeader) String

func (h *INesHeader) String() string

type INesRom

type INesRom struct {
	Header  INesHeader
	Trainer []byte
	Prg     memory.Memory
	Chr     memory.Memory
	PrgBin  []byte
	ChrBin  []byte
	Extra   []byte
}

func NewINesRom

func NewINesRom(reader io.Reader) (*INesRom, error)

func (*INesRom) MatchesFileMagic

func (p *INesRom) MatchesFileMagic(reader io.Reader) (bool, error)

func (*INesRom) String

func (p *INesRom) String() string

Jump to

Keyboard shortcuts

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