HxD: partition table editor/viewer

Wishlists for new functionality and features.
Post Reply
hans_meier
Posts: 1
Joined: 11 Dec 2008 08:22

HxD: partition table editor/viewer

Post by hans_meier » 11 Dec 2008 08:31

hi Maël and all the others,

thank you for the *nice* HxD editor!

what i've missed sometimes was the ability to view a disk's partition table
(and ideally edit it) in a human readable format.

what do you think?
bye
HM

Maël
Site Admin
Posts: 1148
Joined: 12 Mar 2005 14:15

Re: HxD: partition table editor/viewer

Post by Maël » 13 Dec 2008 01:47

Indeed, sounds useful and is planned.

g3gg0

Re: HxD: partition table editor/viewer

Post by g3gg0 » 12 Mar 2009 03:18

maybe its generally a good idea to specify some format templates.
e.g. similar to C structs and displaying the data at cursor position in this format.

types i can think of:
uint8, uint16, uint24, uint32, int8, ... - integer values
float, double, quad - floating point numbers
bit - used for bitmasks
char[...], utf8[...], utf16[...], utf32[...] - character array.
any_type[...] - arrays of any structure or type. so nesting is possible.

if "..." is a value, its fixed length. if "..." is text, use the field with that name as length.
for every multi-byte type should be types for big and little endianess (_le, _be)


e.g.:

Code: Select all

struct some_descriptor {
    uint32_le entries;
    some_format[entries] data;
}

struct some_format {
    uint32_le length;
    uint16_le type;
    some_bitmask flags;
    char[32] name;
    char[length] data;
}

struct some_bitmask {
    bit used;
    bit deleted;
    bit truncated;
    bit hidden;
    bit[4] unused;
}
now when clicking at some data in the hexdump, show the structure dumps in an extra window/toolbar.
maybe also coloring of the hexdump for every entry and highlighting hexdump bytes when selecting some struct entry in the extra window.

i wonder if its possible to design this thing on a per-bit basis, so that its possible to have e.g. a bit field followed by a char.
especially in serial protocols you often have 1 or 2 bits for synchronisation and maybe 8 data bits.
that would allow to analyze raw serial stream dumps also.
that requires to calculate in bit sizes, but should be not a big issue. its not much processing overhead to allow this :)


if i can help you with programming this, just tell me :)

g3gg0

Re: HxD: partition table editor/viewer

Post by g3gg0 » 12 Mar 2009 03:22

oh i forgot to add a type:
align[n] - align the struct to n-bit boundary

Code: Select all

struct test {
    uint32_le length;
    char[length] data;
    align[32] padding;
}
will align the struct size to a 32-bit boundary, multiple of 4 bytes.

Maël
Site Admin
Posts: 1148
Joined: 12 Mar 2005 14:15

Re: HxD: partition table editor/viewer

Post by Maël » 18 Mar 2009 15:16

Something along those lines is planned, including support for importing structs from several languages. The main method would be to enter structs using a GUI and selecting parts in the hex editor as your work your way through the file and identify specific portions that you think should be of a specific type. Templates/structs defined this way will also be exportable.

Post Reply