ppu

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Colors [64]color.RGBA

Functions

This section is empty.

Types

type CtrlFlags

type CtrlFlags = uint8
const (
	CtrlIncrementMode      CtrlFlags = 1 << 2
	CtrlSpritePatternAddr  CtrlFlags = 1 << 3
	CtrlPatternTableSelect CtrlFlags = 1 << 4
	CtrlSpriteSize         CtrlFlags = 1 << 5
	CtrlSlaveMode          CtrlFlags = 1 << 6
	CtrlNMI                CtrlFlags = 1 << 7
)

type MaskFlags

type MaskFlags = uint8
const (
	MaskGrayscale       MaskFlags = 1 << 0
	MaskShowLeftTiles   MaskFlags = 1 << 1
	MaskShowLeftSprites MaskFlags = 1 << 2
	MaskShowBackground  MaskFlags = 1 << 3
	MaskShowSprites     MaskFlags = 1 << 4
	MaskEmphasizeRed    MaskFlags = 1 << 5
	MaskEmphasizeGreen  MaskFlags = 1 << 6
	MaskEmphasizeBlue   MaskFlags = 1 << 7
)

type PPU

type PPU struct {
	Frame [256][240]color.RGBA

	NoSpriteLimit bool
	FastForward   bool
	// contains filtered or unexported fields
}

func New

func New(cart ines.Cartridge) *PPU

func (*PPU) DisableFastForward

func (p *PPU) DisableFastForward()

func (*PPU) EnableFastForward

func (p *PPU) EnableFastForward()

func (*PPU) FrameComplete

func (p *PPU) FrameComplete() (v bool)

func (*PPU) LoadState

func (p *PPU) LoadState(r *binario.Reader) error

func (*PPU) PendingNMI

func (p *PPU) PendingNMI() (v bool)

func (*PPU) Read

func (p *PPU) Read(addr uint16) uint8

func (*PPU) Reset

func (p *PPU) Reset()

func (*PPU) SaveState

func (p *PPU) SaveState(w *binario.Writer) error

func (*PPU) ScanlineComplete

func (p *PPU) ScanlineComplete() (v bool)

func (*PPU) SetDMACallback

func (p *PPU) SetDMACallback(callback dmaFunc)

func (*PPU) Tick

func (p *PPU) Tick()

func (*PPU) TransferOAM

func (p *PPU) TransferOAM(pageAddr uint8)

func (*PPU) Write

func (p *PPU) Write(addr uint16, data uint8)

type Sprite

type Sprite struct {
	Index     int
	Pixels    [8][16]uint8
	PaletteID uint8
	X, Y      uint8
	FlipX     bool
	FlipY     bool
	Behind    bool
}

type StatusFlags

type StatusFlags = uint8
const (
	StatusSpriteOverflow StatusFlags = 1 << 5
	StatusSpriteZeroHit  StatusFlags = 1 << 6
	StatusVBlank         StatusFlags = 1 << 7
)

type Tile

type Tile struct {
	Pixels    [8][8]uint8
	PaletteID uint8
}

Jump to

Keyboard shortcuts

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