signal

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 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
	Scanline int
	Clock    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
	ReqClock
)

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