Skip to content

Dialog Hex Editor

Digitoxin edited this page Dec 22, 2025 · 6 revisions

Hex Editor

Hex Editor Dialog

DiskImageTool uses a single, shared hex editor for all hex-based views. Different menu options open the editor with a different scope, but the editor itself, its tools, and its behavior remain consistent.

The hex editor allows modification of existing data only. Bytes may be overwritten, but data cannot be inserted or deleted.


Hex Views and Scope

Hex views determine which portion of the disk image is exposed to the editor.

Common examples include:

  • Boot sector
  • File Allocation Table
  • Directories
  • Individual clusters or tracks
  • Entire disk image

While the displayed data changes, navigation, editing behavior, and analysis tools remain the same across all views.


Hex Editor Panel

The hex editor panel displays the raw data for the current view.

  • Hexadecimal byte values are shown on the left
  • ASCII representation is shown on the right
  • Visual markers indicate track, side, and sector id boundaries where applicable

All hex views use the same editor and support the same editing operations.


Data Inspector

The Data Inspector panel appears on the right side of the editor.

It displays the value under the cursor interpreted as various data types and allows those values to be edited directly. Editing a value in the Data Inspector overwrites the corresponding bytes in the editor.


Data Inspector Header Fields

The top of the Data Inspector displays read-only context information:

  • Area
    The region currently being viewed (for example, Boot Sector, FAT, Root Directory, Data Area).

  • Region
    Appears in Boot Sector view and indicates the specific boot sector region.

  • File
    Appears when the current view corresponds to file data.

  • CRC32
    The CRC32 checksum of the currently selected data.

All fields below these are editable data interpretations.


Hex Editor Toolbar

The hex editor toolbar provides editing, selection, search, and navigation controls. Available options adapt depending on the current view.


Common Toolbar Actions

These actions are available in all hex views unless otherwise noted.

  • Commit
    Applies all changes made in the hex editor and closes the editor.

  • Undo
    Reverts the most recent edit made in the hex editor.

  • Redo
    Reapplies the last undone edit.


Clipboard Operations

  • Copy Text
    Copies the selected ASCII text.

  • Copy Hex
    Copies the selected bytes as raw hexadecimal.

  • Copy Hex Formatted
    Copies the selected bytes as formatted hexadecimal, with spaces between bytes and 16 bytes per line.

  • Paste Over
    Pastes hexadecimal data from the clipboard, overwriting existing bytes starting at the first selected byte.


Search

  • Find
    Searches for specified text or hexadecimal data.

  • Find Next
    Finds the next occurrence of the previous search.


Fill Operations

  • Fill Selection with 0x00
  • Fill Selection with 0xF6
  • Fill Selection
    Opens a submenu allowing a custom byte value to be selected.

Selection Tools

  • Select All
    Selects all bytes in the current view.

  • Select Sector n
    Selects all bytes in the sector containing the cursor, or the sector containing the first byte of the current selection.

  • Select Track nn.n
    Selects all bytes in the current track.
    This option is available only when viewing Entire Disk.


Navigation Controls

Navigation controls appear on the toolbar depending on the current view scope.


Entire Disk View

When viewing the entire disk image, the following navigation controls are available:

  • Cluster n
    Displays the cluster corresponding to the topmost visible row.
    Changing this value scrolls the editor to the specified cluster.

  • Sector n
    Displays the global sector number corresponding to the topmost visible row.
    Changing this value scrolls the editor to the specified sector.

  • Track nn.n
    Displays the current track. Tracks may be selected from a dropdown list or entered manually.

These values update automatically as the editor is scrolled.


Scoped Views

When viewing a specific region (such as the boot sector, FAT, directory, cluster, or track):

  • Disk-wide navigation controls are hidden
  • Positioning is relative to the selected region

This limits navigation to the current scope and helps prevent unintended edits outside the selected area.


FAT Synchronization

When editing the File Allocation Table and multiple FAT copies exist:

  • A Synchronize FATs checkbox appears
  • When enabled, changes made to the active FAT are mirrored to all FAT copies

Display Selector

In all hex views except Entire Disk, a Display dropdown is shown. This allows switching between regions within the current scope.

Examples include:

  • Boot Sector
    Sector 0

  • File Allocation Table
    FAT 1 (Sector 1–2)
    FAT 2 (Sector 3–4)

  • Root Directory
    Sector ranges occupied by the directory

  • Other Views
    One or more regions represented by the view (for example, cluster or sector ranges)


Status Bar

The status bar at the bottom of the editor displays real-time location and selection information.

  • Offset (h)
    Offset of the cursor or the first byte of the selection.

  • Block (h)
    Displays start and end offsets when a selection exists.

  • Length (h)
    Length of the selected region in hexadecimal, with the decimal value in parentheses.

  • Cluster
    Cluster containing the cursor or selection (visible when viewing the data area).

  • Sector

  • Track

  • Side

  • Sector Id

  • Bytes
    Total number of bytes in the current view.


Hex Editor Context Menu

The hex editor context menu mirrors the toolbar functionality and includes:

  • Undo / Redo
  • Copy Text
  • Copy Hex
  • Copy Hex Formatted
  • Paste Over
  • Find / Find Next
  • Fill Selection options
  • Select Sector
  • Select Track (Entire Disk only)
  • Select All

All context menu actions behave identically to their toolbar counterparts.


View-Specific Visual Behavior

Boot Sector Color Coding

When viewing the Boot Sector, bytes are color-coded by region:

  • Green — Bootstrap jump and bootstrap code
  • Red — OEM Name
  • Blue — BIOS Parameter Block (BPB) fields
  • Purple — Extended Parameter Block fields
  • Orange — Boot sector signature

These regions correspond to the Region field shown in the Data Inspector.


File Allocation Table Highlighting

When viewing the File Allocation Table:

  • Any bytes that differ between FAT copies are highlighted in red

This allows quick identification of FAT inconsistencies.


Notes

  • All hex views support overwriting existing data only
  • Data cannot be inserted or deleted using the hex editor
  • Changes are staged until Commit is selected
  • Undo and redo apply only to hex editor operations

Clone this wiki locally