MCP.so
Sign In

Overview

What is HAN JIE?

HAN JIE is a tool that converts Xbox 360 executables into C++ code, which can then be recompiled for any platform. Currently, it only supports x86 platforms due to the use of x86 intrinsics.

How to use HAN JIE?

Use two command-line tools: XenonAnalyse to detect jump tables from an XEX file, and XenonRecomp with a TOML configuration file and the PPC context header file. Example invocation: XenonRecomp [input TOML file path] [input PPC context header file path].

Key features of HAN JIE

  • Converts Xbox 360 PPC instructions to C++ with x86 intrinsics.
  • Supports most PPC instructions; missing cases generate warnings or debug breaks.
  • Handles big-endian memory and vector register endianness via reversal.
  • Resolves virtual function calls using a perfect hash table at runtime.
  • Detects jump tables statically (Sonic Unleashed pattern) and generates switch cases.
  • Provides optimizations like skipping link register and converting registers to local variables.
  • Enables easy function hooking via weak aliasing and mid-asm hooks.

Use cases of HAN JIE

  • Recompiling Xbox 360 games for modern platforms (e.g., Unleashed Recompiled).
  • Porting Xbox 360 executables to x86-64 with native performance.
  • Modding and game preservation by converting binary code to modifiable C++.

FAQ from HAN JIE

What platforms does HAN JIE support?

Currently, only x86 platforms due to use of x86 intrinsics. Support for other architectures may be possible via SIMDe.

How does HAN JIE handle endianness?

Memory loads and stores swap endianness automatically; vector registers are reversed as 16-byte blocks.

Are exceptions and setjmp/longjmp supported?

Exceptions are not supported. setjmp and longjmp are redirected to native implementations.

What are the main configuration steps?

Provide a TOML file with paths to XEX, optional patch file, output directory, jump table definitions, and addresses of register restore/save functions.

What optimizations are available?

Options include skipping link register, using local variables for certain registers, and more. They are recommended only after achieving a working recompilation.

Tags

More from Other