Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Platform:PlayStation 2

From ReverseEngineering.wiki
Platform
Vendor Sony
Endianness little
On this wiki Facts · Code · Notes · Topics

Sony's second home console (2000 JP). Its main CPU is the Emotion Engine (EE, a little-endian MIPS R5900 with 128-bit registers, vector units VU0/VU1), and an I/O Processor (IOP, a PlayStation 1 R3000A CPU) runs separate IRX modules; game executables are ELF files.

Overview

The PlayStation 2 has two programmable CPUs that matter to a reverser:

  • Emotion Engine (EE): MIPS R5900, little endian, 32 general registers of 128 bits (the multimedia instructions lq/sq load and store a full quadword), two vector units (VU0, VU1) with their own micro-programs. Game code runs here.
  • I/O Processor (IOP): a MIPS R3000A (the same core as Platform:PlayStation) that drives the disc, pads, memory cards, USB and sound through IRX modules loaded at run time (Format:IRX (PlayStation 2 IOP module)).

The boot executable on a disc is named in SYSTEM.CNF and is a normal 32-bit MIPS little-endian Format:ELF (Executable and Linkable Format). In the Sly Cooper decompilation the entry point _start of the NTSC-U executable is at 0x100008, i.e. EE programs are linked from the bottom of RAM at about 0x100000.

Toolchains seen in matching decompilations

  • Sony/SN Systems ProDG ee-gcc 2.95.2 (build v2.73a) for C and C++ games of the first generation; flags -O2 -G0 -ffast-math in Software:Sly Cooper and the Thievius Raccoonus. C++ names follow the old GCC 2 scheme Function__[qualifier]Args.
  • The splat disassembler supports platform: ps2 and compiler: EEGCC; see Tool:splat.

Recognising PS2 code

  • Prologue/epilogue saving $s0-$s7 with sq/lq (16-byte stack slots) instead of sw/lw.
  • $gp initialised to a fixed value (Sly 1: _gpReg = 0x2832F0) so small data is reached with $gp-relative loads.
  • IOP modules are separate .IRX files (or inside an IOPRP image) loaded over RPC.

Further reading

The PS2SDK (open source, AFL 2.0, https://github.com/ps2dev/ps2sdk) documents the module formats and IOP kernel headers.

Data formats

Code & repositories

  • https://github.com/TheOnlyZac/sly1 @ ea5e2d77ac2a083df1efeafcee178f895943b13d · license: CC0-1.0
    Matching decompilation of Sly Cooper and the Thievius Raccoonus (NTSC-U SCUS_971.98) for PS2. Useful without building: config/sly1.yaml (splat segments), config/symbol_addrs.txt (about 5,400 names and addresses), config/checksum.sha1, docs/mips_ps2_cheatsheet.md, configure.py (ee-gcc 2.95.2 flags).
    Tested on: source read, not run: Read at commit ea5e2d7: config files, README, configure.py; not built (needs the game disc) · checked 2026-10-18; last activity 2026-10-11
  • https://github.com/ps2dev/ps2sdk @ 329e2bb43287e16af16c4dde1c614e2662c24468 · license: AFL-2.0 (declared by the contributor; GitHub's detector did not recognize LICENSE)
    Open-source PS2 SDK (AFL-2.0): IOP kernel headers (iop/kernel/include/irx.h, iop/system/loadcore) giving the IRX import/export table layout, tools/ps2-irxgen and tools/srxfixup for the IRX ELF type 0xFF80 and .iopmod section, tools/romimg for ROM images.
    Tested on: source read, not run: Read at commit 329e2bb: irx.h, udnl ELF.h, ps2-irxgen elftypes.h; not built · checked 2026-10-18; last activity 2026-10-13