counter

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package counter is closely related to the reflection package. Rather than detailed screen level information about the emulated system however, counter simply accumulates simple state information as a numeric value.

It is closely related to the rewind package and implements the TimelineCounter interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Counter

type Counter struct {
	// contains filtered or unexported fields
}

Counter inspects hardware.VCS and counts for how long a state has been active/or in active.

func NewCounter

func NewCounter(vcs *hardware.VCS) *Counter

NewCounter is the preferred method of implementation for the Counter type.

func (*Counter) Clear

func (ct *Counter) Clear()

Clear count data.

func (*Counter) NewFrame

func (ct *Counter) NewFrame(_ television.FrameInfo) error

NewFrame implements the television.FrameTrigger interface.

func (*Counter) Step

func (ct *Counter) Step(clocks int, bank mapper.BankInfo)

Accumulate count values at end of CPU cycle. The clocks argument says how many color clocks the Step() represents. Count values will be increased by that amount.

func (*Counter) TimelineCounts

func (ct *Counter) TimelineCounts() rewind.TimelineCounts

TimelineCounts implements the rewind.TimelineCounter interface.

Jump to

Keyboard shortcuts

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