<!-- Canonical page: https://reversedwithai.com/p/the-lord-of-the-rings-the-return-of-the-king-gamec-fb18e468 -->
Canonical page: https://reversedwithai.com/p/the-lord-of-the-rings-the-return-of-the-king-gamec-fb18e468

# Recompiled The Lord of the Rings: The Return of the King (GameCube) into a native port with LLMs

> A native port of the GameCube title The Lord of the Rings: The Return of the King created via static recompilation.

Reditus Regis NX is a native port of The Lord of the Rings: The Return of the King (GameCube) built by statically recompiling the original PowerPC binary into C. The project relies on LLMs for code generation and a custom runtime to emulate GameCube hardware.

## Key facts

- Target: The Lord of the Rings: The Return of the King (GameCube)
- Category: Games and mods
- Platform: Host (SDL2/OpenGL), Switch (deko3d/libnx)
- Models: LLM
- Tools: decomp-toolkit, Python, Ninja, SDL2, OpenGL, deko3d, libnx
- Outcome: Works
- Checks: Source available: not reported; Repro steps: not reported; Real hardware: not reported; Verified by others: not reported
- Author: NiceneNerd
- Added: 2026-11-29
- Updated: 2026-11-29
- Sources reviewed: 2026-11-30 (automated reviewer)

## What was done

Reditus Regis NX is a native port of The Lord of the Rings: The Return of the King (GameCube, disc ID GKLE69). The project functions by statically recompiling the original game binary, where PowerPC code is translated into C and compiled for the host platform. A custom runtime reimplements GameCube hardware surfaces, including CPU, threads, interrupts, GX/GPU, VI, DVD, EXI+CARD, SI/PAD, and DSP/AX audio. The author reports that the software is almost entirely produced by LLMs, which were used to overcome time constraints. The porting process involves using decomp-toolkit to split the DOL, followed by translation and build steps via Python scripts and Ninja. Correctness is measured by capturing the game's GX command stream and comparing the output against Dolphin. The author notes that the game runs past the movie sequence without crashing, verified by a 214-second test run. The project is available at https://raw.githubusercontent.com/nicenenerd/reditus-regis-nx/HEAD/README.md.

## Human work and limitations

The author explicitly characterizes the AI-generated code as potentially messy, comparing the LLM to a talented assistant with substance abuse issues. The project requires the user to provide their own disc image for the build process.

## Reproduce it

1. Run python3 tools/fetch_dtk.py to get the decomp-toolkit. 2. Run python3 tools/extract_dol.py <disc.iso> to extract the DOL. 3. Run python3 tools/census.py to split and translate. 4. Run python3 configure.py --target host and then ninja -C build/host to build.

## Sources

- [Repository](https://github.com/NiceneNerd/Reditus-Regis-NX)

Figures are reported by the author and not measured by this site, except the commit history. Entry drafted with AI from the linked sources and checked against them.

Cite as: NiceneNerd (2026). Recompiled The Lord of the Rings: The Return of the King (GameCube) into a native port with LLMs. Reversed with AI. https://reversedwithai.com/p/the-lord-of-the-rings-the-return-of-the-king-gamec-fb18e468
