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

SetPCFromEntryPoint() private method

private SetPCFromEntryPoint ( uint entryPoint ) : void
entryPoint uint
return void
        private void SetPCFromEntryPoint(uint entryPoint)
        {
            var what = machine.SystemBus.WhatIsAt((long)entryPoint);
            if(what != null)
            {
                if(((what.Peripheral as IMemory) == null) && ((what.Peripheral as Redirector) != null))
                {
                    var redirector = what.Peripheral as Redirector;
                    var newValue = redirector.TranslateAbsolute(entryPoint);
                    this.Log(LogLevel.Info, "Fixing PC address from 0x{0:X} to 0x{1:X}", entryPoint, newValue);
                    entryPoint = (uint)newValue;
                } 
            }
            PC = entryPoint;
        }
TranslationCPU