Documentation
¶
Overview ¶
Package cartridge provides .nes ROM loading and saving.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cartridge ¶
type Cartridge struct { PRG []byte // PRG-ROM banks CHR []byte // CHR-ROM banks RAM byte // PRG-RAM banks Trainer []byte Mapper byte // mapper type Mirror MirrorMode // mirroring mode Battery byte // battery present VideoFormat byte // 0 NTSC, 1 PAL }
Cartridge contains a NES cartridge content.
type MirrorMode ¶
type MirrorMode int
MirrorMode defines a mirror mode.
const ( // MirrorHorizontal is a vertical arrangement of the nametables, // resulting in horizontal mirroring, which makes a 32x60 tilemap. MirrorHorizontal MirrorMode = iota // MirrorVertical is a horizontal arrangement of the nametables, // resulting in vertical mirroring, which makes a 64x30 tilemap. MirrorVertical // Single-screen mirroring is only available with certain mappers, // resulting in two 32x30 tilemaps. MirrorSingle0 MirrorSingle1 // Mirror4 offers 4 unique nametables can be addressed through the PPU bus, // creating a 64x60 tilemap, allowing for more flexible screen layouts. Mirror4 MirrorDiagonal MirrorLShaped Mirror3Vertical Mirror3Horizontal Mirror3Diagonal )
mirror modes.
func (MirrorMode) NametableIndexes ¶
func (m MirrorMode) NametableIndexes() [4]uint16
NametableIndexes returns the nametable indexes of the mirror mode.
Click to show internal directories.
Click to hide internal directories.