Skip to content

About

Static recompilation of SSX 3 (original Xbox, PAL) into a native Windows program

Resources

Stars

63 stars

Watchers

2 watching

Forks

Repository files navigation

ssx3-recomp

Listed on PlayPorted

Static recompilation of SSX 3 (original Xbox, PAL) into a native program for Windows and Linux, built with xboxrecomp. The game's own code runs as native code, and the Xbox GPU is emulated on Vulkan. It plays at 60 FPS, at your monitor's resolution, in true widescreen (16:9, 21:9 or 32:9), with HD textures, anti-aliasing and a longer view.

Snow Jam on a 32:9 monitor Snow Jam at 5120x1440 (32:9): the game's camera is widened, so nothing is stretched, and the HUD sits at the screen edges.

Platform Status
Windows (x86-64) Fully supported: the release download, the launcher, everything below.
Linux (x86-64) Boots to a race at 60 FPS on the Vulkan renderer, with its own launcher. Build it yourself (see Build).
Linux on Apple Silicon Macs (arm64, Asahi Linux) Boots through the intro to the menus. Gameplay not checked yet.

Native macOS is not supported. On a Mac, run it under Asahi Linux.

No game data or game code is in this repository. You need your own rip of the disc (default.xbe + data/); everything derived from it is regenerated by the scripts below.

Quick start (Windows)

  1. Download SSX3-recomp.zip from the latest release and unzip it anywhere.
  2. Run launcher.exe, press Browse and pick the folder with your default.xbe and data\ (SSX 3, PAL). The launcher checks it.
  3. Pick your settings and press Play.

The launcher: game folder, display, graphics, audio, game and log options, controllers

The launcher. Settings are kept in launcher.ini; with "Check for updates" on it tells you when a newer release is out.

What works

  • The whole game. Boot, menus, every Race and Freestyle event on all three peaks, Conquer the Mountain (free-roam, lodges, transport), and 2-player split-screen with two controllers.
  • Saving and loading to a hard-disk save in game\UDATA.
  • 60 FPS. The game's vertex programs and pixel combiners run on the GPU. A 2-hour automated soak test passed with no crash, and 48 of 48 parallel boots reached a race.
  • Accurate visuals, checked frame by frame against the xemu emulator: lighting, colours, snow spray, board trails and the display gamma ramp.
  • Audio through the emulated Xbox sound chip, in stereo or 5.1, plus rumble on an XInput controller.
  • Keyboard and controller, with remappable keys and buttons (keys.ini).

Features

True widescreen. The game's camera projection is widened to your monitor's shape, so you see more of the mountain instead of a stretched picture. The race HUD moves to the screen edges (or stays in the 4:3 middle, your choice); menus are pillarboxed. Metro City in 16:9
Native resolution. The Vulkan renderer draws at your monitor's height (1080p, 1440p, 4K; Gravitude on Peak 3 here) while the game itself still sees 640x480. Anti-aliasing (up to 8x MSAA, cut-out edges like trees and fences included) and anisotropic filtering with mipmaps for every texture keep it clean. Gravitude in 16:9
HD textures. Bl4ckH4nd's HD texture pack for the PS2 version (gbatemp) is included: the renderer swaps each matched texture for its HD version, mipmaps included. Left: the original; right: HD. HD textures
Every event on every peak: all races, slopestyle, big air and super pipe (here The Junction at night), plus the peak runs. Longer view and sharper shadows: draw distance up to 2x the original (pulled in by itself where the game's render lists would overflow) and rider shadows drawn on the GPU at up to 8x the original resolution. The Junction
Conquer the Mountain free-roam, lodges and transport, in widescreen; here Green Base Station. The MCOMM station prompts are 4:3 art and shown pillarboxed, like the menus. Conquer the Mountain
Lighting matches the hardware. Riders were washed out because vertex colours were not clamped the way the Xbox GPU clamps them. Left: xemu; right: this project. lighting
Trails and snow spray. Board trails are lines and snow spray is point sprites; the GPU renderer draws both, following xemu's rules, and the snow's own trails keep their depth (they used to show through the slope). Intimidator on Peak 2. trails
2-player split-screen (Multi Play) works when two controllers are plugged in at start. split
briefing menu character select
the race briefing fills the screen menus keep their 4:3 artwork character select at 1080p

Also in the launcher: 5.1 surround (the game mixes front, centre and rear speakers), motion blur (camera and speed streaks, riders kept sharp), a modern race camera (smoother follow, wider view with speed, landing shake), a CRT TV shader, an FPS counter, fast boot (the title and hard-disk check waits run 4x faster) and skipping the intro movies.

When something looks wrong. Every session writes a readable log (settings, menus, events with results and frame rate, saves, warnings, how it ended). Press F12 (or click both thumbsticks) the moment you see a problem: the log gets a marked line with the game's state and a screenshot is saved next to it. F4 / F5 / F6 switch HD textures, draw distance and rider shadows while playing, to see which one a glitch comes from. Details under Play and in docs/LOGGING.md.

Other things in the repository:

  • Native Windows build. No WSL is needed: setup.ps1, regen.ps1 and build.bat, verified from a fresh clone.
  • Linux on x86-64. Device registers are trapped and decoded on x86-64 as well as arm64, and the launcher has an SDL2 version.
  • Test tooling.
    • The game can drive its own menus (RECOMP_AUTONAV), getting from boot to a race in about 15 s.
    • Every scripted run gets its own save (with everything unlocked) and its own emulated hard disk.
  • xemu as a reference. tools\xemu.ps1 and the xemu agent skill boot xemu with the ISO, press buttons, capture frames, restore snapshots (character select, race start, ...) in a second and read the game's frame counter.

Play

On Windows, start launcher.exe (from the release, or build\launcher.exe after building): browse to the folder of your SSX 3 rip (it checks that default.xbe is SSX 3 PAL), pick the display, graphics, audio, game and log options, see which controllers are connected, and press Play. The choices are kept in launcher.ini; Reset to defaults puts them back. tools\package.ps1 builds the release folder and zip (launcher.exe, ssx3_recomp.exe, the HD textures and a player README; no game files).

From a console, tools\play.bat starts the game with the defaults, which follow your monitor.

On Linux, start build-linux/launcher. It has the same settings and launcher.ini, except Fullscreen, the FPS counter, 5.1 audio, motion blur, the modern camera and the update check. tools/play.sh starts the game directly with the defaults.

The launcher's choices are these environment variables:

Setting Default
RECOMP_WIDESCREEN auto auto = the window's shape (your monitor's at start, then follows resizes); 16:9, 21:9, any W:H; 0 = original 4:3
RECOMP_RES monitor height internal resolution as a height (1080, 1440, 2160) or 480 for the original
RECOMP_SKIP_INTRO 1 0 plays the EA/THX/intro movies
RECOMP_GPU Vulkan sw = the software rasteriser (reference/fallback)
RECOMP_PRESENT_FILTER linear point for sharp pixels
RECOMP_FULLSCREEN 0 1 = start in fullscreen (F11 toggles); Windows
RECOMP_CRT 0 1 = CRT TV shader (needs a resolution above 480); tune with RECOMP_CRT_PARAMS
RECOMP_DEBUG_MENU 0 1 = EA's quick-start menu (Start on the title screen)
RECOMP_MONEY_CHEAT 0 1 = for testing: each Home key press gives player 1's rider 200,000 cash (spendable cash only; the career total earned is left alone)
RECOMP_GAME_DIR game the folder with default.xbe and data\
RECOMP_ANISO 16 anisotropic filtering (0 = trilinear); the game's textures also get mip chains (RECOMP_TEX_MIPS=0 turns those off)
RECOMP_DRAW_DIST 1.5 view distance in races, times the original (1 = original, up to 2)
RECOMP_HUD_EDGES 1 widescreen: the race HUD at the screen edges instead of the 4:3 middle (0 = middle); RECOMP_HUD_MARGIN insets it (% of the way)
RECOMP_SHADOW_RES 4 rider shadow maps drawn on the GPU at this times 128x128 (1, 4, 8; 0 = the old software path)
RECOMP_FAST_BOOT 4 the title's intro wait and the "Checking hard disk" screen run this many times faster (0 = off); boot to the main menu ~4.6 s instead of ~12.7 s
RECOMP_AUDIO_CHANNELS 2 6 = 5.1 surround output (the game mixes front, centre and rear speakers; Windows); stereo uses a proper downmix
RECOMP_MSAA 4 anti-aliasing: 0 off, 2, 4, 8 samples (as far as the GPU goes); cut-out edges (trees, fences) are smoothed too
RECOMP_HDTEX hd-textures the HD texture pack (Bl4ckH4nd's, see below) and its ssx3_map.txt; 0 = off
RECOMP_FPS30 0 1 = keep the game's own 30 FPS stretches (split screen, Metro-City's tunnel); by default they render at 60
RECOMP_FPS_OVERLAY 0 1 = start with the FPS counter on (F3 toggles it): game FPS, frames shown, slowest frame; Windows
RECOMP_MBLUR off motion blur strength (the launcher uses 0.5): camera blur and speed streaks, riders kept sharp
RECOMP_CAM 0 1 = the modern race camera (smoother follow, look-ahead, wider view with speed, landing shake)
RECOMP_LOG_LEVEL info trace, debug, info, warn, error, critical: how much the session log keeps (the launcher's "Log detail")
RECOMP_PERF_SLOW_FPS 50 a stretch of seconds below this FPS is logged with when and where it happened

Keyboard. The game window must have focus. Remap the keys by copying keys.example.ini to keys.ini and editing it.

Key Pad Key Pad
Enter Start Backspace Back
Z X A S A B X Y Q E White / Black
1 3 Left / right trigger Arrows D-pad
Numpad 8/4/2/6 Left stick I J K L Right stick
F11 / Alt+Enter Fullscreen F3 FPS counter
F12 Mark a problem in the log F4 HD textures on/off
F5 Draw distance Normal / Far / Maximum F6 Rider shadows on/off

F4-F6 change the setting until the game is closed, show it on screen and write it to the log. F12 and F4-F6 also work on Linux (without the on-screen message); F3 and F11 are Windows only.

Controller. An Xbox/XInput controller works without setup, rumble included; two controllers enable Multi Play.

Logs. Each run's log is kept in logs\ (the last 20; logs\latest.txt names the newest). At the default level it reads as the session's story -- settings, menus, events with results and frame rate, saves, money spent, warnings, how it ended; the launcher's "Log detail" (or RECOMP_LOG_LEVEL=trace|debug|info|warn|error|critical) turns detail up or down. F12, or both thumbsticks clicked, writes a marked line plus a snapshot (mark_<time>.png; BMP on Linux). A crash also leaves a minidump there (crash_<time>.dmp, open it in Visual Studio next to build\ssx3_recomp.pdb). Details: docs/LOGGING.md.

On Linux, any controller SDL recognises works: wired over USB, or over Bluetooth. The Xbox Wireless Adapter needs the xone driver (Arch: yay -S xone-dkms xone-dongle-firmware). Started from the launcher without a terminal, the log goes to logs/ beside the game folder.

Build

Windows (no WSL). You need Visual Studio 2022 with the C++ workload, the Vulkan SDK (winget install KhronosGroup.VulkanSDK), git and Python 3.9+.

git clone https://github.com/koenhendriks/SSX3-recomp.git ssx3-recomp; cd ssx3-recomp
# put your rip in game\ : game\default.xbe and game\data\
powershell -ExecutionPolicy Bypass -File scripts\setup.ps1   # toolkit (pinned + patched) in ..\xboxrecomp, Python venv
powershell -ExecutionPolicy Bypass -File scripts\regen.ps1   # analysis, decomp\ split, src\recomp\gen\ C lift (~7 min)
tools\build.bat                                              # MSVC + Ninja, ~2 min on 32 threads
tools\play.bat

From WSL, which is how the project is developed. The build itself is the same MSVC build on the Windows side:

scripts/setup.sh                 # toolkit clone (pinned + patched) and Python venv
scripts/regen.sh                 # needs the rip in ../SSX3/
scripts/sync-windows.sh --game   # copy to C:\Code\Xbox for the MSVC build
cmd.exe /c 'C:\Code\Xbox\ssx3-recomp\tools\build.bat'

Linux (x86-64, or arm64 on Asahi). You need GCC or Clang, CMake, Ninja, SDL2, SDL2_ttf, fontconfig, the Vulkan headers, glslc, git and Python 3.9+ (Arch: sdl2 sdl2_ttf fontconfig vulkan-headers shaderc cmake ninja).

git clone https://github.com/koenhendriks/SSX3-recomp.git ssx3-recomp && cd ssx3-recomp
# put your rip in game/ : game/default.xbe and game/data/
scripts/setup.sh                 # toolkit (pinned + patched) in ../xboxrecomp, Python venv
XBE=game/default.xbe scripts/regen.sh
cmake -S . -B build-linux -G Ninja -DCMAKE_BUILD_TYPE=Release
ninja -C build-linux
build-linux/launcher

docs/LINUX.md has the details: what the port does, its status per platform and what is not ported yet.

The toolkit is pinned at v0.13.1 (193e299), with this project's fixes in patches/xboxrecomp-local.patch.

Testing

Scripted runs are silent, ignore a real controller, render at 640x480 in 4:3, and each gets its own copy of a save fixture, so your saves are never touched and the PC stays usable while they run. The fixture is work\saves\unlocked\ (not in git): copy your game\UDATA there, ideally from a save with every peak unlocked; without it runs start with no save. Run these from the repo root on Windows:

Command What it does
tools\race_test.ps1 -Runs 1 -RaceSec 20 -Snap x.png [-Rider N -Peak N -Mode N -Event N] boot to a race, ride, screenshot
tools\race_par.ps1 -Instances 8 -Runs 3 parallel boot-to-race batches (24 runs in ~3 min)
tools\cycle_test.ps1 -Cycles 12 race, pause, quit to the title, again (leak/soak)
tools\menu_test.ps1 -Steps "y,wait,down,a" menu presses with a screenshot per step (p2-a for player 2)
tools\burst.ps1 -From 15 -To 40 -Every 2 screenshot burst during a race
tools\bench.ps1 -Seconds 60 -Peak N -Event N frame-time benchmark (logs\bench_*.json)
tools\xemu.ps1 start -Snapshot race_go -Paused / cap / press reference frames from xemu

Known issues

  • No more than 60 FPS. The game's logic, physics and race clock run per 60 Hz frame; faster frames would speed the game up.
  • Peaks 2 and 3 are locked on a fresh save, as in the original game. Unlock them in game.
  • Being looked into: black ground at the start of a Conquer the Mountain race entered by riding into it (seen once at Gravitude; gone after a restart). If you see it, press F12 and try F4 / F5 / F6.
  • Untested. Audio hasn't been checked by ear in every mode.

Screenshots of the journey

first boot: a black window the intro movie plays first race (software renderer, ~5 FPS)
asynchronous GPU executor, 11 FPS Vulkan renderer, 57 FPS Metro-City at 60 FPS
title screen Equip Gear loading a hard-disk save

Legal

This is an unofficial fan project, not affiliated with or endorsed by Electronic Arts or Microsoft. SSX and SSX 3 are trademarks of Electronic Arts. The repository holds only original code, tooling and notes: no game code or data. The build is generated from a copy of the game you own, and the screenshots show this project running. The one set of assets is hd-textures/: Bl4ckH4nd's HD texture pack, included with EA's approval.

License

GPL-2.0-or-later (see LICENSE), copyright Koen Hendriks and Corné Dorrestijn. One exception: patches/xboxrecomp-local.patch changes the xboxrecomp toolkit and is offered under the toolkit's own licenses (MIT, and LGPL-2.1 for its APU files), so the fixes can go upstream. The DDS files in hd-textures/ are not covered by the GPL: they are Bl4ckH4nd's work (see Credits).

Credits

  • HD textures: Bl4ckH4nd, the SSX 3 HD texture pack made for the PS2 version (PCSX2), in hd-textures/. tools/hdtex_match.py pairs its files with the Xbox game's textures (hd-textures/ssx3_map.txt).

More

About

Static recompilation of SSX 3 (original Xbox, PAL) into a native Windows program

Resources

Stars

63 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages