Games and modsPartialSource available
Target: Star Wars Episode I: The Phantom Menace (USA Rev 1)

esp-cpp/tpm-decomp

by finger563 Repository0 views
Platform
PlayStation, M5Stack Tab5 (ESP32-P4), Desktop
Outcome
Partial
Star Wars Episode I: The Phantom Menace (USA Rev 1): A decompilation and native port project for Star Wars Episode I: The Phantom Menace (PS1).
Image: Source: raw.githubusercontent.com

Evidence at a glance

Loading source evidence…

What was done

This project aims for a matching C decompilation of the PlayStation game Star Wars Episode I: The Phantom Menace. It currently utilizes a static recompiler as a stopgap to enable native execution on the M5Stack Tab5 (ESP32-P4) and desktop platforms.

The tpm-decomp project is a reverse-engineering effort targeting the PlayStation version of Star Wars Episode I: The Phantom Menace. The primary goal is a matching decompilation that produces a byte-identical executable when compiled with the original PSY-Q 4.3 toolchain. As a stopgap, the project employs a static recompiler that translates the original binary into C code, allowing the game to run natively on desktop systems and the M5Stack Tab5 (ESP32-P4). The project documentation notes that decompiled functions are intended to replace recompiled code incrementally. Current progress includes a split executable that rebuilds byte-identical from assembly stubs, identification of library functions, and a functional native port that supports sound, MDEC/XA movies, and save states. The project credits Claude Opus 5.5 as a co-author for various commits, including runtime optimizations and recompiler logic. Limits include the reliance on a user-provided disc image and the ongoing nature of the decompilation process, which currently requires some functions to be built under non-matching configurations.

Reproduce it

setup
tools/setup_toolchain.sh; python3 tools/extract_disc.py "<your disc>.bin" disc/; cp disc/SLUS_008.84 disks/us/; make setup; make