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 ¶
const ( VSYNCrecoveryMin = 0 VSYNCrecoveryMax = 99 )
Limits of VSYNC recovery values
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 // regulator of cycle counting for the ARM. this value is multiplied with // the number of cycles used by each instruction. therefore a value of 1.0 // is a neutral regulator CycleRegulator prefs.Float // whether the ARM coprocessor (as found in Harmony cartridges) executes // instantly Immediate prefs.Bool // whether to issue the PC correction after a CALLFN has concluded. the // correction is not necessary but it is sometimes useful to see the // JMP instructions // // * this is not intended to be an option visible to the end user ImmediateCorrection 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 execution on memory fault (eg. accessing memory that doesn't exist) AbortOnMemoryFault prefs.Bool // treat misaligned accesses as a memory fault. (ie. will be reported as a // memory fault and will cause execution to abort if AbortOnMemoryFault is // true) MisalignedAccessIsFault prefs.Bool // include disassembly and register details when logging memory faults ExtendedMemoryFaultLogging prefs.Bool // warn developer that the ELF contains an undefined symbol UndefinedSymbolWarning 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 LateColor 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 // show HTTP transactions in the log HTTPLogging prefs.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 television TV *TVPreferences // 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 // preferences for the AtariVox peripheral 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 LateColor 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.
type TVPreferences ¶ added in v0.32.0
type TVPreferences struct { // number of scanlines required for a valid scanline signal VSYNCscanlines prefs.Int // the speed at which the screen recovers once a valid VSYNC signal is // received. the higher the value the slower the recovery VSYNCrecovery prefs.Int // whether the televisin should desynchronise immediately when a VSYNC // signal arrives late VSYNCimmediateDesync prefs.Bool // whether the televsion should be synced on start VSYNCsyncedOnStart prefs.Bool // halt conditions HaltVSYNCTooShort prefs.Bool HaltVSYNCScanlineStart prefs.Bool HaltVSYNCScanlineCount prefs.Bool HaltVSYNCabsent prefs.Bool HaltChangedVBLANK prefs.Bool // contains filtered or unexported fields }
func (*TVPreferences) Load ¶ added in v0.32.0
func (p *TVPreferences) Load() error
Load television preferences from disk.
func (*TVPreferences) Save ¶ added in v0.32.0
func (p *TVPreferences) Save() error
Save current television preferences to disk.
func (*TVPreferences) SetDefaults ¶ added in v0.32.0
func (p *TVPreferences) SetDefaults()
SetDefaults reverts all settings to default values.