58 |
|
private |
59 |
|
fileid: Integer; |
60 |
|
ConID: Integer; |
61 |
+ |
rawlist: TRawDataList; |
62 |
|
public |
63 |
|
end; |
64 |
|
|
67 |
|
|
68 |
|
implementation |
69 |
|
|
70 |
< |
uses ValueEdit, Main, Functions, DatStructureLoader{, RawEdit}; |
70 |
> |
uses ValueEdit, Main, Functions, DatStructureLoader, RawEdit; |
71 |
|
{$R *.dfm} |
72 |
|
|
73 |
|
type |
161 |
|
Self.ClearStructViewer; |
162 |
|
mem := nil; |
163 |
|
ConManager.Connection[ConID].LoadDatFile(fileid, TStream(mem)); |
164 |
+ |
rawlist := ConManager.Connection[ConID].GetRawList(fileid); |
165 |
|
hex.LoadFromStream(mem); |
166 |
|
mem.Free; |
167 |
|
ClearValues; |
174 |
|
Self.ClearStructViewer; |
175 |
|
ClearValues; |
176 |
|
hex.DataSize := 0; |
177 |
+ |
SetLength(rawlist, 0); |
178 |
|
end; |
179 |
|
end; |
180 |
|
|
183 |
|
function TForm_BinEdit.GetValue(datatype: Word; offset: Integer): String; |
184 |
|
var |
185 |
|
Data: TByteData; |
186 |
< |
i: Word; |
186 |
> |
i: Integer; |
187 |
|
tempi: Integer; |
188 |
|
floatformat: TFormatSettings; |
189 |
|
begin |
221 |
|
Result := IntToBin(hex.Data[offset]); |
222 |
|
11: |
223 |
|
begin |
224 |
< |
tempi := ConManager.Connection[ConID].GetRawInfo(fileid, offset).RawAddr; |
225 |
< |
if tempi >= 0 then |
226 |
< |
Result := '0x' + IntToHex(tempi, 8) |
227 |
< |
else |
228 |
< |
Result := 'unused'; |
224 |
> |
if Length(rawlist) > 0 then |
225 |
> |
for i := 0 to High(rawlist) do |
226 |
> |
if rawlist[i].SrcOffset = offset then |
227 |
> |
begin |
228 |
> |
if rawlist[i].RawAddr > 0 then |
229 |
> |
Result := '0x' + IntToHex(rawlist[i].RawAddr, 8) |
230 |
> |
else |
231 |
> |
Result := 'unused'; |
232 |
> |
Break; |
233 |
> |
end; |
234 |
|
end; |
235 |
|
12: |
236 |
|
if hex.Data[offset] = 1 then |
752 |
|
var |
753 |
|
node: PVirtualNode; |
754 |
|
nodedata: PNodeData; |
755 |
+ |
rawinfo: TRawDataInfo; |
756 |
|
form: TForm_ToolTemplate; |
757 |
|
begin |
758 |
|
if VST.FocusedColumn = 3 then |
770 |
|
begin |
771 |
|
if (nodedata.DataType = 11) and (nodedata.Value <> 'unused') then |
772 |
|
begin |
773 |
< |
if ConManager.Connection[ConID].GetRawInfo(fileid, nodedata.offset).RawSize > 0 then |
774 |
< |
Form_Main.open_child('rawedit', ConID, fileid); |
773 |
> |
rawinfo := ConManager.Connection[ConID].GetRawInfo(fileid, nodedata.offset); |
774 |
> |
if rawinfo.RawSize > 0 then |
775 |
> |
begin |
776 |
> |
form := nil; |
777 |
> |
form := Form_Main.open_child('rawedit', ConID, fileid); |
778 |
> |
if Assigned(form) then |
779 |
> |
TForm_RawEdit(form).LoadRaw(rawinfo); |
780 |
> |
end; |
781 |
|
end; |
782 |
|
if (nodedata.DataType = 12) and (nodedata.Value <> 'no link') then |
783 |
|
begin |