Documentation
¶
Index ¶
- Constants
- type AddressFlag
- type ControllerFlag
- type CycleFunc
- type MaskFlag
- type Mirroring
- type Nametable
- func (nametable *Nametable) Fetch(address uint16) (value uint8)
- func (nametable *Nametable) Mappings(which rp2ago3.Mapping) (fetch, store []uint16)
- func (nametable *Nametable) Reset()
- func (nametable *Nametable) SetTables(t0, t1, t2, t3 int)
- func (nametable *Nametable) Store(address uint16, value uint8) (oldValue uint8)
- type OAM
- type RP2C02
- func (ppu *RP2C02) Execute() (colors []uint8)
- func (ppu *RP2C02) Fetch(address uint16) (value uint8)
- func (ppu *RP2C02) GetPatternTables() (left, right *image.RGBA)
- func (ppu *RP2C02) Mappings(which rp2ago3.Mapping) (fetch, store []uint16)
- func (ppu *RP2C02) Reset()
- func (ppu *RP2C02) SavePatternTables() (left, right *image.RGBA)
- func (ppu *RP2C02) Store(address uint16, value uint8) (oldValue uint8)
- func (ppu *RP2C02) ToggleDecode() bool
- func (ppu *RP2C02) TriggerScanlineCounter() (trigger bool)
- type Registers
- type Sprite
- type SpriteFlag
- type StatusFlag
- type TileData
Constants ¶
View Source
const ( ClearBuffer int = iota CopyYPosition CopyIndex CopyAttributes CopyXPosition EvaluateYPosition EvaluateIndex EvaluateAttributes EvaluateXPosition FailCopyYPosition )
View Source
const ( CyclesPerScanline uint16 = 341 PowerupScanline = 241 StartNMIScanline = 241 FirstVisibleScanline = 0 LastVisibleScanline = 239 // NTSC NumScanlinesNTSC = 262 PreRenderScanlineNTSC = 261 // PAL NumScanlinesPAL = 312 PreRenderScanlinePAL = 311 FrameSize = 0xf000 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressFlag ¶
type AddressFlag uint16
const ( CoarseXScroll AddressFlag = 1 << iota CoarseYScroll NametableSelect FineYScroll )
type ControllerFlag ¶
type ControllerFlag uint8
const ( BaseNametableAddress ControllerFlag = 1 << iota VRAMAddressIncrement SpritePatternAddress BackgroundPatternAddress SpriteSize NMIOnVBlank )
type OAM ¶
type OAM struct {
*m65go2.BasicMemory
Address uint16
Latch uint8
Buffer *m65go2.BasicMemory
SpriteZeroInBuffer bool
Index uint16
WriteCycle int
// contains filtered or unexported fields
}
type RP2C02 ¶
type RP2C02 struct {
Frame uint16
Scanline uint16
Cycle uint16
Registers Registers
Memory *rp2ago3.MappedMemory
Palette [32]uint8
Nametable *Nametable
Interrupt func(state bool) `json:"-"`
OAM *OAM
Latch bool
LatchAddress uint16
LatchValue uint8
AddressLine uint16
PatternAddress uint16
AttributeNext uint8
AttributeLatch uint8
Attributes uint16
TilesLow uint8
TilesHigh uint8
TilesLatchLow uint8
TilesLatchHigh uint8
TileData [16]TileData
Sprites [8]Sprite
ShowBackground bool `json:"-"`
ShowSprites bool `json:"-"`
PAL bool
NumScanlines uint16
PreRenderScanline uint16
// contains filtered or unexported fields
}
func (*RP2C02) GetPatternTables ¶
func (*RP2C02) SavePatternTables ¶
func (*RP2C02) ToggleDecode ¶
func (*RP2C02) TriggerScanlineCounter ¶
type Registers ¶
type SpriteFlag ¶
type SpriteFlag uint32
const ( // byte 0 YPosition SpriteFlag = 1 << iota // byte 1 TileBank TileNumber // byte 2 SpritePalette Priority FlipHorizontally FlipVertically // byte 3 XPosition )
type StatusFlag ¶
type StatusFlag uint8
const ( SpriteOverflow StatusFlag Sprite0Hit VBlankStarted )
Click to show internal directories.
Click to hide internal directories.