gt4-staticrecomp README

README проекта с github.com/moesuito/gt4-staticrecomp. Одним файлом markdown: 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)

Ищем в базе…

Что это такое?GT4Recomp — это статическая рекомпиляция Gran Turismo 4 (NTSC-U, SCUS-97328), которая позволяет гоночной игре для PS2 работать на Windows напрямую через Vulkan, без JIT и без окна эмулятора.
Это эмулятор или что-то другое?Это не универсальный эмулятор: код игры для PS2 (процессор EE, микропрограммы VU1 и VU0) заранее переводится в C++ и компилируется в машинный код, аппаратная часть PS2 воспроизводится программно, а вывод изображения выполняется через Vulkan.
Как это запустить?Скачайте GT4Recomp-Setup-1.2.3.exe со страницы Releases, запустите установщик, затем откройте Gran Turismo 4 из меню «Пуск» и укажите лаунчеру образ вашего диска.
Что нужно, кроме установщика?Нужны Windows 10/11 64-бит, процессор с поддержкой SSE4.1, видеокарта с драйверами Vulkan 1.2 и ваш законно приобретённый образ диска Gran Turismo 4 USA v2.00 (SCUS-97328) в виде обычного .iso.
Какие подводные камни есть до установки?Руль пока не поддерживается, а долгие игровые сессии проверены не полностью; некоторые фоны экзаменов на лицензию не отображаются (это соответствует поведению PCSX2 по умолчанию); установщик не имеет цифровой подписи, поэтому Windows SmartScreen может выдать предупреждение при первом запуске.
Будет ли это работать на Linux или мобильных устройствах?Пока только для Windows; сборки под Linux (нативно) и Android запланированы после выхода CoreGS 2.0 — собственного рендерера проекта.
Лицензирование простое?Собственный код GT4Recomp распространяется по лицензии MIT, но встроенный рендерер GSdx лицензирован под GPL-3.0-or-later и работает в отдельном процессе (gt4-gs.exe) со своим исходным кодом, который публикуется для каждого релиза, поэтому основное приложение остаётся свободным от этих ограничений.
Нужна ли определённая видеокарта?Нужна видеокарта с поддержкой Vulkan 1.2 от NVIDIA, AMD или Intel; большая часть тестов пока проводилась на AMD, поэтому NVIDIA и Intel проверены меньше.
Как достигается фиксированные 60 FPS?За счёт предварительной компиляции микрокода VU1 и VU0 вместо его интерпретации, асинхронной отправки работы GPU и синхронизации каждого кадра по одним высокоточным часам.
Можно ли использовать HD-текстуры из PCSX2?Да, пользовательские наборы текстур можно просто положить в папку data/Textures установки, а существующие текстурные моды сообщества PCSX2 работают без переименования папок.
Поддерживаются ли мониторы с ультраширокой матрицей?С версии 1.1.0 поддерживаются нативное ультраширокое разрешение и любые соотношения сторон: 3D-вид расширяется по схеме Hor+/Vert+, интерфейс (HUD) остаётся по центру в формате 16:9, а меню выводятся с вертикальными полосами по бокам.
Откуда взялись исходный код игры и форматы?Проект опирается на рантайм ps2-web-recomp, проект gt4-decomp для определения функций и классов, а также на исследования Nenkai по форматам файлов GT и шифрованию микрокода VU1.
Автор
moesuito
Размер
40 MB
Звёзды
596
Возраст
1 мес
Коммиты · 90 дней