Persona 3 FES Recompiled
Persona 3 FES
OriginPlayStation 2
TechnologyStatic recompilation (native C/C++)
Available forWindows
View official projectAbout the project
Persona 3 FES es un videojuego de rol en 2007.
Official project information
An attempt at a static recompilation of Shin Megami Tensei: Persona 3 FES (NTSC-U SLUS-21621)<br>
The game's MIPS R5900 code is statically recompiled to C++ and run on a reimplementation of the PS2 hardware. No emulator is involved.
[!IMPORTANT] No game files are included: no ELF, IRX modules,
.CVMarchives or code generated from them. You need your own copy of Persona 3 FES, NTSC-U, PS2 IDSLUS-21621, matching the Redump record. The port is built against that disc's executable:
File SHA-1 SLUS_216.217ca061aac239e53e86bcd4c0ce8e19e987d8a75f
Status
<img src="p3fes/status/progress.svg" alt="Status map: the executable's functions by module and the PS2 hardware, coloured by state, and the road to a playable port" width="100%"><sub>Generated from <a href="p3fes/status/status.toml"><code>p3fes/status/status.toml</code></a> by <code>p3fes/scripts/status_chart.py</code>. 🟩 working · 🟦 partial · 🟥 pending.</sub>
Where it stands: the game boots from its own CVM archives, plays the opening movie, and goes through New Game (the FES introduction, the opening anime, name entry) into the story: the dorm, school, day changes and Tartarus, loaded from a memory card save. 3D runs at the console's 30 fps with VU1 on PCSX2's microVU recompiler; menus run at 60. Music and voices play; sound effects are still silent, and battles have not been tested yet.
| Milestone | |
|---|---|
Recompile all 14,640 functions of SLUS_216.21 | ✅ |
| Boot: EE kernel, original IRX modules, CVM archives | ✅ |
Memory card (8 MB .ps2, PCSX2 format) and controller | ✅ |
| Movies: video (IPU) and audio (ADX over SPU2 AutoDMA) | ✅ |
| PCSX2 GS renderer (OpenGL / software) | ✅ |
| Title screen and main menu (The Journey / The Answer) | ✅ |
| New Game: introduction, opening anime, name entry | ✅ |
| Story scenes, free movement, day changes | ✅ |
| VU1 on PCSX2's microVU recompiler | ✅ |
| 3D at 30 fps, menus at 60 (console frame pacing) | ✅ |
| Tartarus | 🔧 |
| Sound effects (SPU2 voices) | 🔧 |
| Battles | ⏳ |
| Widescreen, upscaling, 60 FPS | ⏳ |
Goal
A fully playable Persona 3 FES, covering The Journey and The Answer from the opening movie to the credits, as a native executable. Accuracy comes first, with PCSX2 as the reference. Once the game is playable, the port hopes to add widescreen, higher internal resolution and 60 FPS with frame interpolation.
How it works
SLUS_216.21 ──► function map (14,640) ──► ps2_recomp ──► C++ (one file per function)
│
ps2xRuntime EE kernel HLE · DMAC · GIF/GS · VIF1/VU1 · IPU ─┼─► native executable
ps2xIOP R3000A interpreter running the game's own IRX · SPU2 · SIO2
pcsx2gs PCSX2's GS (OpenGL / software) behind a small C API
<details>
<summary><b>EE: static recompilation</b></summary>
ps2xRecomp decodes every function in the map and emits C++ against an R5900Context (128-bit GPRs, HI/LO pairs,
FPU and VU0 state). Delay slots, 64-bit compares and MMI lane semantics are translated explicitly. Direct calls are
C++ calls. Indirect jumps go through a dispatcher that maps a guest PC to a compiled function or a mid-function entry.
| Functions recompiled | 14,435 |
| Bound to runtime HLE | 205 (EE kernel, SIF, CD, pad, memory card libraries) |
| Kept as guest code | Sony libmpeg / libipu, so the game's MPEG player runs on the emulated IPU |
| Indirect-jump fallback entries | 3,910 functions (453,264 entries) |
| Recovered jump tables | 14 |
- EE kernel (HLE): threads, semaphores, event flags, alarms, interrupt handlers and VBlank/HBlank timing.
- DMAC: all channels, including scratchpad chain and interleave modes, which Sofdec's motion compensation uses.
- IPU: the MPEG-1/2 decoder adapted from PCSX2.
- GS: PCSX2's GS (
third_party/pcsx2-gs, OpenGL or software renderer), fed through an observer on the GIF stream; the original CPU rasterizer and OpenGL backend remain as fallbacks (PS2X_GS_RENDERER=builtin). - VIF1/VU1: VU1 microcode runs on PCSX2's microVU recompiler (
third_party/kzvu);PS2X_VU1=interpselects the built-in interpreter. - IOP: the game's original IRX modules (
SIO2MAN,PADMAN,MC2_S1,LIBSD,CRI_ADXI,SKSOUND, …) run on an R3000A interpreter over an HLE IOP kernel. SPU2 handles voices and ADMA streaming, and SIO2 handles PCSX2-format memory cards.
| Middleware | Role | State |
|---|---|---|
CRI Sofdec + Sony libmpeg | FMV (.SFD, MPEG-1 640×448) through the IPU | ✅ |
CRI ADX (CRI_ADXI.IRX) | Music and movie audio over SPU2 AutoDMA | ✅ |
| CRI ROFS / CVM | Disc archives | ✅ |
| RenderWare 3.x | 2D/3D engine | 🔧 |
ATLUS sound (SKSOUND/MODHSYN) | Effects and sequenced audio | 🔧 |
p3fes/ Persona 3 FES config: p3fes.toml, function map, analyzer output, run.bat, scripts, status
ps2xRecomp/ Recompiler: R5900 decoder (rabbitizer) and C++ emitter
ps2xAnalyzer/ ELF analyzer that proposes stubs and entry points
ps2xRuntime/ EE runtime: kernel, DMAC, GS, VIF/VU, IPU, input, host window
ps2xIOP/ IOP: R3000A interpreter, HLE kernel and libraries, SPU2, SIO2
third_party/pcsx2/ Subset of PCSX2 at 2954ebe (GS, common, libraries)
third_party/pcsx2-gs/ PCSX2's GS as a shared library with a C API
third_party/kzvu/ PCSX2's microVU (VU1 recompiler) as a library, from KillzoneRecomp
third_party/pcsx2-vu/ Subset of PCSX2 at 646df006a used by kzvu
</details>
Building
See p3fes/README.md. In short:
- Build
ps2xRecomp, copySLUS_216.21from yourSLUS-21621disc (check its SHA-1 above) next top3fes/p3fes.tomland runps2_recomp p3fes.toml. - Copy the generated C++ into
ps2xRuntime/src/runner/and its two headers intops2xRuntime/include/. - Build
ps2xRuntime(Windows: llvm-mingw or MSVC). - Put the executable,
run.bat,SLUS_216.21,SYSTEM.CNF,LIB31\and the.CVMfiles in one folder.
| Variable | Effect |
|---|---|
PS2X_CALLBACK_STACK_TOP=0x100000 | Required: keeps interrupt/callback stacks clear of the main stack |
PS2X_GS_RENDERER=pcsx2 (default) / pcsx2-sw / builtin | PCSX2's GS with the OpenGL or software renderer (pcsx2gs.so/.dll next to the executable), or the built-in rasterizer |
PS2X_PCSX2_SCALE=2 | PCSX2 internal resolution multiplier |
PS2X_PCSX2_OPTIONS= | PCSX2 image options, key=value;… (see third_party/pcsx2-gs/include/pcsx2gs_api.h) |
PS2X_VU1=interp | Built-in VU1 interpreter instead of PCSX2's microVU recompiler |
PS2X_EE_CYCLE_SCALE=4 | Multiplier on the EE time charged by the recompiled code (1 = unscaled; 4 gives the console's 30 fps in 3D) |
PS2X_SHOW_SPEED=0 | Hide the game FPS / VPS readout in the window title |
PS2X_FRAME_CAP_FIELDS=1 | Let the game logic run at 60 updates per second (default 2: 30, like the console) |
PS2X_AUDIO_STRETCH=0 | Play the sound unstretched when the game runs below full speed (it runs dry instead) |
PS2X_GS_GPU=1 | Built-in OpenGL GS backend instead of the CPU rasterizer |
PS2X_GS_THREAD=1 | Run the GS backend on its own thread |
PS2X_MEMCARD1=<path> / none | Memory card for slot 1 (default memcards/Mcd001.ps2) |
PS2X_PAD_DEADZONE=0.15 | Analog stick deadzone |
PS2X_HIDE_DEBUG_UI=1 | Hide the developer overlay |
PS2X_AUDIO=0 | Disable host audio |
PS2X_AUDIO_DUMP=<file> | Dump the SPU2 output (s16le stereo 48 kHz) |
PS2X_PROFILE=<file> | Linux sampling profiler; summarise with p3fes/scripts/prof_report.py |
Debug traces: PS2X_SPU2_DIAG, PS2X_GS_DIAG, PS2X_IPU_TRACE, PS2X_DMA_LOG, PS2X_CD_LOG, PS2X_IOP_CD_LOG,
PS2X_RPC_LOG, PS2X_IOP_RPC_COUNTS, PS2X_SIFDMA_LOG, PS2X_IOP_MEMLOG, PS2X_IOP_TRACE, PS2X_EE_CYCLE_STATS, PS2X_GIF_TRACE, PS2X_PCSX2_SHOTS,
PS2X_PAD_SCRIPT (with PS2X_PAD_SCRIPT_CLOCK=fields), PS2X_EE_TRACE_CALLS, PS2X_LOG_SUSPEND.
Credits
- Logo lettering: Faktos and BM Space (free font).
- PS2Recomp by ran-j and contributors: the recompiler and runtime this port is built on.
- god-of-war-recomp by KIexster: SPU2, SIO2, IOP and VU1 work and many EE/GS fixes, merged here, plus the status map design.
- Taylor N. Albarnaz / LightVelox's Shadow of the Colossus fork of PS2Recomp: the OpenGL GS backend (via god-of-war-recomp).
- urban-reign-recomp by thiagordsfx: the PCSX2 GS bridge design.
- PCSX2: the IPU, the GS and microVU (VU1 recompiler), and the accuracy reference.
- KillzoneRecomp by drakolordx7: kzvu, PCSX2's microVU packaged for
PS2Recomp (
third_party/kzvu, ported here to clang and MinGW), and the IOP heap reuse fix. - ps2-web-recomp: SPU2, IPU and GPU GS reference.
- ps2-native-recomp by Samir Nuri and exoteric33: the sound
time-stretcher (
ps2xRuntime/src/lib/audio/stretch.*, MIT) that keeps audio smooth below full speed. - The snaku Persona 3 FES decompilation, for function names.
- The Persona 4 decompilation by Raikaru: names for shared
engine, RenderWare and CRI functions, transferred by
p3fes/scripts/p4_names.py(p3fes/names/p4_names.csv).
Persona 3 FES is © ATLUS / SEGA. This is an unofficial, non-commercial fan project, not affiliated with or endorsed by ATLUS or SEGA. Licensed under GPL-3.0 (PS2Recomp, PCSX2 and god-of-war-recomp code is GPL); distributing a build means providing its source.