preferences

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: GPL-3.0, GPL-3.0 Imports: 11 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

View Source
const MAMDriver = -1

Indicators that the ARM should put the MAM into the mode inidcated by the emulated driver for the cartridge mapper.

Variables

This section is empty.

Functions

This section is empty.

Types

type ARMPreferences added in v0.12.1

type ARMPreferences struct {

	// the specific model of ARM to use. this will affect things like memory
	// addressing for cartridge formats that use the ARM.
	//
	// NOTE: this may be superceded in the future to allow for more flexibility
	Model prefs.String

	// speed of processor
	Clock prefs.Float // Mhz

	// amount of time required to access flash memory
	FlashLatency prefs.Float // nanoseconds

	// whether the ARM coprocessor (as found in Harmony cartridges) executes
	// instantly
	Immediate prefs.Bool

	// a value of MAMDriver says to use the driver supplied MAM value. any
	// other value "forces" the MAM setting on Thumb program execution.
	MAM prefs.Int

	// abort Thumb program is it tries to access memory that does not exist.
	// for example: reading from Flash memory above the 32k memtop (for 32k
	// ROMs)
	AbortOnIllegalMem prefs.Bool
	// contains filtered or unexported fields
}

func (*ARMPreferences) Load added in v0.16.0

func (p *ARMPreferences) Load() error

Load current arm preference from disk.

func (*ARMPreferences) Save added in v0.16.0

func (p *ARMPreferences) Save() error

Save current arm preferences to disk.

func (*ARMPreferences) SetDefaults added in v0.16.0

func (p *ARMPreferences) SetDefaults()

SetDefaults reverts all settings to default values.

func (*ARMPreferences) String added in v0.16.0

func (p *ARMPreferences) String() string

type AtariVoxPreferences added in v0.17.0

type AtariVoxPreferences struct {
	FestivalEnabled prefs.Bool
	FestivalBinary  prefs.String
	// contains filtered or unexported fields
}

func (*AtariVoxPreferences) Load added in v0.17.0

func (p *AtariVoxPreferences) Load() error

Load disassembly preferences and apply to the current disassembly.

func (*AtariVoxPreferences) Save added in v0.17.0

func (p *AtariVoxPreferences) Save() error

Save current disassembly preferences to disk.

func (*AtariVoxPreferences) SetDefaults added in v0.17.0

func (p *AtariVoxPreferences) SetDefaults()

SetDefaults reverts all settings to default values.

type LiveRevisionPreferences added in v0.16.0

type LiveRevisionPreferences struct {
	// The names of the preference fields match the Bug enumerations. These
	// values are updated automatically when the corresponding Dsk* field is
	// updated.
	LateVDELGRP0     atomic.Value // bool
	LateVDELGRP1     atomic.Value // bool
	LateRESPx        atomic.Value // bool
	EarlyScancounter atomic.Value // bool
	LatePFx          atomic.Value // bool
	LateCOLUPF       atomic.Value // bool
	LostMOTCK        atomic.Value // bool
	RESPxHBLANK      atomic.Value // bool
}

LiveRevisionPrefrences encapsulates the current (live) revision values.

For performance critical situations these values should be preferred to the prefs.Bool values in RevisionPreferences.

type PlusROMPreferences added in v0.16.0

type PlusROMPreferences struct {
	Nick prefs.String
	ID   prefs.String

	// is true if the default nick/id are being used
	NewInstallation bool
	// contains filtered or unexported fields
}

func (*PlusROMPreferences) Load added in v0.16.0

func (p *PlusROMPreferences) Load() error

Load plusrom preferences from disk.

func (*PlusROMPreferences) Save added in v0.16.0

func (p *PlusROMPreferences) Save() error

Save current plusrom preferences to disk.

func (*PlusROMPreferences) SetDefaults added in v0.16.0

func (p *PlusROMPreferences) SetDefaults()

SetDefaults reverts all settings to default values.

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

	// preferences used by the ARM sub-system
	ARM *ARMPreferences

	// preferences used by PlusROM cartridges
	PlusROM *PlusROMPreferences

	// preferences used by the TIA package in order to emulate different
	// revisions of the TIA chip
	Revision *RevisionPreferences

	AtariVox *AtariVoxPreferences
	// contains filtered or unexported fields
}

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

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) Save

func (p *Preferences) Save() error

Save current hardware preferences to disk.

func (*Preferences) SetDefaults added in v0.12.1

func (p *Preferences) SetDefaults()

SetDefaults reverts all settings to default values.

func (*Preferences) String

func (p *Preferences) String() string

type RevisionPreferences added in v0.16.0

type RevisionPreferences struct {

	// Prefer live values in performance critical code
	Live LiveRevisionPreferences

	// Disk copies of preferences
	LateVDELGRP0     prefs.Bool
	LateVDELGRP1     prefs.Bool
	LateRESPx        prefs.Bool
	EarlyScancounter prefs.Bool
	LatePFx          prefs.Bool
	LateCOLUPF       prefs.Bool
	LostMOTCK        prefs.Bool
	RESPxHBLANK      prefs.Bool
	// contains filtered or unexported fields
}

RevisionPreferences defines the details of the TIA revisins.

func (*RevisionPreferences) Load added in v0.16.0

func (p *RevisionPreferences) Load() error

Load revision preferences from disk.

func (*RevisionPreferences) Save added in v0.16.0

func (p *RevisionPreferences) Save() error

Save current revision preferences to disk.

func (*RevisionPreferences) SetDefaults added in v0.16.0

func (p *RevisionPreferences) SetDefaults()

SetDefaults reverts all settings to default values.

Jump to

Keyboard shortcuts

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