C# Class Emul8.Peripherals.CPU.TranslationCPU

Inheritance: IGPIOReceiver, IControllableCPU, IDisposable, IDisassemblable
Show file Open project: emul8/emul8 Class Usage Examples

Protected Properties

Property Type Description
ClockSource Emul8.Time.BaseClockSource
InvalidInterruptNumberException Exception
machine Emul8.Core.Machine

Private Properties

Property Type Description
AdjustBlockSize void
Allocate System.IntPtr
BlitArray void
CheckCpuThreadId void
CheckHalted bool
CheckIfOnSynchronizedThread void
CpuLoop void
DeactivateHooks void
ExecuteHooks void
Free void
FreeState void
GetCpuIndex int
GetSymbolName string
HandleRamSetup void
HandleStepping void
IClockSource Emul8.Time.ClockEntry
IClockSource IEnumerable
IClockSource bool
Init void
InitDisas void
InitInterruptEvents void
InnerPause void
InvalidateTbInOtherCpus void
InvokeHalted void
InvokeInCpuThreadSafely void
IsBlockBeginEventEnabled uint
IsInstructionCountEnabled uint
IsIoAccessed int
LogAsCpu void
LogDisassembly void
ObtainPauseGuard CpuThreadPauseGuard
OnBlockBegin void
OnTranslationBlockFetch void
OnTranslationCacheSizeChange void
PrepareState void
ReactivateHooks void
ReadByteFromBus uint
ReadDoubleWordFromBus uint
ReadWordFromBus uint
Reallocate IntPtr
RebuildMemoryMappings void
RegisterMemoryChecked void
ReportAbort void
RestoreState void
SetMaximumBlockSize void
SetPCFromEntryPoint void
SubmitTranslationCacheSizeUpdate void
TouchHostBlock void
TrySetDisassembler bool
UpdateInstructionCounter void
UpdateTranslationCacheSize void
ValidateMemoryRangeAndThrow void
WriteByteToBus void
WriteDoubleWordToBus void
WriteWordToBus void

Public Methods

Method Description
AddHook ( uint addr, Action hook ) : void
ClearHookAtBlockBegin ( ) : void
ClearPageAccessViaIo ( long address ) : void
ClearTranslationCache ( bool skipSync = false ) : void
DisassembleBlock ( uint addr, uint flags ) : string
Dispose ( ) : void
DisposeInner ( bool silent = false ) : void
EnterSingleStepModeSafely ( Emul8.Peripherals.CPU.HaltArguments args ) : void
GetRegisterUnsafe ( int register ) : uint
GetRegisters ( ) : int[]
GetRegistersValues ( ) : ].string[

Gets the registers values.

IClockSource ( System.Action action ) : void
IClockSource ( System.Action handler, Action visitor ) : void
IClockSource ( System.Action handler, ClockEntry>.Func visitor, Func factorIfNonExistant ) : void
IClockSource ( Emul8.Time.ClockEntry entry ) : void
IClockSource ( IEnumerable entries ) : void
InitFromElf ( ELF elf ) : void
InitFromUImage ( UImage uImage ) : void
IsSetEvent ( int number ) : bool
LogFunctionNames ( bool value ) : void
MapMemory ( IMappedSegment segment ) : void
MeasureExecutionRate ( ) : void
OnGPIO ( int number, bool value ) : void
Pause ( ) : void
RemoveAllHooks ( ) : void
RemoveHook ( uint addr, Action hook ) : void
RemoveHooksAt ( uint addr ) : void
Reset ( ) : void
Resume ( ) : void
SetHookAtBlockBegin ( uint>.Action hook ) : void
SetPageAccessViaIo ( long address ) : void
SetRegisterUnsafe ( int register, uint value ) : void
Start ( ) : void
StartGdbServer ( int port ) : void
Step ( int count = 1 ) : void
StopGdbServer ( ) : void
SymbolLookup ( uint addr ) : Symbol
TranslateAddress ( uint logicalAddress ) : uint
UnmapMemory ( Range range ) : void
UpdateContext ( ) : void

Protected Methods

Method Description
AfterLoad ( IntPtr statePtr ) : void
BeforeSave ( IntPtr statePtr ) : void
DecodeInterrupt ( int number ) : Interrupt
DoLookupSymbolInner ( uint offset ) : Symbol
ExtendWaitHandlers ( WaitHandle handle ) : void
InitializeRegisters ( ) : void
ResetInterruptEvent ( int number ) : void
TranslationCPU ( string cpuType, Emul8.Core.Machine machine, Endianess endianness ) : System

Private Methods

Method Description
AdjustBlockSize ( ) : void
Allocate ( int size ) : IntPtr
BlitArray ( IntPtr targetPointer, dynamic structures ) : void
CheckCpuThreadId ( ) : void
CheckHalted ( ) : bool
CheckIfOnSynchronizedThread ( ) : void
CpuLoop ( ) : void
DeactivateHooks ( uint address ) : void
ExecuteHooks ( uint address ) : void
Free ( IntPtr pointer ) : void
FreeState ( ) : void
GetCpuIndex ( ) : int
GetSymbolName ( uint offset ) : string
HandleRamSetup ( ) : void
HandleStepping ( bool force = false ) : void
IClockSource ( System.Action handler ) : Emul8.Time.ClockEntry
IClockSource ( ) : IEnumerable
IClockSource ( System.Action handler ) : bool
Init ( ) : void
InitDisas ( ) : void
InitInterruptEvents ( ) : void
InnerPause ( HaltArguments haltArgs ) : void
InvalidateTbInOtherCpus ( IntPtr start, IntPtr end ) : void
InvokeHalted ( HaltArguments arguments ) : void
InvokeInCpuThreadSafely ( Action a ) : void
IsBlockBeginEventEnabled ( ) : uint
IsInstructionCountEnabled ( ) : uint
IsIoAccessed ( uint address ) : int
LogAsCpu ( int level, string s ) : void
LogDisassembly ( uint pc, uint count, uint flags ) : void
ObtainPauseGuard ( bool forReading, long address ) : CpuThreadPauseGuard
OnBlockBegin ( uint address, uint size ) : void
OnTranslationBlockFetch ( uint offset ) : void
OnTranslationCacheSizeChange ( int realSize ) : void
PrepareState ( ) : void
ReactivateHooks ( ) : void
ReadByteFromBus ( uint offset ) : uint
ReadDoubleWordFromBus ( uint offset ) : uint
ReadWordFromBus ( uint offset ) : uint
Reallocate ( IntPtr oldPointer, int newSize ) : IntPtr
RebuildMemoryMappings ( ) : void
RegisterMemoryChecked ( long offset, long size ) : void
ReportAbort ( string message ) : void
RestoreState ( ) : void
SetMaximumBlockSize ( uint value, bool skipSync = false ) : void
SetPCFromEntryPoint ( uint entryPoint ) : void
SubmitTranslationCacheSizeUpdate ( ) : void
TouchHostBlock ( uint offset ) : void
TrySetDisassembler ( string type ) : bool
UpdateInstructionCounter ( int value ) : void
UpdateTranslationCacheSize ( int sizeAtThatTime ) : void
ValidateMemoryRangeAndThrow ( uint startAddress, uint uintSize ) : void
WriteByteToBus ( uint offset, uint value ) : void
WriteDoubleWordToBus ( uint offset, uint value ) : void
WriteWordToBus ( uint offset, uint value ) : void

Method Details

AddHook() public method

public AddHook ( uint addr, Action hook ) : void
addr uint
hook Action
return void

AfterLoad() protected method

protected AfterLoad ( IntPtr statePtr ) : void
statePtr System.IntPtr
return void

BeforeSave() protected method

protected BeforeSave ( IntPtr statePtr ) : void
statePtr System.IntPtr
return void

ClearHookAtBlockBegin() public method

public ClearHookAtBlockBegin ( ) : void
return void

ClearPageAccessViaIo() public method

public ClearPageAccessViaIo ( long address ) : void
address long
return void

ClearTranslationCache() public method

public ClearTranslationCache ( bool skipSync = false ) : void
skipSync bool
return void

DecodeInterrupt() protected abstract method

protected abstract DecodeInterrupt ( int number ) : Interrupt
number int
return Interrupt

DisassembleBlock() public method

public DisassembleBlock ( uint addr, uint flags ) : string
addr uint
flags uint
return string

Dispose() public method

public Dispose ( ) : void
return void

DisposeInner() public method

public DisposeInner ( bool silent = false ) : void
silent bool
return void

DoLookupSymbolInner() protected method

protected DoLookupSymbolInner ( uint offset ) : Symbol
offset uint
return Symbol

EnterSingleStepModeSafely() public method

public EnterSingleStepModeSafely ( Emul8.Peripherals.CPU.HaltArguments args ) : void
args Emul8.Peripherals.CPU.HaltArguments
return void

ExtendWaitHandlers() protected method

protected ExtendWaitHandlers ( WaitHandle handle ) : void
handle System.Threading.WaitHandle
return void

GetRegisterUnsafe() public abstract method

public abstract GetRegisterUnsafe ( int register ) : uint
register int
return uint

GetRegisters() public abstract method

public abstract GetRegisters ( ) : int[]
return int[]

GetRegistersValues() public method

Gets the registers values.
public GetRegistersValues ( ) : ].string[
return ].string[

IClockSource() public method

public IClockSource ( System.Action action ) : void
action System.Action
return void

IClockSource() public method

public IClockSource ( System.Action handler, Action visitor ) : void
handler System.Action
visitor Action
return void

IClockSource() public method

public IClockSource ( System.Action handler, ClockEntry>.Func visitor, Func factorIfNonExistant ) : void
handler System.Action
visitor ClockEntry>.Func
factorIfNonExistant Func
return void

IClockSource() public method

public IClockSource ( Emul8.Time.ClockEntry entry ) : void
entry Emul8.Time.ClockEntry
return void

IClockSource() public method

public IClockSource ( IEnumerable entries ) : void
entries IEnumerable
return void

InitFromElf() public method

public InitFromElf ( ELF elf ) : void
elf ELF
return void

InitFromUImage() public method

public InitFromUImage ( UImage uImage ) : void
uImage UImage
return void

InitializeRegisters() protected method

protected InitializeRegisters ( ) : void
return void

IsSetEvent() public method

public IsSetEvent ( int number ) : bool
number int
return bool

LogFunctionNames() public method

public LogFunctionNames ( bool value ) : void
value bool
return void

MapMemory() public method

public MapMemory ( IMappedSegment segment ) : void
segment IMappedSegment
return void

MeasureExecutionRate() public method

public MeasureExecutionRate ( ) : void
return void

OnGPIO() public method

public OnGPIO ( int number, bool value ) : void
number int
value bool
return void

Pause() public method

public Pause ( ) : void
return void

RemoveAllHooks() public method

public RemoveAllHooks ( ) : void
return void

RemoveHook() public method

public RemoveHook ( uint addr, Action hook ) : void
addr uint
hook Action
return void

RemoveHooksAt() public method

public RemoveHooksAt ( uint addr ) : void
addr uint
return void

Reset() public method

public Reset ( ) : void
return void

ResetInterruptEvent() protected method

protected ResetInterruptEvent ( int number ) : void
number int
return void

Resume() public method

public Resume ( ) : void
return void

SetHookAtBlockBegin() public method

public SetHookAtBlockBegin ( uint>.Action hook ) : void
hook uint>.Action
return void

SetPageAccessViaIo() public method

public SetPageAccessViaIo ( long address ) : void
address long
return void

SetRegisterUnsafe() public abstract method

public abstract SetRegisterUnsafe ( int register, uint value ) : void
register int
value uint
return void

Start() public method

public Start ( ) : void
return void

StartGdbServer() public method

public StartGdbServer ( int port ) : void
port int
return void

Step() public method

public Step ( int count = 1 ) : void
count int
return void

StopGdbServer() public method

public StopGdbServer ( ) : void
return void

SymbolLookup() public method

public SymbolLookup ( uint addr ) : Symbol
addr uint
return Symbol

TranslateAddress() public method

public TranslateAddress ( uint logicalAddress ) : uint
logicalAddress uint
return uint

TranslationCPU() protected method

protected TranslationCPU ( string cpuType, Emul8.Core.Machine machine, Endianess endianness ) : System
cpuType string
machine Emul8.Core.Machine
endianness Endianess
return System

UnmapMemory() public method

public UnmapMemory ( Range range ) : void
range Range
return void

UpdateContext() public method

public UpdateContext ( ) : void
return void

Property Details

ClockSource protected property

protected BaseClockSource,Emul8.Time ClockSource
return Emul8.Time.BaseClockSource

InvalidInterruptNumberException protected static property

protected static Exception InvalidInterruptNumberException
return Exception

machine protected property

protected Machine,Emul8.Core machine
return Emul8.Core.Machine