digraph {
rankdir=LR;
node [shape=plaintext];
subgraph cluster__tr_dos_image {
label="TrDosImage";
graph[style=dotted];
tr_dos_image__seq [label=<
pos | size | type | id |
0 | ... | File | files |
repeat until _.is_terminator |
>];
tr_dos_image__inst__volume_info [label=<
pos | size | type | id |
2048 | 256 | VolumeInfo | volume_info |
>];
subgraph cluster__volume_info {
label="TrDosImage::VolumeInfo";
graph[style=dotted];
volume_info__seq [label=<
pos | size | type | id |
0 | 1 | | catalog_end |
1 | 224 | | unused |
225 | 1 | u1 | first_free_sector_sector |
226 | 1 | u1 | first_free_sector_track |
227 | 1 | u1→DiskType | disk_type |
228 | 1 | u1 | num_files |
229 | 2 | u2le | num_free_sectors |
231 | 1 | | tr_dos_id |
232 | 2 | | unused_2 |
234 | 9 | | password |
243 | 1 | | unused_3 |
244 | 1 | u1 | num_deleted_files |
245 | 8 | | label |
253 | 3 | | unused_4 |
>];
volume_info__inst__num_tracks [label=<
id | value |
num_tracks | ((TrDosImage::I__DISK_TYPE[disk_type] & 1) != 0 ? 40 : 80) |
>];
volume_info__inst__num_sides [label=<
id | value |
num_sides | ((TrDosImage::I__DISK_TYPE[disk_type] & 8) != 0 ? 1 : 2) |
>];
}
subgraph cluster__position_and_length_code {
label="TrDosImage::PositionAndLengthCode";
graph[style=dotted];
position_and_length_code__seq [label=<
pos | size | type | id |
0 | 2 | u2le | start_address |
2 | 2 | u2le | length |
>];
}
subgraph cluster__filename {
label="TrDosImage::Filename";
graph[style=dotted];
filename__seq [label=<>];
filename__inst__first_byte [label=<
pos | size | type | id |
0 | 1 | u1 | first_byte |
>];
}
subgraph cluster__position_and_length_print {
label="TrDosImage::PositionAndLengthPrint";
graph[style=dotted];
position_and_length_print__seq [label=<
pos | size | type | id |
0 | 1 | u1 | extent_no |
1 | 1 | u1 | reserved |
2 | 2 | u2le | length |
>];
}
subgraph cluster__position_and_length_generic {
label="TrDosImage::PositionAndLengthGeneric";
graph[style=dotted];
position_and_length_generic__seq [label=<
pos | size | type | id |
0 | 2 | u2le | reserved |
2 | 2 | u2le | length |
>];
}
subgraph cluster__position_and_length_basic {
label="TrDosImage::PositionAndLengthBasic";
graph[style=dotted];
position_and_length_basic__seq [label=<
pos | size | type | id |
0 | 2 | u2le | program_and_data_length |
2 | 2 | u2le | program_length |
>];
}
subgraph cluster__file {
label="TrDosImage::File";
graph[style=dotted];
file__seq [label=<
pos | size | type | id |
0 | 8 | Filename | name |
8 | 1 | u1 | extension |
9 | ... | switch (extension) | position_and_length |
... | 1 | u1 | length_sectors |
... | 1 | u1 | starting_sector |
... | 1 | u1 | starting_track |
>];
file__inst__is_deleted [label=<
id | value |
is_deleted | name.first_byte == 1 |
>];
file__inst__is_terminator [label=<
id | value |
is_terminator | name.first_byte == 0 |
>];
file__inst__contents [label=<
pos | size | type | id |
(((starting_track * 256) * 16) + (starting_sector * 256)) | (length_sectors * 256) | | contents |
>];
file__seq_position_and_length_switch [label=<
case | type |
66 | PositionAndLengthBasic |
67 | PositionAndLengthCode |
35 | PositionAndLengthPrint |
_ | PositionAndLengthGeneric |
>];
}
}
tr_dos_image__seq:files_type -> file__seq [style=bold];
file__inst__is_terminator:is_terminator_type -> tr_dos_image__seq:files__repeat [color="#404040"];
tr_dos_image__inst__volume_info:volume_info_type -> volume_info__seq [style=bold];
volume_info__seq:disk_type_type -> volume_info__inst__num_tracks [color="#404040"];
volume_info__seq:disk_type_type -> volume_info__inst__num_sides [color="#404040"];
file__seq:name_type -> filename__seq [style=bold];
file__seq:position_and_length_type -> file__seq_position_and_length_switch [style=bold];
file__seq_position_and_length_switch:case0 -> position_and_length_basic__seq [style=bold];
file__seq_position_and_length_switch:case1 -> position_and_length_code__seq [style=bold];
file__seq_position_and_length_switch:case2 -> position_and_length_print__seq [style=bold];
file__seq_position_and_length_switch:case3 -> position_and_length_generic__seq [style=bold];
file__seq:extension_type -> file__seq:position_and_length_type [color="#404040"];
filename__inst__first_byte:first_byte_type -> file__inst__is_deleted [color="#404040"];
filename__inst__first_byte:first_byte_type -> file__inst__is_terminator [color="#404040"];
file__seq:starting_track_type -> file__inst__contents:contents_pos [color="#404040"];
file__seq:starting_sector_type -> file__inst__contents:contents_pos [color="#404040"];
file__seq:length_sectors_type -> file__inst__contents:contents_size [color="#404040"];
}