Documentation ¶
Overview ¶
Package reflection monitors the emulated hardware for conditions that would otherwise not be visible through normal emulation. The reflection system is stepped every video cycle.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var OverlayLabels = []string{"No overlay", "WSYNC", "Collisions", "HMOVE", "RSYNC", "Coprocessor"}
OverlayLabels are names/labels for the the Policy type values.
Functions ¶
This section is empty.
Types ¶
type Broker ¶ added in v0.2.1
type Broker interface {
GetReflectionRenderer() Renderer
}
Broker implementations can identify a reflection.Renderer.
type Gatherer ¶ added in v0.14.0
type Gatherer struct {
// contains filtered or unexported fields
}
Gatherer should be run (with the Check() function) every video cycle.
func NewGatherer ¶ added in v0.14.0
NewGatherer is the preferred method of initialisation for the Monitor type.
func (*Gatherer) AddRenderer ¶ added in v0.14.0
AddRenderer adds an implementation of the Renderer interface to the Reflector.
func (*Gatherer) EnableReflection ¶ added in v0.14.0
EnableReflection implements the Reflector interface.
func (*Gatherer) NewFrame ¶ added in v0.14.0
func (ref *Gatherer) NewFrame(_ television.FrameInfo) error
NewFrame implements the television.FrameTrigger interface.
type Hmove ¶ added in v0.2.1
Hmove groups the HMOVE reflection information. It's too complex a property to distil into a single variable.
Ordering of the structure is important.
type Overlay ¶ added in v0.14.0
type Overlay int
Overlay is used to define the list of possible overlays that can be used to illustrate/visualise information in a ReflectedVideoStep instance.
We don't use this inside the reflection package itself but the type and associated values are useful and it makes sense to define them in this package.
type ReflectedInfo ¶ added in v0.14.0
type ReflectedInfo int
ReflectedInfo identifies specific information that has been reflected in a ReflectedVideoStep instance.
We don't use this inside the reflection package itself but the type and associated values are useful and it makes sense to define them in this package.
const ( WSYNC ReflectedInfo = iota Collision CXCLR HMOVEdelay HMOVEripple HMOVElatched RSYNCalign RSYNCreset CoprocessorActive )
List of valid ReflectedInfo values.
type ReflectedVideoStep ¶ added in v0.14.0
type ReflectedVideoStep struct { CPU execution.Result Collision video.Collisions Bank mapper.BankInfo Signal signal.SignalAttributes Hmove Hmove VideoElement video.Element WSYNC bool IsRAM bool CoprocessorActive bool IsHblank bool RSYNCalign bool RSYNCreset bool }
ReflectedVideoStep packages together the details of the the last video step that would otherwise be difficult for a debugger to access.
It includes the CPU execution result, the bank from which the instruction originates, the video element that produced the last video pixel on screen; among other information.
Note that ordering of the structure is important. There's a saving of about 2MB per frame compared to the unoptimal ordering.
type Renderer ¶
type Renderer interface { // Reflect sends a VideoStep instance to the Renderer. Reflect([]ReflectedVideoStep) error }
Renderer implementations display or otherwise process VideoStep values.