GT4Recomp for Mac

GT4Recomp for Mac is a native macOS port of Gran Turismo 4 that runs on Apple Silicon Macs using the Metal renderer.

README

GT4Recomp for Mac

Gran Turismo 4 and GT4 Spec II, recompiled to run natively on Apple Silicon Macs.
An unofficial macOS arm64 port of GT4Recomp.

Apple Silicon Metal MIT Status

GT4Recomp is a static recompilation of Gran Turismo 4 (NTSC-U, SCUS-97328): the game's own code is translated ahead of time into C++ and compiled to native machine code, and the PS2 hardware it talks to is reproduced in software. Nothing generates code while the game runs.

This fork brings it to arm64 macOS. The game code is compiled for Apple Silicon, and the picture comes from the PCSX2 GS renderer running on Metal in its own process.

Status

PartState
Host runtime and its testsDone (47 tests pass)
Game library built for arm64 from your own discDone: the generated code is byte-identical to the Windows build's
Boot, menus, races, saves to a memory card, controller and keyboardWorking
PCSX2 GS renderer (Metal), shown inside the game windowWorking; races run well on an Apple M4
Launcher and a double-clickable GT4Recomp.appWorking: sets the game up from your disc image and plays it
Upstream 1.3.0 game (rc14 recipe): 360-degree camera, FoV zoom, full trigger range, frame skip, racing wheelsWorking on macOS
Keyboard rebinding, PCSX2 save import, clean quit from the launcherWorking
Gran Turismo 4 Spec II 1.10 as a second game (upstream's Spec II build, same recipe)Built and checked against upstream's pins; boots and runs on an Apple M4, not played through yet

Tested only on an Apple M4. Other Apple Silicon Macs should work but have not been tried.

Known issues

  • The app is not notarized by Apple (see Install for how to open it).
  • CoreGS 2.0 (upstream's own renderer) is not in the Mac build yet; the Mac app uses the PCSX2 GS renderer on Metal.
  • RetroAchievements sign-in does not work on macOS yet (upstream now protects the token with a Windows-only store).
  • Save states are not available (the PCSX2 GS process refuses them, as on Windows).
  • Heavy night scenes at high resolutions can slow down on base Apple chips; lower the Render scale if they do.
  • Tested on an Apple M4 only.

Requirements

  • An Apple Silicon Mac with macOS 14.4 or later.
  • Xcode command line tools, CMake 3.24+, Ninja, Python 3 and Rust (for the shader compiler).
  • Homebrew packages: sdl3, molten-vk, vulkan-loader, vulkan-headers, plus the renderer's libraries (see the renderer build notes).
  • Your own disc image of Gran Turismo 4 USA v2.00 (SCUS-97328) as a plain .iso. This repository contains no game files.
  • Optional, for Spec II: a Gran Turismo 4 Spec II 1.10 image. Spec II is a community mod of the GT4 Online Public Beta disc (SCUS-97436), not of v2.00: you make it by applying the mod's .xdelta patch to your own dump of that beta disc (for example xdelta3 -d -s "<beta>.iso" "<Spec II 1.10>.xdelta" "<Spec II>.iso"). It cannot be made from a v2.00 image.

Install

  1. Download GT4Recomp-<version>-macos-arm64.zip from Releases, unzip it and move GT4Recomp.app to Applications. Or with Homebrew:

    brew tap vgs499p/gt4-recomp-mac https://github.com/vgs499p/gt4-recomp-mac
    brew install --cask gt4recomp
    
  2. The app is signed but not notarized, so the first time macOS refuses to open it. Open System Settings > Privacy & Security and click Open Anyway next to GT4Recomp (the Homebrew install skips this step).

  3. Choose your Gran Turismo 4 (USA) v2.00 disc image once, then press Play. The launcher uses the image where you keep it (keep it there). Your settings and saves go in ~/Library/Application Support/GT4Recomp.

For Spec II, pick Gran Turismo 4 Spec II in the launcher and choose your Spec II 1.10 image the same way.

Releases never include the disc image: you always bring your own copy.

Build and play

The full recipe, with every command and the checks each step makes, is in docs/MACOS-PORT.md. In short:

  1. Host runtime: configure and build with CMake, then run ctest.
  2. Game library: scripts/ee_producer.py prepare checks your ISO and rebuilds the game executable byte for byte; ports/macos/ee_generate.py translates it into C++, which is then compiled for arm64.
  3. Release runtime: scripts/prepare_perf_runtime.py and ports/macos/vu_generate.py produce the precompiled VU1 and VU0 programs and the multithreaded VU1 runtime. All of them are checked against the release pins.
  4. Renderer: build gt4-gs from vgs499p/gt4recomp-gs, branch gt4gs/macos, and package it with gt4gs/package-macos.sh into build/macos/ports/macos/gs.
  5. App: build the launcher and put everything into one app:
cargo build --release --manifest-path launcher/Cargo.toml -p gt4l-tauri
python3 -I ports/macos/package_app.py --out build/macos/GT4Recomp.app
  1. Play: open build/macos/GT4Recomp.app (move it to Applications if you like), choose your disc image once, then press Play. The launcher uses the image where you keep it; your settings and saves go in ~/Library/Application Support/GT4Recomp.

The app you build is signed only for your Mac (ad hoc), so other Macs will refuse to open it.

You can also start the game without the launcher:

GT4_RENDERER=pcsx2 build/macos/ports/macos/gt4vulkan private/macos-ee-producer/SCUS_973.28.elf \
    --disc "<path>/Gran Turismo 4 (USA) (v2.00).iso" --memcard private/<your card>.ps2 --window
Controls

Controllers (Xbox, DualShock 4, DualSense, Switch Pro and others) work through SDL3 with the DualShock 2 layout. Turn the controller on before you start the game.

KeyAction (PS2 button)
W · EnterAccelerate, confirm (Cross)
SBrake (Square)
SpaceHandbrake (Circle)
A · D · arrow keysSteer, navigate (D-pad)
Backspace · EscBack (Triangle)
ShiftNitro (R1)
R · FGear up · gear down (R2 · L2)
QLook back (L1)
C · TabCamera (Select)
PStart / Pause
Option+Return, F11Fullscreen
Cmd+QQuit

Keys can be rebound in the launcher (Settings > Controls, Keyboard view: pick a button, Rebind, press a key).

How the Mac port works

  • Same generated code as Windows. The donor translator is built with Apple clang. Its 328 output files match the Windows generation byte for byte, and the 326 units compile for arm64 without source changes.
  • Windows code paths stay unchanged. Mac-specific code is either a new file or an #ifdef branch next to the original: POSIX shared memory and wait-on-address for the renderer link, SDL3 for the window, audio and input, and CommonCrypto for hashes.
  • Picture sharing between processes. macOS has no cross-process child windows, so gt4-gs makes its Metal layer the root of a remote Core Animation context. The game shows that context in its window with a CALayerHost, so the picture is never copied.
  • No GPL code in the game executable. The PCSX2 GS lives only in the separate gt4-gs process.

Credits

  • GT4Recomp by moesuito and contributors: the project this port is built on. Everything that makes the game run is theirs. Its GitHub contributors include Wise (gustavocanepa), Julio Vitor Rufino (JulioHeroZ) and Luan Antony (luanantony).
  • gt4-staticrecomp, the original project by Kaezzey (Niket Shah), where GT4Recomp started.
  • ps2-web-recomp (MIT) by snuri00: the runtime foundation.
  • gt4-decomp (MIT) by gustavocanepa, Nenkai's GT research and GT4FS by Razer2015: the research behind the port.
  • Gran Turismo 4 Spec II by TheAdmiester and contributors: the Spec II mod (the second game). This project ships none of its files.
  • PCSX2 (GPL-3.0): the GS renderer in gt4-gs.
  • macOS port by vgs499p, with Claude.

Exact revisions and licenses: THIRD_PARTY.md.

License and legal

  • GT4Recomp's own code is MIT. The game executable does not contain or link GPL code; the PCSX2 GS (GPL-3.0-or-later) runs only in the separate gt4-gs process, whose source is vgs499p/gt4recomp-gs.
  • You bring your own disc. The project does not include Gran Turismo 4, Spec II files, disc images, BIOS files, keys or saves.
  • "Gran Turismo" and "PlayStation" are trademarks of Sony Interactive Entertainment. Gran Turismo 4, its logos and artwork belong to Sony Interactive Entertainment and Polyphony Digital. This is an unofficial fan project, not affiliated with or endorsed by either, or by the upstream GT4Recomp project.