<!-- Canonical page: https://reversedwithai.com/p/rittai-ninja-katsugeki-tenchu-2-slps-03040-3d46a5d6 -->
Canonical page: https://reversedwithai.com/p/rittai-ninja-katsugeki-tenchu-2-slps-03040-3d46a5d6

# Fuuzetsu/tenchu-2-decomp is a work-in-progress matching decompilation of Rittai Ninja Katsugeki: Tenchu 2

> A matching decompilation project for the Japanese PlayStation release of Tenchu 2.

This project aims to produce readable source code for Tenchu 2 (SLPS-03040) that compiles to match the original game's binary output. It is currently unfinished and relies on manual matching of C functions and assembly routines.

## Key facts

- Target: Rittai Ninja Katsugeki: Tenchu 2 (SLPS-03040)
- Category: Games and mods
- Platform: PlayStation
- Models: Codex
- Tools: GCC 2.8.1, maspsx, Nix, Python
- Outcome: Research
- Checks: Source available: not reported; Repro steps: not reported; Real hardware: not reported; Verified by others: not reported
- Author: Fuuzetsu
- Added: 2026-11-29
- Updated: 2026-11-29
- Sources reviewed: 2026-11-30 (automated reviewer)

## What was done

The [Tenchu 2 (Japan) decompilation](https://raw.githubusercontent.com/fuuzetsu/tenchu-2-decomp/HEAD/README.md) project is a work-in-progress effort to recover readable source code for the PlayStation title Rittai Ninja Katsugeki: Tenchu 2. The project follows the methodology established by the Tenchu 1 decompilation. The build process compiles declared C units with GCC 2.8.1 and maspsx, assembles reviewed handwritten source, links at retail addresses, and compares every output byte. The scope includes gameplay, engine, menus, save, ending, trial, and editor modules, while excluding Sony PsyQ/SDK/CRT implementations. As of November 2026, the project tracks 1,438 matching game C function instances and 62 nonmatching drafts. Some recent commits are authored by the account named codex, including commits describing matched functions such as the bait pursuit AI and trial editor control loop. The project is not finished, and matching remaining code takes priority over humanization. Original behavior, arithmetic order, ABI, and gameplay glitches are preserved. The project does not include game files, and users must supply their own Japanese disc for extraction and verification.

## Human work and limitations

The project uses a Nix-based build system to ensure a reproducible environment. The progress is tracked per-image, and the repository includes a PLAN.md for development status.

## Reproduce it

./dev.sh python3 tools/extract.py '/path/to/Tenchu 2 (Japan).cue'; ./dev.sh ./Build check-all

## AI use in the original source

- "Match complete bait pursuit AI" ([source](https://github.com/fuuzetsu/tenchu-2-decomp/commits.atom))

Excerpts checked against the source on 2026-11-28.

## Sources

- [Repository](https://github.com/Fuuzetsu/tenchu-2-decomp)

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: Fuuzetsu (2026). Fuuzetsu/tenchu-2-decomp is a work-in-progress matching decompilation of Rittai Ninja Katsugeki: Tenchu 2. Reversed with AI. https://reversedwithai.com/p/rittai-ninja-katsugeki-tenchu-2-slps-03040-3d46a5d6
