示例#1
0
            public override bool TryGetAbsDataAddress(PICBankedAddress bAddr, out PICDataAddress absAddr)
            {
                if (bAddr == null)
                {
                    throw new ArgumentNullException(nameof(bAddr));
                }
                absAddr = null !;
                IMemoryRegion?regn = null;

                if (PICRegisters.TryGetAlwaysAccessibleRegister(bAddr, out var reg))
                {
                    regn = PICMemoryDescriptor.GetDataRegionByAddress(reg.Traits.RegAddress.Addr !);
                }
                else if (bAddr.BankSelect.IsValid)
                {
                    regn = GetDataRegionBySelector(bAddr.BankSelect);
                }
                if (regn != null)
                {
                    absAddr = bAddr.ToDataAddress(regn);
                }
                return(absAddr != null);
            }
示例#2
0
 /// <summary>
 /// Query if memory banked address <paramref name="bAddr"/> can be a FSR2 index.
 /// </summary>
 /// <param name="bAddr">The memory banked address to check.</param>
 public override bool CanBeFSR2IndexAddress(PICBankedAddress bAddr) => false;