Skip to content
ProjectLeonidaLPublic

Latest commit

 

History

379 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegram — Leonida Legacy


Leonida Legacy
Leonida Legacy

Grand Theft Auto VI (Xbox Series) running natively on Windows, from your own copy.

Continued by orkan1k.

ItsNotRexed just wanted to play on the PC.

Status | Getting started | Updating | Fork notes | Contact | Credits | License

Leonida Legacy is a compatibility layer. The game's x86-64 code runs unchanged inside our process, and Leonida Legacy supplies the console platform underneath it: the loader, the runtime services, a Direct3D 12 back end and a shader recompiler that turns the console's GPU code into DXIL on first use. See docs/architecture.md.

It is a fork of victory-gta6, itself a fork of VIctory.

Important

This repository does not contain the game, keys or an executable. You need your own copy of the game. Everything the tools make from your files (translated shaders, caches, saves, logs) stays outside the repository and on your PC. Never share those files.

Made for everyone's PC, not just ours. Many projects like this are tuned on the developer's own machine and nowhere else. Leonida Legacy aims to run as well as it can on your hardware, and to be usable by people who can't code and don't have an AI assistant to help them. The run scripts pick their settings for your graphics card (gpu-profiles.json), so a change that helps one card is not forced on everyone. If it runs badly on your PC, tell us your CPU, GPU, driver version and frame rate (see Contact); that is how new cards get a profile.

Status

Not playable yet: 2 to 4 frames per second by default, and shadowed areas are black. Tested on Windows 11 Pro, AMD Ryzen 7 7800X3D, NVIDIA RTX 3080 12 GB, 32 GB RAM, Series X profile. The world frame rates below were measured by victory-gta6 on an RTX 4070 and have not been measured again on this machine yet.

Stage State
Boot, menus, start screen works, 30 fps
Opening cutscene plays from start to finish, lit
Saves the game autosaves a checkpoint and loads it again
First gameplay scene renders characters, textures, sky and the sunlit exterior; HUD, pause menu and pad input work
Light in shadow missing: ray-traced bounce light and shadows don't run yet, so anything out of direct sun is black
Frame rate in the world 2-4 fps by default; about 10 fps in the first rooms with the newer switches, all off by default

Known problems:

  • The first gameplay room is sometimes not drawn after the cutscene hands over to gameplay.
  • Around 24 GB of memory is in use during play.
  • Many changes are specific to this game and this GPU; some are marked shortcut: in the code.

The full measurement log, what each switch does and the debugging options are in docs/fork-notes.md.

Getting started

Requirements: Windows 10/11 x64, a CPU with AVX2, a Direct3D 12 GPU with shader model 6.6 and mesh shaders, Rust (pinned in rust-toolchain.toml), and several GiB of free Windows commit at startup (if crashes.log reports Windows error 1455, close other applications or make the paging file bigger).

cargo xtask install-hooks                # asset-policy check on every commit
cargo test --workspace                   # needs no game data

cargo build --release -p leonida
target\release\leonida.exe run --execute # asks for your game folder the first time

The first run asks for the folder of your copy of the game (the one with MicrosoftGame.config in it) and saves it to leonida.toml, which git ignores. leonida config shows what is set, and leonida.example.toml lists the other settings.

run-gta6.ps1 does the build and the run in one step, with the frame-rate switches measured for your graphics card (gpu-profiles.json; they are off by default in the program). It asks for the game folder too, and whether to remember it:

powershell -ExecutionPolicy Bypass -File .\run-gta6.ps1

measure-gta6.ps1 does the same with the diagnostics build, the frame log and the card meter on, and saves everything the game prints to %LOCALAPPDATA%\leonida\logs. -SpeedSwitches off runs it without the frame-rate switches, for a comparison in the same place.

Testing for the project, with no programming experience

  1. Download this repository (Code, Download ZIP) and unpack it, or clone it.
  2. Double-click start-measure.cmd. If the Visual Studio C++ build tools or Rust are missing, it offers to install them with winget (about 3 GB, 5 to 15 minutes, asks first). The first build takes about 5 to 10 minutes.
  3. Say yes when it offers to look for your copy of the game, and check the folder it found. If it finds nothing, drag the game's .exe from File Explorer into the window and press Enter. Answer its other questions, and play until the place you want to test.
  4. Close the game window. The script offers a short test report: your graphics card, driver, CPU, RAM, Windows version, the switches that were on and the frame rates. It shows all of it before anything is shared, and never includes log files, game files, paths or your user name.
  5. If you agree, it copies the report and opens #test-results on our Discord. Paste it with Ctrl+V and send it. Nothing is uploaded unless you post it yourself.

Run it once with the speed switches on and once with them off, in the same place: the pair is what lets us add a profile for your card to gpu-profiles.json. Reports are kept in %LOCALAPPDATA%\leonida\reports.

shot-run.ps1 runs the game unattended and takes frame shots (-ShotAt, with -Keys to get through the menus) into %LOCALAPPDATA%\leonida\shots. Shots come from your game: keep them on your PC.

If the GPU driver crashes while building one shader's pipeline, LEONIDA_SKIP_PIPELINES=<16-digit shader hash> keeps that pipeline from ever reaching the driver (its draws are dropped).

Saves, settings and crashes.log are kept in %LOCALAPPDATA%\leonida\data, derived data in %LOCALAPPDATA%\leonida\cache.

Input: XInput pads. With none connected, the keyboard acts as a pad while the game's window has focus:

Keys Pad
W A S D / I J K L left / right stick
arrows D-pad
Enter, Backspace, X, Y A, B, X, Y
Q / E, Z / C shoulders, triggers
F / H stick clicks
Esc, Tab Menu, View

Updating

Get the newest version before you report a problem: it may already be fixed. In PowerShell, in the folder you cloned:

git switch main
git pull
powershell -ExecutionPolicy Bypass -File .\run-gta6.ps1

run-gta6.ps1 builds the new version before it starts the game. Your game folder, saves and settings are outside the code (leonida.toml and %LOCALAPPDATA%\leonida), so updating keeps them.

  • First time only: if you cloned before the project moved to ProjectLeonidaL, point your copy at it once: git remote set-url origin https://github.com/ProjectLeonidaL/leonida.git. If git pull then says your branch has no upstream, run git branch -u origin/main once.
  • git pull refuses because files changed: you edited something in the folder. git stash puts your changes aside, then git pull again; git stash pop brings them back. Your own GPU settings belong in gpu-profiles.local.json, which git leaves alone.
  • The first run after an update stutters while shaders are translated again. Let the warm-up run when the script asks, or play a minute and start again.
  • Don't have git? Download the code as a ZIP from the green Code button on GitHub, unpack it over a fresh folder, and copy your leonida.toml across.

Contact

Credits

  • victory-gta6 by fxceless is the fork this repository continues under the name Leonida Legacy, with its history kept.
  • VIctory by Marvisak and its contributors is the base of everything here: the loader, the runtime services, the Direct3D 12 back end and the shader recompiler.
  • XCL by ivall and its contributors (GPL-2.0-only) was used as a reference for how the same game behaves under another layer. Fixes inspired by it were written anew in VIctory's code.
  • The guard over every view of a memory page is code by myokex (victory-amd, commit c6dc4d8), which adapts pull request #115 by Spexivus, its correction by joroyt and a part of VIctory #1122 by tightfall. The read-beside fix for kernel reads into title memory is by Joshua Odom (commit 10ea38e of the same fork family).
  • Logo: "Grand Theft Auto VI" icon by SlyDevil on SteamGridDB.
  • The victory-gta6 changes were developed with Claude Code.

Grand Theft Auto and all related names are trademarks of their owners. This project is not affiliated with or endorsed by them.

License

GPL-3.0-or-later, like victory-gta6 and VIctory. See LICENSE.

Contributors

Languages