gt4-staticrecomp README

The project's README from github.com/moesuito/gt4-staticrecomp. As one markdown file: README.md.

GT4Recomp

Gran Turismo 4, recompiled to run natively on PC.
No JIT, no emulator window, full speed.

60 FPS Windows MIT Release Beta Ko-fi Discord

Code GS


Gran Turismo 4 night race at high resolution, 60 FPS

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

[!IMPORTANT] You need your own original copy of the game. GT4Recomp does not include or distribute Gran Turismo 4. We only distribute the launcher and the natively recompiled system that runs the game. To play, make a disc image of your own Gran Turismo 4 (USA, v2.00, SCUS-97328) disc as a plain .iso, and for the mod, your own Spec II 1.10 image.

Highlights

Where we are

Channel Version Renderer
Stable 1.2.5 GSdx The latest final release
Beta 1.3.0-rc14 CoreGS 2.0 (default) · GSdx Release candidate: Spec II, CoreGS 2.0, new launcher

Choose the channel in the launcher (Settings > General > Channel). Every piece of work is a numbered task in TASKS.md, tested in game before it is released.

Known issues

Roadmap

Phase Release Platform Renderer Status
1 1.0.0 - 1.2.5 Windows PC GSdx (PCSX2 GS, separate process) Done
2 1.3.0 - 2.0.0 Windows PC CoreGS 2.0 (our own) as the default · GSdx as the fallback In progress (1.3.0 beta)
3 after 2.0.0 Linux (native) CoreGS 2.0 Planned
4 after 2.0.0 Android CoreGS 2.0 (Vulkan) Planned

How it works

The EE game code is translated ahead of time into C++ and compiled for x86-64. The VU1 microcode, stored encrypted inside the executable, is recovered and compiled offline and verified against a reference interpreter; the VU0 microprograms are compiled the same way. IOP system services are native, and frames are paced by one high-resolution clock. This is a hybrid recompilation: PS2 hardware is still modelled in software, so we do not claim zero emulation or full PS2 fidelity. Details: Architecture.

Requirements

The launcher checks the processor and the graphics card before setup and before Play, and says what is missing.

Install

  1. Download the installer (GT4Recomp-Setup-<version>.exe) or the portable zip from Releases: the latest release for Stable, or the newest pre-release for Beta.
  2. Start GT4Recomp and choose your disc image. The launcher checks it, prepares the game and its shaders.
  3. Press Play.

Updates install from the launcher. Your settings, saves and replays are kept per Windows user in %APPDATA%\GT4Recomp (the portable build keeps them in its own folder). Building from source needs your own game files and a development environment: see the Build guide.

Controls

Controllers work out of the box with the DualShock 2 layout (analog triggers with pressure for throttle and brake) and can be remapped in the launcher (Settings > Controls). The keyboard has a fixed layout:

Key Action (PS2 button)
W · Enter Accelerate, confirm (Cross)
S Brake (Square)
Space Handbrake (Circle)
A · D · arrow keys Steer, navigate (D-pad)
Backspace · Esc Back (Triangle)
Shift Nitro (R1)
R · F Gear up · gear down (R2 · L2)
Q Look back (L1)
C · Tab Camera (Select)
P Start / Pause
Alt+Enter, F11 Borderless fullscreen

Support and contributing

Credits

Contributors on GitHub: Wise (gustavocanepa), the author of gt4-decomp, for the game's function names and a check on GS settings; Julio Vitor Rufino (JulioHeroZ), for racing wheel support, RetroAchievements and the renderer choice kept on updates; Luan Antony (luanantony), for the racing wheel integration, DualSense trigger curves and many fixes and studies. Thank you!

Project Author What it gives this project
gt4-staticrecomp, the original project Kaezzey (Niket Shah) Where GT4Recomp started: this repository is a fork of his project.
ps2-web-recomp (MIT) snuri00 The runtime foundation: EE-to-C++ translator, PS2 hardware models and the original VU1 compiler.
gt4-decomp (MIT) gustavocanepa GT4's decompilation: function names, class layouts and engine notes (identity).
Nenkai's GT research Nenkai File formats and the VU1 microcode encryption scheme (details).
GT4FS Razer2015 GT4 volume file-system research.
Gran Turismo 4 Spec II TheAdmiester and contributors The Spec II mod (the second game). GT4Recomp ships none of its files.
PCSX2 (GPL-3.0) PCSX2 team Decades of PS2 knowledge; its GS runs only in the separate gt4-gs.exe.
naga · Vulkan-Headers gfx-rs · Khronos Shader compilation at build time · Vulkan API headers.

Gran Turismo 4 Spec II by TheAdmiester and contributors, with credits to Nenkai, ddm, ermaccer, zinklesmesh, pez2k, xfileFIN, Silentwarrior112, Xenn and Submaniac, Silent, Alconautica, hydnhntr, JeyM and pioneerspine; special thanks to DustinEden and the testers and translators listed on the mod's credits page.

Exact revisions and licenses: THIRD_PARTY.md.

Documentation

TASKS · CONTRIBUTING · STATUS · BUILD · ARCHITECTURE · Renderers · Decisions · Journal

Star history

Star history chart of moesuito/gt4-staticrecomp

gt4-staticrecomp (moesuito/gt4-staticrecomp)

game-preservation
Searching Database…

What is this?GT4Recomp is a static recompilation of Gran Turismo 4 (NTSC-U, SCUS-97328) that lets the PS2 racing game run natively on Windows via Vulkan, with no JIT and no emulator window.
Is this an emulator or something else?It is not a general emulator: the PS2 game code (EE CPU, VU1 and VU0 microprograms) is translated ahead of time into C++ and compiled into native machine code, with PS2 hardware reproduced in software and rendering done through Vulkan.
How do I get it running?Download GT4Recomp-Setup-1.2.3.exe from Releases, run the installer, then start Gran Turismo 4 from the Start menu and point the launcher at your own disc image.
What do I need besides the installer?You need Windows 10/11 64-bit, an SSE4.1-capable CPU, a GPU with Vulkan 1.2 drivers, and your own legally owned Gran Turismo 4 USA v2.00 (SCUS-97328) disc image as a plain .iso.
Any gotchas before I install it?Racing wheels aren't supported yet and long play sessions aren't fully qualified; some license-test backgrounds don't render (matching PCSX2's default behavior); and the installer isn't code-signed, so Windows SmartScreen may warn on first run.
Will this ever run on Linux or mobile?Right now it's Windows-only; Linux (native) and Android builds are planned for after CoreGS 2.0, the project's own renderer, ships.
Is the licensing straightforward?GT4Recomp's own code is MIT, but the bundled GSdx renderer is GPL-3.0-or-later and is kept in a separate process (gt4-gs.exe) with its own source published per release, so the main app stays unencumbered.
Does it need a specific graphics card?It needs a Vulkan 1.2-capable GPU from NVIDIA, AMD or Intel; most testing so far has been on AMD, so NVIDIA/Intel have had less coverage.
How does it hit a locked 60 FPS?By precompiling the VU1 and VU0 microcode ahead of time instead of interpreting it, submitting GPU work asynchronously, and pacing every frame from a single high-resolution clock.
Can I use PCSX2 HD texture packs?Yes, custom texture packs can be dropped straight into the install's data/Textures folder, and existing PCSX2 community texture mods work without renaming folders.
Does it support ultrawide monitors?Since 1.1.0 it supports native ultrawide and arbitrary aspect ratios: the 3D view widens Hor+/Vert+ while the HUD stays centered 16:9 and menus are pillarboxed.
Where did the original game code and formats come from?It builds on the ps2-web-recomp runtime, the gt4-decomp project for function/class identities, and Nenkai's GT research into file formats and VU1 microcode encryption.
Creator
moesuito
Size
40 MB
Stars
608
Age
2mo
Commits · 90 Days