signal

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2020 License: GPL-3.0, GPL-3.0 Imports: 1 Imported by: 2

Documentation

Overview

Package signal exposes the interface between the VCS and the television implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColorSignal

type ColorSignal int

ColorSignal represents the signal that is sent from the VCS to the television.

const VideoBlack ColorSignal = -1

VideoBlack is the ColorSignal value that indicates no pixel is being output.

type SignalAttributes

type SignalAttributes struct {
	VSync     bool
	VBlank    bool
	CBurst    bool
	HSync     bool
	Pixel     ColorSignal
	AudioData uint8

	// whether the AudioData is valid. should be true only every 114th clock,
	// which equates to 30Khz
	AudioUpdate bool

	// the position on the screen this signal was applied to. added by the
	// television implementation
	HorizPos int
	Scanline int
}

SignalAttributes represents the data sent to the television.

func (SignalAttributes) String

func (a SignalAttributes) String() string

type StateReq

type StateReq int

StateReq is used to identify which television attribute is being asked with the GetState() function.

const (
	ReqFramenum StateReq = iota
	ReqScanline
	ReqHorizPos
)

List of valid state requests.

type TelevisionSprite

type TelevisionSprite interface {
	GetState(StateReq) int
}

TelevisionSprite exposes only the functions required by the video sprites.

type TelevisionTIA

type TelevisionTIA interface {
	Signal(SignalAttributes) error
	GetState(StateReq) int
}

TelevisionTIA exposes only the functions required by the TIA.

Jump to

Keyboard shortcuts

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