preferences

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2020 License: GPL-3.0, GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package preferences (sub-package of the hardware package) coordinates the options for all variations in hardware operation. For example, whether to start the hardware in an unknown, or random, state.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Preferences

type Preferences struct {

	// initialise hardware to unknown state after reset
	RandomState prefs.Bool

	// unused pins when reading TIA/RIOT registers take the value of the last
	// value on the bus. if RandomPins is true then the values of the unusued
	// pins are randomised. this is the equivalent of the Stella option "drive
	// unused pins randomly on a read/peek"
	RandomPins prefs.Bool

	// random values generated in the hardware package should use the following
	// number source
	RandSrc *rand.Rand

	// the number used to seed RandSrc
	RandSeed int64
	// contains filtered or unexported fields
}

Preferences defines and collates all the preference values used by the debugger.

func NewPreferences

func NewPreferences() (*Preferences, error)

NewPreferences is the preferred method of initialisation for the Preferences type.

func (*Preferences) Load

func (p *Preferences) Load() error

Load current hardware preference from disk.

func (*Preferences) Reseed

func (p *Preferences) Reseed(seed int64)

Reseed initialises the random number generator. Use a seed value of 0 to initialise with the current time.

func (*Preferences) Reset

func (p *Preferences) Reset() error

Reset all hardware preferences to the default values.

func (*Preferences) Save

func (p *Preferences) Save() error

Save current hardware preferences to disk.

func (*Preferences) String

func (p *Preferences) String() string

Jump to

Keyboard shortcuts

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