Example #1
0
        /// <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");
        }
Example #2
0
 [DllImport(DllPath, EntryPoint = "GetMemoryAccessCounts")] private static extern void GetMemoryAccessCountsWrapper(UInt32 offset, UInt32 length, SnesMemoryType type, MemoryOperationType operationType, [In, Out] UInt32[] counts);
Example #3
0
 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);
 }
Example #4
0
 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);
 }