signal

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 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

View Source
const (
	AudioChannel0Shift = 5
	AudioChannel1Shift = 13
	ColorShift         = 21
	IndexShift         = 29
)

List of shift amounts to be used to access the corresponding bits in a SignalAttributes value.

View Source
const NoSignal = Index

NoSignal is the null value of the SignalAttributes type.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColorSignal

type ColorSignal uint8

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

const VideoBlack ColorSignal = 0xff

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

type SignalAttributes

type SignalAttributes uint64

SignalAttributes represents the data sent to the television.

const (
	VSync         SignalAttributes = 0b0000000000000000000000000000000000000000000001
	VBlank        SignalAttributes = 0b0000000000000000000000000000000000000000000010
	CBurst        SignalAttributes = 0b0000000000000000000000000000000000000000000100
	HSync         SignalAttributes = 0b0000000000000000000000000000000000000000001000
	AudioUpdate   SignalAttributes = 0b0000000000000000000000000000000000000000010000
	AudioChannel0 SignalAttributes = 0b0000000000000000000000000000000001111111100000 // 8 bits
	AudioChannel1 SignalAttributes = 0b0000000000000000000000000111111110000000000000 // 8 bits
	Color         SignalAttributes = 0b0000000000000000011111111000000000000000000000 // 8 bits

	// Index is additional information relating to the position of the signal
	// in relation to the top left of the screen. It can mostly be ignored but
	// it is useful for synchronisation between the television and reflection
	// packages.
	Index SignalAttributes = 0b1111111111111111100000000000000000000000000000 // 17 bits
)

List of bit masks to be used to with the SignalAttribute type.

func (SignalAttributes) String

func (a SignalAttributes) String() string

Jump to

Keyboard shortcuts

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