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); }
/// <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;