GT4 for macOS

Gran Turismo 4 for macOS is a native port of Gran Turismo 4 for macOS that translates the game's code to C++ and compiles it on your Mac, with a hardware renderer on Metal and gameplay options the PS2 never had.

README

Gran Turismo 4 for macOS

Native Gran Turismo 4 on macOS (Apple Silicon) by static recompilation: the game's code is translated to C++ and compiled on your Mac, and the rest of the PS2 is reimplemented by a C++ runtime that draws with Metal.

The launcher: Ready to race, with the Play button Launcher settings, Controls: the Xbox controller's buttons mapped to PS2 buttons Launcher settings, Game: the installed disc, build and storage in use

Work in progress. What is open and what is done lives in the issues. The original plan is epic #1 and the gameplay options are epic #132, both closed.

What you get

  • A launcher that picks your ISO, prepares the game and plays it, with no command line.
  • A hardware renderer on Metal: 1080p, 1440p or 4K, with optional MetalFX.
  • Widescreen, 480p races, and races that fill a 16:10 screen.
  • Gameplay options the PS2 never had: full trigger range, steering curve, FoV zoom, a 360-degree chase camera and wind volume.
  • An in-game menu with four quick-save slots, and a memory card manager in the launcher.

You need your own game

This repository contains no game code or data. You use an ISO image of your own Gran Turismo 4 disc: the US version, SCUS-97328 v2.00. Before preparing, the launcher and prep check the image size against its volume and the SHA-256 of CORE.GT4, and refuse another region, revision or game, and a cut or modified image (#148). The generated C++ and the builds are translations of the game, they belong to its owners and stay only on your machine: never publish them.

To play

You need:

  • A Mac with Apple Silicon and macOS 14 or newer
  • Xcode Command Line Tools: xcode-select --install (the app offers to install them)
  • Gran Turismo 4.app, from the DMG

The app ships with the recompiler, the runtime, SDL2 and the rest of the engine ready to use: the preparation translates the game and compiles it with the Command Line Tools' clang, with no Homebrew or Rust.

  1. Open Gran Turismo 4.app and pick your ISO on Home.
  2. Let it Prepare the game. This translates and compiles it on your Mac and takes a few minutes.
  3. Press Play.

The app is ad hoc signed, not signed by Apple. The first time, macOS refuses to open it: in System Settings > Privacy & Security, click Open Anyway. Or, in Terminal:

xattr -dr com.apple.quarantine "/Applications/Gran Turismo 4.app"

Documentation

PageWhat is in it
Building and testingRequirements, build, tests, the app and DMG, the repository layout
LauncherThe player-facing app: Home, Prepare, Settings, Controls, Memory card
Preparing the gameprep from the command line, the kit, the exploration, quick preparation
Native hooksHow changes to the game work, and each hook (widescreen, FoV, 360 camera, wind, and more)
GS renderer and MetalFXThe Metal hardware renderer, the CPU reference and gs-replay
In-game menu and controlsThe Esc menu, controller mapping and stick curves
ToolsThe frame gate and other helpers

Contributing

Bug reports, ideas and pull requests are welcome. Read CONTRIBUTING.md first: it covers how to report a problem, how to build, what a good change looks like and the one rule that never bends, no game data in the repository. Everyone taking part follows the Code of conduct.

Credits

The recompiler and the runtime come from Samir Nuri's ps2-web-recomp (MIT). The MPEG decoder's VLC tables come from Play! (BSD 2-clause). Several fixes and much of the GT4 knowledge come from GT4Recomp (MIT, João Alano and GT4Recomp contributors), the Windows recompilation of the same game: the SPU2 release fix, the license demo guard (gt4/license.cpp), the FoV zoom's site and rule (gt4/fov.cpp), the 360-degree camera's sites and rule (gt4/camera.cpp), the sites, formulas and scene rule for races at the screen's shape (gt4/aspect.cpp), the idea of the steering response curve (#165), the idea of the launcher's disc and settings checks (#148) and addresses and findings cited in the issues.

The app includes SDL2 (zlib) and Ninja (Apache 2.0); the licenses go in Contents/Resources/kit/licenses.

The white Ford GT40 behind the launcher's Home and Settings is a render by the London studio INK, first shown by Classic Driver in 2016. It is used here with credit but without a licence from INK; if you are the author and want it removed, open an issue and it will be taken out. The Gran Turismo logo comes from Wikimedia Commons and remains a trademark of Polyphony Digital and Sony Interactive Entertainment. The launcher icons are Lucide (ISC) and the font is Outfit (OFL).

Gran Turismo and PlayStation are trademarks of Sony Interactive Entertainment. This project is not affiliated with or endorsed by Sony or Polyphony Digital.

License

MIT, see LICENSE.