public object[,] GetReads(long firstCycles, long lastCycles) { var bla = _records .Where(info => info.Type == RecordedOperationType.Read && info.Cycles >= firstCycles && info.Cycles <= lastCycles) .GroupBy(info => info.Address) .OrderBy(x => x.Key) .ToDictionary(group => group.Key, group => group.ToList()); object[,] result = new object[bla.Count, 2]; int row = 0; foreach (KeyValuePair <int, List <RecordedMemoryOperation> > keyValuePair in bla) { result[row, 0] = keyValuePair.Key.ToHex(true); result[row, 1] = string.Join(", ", keyValuePair.Value.Select(x => RobotronObject.DecimalToHexNum(x.Value, true))); row++; } return(result); }
public static string ToHex(this int dec, bool zeroPage) { return(dec == -1 ? "N/A" : RobotronObject.DecimalToHexAddress(dec, zeroPage)); }
public static int ToDecimal(this string hex) { return(RobotronObject.HexToDecimal(hex)); }
public static string To8BitHex(this int dec) { return(dec == -1 ? "N/A" : RobotronObject.DecimalToHexNum(dec, true)); }