govern

package
v0.24.2 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: GPL-3.0, GPL-3.0 Imports: 0 Imported by: 2

Documentation

Overview

Package govern defines the types that define the current condition of the emulation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mode

type Mode int

Mode inidicates the broad condition of the emulation. Currently defined to be debugger and play.

const (
	ModeNone Mode = iota
	ModeDebugger
	ModePlay
)

List of defined modes.

func (Mode) String

func (m Mode) String() string

type State

type State int

State indicates the emulation's state.

const (
	EmulatorStart State = iota
	Initialising
	Paused
	Stepping
	Rewinding
	Running
	Ending
)

List of possible emulation states.

EmulatorStart is the default state and should never be entered once the emulator has begun.

Initialising can be used when reinitialising the emulator. for example, when a new cartridge is being inserted.

Values are ordered so that order comparisons are meaningful. For example, Running is "greater than" Stepping, Paused, etc.

* There is a sub-state of the rewinding state that we can think of as the "catch-up" state. This occurs in the brief transition period between Rewinding and the Running or Pausing state.

Currently, we handle this state in the CartUpLoop() function of the debugger package. There is a good argument to be made for having the catch-up state as a distinct State listed below.

func (State) String added in v0.21.0

func (s State) String() string

Jump to

Keyboard shortcuts

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