/// <summary> /// Конструктор. Создает ОМК0 согласно переданному коду. В случае если переданный код /// соответствует команде другого типа конструктор вызывает исключение ArgumentException. /// </summary> /// <exception cref="ArgumentException"> /// В конструктор передан код соответствующий другому типу микрокоманды /// </exception> /// <param name="source">Исходный код микрокоманды</param> public OperationalMicrocommand0(ushort source) : base(source) { MemoryOperation = (MemoryOperationType)(Source & 0x0003); RotateAccumulator = (RotateAccumulatorMode)((Source >> 2) & 0x0003); AluOperation = (AluOperationType)((Source >> 4) & 0x0003); AluInputInvert = (AluInputInvertMode)((Source >> 6) & 0x0003); AluRightInput = (AluRightInputSource)((Source >> 8) & 0x0003); AluLeftInput = (AluLeftInputSource)((Source >> 12) & 0x0003); if (((Source >> 14) & 0x0003) != 0) throw new ArgumentException("Unknown command type", "source"); }
[DllImport(DllPath, EntryPoint = "GetMemoryAccessCounts")] private static extern void GetMemoryAccessCountsWrapper(UInt32 offset, UInt32 length, SnesMemoryType type, MemoryOperationType operationType, [In, Out] UInt32[] counts);
public static UInt32[] GetMemoryAccessCounts(UInt32 offset, UInt32 length, SnesMemoryType type, MemoryOperationType operationType) { UInt32[] counts = new UInt32[length]; DebugApi.GetMemoryAccessCountsWrapper(offset, length, type, operationType, counts); return(counts); }
public static UInt64[] GetMemoryAccessStamps(UInt32 offset, UInt32 length, SnesMemoryType type, MemoryOperationType operationType) { UInt64[] stamps = new UInt64[length]; DebugApi.GetMemoryAccessStampsWrapper(offset, length, type, operationType, stamps); return(stamps); }