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 MAMDriver = -1
Indicats 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 {
// whether the ARM coprocessor (as found in Harmony cartridges) execute
// instantly or if the cycle accurate steppint is attempted
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
Clock prefs.Float
FlashAccessTime prefs.Float
SRAMAccessTime prefs.Float
}
type Preferences ¶
type Preferences struct {
// random values generated in the hardware package should use the following
// number source
RandSrc *rand.Rand
// the number used to seed RandSrc
RandSeed int64
// 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
// ARM preferences are contained in their own type so they can be passed
// easily to the ARM subsystem
ARM ARMPreferences
// 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) 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