motorstorm-pacific-rift-pc

MotorStorm Pacific Rift PC is a native port of MotorStorm Pacific Rift for Linux and macOS, supporting up to 4K resolution and optional 60 fps.

README

MotorStorm: Pacific Rift — native PC port (Linux: Vulkan · macOS: Metal)

Status: playable Linux x86-64 macOS on Apple Silicon Vulkan Metal PS3 BCES00129 Code MIT

motorstorm-pacific-rift-pc · native on Linux and macOS · PS3 static recompilation · Vulkan / Metal · up to 4K · optional 60 fps

GO at Cascade Falls: the player's monster truck behind a pack of bikes, ATVs and buggies on a jungle track, race HUD on

MotorStorm: Pacific Rift (PS3, BCES-00129, version 01.00) running natively on Linux (x86-64) and on macOS (Apple Silicon), without an emulator. The game's code, PowerPC (PPU) and SPU, is translated to C ahead of time by static recompilation with ps3recomp and compiled into a normal x86-64 or arm64 program. The PS3 system is reimplemented by the toolkit's runtime, and the GPU (RSX) runs the game's own shaders translated to Vulkan on Linux and to Metal on macOS.

A buggy flipping end over end in a crash at Rain God Spires, debris flying A monster truck crashing under a water tower at Cascade Falls, its fender torn off in mid-air

A big rig tanker truck on the grid at Caldera Ridge during the countdown Racing a bike along the beach at Kanaloa Bay among palm trees

Cascade Falls, Rain God Spires, Caldera Ridge and Kanaloa Bay at 1440p in 60 fps mode (shown here scaled to 1280×720).

Important

No game files come with this project, and none may be added to it. To play you must own the game and dump it from your own PS3. The build turns your executable into code on your machine; that code, like the game data, is the game's and cannot be distributed. This repository holds only the port's own code, scripts and a patch to the toolkit.

Status

AreaState
Lift (39,469 PPU functions; 9 SPU ELFs, the WWS policy module, 31 job modules) and link✅
Boot, intro FMV (Bink on SPU), first-run driver select, menus✅
Free-Play races: rendering, AI, HUD, Havok physics on SPU, race results✅
Audio (MultiStream, 7.1 folded to the output device)✅
Game speed: 30 fps, as the game ships✅ correct speed, holds 30 fps
60 fps mode (opt-in, game timestep patched, correct speed)✅ holds 60 fps in races at 1440p; dips in the slow-motion crash replay
Render scale (720p / 1440p / 4K) and upscaling (AMD FSR 1 on Vulkan, MetalFX on Metal)✅
Start screen (Play, settings, saves, game files), in-game menu (F1), performance HUD (F10), settings file✅
Pad (SDL2 game controller)✅
Saves, other modes and tracks🔧 not checked end to end
Online play❌ not planned (the servers are gone)
macOS (Apple Silicon, Metal)✅ everything above; 30 fps holds, 60 fps mode runs at about 50 on an M1 Max (see below)
Windows❌ not built or tested

Measured on a Ryzen 9 5950X with an RTX 3090 on Linux. Known issue: in 60 fps mode the frame rate dips in the crash camera's slow-motion replay, where the game's SPU physics jobs fill every job lane (see docs/NOTES.md, Performance).

On macOS the port was brought up on an M1 Max (macOS 27). 30 fps mode holds 30 in races at 720p (29.9 fps over a 10 s race window, frame interval p50 33.4 ms). 60 fps mode runs at about 50 fps there (54 in the pack, p50 17.9 ms): close to, but not yet, a steady 60. Both were measured while the machine was busy with other work, which the game's threads now outrank. GPU time is 5-7 ms a frame at 720p: the limit is on the CPU side (docs/NOTES.md, macOS / Metal).

Technical notes: docs/NOTES.md.

Requirements

Game files (details: docs/REQUIRED_FILES.md):

  • Your own dump of MotorStorm: Pacific Rift, BCES-00129 (Europe), version 01.00: the whole PS3_GAME/ folder.
  • Its EBOOT.BIN decrypted to EBOOT.elf, for example with RPCS3 (Utilities → Decrypt PS3 Binaries). scripts/lift.sh checks its SHA-256; other regions and versions are not supported (the port patches the game at fixed addresses).
  • The PS3 firmware installed in RPCS3 (File → Install Firmware), which provides the dev_flash the game reads.

PC (Linux):

  • Linux x86-64. The lifted code is built for x86-64-v3 (AVX2/FMA) by default; set the CMake cache variables PORT_PPU_ARCH and PORT_SPU_ARCH empty for an older CPU.

  • A Vulkan GPU and driver (developed on NVIDIA).

  • Plenty of RAM and time for the first build: the lift is tens of large C files. scripts/build.sh defaults to 14 jobs inside an 80 GB memory scope; lower JOBS (and PORT_BUILD_MEM) on a smaller machine.

  • Tools and libraries: git, rsync, CMake 3.20+, Ninja, Clang (clang-20 is preferred when installed), Python 3.10+, and the development packages of SDL2, the Vulkan headers and glslang. On Debian/Ubuntu, for example:

    sudo apt install git rsync cmake ninja-build clang python3 python3-venv \
        libsdl2-dev libvulkan-dev glslang-dev glslang-tools spirv-tools libpng-dev
    

    libpng is optional: it draws the start screen over the game's own artwork (a plain backdrop without it).

    ffmpeg is only needed by the test scripts in work/tools/.

Mac:

  • An Apple Silicon Mac. macOS 13 or later for MetalFX upscaling; the rest needs only Metal. Developed on an M1 Max.

  • Xcode's command line tools (xcode-select --install) and, from Homebrew:

    brew install cmake ninja sdl2 glslang spirv-cross libpng
    

    glslang and spirv-cross translate the game's shaders to Metal's language; without them the build has no guest shaders and the game does not render. ffmpeg and coreutils are only needed by the test scripts.

  • 64 GB of RAM builds comfortably with the default job count (one per performance core); lower JOBS on a smaller machine.

Installing from the release download (Quiver)

The release download, motorstorm-pacific-rift-pc-linux-x86_64.tar.gz, is what Quiver installs. It holds no game code: it is this repository plus motorstorm-pacific-rift.sh, which on the first start opens a set-up window, in the style of the game's own menu and driven by a controller, the keyboard or the mouse (bin/, built from work/setup/setup.cpp; it holds no game code), which walks through:

  1. asks for an install folder (the build, saves and settings live there, so an update of the download keeps them);
  2. checks the Linux packages listed above and offers to apt install the missing ones;
  3. asks for your dump (the folder holding PS3_GAME) and your decrypted EBOOT.elf, and checks its hash;
  4. checks for the firmware installed in RPCS3;
  5. runs scripts/setup.sh, scripts/lift.sh and scripts/build.sh in the install folder (about 15 minutes on a fast 16-core PC; the log is work/runs/install-*.log).

Without a desktop (or with NO_GUI=1) the same steps run in a terminal. Later starts go straight to the game. A new download is copied over the install and built again. motorstorm-pacific-rift.sh --setup runs the set-up again, --where prints the install folder.

Setup

The steps are the same on Linux and macOS; where they differ it is said in the step. On a Mac, in short, once the game files are in disc/ and the firmware's dev_flash is in ./dev_flash (or installed in RPCS3):

brew install cmake ninja sdl2 glslang spirv-cross
scripts/setup.sh && scripts/lift.sh && scripts/build.sh
work/run.sh
1. Get the code
git clone https://github.com/millennium-h4x0r/motorstorm-pacific-rift-pc.git motorstorm_pacific
cd motorstorm_pacific
scripts/install-hooks.sh    # optional: blocks commits of game files
2. Put the game in place

disc/ is git-ignored. The port expects:

disc/PS3_GAME/            PARAM.SFO, ICON0.PNG, ... (links into your dump are fine)
disc/PS3_GAME/USRDIR/     the dump's USRDIR files, plus:
    EBOOT.elf             your decrypted executable
    ms2.psarc             one file; join a FAT32 dump's ms2.psarc.66600..66604 pieces in order

docs/REQUIRED_FILES.md has the exact commands (symlinks for everything, a copy of EBOOT.elf, and the cat that joins ms2.psarc), the expected checksum, and where the firmware's dev_flash is looked for on each system. RPCS3 runs on macOS too, so the executable can be decrypted and the firmware installed there; files prepared on another machine can simply be copied over.

3. Get and patch the toolkit
scripts/setup.sh

This clones ps3recomp into ps3recomp/ (its own git repository, ignored by this one), checks out the pinned commit (v0.18.0, 4e8f3ca8), applies this port's changes from work/patches/ps3recomp.patch, clones Dear ImGui v1.91.5 for the menu, and installs the toolkit's Python tools into .venv/. Set PS3RECOMP_DIR=<dir> to keep the toolkit elsewhere (every script honours it).

4. Lift your executable
scripts/lift.sh                 # or: scripts/lift.sh path/to/EBOOT.elf

This translates the PPU code into work/src/recomp/ and the SPU images into work/port/spu/ (work/tools/lift_spu.sh). It then runs work/tools/patch_lift.py, which splices the port's hooks into the lifted code: the 60 fps timestep, the frame-time compensation and the camera-shake hooks. Both directories are git-ignored and must never be shared. After updating this repository, run scripts/lift.sh again, or at least .venv/bin/python work/tools/patch_lift.py (it is idempotent and fails loudly if the lifted code is not what it expects).

5. Build
scripts/build.sh                # -> work/port/build/PacificRiftRecomp

This configures work/port/CMakeLists.txt with Ninja, a Release build and the Vulkan backend (Linux) or the Metal backend (macOS), and builds it. It accepts JOBS=<n>, PORT_BUILD_MEM=<size>, BUILD_DIR=<dir>, SPU_DIR=<dir>, CC=/CXX=. To run CMake yourself:

cmake -S work/port -B work/port/build -G Ninja -DCMAKE_BUILD_TYPE=Release \
    -DPS3RECOMP_DIR="$PWD/ps3recomp" -DRECOMP_DIR="$PWD/work/src/recomp" \
    -DSPU_DIR="$PWD/work/port/spu" -DPS3RECOMP_RSX_VULKAN=ON \
    -DPython3_EXECUTABLE="$PWD/.venv/bin/python"
cmake --build work/port/build

On macOS leave -DPS3RECOMP_RSX_VULKAN=ON out: the Metal backend is always built there.

6. Play
work/run.sh

The game opens on its start screen: Play (backs up your saves first, then boots the game), Settings, Saves, Game files (where the game, the firmware and the saves are, each checked), Help and Quit. A pad, the keyboard or the mouse all work there. work/run.sh --play (or PS3_SKIP_START=1, or the option under Settings > Gameplay) boots straight into the game.

work/run.sh sets up the environment (./dev_flash when it exists, else the Game files page's folder or RPCS3's copy; gamedata/ for saves), runs work/port/build/PacificRiftRecomp on disc/PS3_GAME/USRDIR/EBOOT.elf and logs to work/runs/<time>.log (work/runs/latest.log points at the newest). The game opens a window; work/run.sh --offscreen renders offscreen instead (the test scripts' INST instances are offscreen by default). Arguments of the form VAR=value are exported to the game.

Use an SDL2-supported game controller. The game ignores SIGINT (Ctrl+C); stop it with SIGKILL, for example pkill -KILL -x PacificRiftReco (on macOS the process name is not cut short: pkill -KILL -x PacificRiftRecomp, or Cmd+Q in the window).

Settings

Start screen, menu and keys
KeyAction
F1, the pad's Home button (PS, Xbox, Guide), or Select+Start togetherThe in-game menu, and closes it again: Resume, Settings, Quit game. The game sees a neutral pad while it is open
F10Performance HUD: detailed, compact, off
F11 or Alt+Enter (macOS: Option+Return, or the green button)Full screen and back

Both the start screen and the menu are made for a controller, with the PS3's button icons shown on screen: D-pad or left stick to move, ✕ to select, ○ to go back, L1/R1 to switch the start screen's tabs. Every connected pad works, and so do the keyboard (arrows, Enter, Escape) and the mouse.

The in-game menu follows the PS3's home menu (as RPCS3 draws it and the Gran Turismo 6 PC launcher themes it): the race dims and a panel slides in with Resume, Settings and Quit game. Quitting is PS, △, ✕; ○ resumes. Its settings are the ones worth changing in a race, each a row that ←/→ changes: resolution, frame rate, upscaling and sharpness, full screen, camera shake, the performance HUD and whether the start screen shows. A changed row that needs a restart is marked, and Restart now appears under the list.

The start screen's pages:

PageWhat is there
DisplayFull screen, picture shape (16:9 with black bars, or stretched), resolution (720p, 1440p, 4K), FSR 1 / MetalFX upscaling and sharpness
Gameplay30 or 60 fps, frame-time catch-up (60 fps), camera shake, the performance HUD, skipping the start screen
ControllerThe controllers found, a live button test
SavesThe saves (title, date, size), back up now, backups kept, restore (start screen only), delete; Play backs up first unless turned off
Game filesThe game folder (EBOOT.elf decrypted and the right version by its checksum, PARAM.SFO, ms2.psarc joined), dev_flash and the saves folder, each with a folder picker
Keys / HelpThe keys; the version, the logs and settings folders

Every change is saved to user/settings.ini at once. The upscaler and its sharpness apply immediately. What is read at start (resolution, frame rate, picture shape, camera shake, catch-up, folders) applies when Play is pressed on the start screen, which starts the process again with it; in game the settings offer Restart now. Save backups go to user/backups/.

The menus use the game's own menu font once the game has unpacked it on its first run (disc/framdcn.ttf), and a system sans (Inter, Noto Sans, DejaVu or Liberation) for the text.

user/settings.ini

Read by windowed runs only ($PS3_USER_DIR/settings.ini if that is set). An environment variable that is already set wins over the file.

[video]
fullscreen = 0
scale = 1            ; 1 = 720p, 2 = 1440p, 3 = 4K render targets (restart)
upscaler = off       ; off, or fsr (Linux: AMD FSR 1) / metalfx (macOS), to the window's size
fsr_sharpness = 0.80 ; the upscaler's sharpening, 0..1, 1 = sharpest
stretch = 0          ; 0 = keep the 16:9 shape, 1 = fill the window (restart)
fps = 30             ; 30 (original) or 60 (restart)

[game]
camera_shake = 0     ; the game's own camera shake (restart)
catch_up = 0         ; 60 fps mode: a late frame makes up the lost time (restart)

[performance]
fps_counter = 1      ; HUD: 0 = off, 1 = detailed, 2 = compact

[launcher]
skip_start = 0       ; 1 = no start screen
backup_on_play = 1   ; back up the saves each time Play is pressed
keep_backups = 8     ; save backups kept (0 = all)

[paths]              ; empty = the default
game =               ; the folder holding PS3_GAME (default: disc/)
dev_flash =          ; default: ./dev_flash, else RPCS3's
saves =              ; default: gamedata/
Environment variables

The ones a player may want (all PS3RECOMP_* switches are read at start). The names with VK in them are the Vulkan backend's; on macOS the port passes each one on to the Metal backend's own switch, so the table holds for both.

VariableEffect
PS3RECOMP_VK_WINDOW=0Render offscreen, same as --offscreen (default: a window, which reads user/settings.ini)
PS3RECOMP_VK_FULLSCREEN=1Start full screen
PS3RECOMP_STRETCH=1Stretch the frame to the window (default: keep its shape, black bars)
PS3RECOMP_RES_SCALE=1..4Render-target scale: 2 = 1440p, 3 = 4K
PS3RECOMP_FSR=1, PS3RECOMP_FSR_SHARPNESS=0..1Upscaling to the window's size: AMD FSR 1 (Vulkan), MetalFX spatial scaling plus sharpening (Metal)
PS3RECOMP_FPS=6060 fps mode at correct game speed while it holds 60 (needs the patch_lift.py hooks)
PS3RECOMP_DT_MAX=260 fps mode: a late frame makes up the lost time (default 1, off: every frame is 1/60 s, so the game runs slightly slow below 60 fps; the catch-up makes the car lurch and riders fall)
PS3RECOMP_CAMERA_SHAKE=1Keep the game's camera shake (default: off, a steady camera at both 30 and 60 fps)
PS3RECOMP_SHAKE_60=1With camera shake on, 60 fps mode: step it every frame (stronger shake)
PS3_DEV_FLASH=<dir>Firmware dev_flash, over the Game files page (default: ./dev_flash, else the page's folder, else RPCS3's: ~/.config/rpcs3/dev_flash, on macOS ~/Library/Application Support/rpcs3/dev_flash)
PS3_GAMEDATA_ROOT=<dir>Where the saves live (<dir>/dev_hdd0/home/00000001/savedata), over the Game files page (default gamedata/)
PS3_HDD0_ROOT=<dir>The PS3 hard drive's game data (run.sh default: hdd0/)
PS3_SKIP_START=1No start screen (as work/run.sh --play); INST test runs set it
PS3_UI_PAGE=settings, saves, game or helpOpen the start screen on that page (with PS3RECOMP_UI_SHOT, for screenshots)
PS3_UI_AUTOPLAY_MS=<ms>Press the start screen's Play by itself after that long
PS3RECOMP_UI_FONT=<file.ttf>, PS3RECOMP_UI_TITLE_FONT=<file.ttf>The menus' text and title fonts
PS3_USER_DIR=<dir>Where settings.ini and shader_cache/ live (default user/)
PS3RECOMP_SPIRV_CACHE=<dir> or 0Translated-shader cache (default user/shader_cache) or none; on macOS it also holds the translated Metal shaders and the pipeline list the next start prewarms
PS3RECOMP_FLIPLOG=<file>Log a timestamp per presented frame (work/tools/fliplog.py reads it)

macOS only:

VariableEffect
PS3_THREAD_QOS=defaultLeave the game's threads at the system's default priority (default: user-interactive at priority 45, so other work on the Mac does not slow the game)
SPURS_PM_SPIN_US=<us>How long an SPU job lane looks for its next job before it sleeps (default 80; 0 = sleep at once, less CPU, lower frame rate in 60 fps mode)
PS3RECOMP_METAL_PREWARM=0Do not rebuild the previous runs' render pipelines in the background at start (default: on, from user/shader_cache/pipelines.bin; the first run of a track still compiles as it goes)
PS3RECOMP_METAL_STATS=1Log GPU time, passes and draws per frame every 120 frames
PS3RECOMP_UI_SHOT=<file.ppm>Write the window's frame, menu and HUD included,