registers

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	CtrlNametableX = 1 << iota
	CtrlNametableY
	CtrlIncrementMode
	CtrlSpriteTileSelect
	CtrlBgTileSelect
	CtrlSpriteHeight
	CtrlMasterSlaveSelect
	CtrlEnableNMI
)
View Source
const (
	MaskGrayscale = 1 << iota
	MaskBgLeftColEnable
	MaskSpriteLeftColEnable
	MaskBackgroundEnable
	MaskSpriteEnable
	MaskEmphasizeRed
	MaskEmphasizeGreen
	MaskEmphasizeBlue
)
View Source
const (
	StatusSpriteOverflow = 1 << (iota + 5)
	StatusSpriteZeroHit
	StatusVblank
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	CoarseX    byte
	CoarseY    byte
	NametableX bool
	NametableY bool
	FineY      byte
}

func (*Address) Get

func (r *Address) Get() uint16

func (*Address) Increment

func (r *Address) Increment(inc byte)

func (*Address) IncrementX

func (r *Address) IncrementX()

func (*Address) IncrementY

func (r *Address) IncrementY()

func (*Address) LoadX

func (r *Address) LoadX(other Address)

func (*Address) LoadY

func (r *Address) LoadY(other Address)

func (*Address) Set

func (r *Address) Set(data uint16)

func (*Address) WriteHi

func (r *Address) WriteHi(data byte)

func (*Address) WriteLo

func (r *Address) WriteLo(data byte)

func (*Address) WriteScrollX

func (r *Address) WriteScrollX(data byte)

func (*Address) WriteScrollY

func (r *Address) WriteScrollY(data byte)

type Control

type Control struct {
	NametableX        bool
	NametableY        bool
	IncrementMode     bool
	SpriteTileSelect  bool
	BgTileSelect      bool
	SpriteHeight      bool
	MasterSlaveSelect bool
	EnableNMI         bool
}

func (Control) BgTileAddr

func (c Control) BgTileAddr() uint16

func (*Control) Set

func (c *Control) Set(data byte)

func (Control) SpriteSize

func (c Control) SpriteSize() byte

func (Control) SpriteTileAddr

func (c Control) SpriteTileAddr() uint16

func (Control) VRAMAddr

func (c Control) VRAMAddr() byte

type Mask

type Mask struct {
	Grayscale           bool
	BgLeftColEnable     bool
	SpriteLeftColEnable bool
	BackgroundEnable    bool
	SpriteEnable        bool
	EmphasizeRed        bool
	EmphasizeGreen      bool
	EmphasizeBlue       bool
}

func (*Mask) Get

func (m *Mask) Get() byte

func (*Mask) RenderingEnabled

func (m *Mask) RenderingEnabled() bool

func (*Mask) Set

func (m *Mask) Set(data byte)

type Status

type Status struct {
	SpriteOverflow bool
	SpriteZeroHit  bool
	PrevVblank     bool
	Vblank         bool
}

func (*Status) Get

func (s *Status) Get() byte

func (*Status) Set

func (s *Status) Set(data byte)

Jump to

Keyboard shortcuts

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