Introduction
A PS-X EXE is a program for the Sony PlayStation: the boot file of a game (named by the disc’s
SYSTEM.CNF or called PSX.EXE; on discs often SLUS_000.01 and similar), a program a game loads, or
homebrew. It is a header of 2048 bytes that says where the program goes in RAM and where it starts, then the program itself. The
processor is a MIPS R3000A (little-endian) with a geometry coprocessor, the GTE; the instructions are on the
MIPS pages (the PlayStation variant, and the
GTE).
There is no extension to rely on. The file starts with the eight characters PS-X EXE, and that is how
the explorer recognises it (a .exe file is tried as a Windows program first, and a file named like SLUS_000.01 or with no
extension is recognised by its first bytes).
Structure
0x000"PS-X EXE" and eight zero bytes16 bytes0x010initial PC, initial GP, destination address, size16 bytes0x020an unused address and size, the memory fill area, the initial stack32 bytes0x038reserved for the BIOS Exec function, then the region text, then zerosto 0x7FF0x800the program: code and data, loaded to the destination addresssize bytes
Every field is on the header page. Where the program lands and the hardware it talks to are on memory map and registers; how it calls the built-in BIOS is on BIOS calls.
Not described
Known, not yet covered
- Reference: the relocatable variant “PS-X EXR” of one game, the ECOFF and PsyQ CPE debug formats, the BIOS’s SYS and BREAK functions, the bit fields of every hardware register, the memory card and disc formats (the files are on discs and cards; disc images are a separate job).
- Viewer: the explorer opens a PS-X EXE by its signature, wherever it is named: the header field by field, the size rule (the file is
$800plus the size, and the size a multiple of$800), the region text, the address the program loads at and its KUSEG, KSEG0 and KSEG1 mirrors, and the program disassembled from the destination address with the R3000A decoder (MIPS I, little-endian, GTE instruction names), the entry marked, hardware registers named where an address built byluilands on one, and BIOS calls named where the function number is set next to the call. Options: load address, initial PC, register names, pseudo-instructions. It decodes every word as an instruction (no code and data separation), does not follow jumps and does not unpack compressed or overlay code. It was checked only on built files and on the programs of this site’s PlayStation emulator, because no real PlayStation executable exists on this machine. It has not been run in a browser by its author.
Links
Software
- PCSX-Redux – PlayStation emulator and debugger (Windows, macOS, Linux)
- DuckStation – PlayStation emulator (Windows, macOS, Linux, Android)
Reference
- Nocash PSX-SPX – the PlayStation hardware and file format reference: PSX.EXE, the memory map, the I/O map
- Kernel (BIOS) – the PSX-SPX page on the BIOS function tables