Hi - I am new to 010 editor scripts and templates so please bear with me!
I am currently analyzing (i.e. reverse-engineering) a pretty complex file format. This format uses lots of “type“ “length“ “data…” - structures, i.e. the file is - at least in parts - a sequence of sections structured like “typeA“ “lengthA“ “data of lengthA here…” “typeB“ “lengthB“ “data of lengthB here…”. etc. The file format is 16-bit oriented. type-tags, length and data/payload are in 16-bit words (i.e. 2 bytes each in Little-Endian format).
While the total file length can be >64kB, the individual data sections are limited to 64K (much less actually), so the fact that lengths are 16 bit-values only is not an issue.
My “wish“ is as follows: While analzying this it would be very helpful, if I could hover over a length-word, run a command and it would somehow mark or highlight the subsequent -word. WIth this is would be much easier, quicker and less error-prone to step through those files instead of manually counting words.
Is that (easily) doable using a 010-script or -template?
There are some details to observe, e.g. the length-value includes the length word itself (i.e. the minimum length is 2 (just a length without data), the data’s actual length is thus length-2), but I guess these are details that can be tweaked once the basic mechanism exists.
I would very much appreciate if some kind soul could sketch out how to achieve that using a 010 template!