private void GetListItem(object sender, RetrieveVirtualItemEventArgs e) { var sprite = _spriteInfo.Details[e.ItemIndex]; e.Item = new ListViewItem(new[] { e.ItemIndex.ToString(), string.Format(@"{0}{1}", WatchValue.FormatHex(sprite.TileIndex, 2), sprite.UseSecondTable ? " (2nd)" : ""), string.Format(@"{0}, {1}", sprite.X, sprite.Y), sprite.Palette.ToString(), sprite.Priority.ToString(), string.Format(@"{0}{1}", sprite.FlipH ? "H" : "", sprite.FlipV ? "V" : ""), string.Format(@"{0}x{1}", sprite.Width, sprite.Height) }); }
protected string GetParsedAddress(string word) { var memoryState = GetCpuMemory(); if (memoryState == null) { return(word); } var addressReference = new AddressReference(word, s => File.Project.DebugSymbols.ContainsKey(s) ? File.Project.DebugSymbols[s] : null); var val8 = memoryState.ReadAddress(addressReference.BaseAddress, false, addressReference.OffsetRegister, out var address); var val16 = memoryState.ReadAddress(addressReference.BaseAddress, true, addressReference.OffsetRegister); return(string.Format("{0} ({1})\n\nValue: {2} ({3})\nWord value: {4} ({5})", word, WatchValue.FormatHexAddress(address), WatchValue.FormatHex(val8, 2), val8, WatchValue.FormatHex(val16, 4), val16 )); }