Hex Workshop v4.1New FeaturesArray Lengths: Variable and ExpressionsThe Hex Workshop Structure Viewer now supports arrays of variable length. This new feature allows users to define the length of an array based on one of the structure’s own data elements. For example, it is common to find strings in binary format coded with integer length followed by the string content. The declaration below demonstrates how to define the length of an array: struct pstring { word length; // Length of string char string[length]; // Actual characters }; Variable length arrays, defined using simple expressions, can be embedded within the definition of the length of an array. For example, to define a binary format that always allocates an even number of bytes per string, use the following variable length array definition: struct pstring2 { word length; char string[length + (length % 2)]; }; typedef SupportUsers can now define their own data types for the Hex Workshop Structure Viewer. This feature is extremely useful when porting structures from existing source code. The example below defines a new signed int called “SINT”: typedef signed int SINT; Enumeration supportThe Hex Workshop Structure Viewer now supports enumerated types. Enumerated types allow users to create labels for unique numeric values. For example, a .zip compression file format reserves 2 bytes for a compression method. In the following example, the #pragma command instructs Hex Workshop to use 2 bytes for enumerations. Then, an enumeration declaration is used to define the possible compression types. #pragma enumsize(2) enum COMPRESSION_METHOD { STORED = 0, SHRUNK = 1, REDUCED_FACTOR_1 = 2, REDUCED_FACTOR_2 = 3, REDUCED_FACTOR_3 = 4, REDUCED_FACTOR_4 = 5, IMPLODED = 6, TOKENZIED = 7, DEFLATED = 8, DEFLATE64 = 9, LIB_IMPLODE = 10, }; When enumeration types are defined, Hex Workshop displays the user-defined
labels in addition to the numeric values. The user can change the value
of the enumeration by selecting a different user-defined label in a drop
down choice box. “#include” SupportHex Workshop Structure Libraries can now reference user-defined structure libraries by using a #include directive. This feature offers users improved control over and ability to organize their structure files. In addition, Hex Workshop provides a standard types library that users can include. Custom ChecksumUsers can now calculate up to 12 different checksums within Hex Workshop. The latest checksum algorithm allows users to define a 16 bit or 32 bit CRC by supplying the polynomial, initial value, reflective properties, and final XOR value. Offset context menuWhen clicking the right mouse button over the offset portion of the hex
editing display, a new popup context menu is displayed with various offset
related options:
Intel Hex Code / Motorola S-Record fill byteWhen importing Intel Hex Code or Motorola S-Records, users can now specify the fill byte used for unspecified data regions. Prior to v4.10, if an input file did not supply data for all regions of memory spanned by the source file, Hex Workshop would fill unreferenced memory with zeros (0x00). Now, users can designate the fill byte used under the “Import/Export” tab of Preferences. Swapping bytes in the hex editing display areaWhen working with binary file with Big Endian ordered bytes, users can now swap the order of bytes displayed in the editor window. This feature is only available when the byte order is set to “Big Endian”. To enable byte swapping, either check “Flip Bytes in Editor” from the “Options:Byte Order” menu or press Ctrl+Alt+Shift+B to toggle into and out of this mode. When viewing and editing a file with flip bytes enabled, many features
are disabled. Turn off byte swapping to re-enable the full Hex Workshop
feature set. Bug FixesPrior to v4.10, imported Intel Hex Code documents could be corrupted when records overlapped. This problem has been addressed. Prior to v4.10, if users clicked on a read-only portion of the structure
viewer display instead of an editable element, editing was not initiated
upon pressing F2. Now, pressing F2 will invoke the in-placing edit feature
for bookmarks, structures, and the data inspector whenever an element
has active focus. |