HEX-MASTER

User Guide • by MKhanfar

HEX-MASTER Documentation

This guide explains the full workflow of HEX-MASTER: how to navigate a file, select bytes, edit values, use the Inspector and checksum tools, apply colors/markers, compare tabs, run scripts, and use the right-click tools (Swap bytes, XOR, Fill, Copy/Paste).

Important: HEX-MASTER is a byte editor. For real ECU/EEPROM work, you may still need model-specific checksum/CRC correction tools. Always keep a clean backup of the original file and verify changes before flashing.

1) Overview

HEX-MASTER is a fast desktop hex editor built for EEPROM dumps and ECU binary workflows. It shows: address offsets, hex bytes, and ASCII together, and gives you practical editing tools:

2) Screen layout

Top area

  • Toolbar: Scripts / Open / Save / Copy / Info / Perf Mode
  • Tabs: one tab per opened file (close button x)

Center

  • Color bar: quick marker colors + Apply toggle
  • Hex view: Address + Hex + ASCII

Right side

  • Inspector: HEX / !HEX / DEC / !DEC (normal + reversed order)
  • Checksum: SUM / XOR / SUM16 for the selection
  • EXPR: calculator that can use the selection as variables

Left side (optional)

  • Scripts panel: opens when you press Scripts
HEX-MASTER automatically switches between 8 columns and 16 columns depending on window width. This affects how far PageUp/PageDown jumps, and how selection looks.

3) Quick Start

  1. Click Open and choose your .bin / dump file.
  2. Scroll with the mouse wheel. Click a byte to place the cursor.
  3. Click + drag to select a region.
  4. Read the selection in the Inspector (normal and reverse order).
  5. Edit bytes by typing in HEX mode (0–9/A–F) or ASCII mode (printable chars).
  6. Right‑click for actions like Swap bytes, XOR, Fill, Copy, Paste.
  7. Click Save to write the modified file.

5) Selection (why it matters)

Many tools operate on the selection. If nothing is selected, some operations apply to the current byte (coloring) or the whole file (XOR/FILL scripts and some menu actions).

Always check whether you have a selection before using XOR or FILL. If nothing is selected, those operations may affect the entire file.

6) Buttons & Features

ButtonWhat it doesNotes
Scripts Show/hide the Scripts panel (left side). Use scripts for repeatable reads/writes like Sum8/Xor8/Fill/XOR.
Open Open a binary file into a new tab. Open multiple files to compare dumps.
Save Save the current buffer to a file. Saves raw bytes exactly as edited.
Copy Copy the entire file as spaced hex bytes to clipboard. For selection-only copy, use right-click Copy or Ctrl+C.
Info Show information/about dialog. You can customize the message for your EXE release.
Perf Mode Reduces live updates to keep the UI fast on huge files. Inspector/EXPR updates are reduced while Perf Mode is enabled.

7) Tabs, Compare, Master buffer

Tabs

Tab right‑click menu

Compare highlighting

After compare, differing bytes are highlighted (often shown with strong color, e.g. red text).

Compare marks differences in the tab you run it on. Compare the other way if you want the opposite view.

8) Colors / Markers + Apply

What markers are for

How to apply a color

  1. Select a range (drag) or place cursor on a byte.
  2. Click a color square in the color bar.
  3. If a range is selected: the whole range is marked and the selection is cleared.
  4. If no selection: the current byte is marked and cursor advances by 1 byte.

Apply checkbox (master vs current)

Clear markers

Right‑click in the hex view → Clear markers removes all marker colors from the target buffer.

9) Right‑Click Menu (Swap bytes, XOR, Fill…)

Right‑click inside the hex view to open the context menu.

Menu itemWhat it doesTypical use
Clear markers Remove all color markers. Reset annotation layer for a clean pass.
Swap bytes Swap adjacent bytes in pairs across selection (or whole file if no selection). Endianness conversion for 16‑bit words (00 11 22 33 → 11 00 33 22).
XOR… Ask for a hex value (00–FF), then XOR every byte in the selection (or whole file). Obfuscation tests, bit flips, invert with FF.
FILL… Ask for a hex value (00–FF), then fill the selection (or whole file) with it. Blank a region, write 00/FF patterns.
Auto‑Find XOR checksum byteAutomatically extends the selection forward until the selection XOR becomes 00 (or reaches the search limit). Then highlights the discovered checksum byte.Fast way to locate a 1‑byte XOR checksum inside cluster/EEPROM protected blocks before editing.
Checksum Finder…Opens a dialog to search for checksum patterns in/near your selection using XOR8, SUM8, SUM16, CRC16, and CRC32. Includes options for “checksum stored at end / start / elsewhere” and a Fix button to write the correct checksum.Use when you don’t know the exact checksum type or location. Great for cluster EEPROM, airbag, immo, and ECU flash blocks.
Checksum Map Runner…Runs a multi‑segment checksum plan from a JSON map (compute only, or compute + write).ECU flash workflows often have many protected segments — a map lets you validate/fix them in one run.
Export Checksum Map Template…Exports a starter JSON template for checksum maps (segments, algorithm, storage location, parameters).Use as a base for building checksum maps per ECU family/project.
Copy Copy selection as spaced hex bytes. Share/paste a patch snippet.
Paste… Paste at cursor. If clipboard looks like hex, parse as bytes; otherwise paste as ASCII bytes. Apply patches quickly from notes/tools.
Select All Select the entire file. Run checksums/scripts on the full dump.
Note: Checksum Finder… is a dialog. Use Find to detect the checksum byte(s), and Fix to automatically write the correct checksum value once you finish editing the block.
XOR/FILL can modify a lot of data instantly if nothing is selected (whole file). Select your region first if you want a safe targeted edit.

10) Inspector

Inspector reads the selection (or current byte) and shows numeric representations in two ways: Normal order (file order) and Reverse order (byte-reversed for little-endian).

Normal order

  • HEX: concatenated hex bytes in file order
  • !HEX: per-byte inverted (byte XOR FF)
  • DEC: integer value of HEX (big-endian interpretation)
  • !DEC: complement within the selection width

Reverse order

Same fields, but bytes are reversed first. This helps interpret little-endian values.

Editing using Inspector

To write a clean 16-bit value, select exactly 2 bytes first. To write a 32-bit value, select 4 bytes.

11) Checksum box

The checksum panel shows quick integrity values for your selection:

These are quick checks, not ECU vendor CRC algorithms. Use them mainly for “did this region change?” and simple validations.

12) Expression (EXPR)

EXPR is a mini calculator. It evaluates your expression using variables created from the selection.

Variables

hex, dec        # selection interpreted as an integer (normal order)
hex_inv         # selection bytes inverted (per-byte XOR FF), as integer
dec_inv         # complement inside selection bit-width

rhex, rdec      # selection interpreted as integer in reverse order (little-endian)
rhex_inv        # inverted + reversed, as integer
rdec_inv        # complement of reversed integer

sel             # list of selected byte values, e.g. [0x12, 0x34, 0x56]

Examples

# 2-byte selection interpreted as little-endian decimal:
rdec

# Sum of bytes:
sum(sel) & 0xFFFF

# Add offset:
hex + 16

# XOR with a constant:
hex ^ 0x55
Keep EXPR to simple math on the provided variables. If you don’t need it, you can ignore it.

13) Scripts panel

Scripts are built-in helpers (left panel) that operate on your selection. Use Read scripts to calculate values and Write scripts to modify bytes.

How to use

  1. Select a range (or leave no selection if you want the “whole file” behavior in some scripts).
  2. Press Scripts to open the panel.
  3. Choose a script name.
  4. Press Read (outputs info) or Write (applies changes).

Included scripts

ScriptModeDescription
Selection Sum8Read8-bit sum of selection.
Selection XOR8Read8-bit XOR of selection.
Selection Sum16Read16-bit sum of selection.
XOR with valueWriteXOR selection with a user-provided hex byte.
Fill with valueWriteFill selection with a user-provided hex byte.
Mileage (read-only)ReadDisplays two redundant mileage counters (if present) and a MATCH/MISMATCH status. Read-only for research/diagnostics; it does not modify the file.
VAG 95040 / Cluster Info (read-only)ReadAnalyzes common VAG 95040 ECU (512B) and cluster (2KB) dumps and displays non-sensitive metadata (e.g., VIN + checksum validity). Read-only; no write/patch actions and it does not show SKC/Pin or Immo-ID.
Mileage (read-only) currently targets a known 4KB ST95320-style EEPROM layout used in some Bosch EDC16 variants. If your module uses a different layout or EEPROM size, the script will show “not supported”.
VAG 95040 / Cluster Info (read-only) is intended for research/diagnostics. It supports specific file sizes (512B/2KB/1KB) and formats; results may be “not supported” if the dump layout differs.

14) Clipboard formats

Paste rules

For ECU patch notes, keeping byte sequences in spaced hex is easiest: 12 34 56 78 9A BC.

15) Performance Mode + Autosave

Performance Mode

Designed for very large binaries. When enabled, HEX-MASTER reduces live refresh work to keep scrolling and editing fast.

Autosave

HEX-MASTER periodically writes an autosave file (for crash recovery) when changes exist. You can document the autosave name/location here if you want users to recover it manually.

If you distribute as an EXE, consider changing the autosave filename and the Info text to match HEX-MASTER branding.

How to Use (full workflow)

New tools: use Auto‑Find XOR checksum byte to locate checksum bytes fast, and use the Checksum Status Badge to confirm blocks validate (XOR OK) after edits.

  1. Open your dump file.
  2. Inspect: select bytes and read values in Inspector (normal and reverse).
  3. Mark: color regions (maps, checksum blocks, “don’t touch” areas).
  4. Edit: type in hex/ASCII, or overwrite through Inspector DEC/HEX fields.
  5. Transform: right-click tools (Swap bytes, XOR, Fill) for region operations.
  6. Validate: look at checksum box and compare tabs to confirm what changed.
  7. Save the new file.

16) Showcase / examples

Example A — Mark a known region (map/table)

  1. Navigate to the region.
  2. Drag to select the region.
  3. Click a color in the marker bar (blue for maps, yellow for checksum area, gray for “do not edit”, etc.).

Example B — Edit a 16-bit little-endian value

  1. Select exactly 2 bytes.
  2. Use Reverse order → DEC to read the little-endian number.
  3. Type a new value in that field to overwrite the two bytes.

Example C — Compare original vs modified

  1. Open original, open modified.
  2. Right-click original tab → Set as master.
  3. Right-click modified tab → Compare to… → choose original.
  4. Differences are highlighted; add markers to label each changed area.

Example D — XOR a selected block

  1. Select a block.
  2. Right‑click → XOR… → enter FF to invert all bits in that region.
  3. Check Inspector/checksums to confirm effect.

16A) Auto‑Find XOR Checksum Byte

16B) Checksum Status Badge

17) Tips & safety

16C) Checksum Finder (XOR / SUM8 / SUM16 / CRC16)

Purpose: Many dumps are protected by different checksum styles. This tool helps you locate where a checksum byte/word is, by scanning around your selection and testing common rules.

Where to find it

What it can search

Profiles & safety levels

Safe workflow: Always Find / Verify first on an untouched (original) dump. Then apply edits, and only then use Fix (or a validated checksum map) to restore integrity.

How it works (simple)

  1. Select the suspected protected data block (usually without the checksum bytes).
  2. Open Checksum Finder...
  3. Choose algorithm (XOR/SUM/CRC), target (if applicable), endianness (for 16‑bit), direction, search window, and checksum length.
  4. Click Find. HEX‑MASTER will extend your selection to the matching boundary and outline the found checksum bytes in green.

Recommended settings (real automotive use)

Important note (avoid false matches)

This is a pattern finder. Large windows can produce accidental matches. For best results:


New in v4: “stored elsewhere”, “Fix”, custom CRC params, and checksum maps

Checksum map JSON format (quick example)

Each segment defines a data range, an algorithm, and a store address where the checksum is saved.

{
  "name": "Example ECU map",
  "segments": [
    {"data_start":"0x1000","data_end":"0x1FFF","algo":"CRC16",
     "store_at":"0x2000","store_len":2,"endian":"big",
     "params":{"variant":"CRC-16/CCITT-FALSE"}}
  ]
}

Tip: For Bosch/VAG style “checksum tables”, you normally represent each table entry as a segment in the JSON map. HEX-MASTER does not guess OEM tables automatically (they differ by ECU family), but it gives you a clean way to apply a verified map.