Documentation ¶
Index ¶
Constants ¶
View Source
const (
SubmapperMcAcc = 3
)
Variables ¶
View Source
var ErrInvalidROM = errors.New("invalid ROM file")
View Source
var ErrUnsupportedMapper = errors.New("unsupported mapper")
Functions ¶
This section is empty.
Types ¶
type Cartridge ¶
type Cartridge struct { CHR []byte `msgpack:"alias:Chr"` SRAM []byte `msgpack:"alias:Sram"` Mapper uint8 `msgpack:"-"` Submapper uint8 `msgpack:"-"` Mirror Mirror Battery bool `msgpack:"-"` // contains filtered or unexported fields }
func FromiNesFile ¶
type Mapper ¶
type Mapper interface { memory.ReadWrite8 Cartridge() *Cartridge SetCartridge(cartridge *Cartridge) }
type Mapper1 ¶
type Mapper1 struct { ShiftRegister byte Control byte PRGMode byte `msgpack:"alias:PrgMode"` CHRMode bool `msgpack:"alias:ChrMode"` PRGBank byte `msgpack:"alias:PrgBank"` CHRBank0 byte `msgpack:"alias:ChrBank0"` CHRBank1 byte `msgpack:"alias:ChrBank1"` PRGOffsets [2]int `msgpack:"alias:PrgOffsets"` CHROffsets [2]int `msgpack:"alias:ChrOffsets"` // contains filtered or unexported fields }
func NewMapper1 ¶
func (*Mapper1) SetCartridge ¶
type Mapper2 ¶
type Mapper2 struct { PRGBanks uint `msgpack:"alias:PrgBanks"` PRGBank1 uint `msgpack:"alias:PrgBank1"` PRGBank2 uint `msgpack:"alias:PrgBank2"` // contains filtered or unexported fields }
func NewMapper2 ¶
func (*Mapper2) SetCartridge ¶
type Mapper3 ¶
type Mapper3 struct { CHRBank uint `msgpack:"alias:ChrBank"` PRGBank1 uint `msgpack:"alias:PrgBank1"` PRGBank2 uint `msgpack:"alias:PrgBank2"` // contains filtered or unexported fields }
func NewMapper3 ¶
func (*Mapper3) SetCartridge ¶
type Mapper4 ¶
type Mapper4 struct { Register byte Registers [8]byte PRGMode bool `msgpack:"alias:PrgMode"` CHRMode bool `msgpack:"alias:ChrMode"` PRGOffsets [4]int `msgpack:"alias:PrgOffsets"` CHROffsets [8]int `msgpack:"alias:ChrOffsets"` Reload byte Counter byte IRQEnabled bool `msgpack:"alias:IrqEnable"` IRQPending bool `msgpack:"alias:IrqPending"` PrevA12 bool // contains filtered or unexported fields }
func NewMapper4 ¶
func (*Mapper4) OnScanline ¶
func (m *Mapper4) OnScanline()
func (*Mapper4) OnVRAMAddr ¶
func (*Mapper4) SetCartridge ¶
type Mapper69 ¶
type Mapper69 struct { Command byte PRGCount byte `msgpack:"alias:PrgCount"` PRGBanks [5]int `msgpack:"alias:PrgBanks"` RAMSelect bool `msgpack:"alias:RamSelect"` RAMEnabled bool `msgpack:"alias:RamEnabled"` CHRBanks [8]int `msgpack:"alias:ChrBanks"` IRQEnabled bool `msgpack:"alias:IrqEnable"` IRQCounterEnabled bool `msgpack:"alias:IrqCounterEnable"` IRQCounter uint16 `msgpack:"alias:IrqCounter"` IRQPending bool `msgpack:"alias:IrqPending"` // contains filtered or unexported fields }
func NewMapper69 ¶
func (*Mapper69) SetCartridge ¶
type Mapper7 ¶
type Mapper7 struct { PRGBank uint `msgpack:"alias:PrgBank"` // contains filtered or unexported fields }
func NewMapper7 ¶
func (*Mapper7) SetCartridge ¶
type Mapper71 ¶
type Mapper71 struct { PRGCount uint `msgpack:"alias:PrgCount"` PRGActive uint `msgpack:"alias:PrgActive"` PRGLast uint `msgpack:"alias:PrgLast"` // contains filtered or unexported fields }
func NewMapper71 ¶
func (*Mapper71) SetCartridge ¶
type MapperOnCPUStep ¶
type MapperOnCPUStep interface {
OnCPUStep(cycle uint)
}
type MapperOnScanline ¶
type MapperOnScanline interface {
OnScanline()
}
type MapperOnVRAMAddr ¶
Click to show internal directories.
Click to hide internal directories.