crumb-jp: Binary Surgery for a Better Breadboard

How a simple Japanese translation patch for a circuit simulator evolved into a sophisticated Unity binary injector and custom Windows installer.

6 min read • View on GitHub • More from tsuyoshi-otake

A split composition showing an open dictionary next to a solid metal puzzle box being cut open by a laser scalpel. This illustrates the contrast between simple text modding and complex binary injection.
Standard localization relies on text files. Modding compiled Unity assets requires precision binary surgery.
Key Takeaways

The Translation Illusion

Most users assume translating a game is a trivial exercise in text editing. You open a JSON or localization file, swap the English strings for Japanese ones, and restart the application. For the high-fidelity electronic circuit simulator CRUMB, this path was entirely blocked.

CRUMB bakes its Avalonia-style XAML user interface directly into compiled Unity binary assets. The text strings do not live in an accessible folder. They are serialized as MonoBehaviour data inside a massive proprietary blob called sharedassets0.assets. To change a single button from English to Japanese, you have to break open the compiled binary and rewrite the file.

The Header-Preserving Swap

To solve this, the author built a custom C# utility called AssetPatcher. This tool acts as a binary scalpel. It relies on the AssetsTools.NET library to safely parse Unity files without requiring the Unity Editor.

The patcher iterates through the binary blob looking for specific MonoBehaviour assets that contain XAML UI definitions. When it finds one, it performs a delicate operation. It identifies the exact byte offset where the XAML payload begins. It preserves the fragile Unity metadata header above that line, splices in the new Japanese XAML string, and recalculates the file sizes.

An interactive SVG diagram showing a large block labeled 'sharedassets0.assets'. On hover

A White-Glove Installation

Mods requiring binary injection usually ship with a set of terrifying command-line instructions. Users are told to back up their own files and run opaque scripts. The crumb-jp project rejects this paradigm entirely.

A close-up illustration of pristine white butler gloves holding a heavy industrial gear. This represents the polished installer abstracting away heavy technical machinery.
The installer wraps complex binary manipulation in a consumer-grade user experience.

The author built a robust Windows setup package using the WiX Toolset. It includes custom C# actions that automatically scan the Windows registry to locate the Steam library path. It finds the game installation, backs up the original assets, and silently runs the binary injector behind a standard progress bar.

Bridging the STEM Gap

Why build a sophisticated binary patching pipeline and a custom installer just to translate a breadboard simulator? The answer lies in the educational value of the software itself. CRUMB is a powerful tool for learning electronics safely.

By writing custom C# tooling to bypass Unity's compiled asset limitations, the author ensured that language is no longer a barrier for Japanese students exploring STEM concepts.