Emul8.Peripherals.CPU.TranslationCPU.TranslationCPU C# (CSharp) Method

TranslationCPU() protected method

protected TranslationCPU ( string cpuType, Emul8.Core.Machine machine, Endianess endianness ) : System
cpuType string
machine Emul8.Core.Machine
endianness Endianess
return System
        protected TranslationCPU(string cpuType, Machine machine, Endianess endianness)
        {
            if(cpuType == null)
            {
                throw new RecoverableException(new ArgumentNullException("cpuType"));
            }

            oldMaximumBlockSize = -1;

            Endianness = endianness;
            PerformanceInMips = 100;
            currentCountThreshold = 5000;
            this.cpuType = cpuType;
            DisableInterruptsWhileStepping = true;
            ClockSource = new BaseClockSource();
            ClockSource.NumberOfEntriesChanged += (oldValue, newValue) =>
            {
                if(oldValue > newValue)
                {
                    Misc.Swap(ref oldValue, ref newValue);
                }
                if(oldValue == 0 && newValue != 0)
                {
                    ClearTranslationCache();
                }
            };
            this.translationCacheSize = DefaultTranslationCacheSize;
            this.machine = machine;
            started = false;
            isHalted = false;
            translationCacheSync = new object();
            pagesAccessedByIo = new HashSet<long>();
            pauseGuard = new CpuThreadPauseGuard(this);
            InitializeRegisters();
            InitInterruptEvents();
            Init();
            InitDisas();
        }
TranslationCPU