Description
The IDevice interface is the primary interface which exposes devices, such as processors, memory, peripherals, etc, to the emulation environment. A device must implement this interface in order to be compatible, although it is better to derive from the Device base class instead, which contains a default implementation of this interface. Many devices only need to implement a few of these methods in order to actually perform the tasks they need to do, so it is better to use this base class and override just the methods that need to be defined for a given device.
Note that this interface is designed to be passed across DLL boundaries, so it must meet the requirements of a Shared Interface.
Initialization functions
Name | Description | |
---|---|---|
![]() |
BindToSystemInterface |
Called by the system to bind the device to the ISystemDeviceInterface object
|
![]() |
BindToDeviceContext |
Called by the system to bind the device to its IDeviceContext object
|
![]() |
Construct |
Allows a device to load additional parameters which control its construction, as they have been specified in the module file which has
created this device instance.
|
![]() |
BuildDevice |
Allows devices to perform additional one-time construction tasks during the module load process.
|
![]() |
ValidateDevice |
Allows a device to validate its current state and connection to other devices, as a final check before the device is considered
successfully loaded.
|
![]() |
Initialize |
Is called to instruct a device to initialize its internal state back to a state consistent with a cold-boot.
|
Reference functions
Name | Description | |
---|---|---|
![]() |
AddReference |
Allows a device to reference another element in the system. References are the means by which devices are able to be associated with other
system components. Objects of type IDevice,
IExtension,
IBusInterface, and
IClockSource can be referenced.
|
![]() |
RemoveReference |
Removes a reference previously accepted by a successful call to the AddReference method
|
Device context functions
Name | Description | |
---|---|---|
![]() |
GetDeviceContext |
Returns the IDeviceContext object associated with this device
|
![]() |
GetCurrentTimesliceProgress |
Returns the progress this device has made through the current timeslice, in nanoseconds.
|
Suspend functions
Name | Description | |
---|---|---|
![]() |
UsesExecuteSuspend |
Reports whether this device ever calls the SuspendTimesliceExecution
method on the IDeviceContext object associated with this device.
|
![]() |
UsesTransientExecution |
Reports whether this device ever calls the SetTransientExecutionActive
method on the IDeviceContext object associated with this device.
|
Execute functions
Name | Description | |
---|---|---|
![]() |
BeginExecution |
Called by the system on each device when before system execution starts
|
![]() |
SuspendExecution |
Called by the system on each device when system execution is paused
|
![]() |
ExecuteStep |
Called by the system to advance execution on devices that return "Step" as the execution method from GetUpdateMethod
|
![]() |
ExecuteTimeslice |
Called by the system to advance execution on devices that return "Timeslice" as the execution method from GetUpdateMethod
|
![]() |
ExecuteTimesliceTimingPointStep |
Called by the system to step through a timing point for devices that return "Timeslice" as the execution method from GetUpdateMethod
|
![]() |
GetNextTimingPointInDeviceTime |
Called by the system to request a device to report when its next known timing point will occur
|
![]() |
ExecuteRollback |
Called by the system to request a device to rollback its execution state to the point it was at when the last call to ExecuteCommit occurred
|
![]() |
ExecuteCommit |
Called by the system to request a device to commit its current execution state, so that it can be restored if the ExecuteRollback is called.
|
![]() |
GetUpdateMethod |
Returns the update method the device uses to advance execution
|
![]() |
SendNotifyUpcomingTimeslice |
Reports whether the device wants the system to call the NotifyUpcomingTimeslice
method before each system timeslice begins execution
|
![]() |
NotifyUpcomingTimeslice |
Called before each system timeslice begins execution, if this device returned true from the SendNotifyUpcomingTimeslice
method.
|
![]() |
SendNotifyBeforeExecuteCalled |
Reports whether the device wants the system to call the NotifyBeforeExecuteCalled
method before any devices execute the upcoming timeslice
|
![]() |
NotifyBeforeExecuteCalled |
Called before each device executes the upcoming timeslice, if this device returned true from the SendNotifyBeforeExecuteCalled
method.
|
![]() |
SendNotifyAfterExecuteCalled |
Reports whether the device wants the system to call the NotifyAfterExecuteCalled
method after all devices finish executing the last timeslice
|
![]() |
NotifyAfterExecuteCalled |
Called after all devices finish executing the last timeslice, if this device returned true from the SendNotifyAfterExecuteCalled
method.
|
![]() |
NotifyAfterExecuteStepFinishedTimeslice |
Called on this device after it finishes executing the current timeslice
|
Name functions
Name | Description | |
---|---|---|
![]() |
GetDeviceImplementationName | |
![]() |
GetDeviceInstanceName | |
![]() |
GetFullyQualifiedDeviceInstanceName | |
![]() |
GetModuleDisplayName | |
![]() |
GetModuleInstanceName | |
![]() |
GetDeviceModuleID |
Savestate functions
Name | Description | |
---|---|---|
![]() |
GetScreenshot | |
![]() |
LoadState | |
![]() |
SaveState | |
![]() |
LoadPersistentState | |
![]() |
SavePersistentState | |
![]() |
LoadSettingsState | |
![]() |
SaveSettingsState | |
![]() |
LoadDebuggerState | |
![]() |
SaveDebuggerState |
CE line state functions
Name | Description | |
---|---|---|
![]() |
GetCELineID | |
![]() |
SetCELineInput | |
![]() |
SetCELineOutput | |
![]() |
CalculateCELineStateMemory | |
![]() |
CalculateCELineStateMemoryTransparent | |
![]() |
CalculateCELineStatePort | |
![]() |
CalculateCELineStatePortTransparent |
Memory functions
Name | Description | |
---|---|---|
![]() |
ReadInterface | |
![]() |
WriteInterface | |
![]() |
TransparentReadInterface | |
![]() |
TransparentWriteInterface |
Port functions
Name | Description | |
---|---|---|
![]() ![]() |
ReadPort | |
![]() ![]() |
WritePort | |
![]() ![]() |
TransparentReadPort | |
![]() ![]() |
TransparentWritePort |
Line functions
Name | Description | |
---|---|---|
![]() |
GetLineID | |
![]() |
GetLineName | |
![]() |
GetLineWidth | |
![]() |
SetLineState | |
![]() |
TransparentSetLineState | |
![]() |
RevokeSetLineState | |
![]() |
AdvanceToLineState | |
![]() |
AssertCurrentOutputLineState | |
![]() |
NegateCurrentOutputLineState |
Clock source functions
Name | Description | |
---|---|---|
![]() |
GetClockSourceID | |
![]() |
GetClockSourceName | |
![]() |
SetClockSourceRate | |
![]() |
TransparentSetClockSourceRate |
Input functions
Name | Description | |
---|---|---|
![]() |
GetKeyCodeID | |
![]() |
GetKeyCodeName | |
![]() |
HandleInputKeyDown | |
![]() |
HandleInputKeyUp |
See also
- Device
- IDeviceContext
- IBusInterface
- IExtension
- IClockSource