Documentation ¶
Overview ¶
Package reflection monitors the emulated hardware for conditions that would otherwise not be visible through normal emulation. The reflection system is run every video cycle.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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 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 ID ¶ added in v0.10.1
type ID int
ID identifies the reflection information that can be ascertained from the contents of a VideoStep. Other information can probably be gleaned but these are the ones that have been identified. For convenience only.
type Reflector ¶ added in v0.10.1
type Reflector struct {
// contains filtered or unexported fields
}
Reflector should be run (with the Check() function) every video cycle. The (reflection) Renderer's Reflect() function is consequently also called every video cycle with a populated instance of LastResult.
func NewReflector ¶ added in v0.10.1
NewReflector is the preferred method of initialisation for the Monitor type.
func (*Reflector) AddRenderer ¶ added in v0.10.1
AddRenderer adds an implementation of the Renderer interface to the Reflector.
func (*Reflector) NewFrame ¶ added in v0.10.1
NewFrame implements the television.FrameTrigger interface.
type Renderer ¶
type Renderer interface { // Mark the start and end of an update event from the television. // Reflect() should only be called between calls of UpdatingPixels(true) // and UpdatingPixels(false) UpdatingPixels(updating bool) // Reflect sends a VideoStep instance to the Renderer. Reflect(VideoStep) error }
Renderer implementations display or otherwise process VideoStep values.
type VideoStep ¶ added in v0.8.0
type VideoStep struct { CPU execution.Result Collision video.Collisions Bank mapper.BankInfo TV signal.SignalAttributes Hmove Hmove VideoElement video.Element WSYNC bool IsRAM bool CoprocessorActive bool IsHblank bool RSYNCalign bool RSYNCreset bool }
VideoStep 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.