Version: v0.0.0-...-7cd2a6a Latest Latest

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

Go to latest
Published: Oct 5, 2019 License: Apache-2.0 Imports: 4 Imported by: 0




View Source
const (
	MirroringHorizontal MirroringDirection = 0
	MirroringVertical   MirroringDirection = 1

	TVSystemNTSC TVSystemType = 0
	TVSystemPAL  TVSystemType = 1

	TVCompatibleNTSC TVCompatibleType = 0
	TVCompatiblePAL  TVCompatibleType = 2
	TVCompatibleDual TVCompatibleType = 3
View Source
const (
	// HeaderSize standard NES rom header is 16 bytes
	HeaderSize = 16


This section is empty.


func Magic2Mapper

func Magic2Mapper(mapperId int) string


type Header struct {
	Identifier [4]byte // Identifier must be ascii 'NES' and a MS-DOS character break
	PRG        uint8   // PRG size of PRG ROM in 16 KB units
	CHR        uint8   // CHR size of CHR ROM in 8KB units, 0 means CHR RAM only
	Flag6      uint8   // NNNN FTBM
	Flag7      uint8   // NNNN xxPV
	PRGRAM     uint8   // PRG RAM in 8KB units, 0 infers 8KB for compatibility
	Flag9      uint8   // xxxx xxxT
	Flag10     uint8   // xxBP xxTT
	// contains filtered or unexported fields

Header represents a standard iNES format header

func NewHeader

func NewHeader(r io.Reader) (header *Header, err error)

NewHeader create a new header from data

func (*Header) BusConflict

func (h *Header) BusConflict() bool

BusConflict returns true if board has bus conflict

func (*Header) CHRROMSize

func (h *Header) CHRROMSize() int

CHRROMSize returns CHR ROM size

func (*Header) FourScreenMode

func (h *Header) FourScreenMode() bool

FourScreenMode returns true when F flag is set

func (*Header) Mapper

func (h *Header) Mapper() uint8

Mapper returns mapper number

func (*Header) Mirroring

func (h *Header) Mirroring() MirroringDirection

Mirroring returns mirroring direction

func (*Header) NES20

func (h *Header) NES20() bool

NES20 returns true when header is in iNES2.0 format

func (*Header) PRGRAMPresent

func (h *Header) PRGRAMPresent() bool

PRGRAMPresent returns PRG RAM present in flag10

func (*Header) PRGRAMSize

func (h *Header) PRGRAMSize() int

Byte8 -------- PRGRAMSize returns size of PRG RAM

func (*Header) PRGROMSize

func (h *Header) PRGROMSize() int

PRGROMSize returns PRG ROM size

func (*Header) PersistentSRAM

func (h *Header) PersistentSRAM() bool

PersistentSRAM returns true when B flag is set

func (*Header) PlayChoice10

func (h *Header) PlayChoice10() bool

PlayChoice10 returns true if header is a PC-10 game header

func (*Header) String

func (h *Header) String() string

func (*Header) TVCompatible

func (h *Header) TVCompatible() TVCompatibleType

TVCompatible returns TV system type in flag10

func (*Header) TVSystem

func (h *Header) TVSystem() TVSystemType

TVSystem returns TV system type defined in flag9

func (*Header) Trainer

func (h *Header) Trainer() bool

Trainer returns true when T flag is set

func (*Header) Vs

func (h *Header) Vs() bool

Vs returns true is header is a Vs. game header

type MirroringDirection

type MirroringDirection int

MirroringDirection mirroring direction

func (MirroringDirection) String

func (d MirroringDirection) String() string

type TVCompatibleType

type TVCompatibleType int

TVCompatibleType TV compatible

func (TVCompatibleType) String

func (t TVCompatibleType) String() string

type TVSystemType

type TVSystemType int

TVSystemType support TV system

func (TVSystemType) String

func (t TVSystemType) String() string

Source Files

Jump to

Keyboard shortcuts

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