Skip to content

Yokimitsuro/Kh1HexEditor

Repository files navigation

KH1 Hex Editor

A specialized tool for binary file editing and translation, with a focus on modding Kingdom Hearts 1 text sequences.

Overview

KH1 Hex Editor is a Windows application designed to help modders and translators edit text sequences in binary files, particularly for Kingdom Hearts 1. The application enables real-time visualization and editing of binary data while providing a user-friendly interface for text translation.

Features

  • Binary Text Sequence Extraction: Automatically finds and extracts text sequences from binary files.
  • Side-by-Side Editing: View and edit text alongside its hexadecimal representation.
  • Real-Time Difference Highlighting: Modified bytes are highlighted in red in the modified hex view.
  • TBL-Based Translation: Uses table (TBL) files to map between hexadecimal values and characters.
  • Backup System: Automatically creates backups before any changes are saved.
  • Multi-Language Interface: Supports both English and Spanish interfaces.

Requirements

  • Windows operating system
  • .NET 6.0 Runtime or higher
  • 4GB RAM recommended
  • TBL file for character mapping

Installation

  1. Download the latest release from the releases page
  2. Extract all files to a directory of your choice
  3. Run KH1HexEditor.exe

No installation is required as this is a portable application.

How to Use

Basic Workflow

  1. Open a TBL file: First, open a TBL file that defines the character mapping (File > Open TBL).
  2. Open a binary file: Open the binary file you want to edit (File > Open).
  3. Edit text sequences: The application will display found text sequences. Click on any sequence to see its hexadecimal representation.
  4. Translate or modify text: Edit the text in the "Text" column. The modified hex view will update in real-time, highlighting changes in red.
  5. Save changes: Use the Save option to apply your changes to the binary file.

Understanding the Interface

  • Left Panel: Shows a list of text sequences with position and editable text.
  • Right Panel - Top: Displays the original hexadecimal view of the selected sequence.
  • Right Panel - Bottom: Shows the modified hexadecimal view, with changed bytes highlighted in red.

TBL File Format

The TBL file maps hexadecimal values to characters using the format:

XX=c

Where XX is a hexadecimal code and c is the character it represents. For example:

41=A
61=a
20= 

Development Information

Project Structure

  • Models/
    • HexFile.cs - Handles binary file operations
    • TextSequence.cs - Represents individual text sequences
    • TblParser.cs - Parses and manages TBL character mapping
  • Strings/
    • StringResources.cs - Handles application localization
  • MainWindow.xaml/.cs - The application's main interface and logic

Technologies Used

  • WPF (Windows Presentation Foundation)
  • .NET 6.0
  • C#

License

This software is provided as-is for the Kingdom Hearts modding community.

Acknowledgements

Special thanks to the KH modding community for their ongoing efforts and research into the game's file formats.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages