Skip to content
Static Recompilation as a Technique: How Leonida Fits a Wider Method
Official GTA VI screenshot, Rockstar Games. Game art, not build output: the Leonida project does not boot. · Project guide: the GTA 6 recompilation project.
  • Boots: No
  • Release: None
  • File: None

Static Recompilation as a Technique: How Leonida Fits a Wider Method

Static recompilation turns console code into native PC code without an emulator. This guide explains, in plain terms, the technique Leonida uses.

Contents
  1. The Technique in Plain Language
  2. The Same Instruction Set
  3. The System Layer Work
  4. What the Method Shares in General
  5. What the Technique Does Not Do
  6. Measuring Progress by the Technique
  7. The Limits of Technique Talk
  8. Conclusion
  9. Frequently Asked Questions

The Technique in Plain Language

Static recompilation is a technique for turning console code into native PC code, without an emulator. The word static means the work is done ahead of time, on the code as it stands, rather than while the program is running. The word recompilation means the code is rebuilt for a new platform, rather than being translated instruction by instruction at run time. The result, when the technique is finished, is code that runs natively on the new platform, using the new platform's own system services, rather than code that runs inside a pretend version of the old platform.

static recompilation is the technique Leonida uses. Leonida rebuilds the Xbox Series version of GTA VI so the code can run natively on Windows, built on a personal computer from the builder's own copy of the game. The game does not boot today, and the technique is unfinished in Leonida's case, but the technique itself is what defines the project. Understanding the technique is therefore understanding Leonida, even before any question about whether the technique will succeed in this case.

The Same Instruction Set

The technique is possible in Leonida's case because the Xbox Series processor uses the same x86-64 instruction set as a PC processor. An instruction set is the set of basic operations a processor can carry out, and when two processors share it, code written for one can be loaded and run on the other without translating each instruction. Leonida therefore keeps the game's own x86-64 code and runs it natively, rather than translating it. The work of the project is not in the processor instructions, which already match, but in everything around them.

That distinction shapes the whole project. In a technique where the instruction sets differ, the central work would be translating instructions, either ahead of time or as the program runs. Here the central work is rebuilding the system layer: the console system calls the game expects, the console form of graphics, and the console form of data, all have to be rebuilt for Windows. A reader who grasps that the instructions match, and that the system layer does not, will understand why Leonida's progress is measured in shaders, models and system calls, rather than in processor translation.

The System Layer Work

Rebuilding the system layer means rebuilding the services the game expects from its console, so the game can talk to Windows instead. A custom loader resolves the Xbox system calls the game expects into shims that do the same work on Windows. Those shims cover the game development kit surface, memory calls and the console form of DirectX 12. The console graphics programs are translated, with precompiled RDNA2 shaders becoming SPIR-V for Vulkan, and the console DirectX 12 layer is rebuilt on top of Vulkan. The game's data is exported from the builder's own package into a form the new runtime can use, covering models, textures and audio.

Each part of that work can be checked on its own, and that is how progress is measured in general for this technique, and in particular for Leonida. Shader translation can be validated shader by shader, and Leonida reports 26,503 shaders translated and validated. Asset export can be counted, and Leonida reports 382,781 models. The loader can be run against a stand-in program before it ever meets the real game code, and Leonida's loader runs a stand-in today. The guide to how a Leonida port would work explains the same jobs in the order they would be built, and the technique described here is the reason those jobs are the jobs.

What the Method Shares in General

As a method in general, static recompilation shares a shape across every use of it, and Leonida follows that shape. The shape has four parts. First, the game's code is loaded, in its own instruction set, without run-time translation. Second, the system calls the code expects are resolved into equivalents on the new platform. Third, the graphics programs and the graphics layer are translated or rebuilt for the new platform's graphics system. Fourth, the game's data is exported from the builder's own package into a form the new runtime can use. A project that uses the technique will have all four parts, even if the details of each part differ with the console, the game and the target platform.

That shared shape is useful because it gives a reader a checklist for any claim about a recompilation project, without needing to know the details of a particular game. Ask which of the four parts is finished, which is in progress, and which has not started. Ask what figures support each answer, and whether those figures describe work done or a result achieved. A project that can answer those questions with source evidence is a project whose state can be judged. A project that cannot answer them, or that answers with a file instead of a source, is not showing the method at work. It is showing a claim about the method.

What the Technique Does Not Do

The technique does not create game files, and it does not supply a copy of the game. In Leonida's case, everything created on a PC comes from the builder's own copy, and the repository holds tools, translators, exporters and a runtime layer, with no game files, no keys and no finished executable. The technique is a way of rebuilding code the builder already owns, on the builder's own machine, and it cannot conjure the game for a reader who does not own it. A page that offers a file and calls it the result of recompilation has therefore misunderstood the technique, or is misusing its name.

The technique also does not guarantee a boot, and it does not replace the console. A finished recompilation would run the game's code natively, but an unfinished one runs nothing, and Leonida is unfinished: the translation from D3D12 to Vulkan is in progress, the loader runs a stand-in, and there is no executable. The guide to Leonida and emulation explains the difference from the other main method, emulation, where the program runs inside a pretend version of the old hardware. Static recompilation and emulation are different methods with different work, and confusing them leads a reader to expect the wrong kind of progress from the wrong kind of project.

Measuring Progress by the Technique

Progress in a recompilation project is measured by the parts of the method, not by headlines. Shader translation is measured by how many shaders have been translated and validated, and Leonida reports 26,503. Data export is measured by how much data has been exported and counted, and Leonida reports 382,781 models. The copy check is measured by which copies it works for, and Leonida's check works for the Xbox Series copy at version 1.0.2.1. The loader is measured by what it can run, and Leonida's loader runs a stand-in. Each figure answers a question about one part of the method, and none of them answers the question of whether the game boots, because booting needs all the parts together.

That is why a technique-based reading is more honest than a headline-based reading. A headline that says a project is nearly finished, or that it works, is a claim about all the parts together, and it needs evidence from all of them. A figure about one part is evidence about that part alone. The guide to shaders and Vulkan in Leonida explains the graphics part in detail, and the reading it teaches applies to every part: take the figure for what it measures, no more, and ask what the other parts still need before the whole can be judged.

The Limits of Technique Talk

Technique talk explains a method, and it does not predict an outcome. Static recompilation is a sound method in general, and Leonida follows its shape, but a sound method applied to a particular game, on a particular console, with a particular set of system calls and graphics programs, may succeed, may stall, or may remain unfinished, and the method alone does not say which. The outcome depends on the unfinished parts: the loader, the graphics translation and the data work, and on whether those parts can be completed for this game. A reader who understands the technique will therefore not treat the method as a promise. The method is the plan. The source state is the evidence. The boot, if it ever happens, is the result, and it has not happened.

The limit is also a protection. A reader who knows the four parts of the method can ask precise questions of any new claim, and can spot a claim that skips a part, invents a figure for a part, or presents a file as if it were the method's result. Technique talk gives the reader the vocabulary for those questions: loader, shims, shaders, translation, export, runtime. With that vocabulary, a reader does not need to trust a headline. The reader can open the source, find the part the headline is about, and read its state, which is the whole purpose of describing the technique in the first place.

Conclusion

Static recompilation turns console code into native PC code without an emulator, by keeping the game's own x86-64 code, rebuilding the system layer around it, translating the graphics programs and exporting the data from the builder's own copy. Leonida follows that method, and its state can be read through the method's parts: shaders translated and validated, models counted, a loader running a stand-in, a graphics translation in progress, and no executable and no boot. The technique explains the work, the figures measure the parts, and neither one predicts the outcome. A reader who knows the method can judge any claim about Leonida by asking which part it concerns, and whether the source shows that part as finished.

Frequently Asked Questions

What is static recompilation?

It is a technique that rebuilds console code ahead of time so it runs natively on a PC, without an emulator, by rebuilding the system layer around the game's own code.

Why does Leonida not need to translate processor instructions?

Because the Xbox Series processor uses the same x86-64 instruction set as a PC processor, so the game's own code can be kept and run natively, while the system layer is rebuilt.

Does the technique guarantee that Leonida will boot?

No. The technique is a method, not a promise. Leonida's loader runs a stand-in, the graphics translation is in progress, and there is no executable, so the game does not boot.