Translated ahead of time
The game's code becomes C++ before the game ever runs: one C++ function for each function of the game, compiled by an ordinary compiler. The rule for a finished game is that no recompiler for PS2 code ships inside it.
Static recompilation · on the core of PCSX2
PS2Native translates a game's code to C++ ahead of time and compiles it for the machine it will run on. The console around that code is the core of PCSX2.
In development. There is nothing here for players yet.
01 · The idea
The aim is a standalone game: no emulator to install, nothing to set up. A PlayStation 2 game talks to the console's hardware directly, though, and rebuilding that hardware is where the first PS2Native stalled. So this one translates the game's code and leaves the hardware to the emulator that has already solved it.
The game's code becomes C++ before the game ever runs: one C++ function for each function of the game, compiled by an ordinary compiler. The rule for a finished game is that no recompiler for PS2 code ships inside it.
Graphics, sound, storage and timing are PCSX2's, pinned to one version and unmodified. The translated code takes the place of PCSX2's recompilers for the console's two processors and its two vector units.
You provide your own game and your own BIOS dump. Neither is included here, and nothing generated from them is.
Stop reinventing what PCSX2 has already solved, while preserving the goal of genuine native recompilation.
From the project's brief
02 · How it works
Once, on your own machine, the game's executable goes through the recompiler and a C++ compiler. From then on the compiled code runs as the console's main processor, inside PCSX2's core.
When the game is built
From your own copy of the game. It is read where it is, and nothing is copied.
1,003,452 instructions
in the first game's
Finds the functions and every place a block of code can begin, and writes one C++ function for each function of the game.
22,668 functions,
written in 1.8 s
Compiles the generated code like any other program, for the processor it will run on.
152.4 MB of C++,
built in 119 s
The game's own code as machine code, carrying fingerprints of the code it was made from and not the code.
checked against memory
before it runs
When the game runs
PCSX2 v2.9.170, a pinned and unmodified submodule. PS2Native owns no model of the hardware.
Some code does not exist until the game runs, and some is reached in ways no analysis can see. It is interpreted once, reported and captured, and the next build compiles it. Nothing is interpreted silently.
463down to0
places in Killzone's executable where a first build had to interpret, and where it had to after one rebuild. First 4,200 frames, 2026-11-11
03 · What comes out
Seven instructions of one of the project's own test programs, and the C++ that the recompiler writes for them. Nothing here comes from a game.
The loop of bench_sum in tests/programs/bench.s, as ps2n-recomp disasm prints it: address, instruction word, cost in eighths of a cycle, instruction.
Beside it, what ps2n-recomp generates for the loop. The comment it writes after each line, naming the instruction the line came from, is left out here.
A block of code can begin at any label: after a call returns, or when an interrupt hands control back. L_ is where one begins, and there the runtime checks that the code in memory is still the code that was compiled. M_ is where a block that began earlier runs on through.
The branch is decided first. The instruction after it runs either way, and only then does the branch take effect.
Nine for most instructions, eleven for the branch: 65 for this block. They are added where PCSX2's recompiler would add them, and that is where the rest of the machine is given its turn.
04 · The same run
Again and again, PCSX2 lets the console's second processor catch up with the main one. At each of those moments a run can be written down: where the main processor is, its cycle count, hashes of its registers. Two runs with the same record took the same path through the program at the same times.
38,478,822
such moments in the first 4,200 frames of Killzone. The compiled run and the run under stock PCSX2 are the same at every one. Their records, 3 GB each, are the same file byte for byte.
Measured on 2026-11-11, on Windows
Those 4,200 frames are the copyright screen, the developer's logo, a memory card prompt and the intro film. A longer run goes through the menus into the first level and plays there for three and a half minutes: the two are at the same place at the same cycle count at every one of its 93,221,937 moments, the second processor's place and registers compared too since 2026-11-14, and they show the same picture at each of the 1,750 frames compared, one in every ten. Where PS2Native follows the console on purpose, because a recording shows PCSX2's recompiler wrong, a run does differ from the stock run, and each such place is listed with its cause.
05 · Measured
Every number on this page came from a run on the date beside it. That goes for the ones that are not flattering as well.
Compiled ahead of time
1,003,452
instructions of Killzone's boot executable, in 22,668 functions.
2026-11-11
Of them, still interpreted
0
in the first 4,200 frames. A first build had to interpret 5,079; one rebuild compiled them.
2026-11-11
Interpreted in all
51
instructions in those frames, at boot, since the BIOS is compiled too. Before, the BIOS's code was 1.11% of the main processor's cycles there.
2026-11-12
Tests that pass
453
and 2 unit test programs of 42 cases, in 153 s. A test that differs from a console recording is listed only once its cause is known.
2026-11-11
Programs that match the console
40of 55
Stock PCSX2: 39 with its recompilers, 38 with its interpreters. On no line of them is stock PCSX2 right and PS2Native wrong.
2026-11-11
Instructions checked one by one
204
against both of PCSX2's implementations: 4,077,475 cases against its recompiler and 36,976,118 against its interpreter, with no difference outside the documented ones.
2026-11-11
The first 4,200 frames of Killzone, in seconds. Shorter is faster.
| Run | Seconds |
|---|---|
| With PCSX2's software renderer | |
| Stock | |
| PS2Native | |
| With nothing drawn | |
| Stock | |
| PS2Native | |
These frames are logos, a prompt and a film, measured again on 2026-11-13: 1.03 and 1.09 times stock PCSX2's time, where on 2026-11-11 they took 1.12 and 1.35. The run into the first level took 1.35 times stock PCSX2's time then, and takes 0.97 times now, its three and a half minutes of play 0.95 times: seven changes to how the code is generated, the VU0 instructions and the BIOS's code compiled, profile-guided optimization, loops that have reached a fixed point skipped, the COP2 instructions and calls through a register made by compiled code itself, the FPU's arithmetic done in SSE registers, and the vector units' programs and the second processor's code compiled ahead of time, each measured. 2026-11-14
Time of the compiled code relative to PCSX2's recompiler. Below 1.00 is faster.
| Workload | Time relative to PCSX2's recompiler |
|---|---|
| sum | |
| call | |
| fpu | |
| mem | |
| jump | |
| mmi |
Measured again, as in the proof of concept: without profile-guided optimization, whose training is the game's. The jump through a table and the calls, 1.47 and 1.15 then, are now about as fast as PCSX2's recompiler. The 128-bit arithmetic, at 1.43 when measured again, is at 1.24 since its loads and stores are made on the locals; its parallel instructions still work on the registers in memory, where PCSX2's recompiler keeps them in host registers. A loop moves by a few percent from one build to the next with nothing in it changed. 2026-11-13
06 · What is static
The rule is that no recompiler for PS2 code ships in a finished game. Today that holds for everything Killzone runs as far as its first level: the game's own code, the BIOS's, the programs on the vector units and the second processor's modules. Code no build has seen is interpreted, and listed.
EE
StaticTranslated ahead of time. In the first 4,200 frames of Killzone not one instruction of the executable is interpreted.
EE
StaticSystem calls, interrupts and threads are the BIOS's own code, translated ahead of time on your machine from your own dump. Of it, 51 instructions at boot are interpreted. In a finished game it will be a file of its own beside the game.
VU0, VU1
StaticTranslated ahead of time, each block by what it does, wherever the game writes it. In the run into Killzone's first level not one block of them is interpreted, and none runs on PCSX2's recompiler.
IOP
StaticTranslated ahead of time, block by block, each found by its instructions wherever the IOP's kernel loads it. In the run into Killzone's first level not one block of them is interpreted, and none runs on PCSX2's recompiler.
Graphics, sound, DMA, timers, the disc, pads and memory cards are not rebuilt. That is the part the project does not reinvent.
Until PS2Native had translators of its own for them, PCSX2's recompilers for the vector units and the second processor stood in, labeled as that; its recompiler for the main processor never did. None is in use now. Packaging does not exist yet: when it does, it is to refuse a release that uses one.
07 · Decisions
Every decision is written down, with the maintainer's own words and how they were read. These are the ones that shape the rest.
The game's code is translated ahead of time and acts as the console's processors. PCSX2's core is the machine. A BIOS is required.
Read the record ADR 0003No recompiler for PS2 code ships in a finished game. Code not seen at build time is interpreted once, reported, captured and rebuilt.
Read the record ADR 0005On no line of a console-recorded test may stock PCSX2 be right and PS2Native wrong. Every remaining difference is listed with its cause.
Read the record ADR 0007From your own dump, as a file of its own beside the game. It is never in the repository and never in anything PS2Native distributes.
Read the record ADR 0011A run on PS2Native is the stock run, moment for moment. A difference is a defect to find, not a property to argue about.
Read the record The briefNo invented test or benchmark results, and no failing test skipped silently. A claim about speed or compatibility needs a measurement that can be repeated.
Read the brief08 · Roadmap
Five phases. Each one ends with a stop, and the next begins only with the maintainer's approval.
The first PS2Native, PCSX2 and three other recompilation projects, read at the source. The recommendation: statically recompiled code as the processors, PCSX2's core as the machine, a BIOS supplied by the user.
Every one of 63 test programs runs with its own code compiled ahead of time, the same as its interpreted run at every event test. The Linux step is deferred by the maintainer: its scripts are written and have never been run.
The European release, from the maintainer's own copy, and then a second game, Agent Under Fire. Nothing of either game is in the repository, and nothing generated from them. The phase's report: docs/phase3-report.md.
A wizard that takes a game and gives back a native application. Every setting is fixed when the game is built, and the result shows no emulator's interface. The maintainer decided its design on 2026-11-16: the wizard brings its own compiler, so a game is compiled on the user's own computer with nothing to install, into a module that a ready-made runtime loads, and a packaged game is a folder. The first step, measured the same day: a game's compiled code as a module of its own costs no time that shows. Agent Under Fire took as long as with its code built into the runtime, and every test passed. The second, on 2026-11-17: the compiled code now needs nothing but a compiler and PS2Native's own headers, no part of PCSX2's source and no system library, and comes in four modules (the game's, the BIOS's, the vector units' and the I/O processor's). Every test passed, and Agent Under Fire stayed the same run as stock PCSX2's at every point compared. The third, the same day: the compiler the wizard brings is LLVM's own, and with it a folder of 254 MB compiles Agent Under Fire from its disc image. On a Windows 10 laptop with nothing else installed it compiled the game in about 8 minutes into the same code as the development build's, and the game played there at close to the console's pace. The fourth, the same day: a game is now a folder that plays it, started from a program named after the game, with no console window beside it. Killzone and Agent Under Fire played from their folders at the console's pace, and the sessions recorded on the development build, the maintainer's own among them, played back from the folders were the same at every point compared. The fifth, the wizard itself, was done on 2026-11-18: it goes through all of PCSX2's settings for a game, PCSX2's own pages, and makes a game from its disc image into a folder that plays it, every default accepted, in about five and a half minutes for Agent Under Fire. On 2026-11-18 the maintainer made a third game with it, Gran Turismo 3, which loads its code from its own data: its first session ran that code interpreted, slower than the console, and once the game was made again from what that session wrote down, it played at the console's pace. The sixth met its criterion the same day: a game's folder now carries its own compiler, and when a session ends the game compiles what it met for the first time by itself, in the background, with a notification when it begins and another when it is done; its next start has it. While a game runs code it meets for the first time, a notice over its picture says so. The maintainer then played a fourth game made with the wizard, Jak and Daxter, which also runs code it loads from its data: 39 minutes and then 23 at the console's pace, 0.17% and then 0.04% of the main processor's work interpreted, what each session met for the first time compiled about a minute after it. The eighth step, the folder others can be given, was begun the same day: a game made from its disc image in any format PCSX2 plays, PCSX2's patches fetched at the user's word where PCSX2 is not installed, settings that PS2Native fixes refused when edited by hand, and the licence of everything in the folder. With it the wizard made a fifth game, Silent Hill 3, from a .chd image, as on a computer without PCSX2, in two and a half minutes. The design: docs/phase4-proposal.md; what was measured: docs/app-log.md.
Automated regression tests, compatibility reports, and checks against each new version of PCSX2 before it is taken up.
Built and run. Everything measured on this page was measured here.
Its scripts are written and have never been run. Nothing is known to work there yet.
Bounded by what PCSX2 supports. Nothing is built or tested for them.
09 · Read more
The goals, the reasoning, the decisions and every measurement are in the repository, in plain words.
The project's goals and rules, in the maintainer's words.
docs/phase1-feasibility.mdWhy this architecture, with references into the source of PCSX2 and of the other projects.
docs/execution-model.mdHow compiled code, the interpreter and the PCSX2 core run a program together.
docs/poc-log.mdWhat Phase 2 did and measured, step by step.
docs/game-log.mdThe first real game: its steps, their pass criteria and what has been measured.
docs/adr/The architecture decision records, one file each.
PS2Native is free software and is being built in the open. There is nothing to download yet. There is a great deal to read.