# ssx3-recomp [![Listed on PlayPorted](https://playported.com/badge.svg)](https://playported.com/ports/434-ssx-3/) Static recompilation of **SSX 3** (original Xbox, PAL) into a native program for **Windows and Linux**, built with [xboxrecomp](https://github.com/sp00nznet/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](docs/screenshots/46-snow-jam-32x9.png) 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](#build)). | | **Linux on Apple Silicon Macs** (arm64, [Asahi Linux](https://asahilinux.org)) | 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](https://github.com/koenhendriks/SSX3-recomp/releases/latest) 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](https://xemu.app) 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](docs/screenshots/47-metro-city-16x9.jpg) | | **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](docs/screenshots/48-gravitude-16x9.jpg) | | **HD textures.** Bl4ckH4nd's HD texture pack for the PS2 version ([gbatemp](https://gbatemp.net/threads/my-ps2-packs.621422/)) is included: the renderer swaps each matched texture for its HD version, mipmaps included. Left: the original; right: HD. | ![HD textures](docs/screenshots/45-hd-textures.png) | | **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](docs/screenshots/49-the-junction-16x9.jpg) | | **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](docs/screenshots/50-conquer-the-mountain-16x9.jpg) | | **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](docs/screenshots/39-lighting-vs-xemu.png) | | **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](docs/screenshots/52-intimidator-trails-16x9.jpg) | | **2-player split-screen** (Multi Play) works when two controllers are plugged in at start. | ![split](docs/screenshots/43-split-screen.png) | | | | | |---|---|---| | ![briefing](docs/screenshots/35-widescreen-briefing.png) | ![menu](docs/screenshots/37-menu-pillarboxed.png) | ![character select](docs/screenshots/38-character-select-1080p.png) | | 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](#play) and in [docs/LOGGING.md](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_