Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public static string ToHex(this int dec, bool zeroPage)
 {
     return(dec == -1 ? "N/A" : RobotronObject.DecimalToHexAddress(dec, zeroPage));
 }
Exemplo n.º 3
0
 public static int ToDecimal(this string hex)
 {
     return(RobotronObject.HexToDecimal(hex));
 }
Exemplo n.º 4
0
 public static string To8BitHex(this int dec)
 {
     return(dec == -1 ? "N/A" : RobotronObject.DecimalToHexNum(dec, true));
 }