Documentation
¶
Overview ¶
Package architecture defines the Map type that is used to specify the differences in cartridge and ARM archtectures.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ARMArchitecture ¶
type ARMArchitecture string
ARMArchitecture defines the features of the ARM core.
const ( ARM7TDMI ARMArchitecture = "ARM7TDMI" ARMv7_M ARMArchitecture = "ARMv7-M" )
List of valid ARMArchitecture values.
type CartArchitecture ¶
type CartArchitecture string
CartArchitecture defines the memory map for the ARM.
const ( Harmony CartArchitecture = "Harmony" PlusCart CartArchitecture = "PlusCart" )
List of valid CartArchitecture values.
type Map ¶
type Map struct {
CartArchitecture CartArchitecture
ARMArchitecture ARMArchitecture
// some ARM architectures allow misaligned accesses for some instructions
MisalignedAccesses bool
FlashOrigin uint32
FlashMemtop uint32
SRAMOrigin uint32
SRAMMemtop uint32
// the memory latency of the Flash memory block (in nanoseconds)
FlashLatency float64
// MAM
HasMAM bool
MAMCR uint32
MAMTIM uint32
// PreferredMAMCR is the value that will be used when ARM MAM preferences
// is set to driver. defaults to MAMfull and is intended to be altered by
// the cartridge implementation before creating the ARM emulation
PreferredMAMCR MAMCR
HasT1 bool
T1TCR uint32
T1TC uint32
HasTIM2 bool
TIM2CR1 uint32
TIM2EGR uint32
TIM2CNT uint32
TIM2PSC uint32
TIM2ARR uint32
HasRNG bool
RNGCR uint32
RNGSR uint32
RNGDR uint32
APBDIV uint32
// the address below which a null access is considered to have happened
NullAccessBoundary uint32
// the value the is returned when an illegal memory address is read
IllegalAccessValue uint32
// the divisor to apply to the main clock when ticking peripherals (eg. timers)
ClkDiv float32
}
Map of the differences between architectures. The differences are led by the cartridge architecture.
func NewMap ¶
func NewMap(cart CartArchitecture) Map
NewMap is the preferred method of initialisation for the Map type.
Click to show internal directories.
Click to hide internal directories.