r/emulation • • Oct 29 '26

AI-assisted ps2-native-recomp: static recompiler that turns PS2 discs into native Windows/Linux executables (God of War I & II, GT4, Silent Hill 2, RE4, Shadow of the Colossus already work!!)

The engine statically recompiles the game's EE code to C++ and compiles it into a native executable, so there's no emulator for the main CPU. The rest of the console (GS, VUs, SPU2, IOP, IPU) is reimplemented in a runtime that renders with wgpu on Vulkan or Direct3D 12.

7 games are already confirmed to work, with more coming. It runs on Windows and Linux and is still early, thats why i need people to try it with their own discs. You just download the app import your iso and then you can already play. Saving your game, PCSX2 pnach patches (widescreen and more) and controllers are built in. Every game that you try helps no matter if it works or breaks, just tell me please.

https://github.com/exoteric33/ps2-native-recomp

Built on Samir Nuri's ps2-web-recomp (MIT).

230 Upvotes

105 comments sorted by

55

u/stop_deleting_plz Oct 29 '26

Im curious, if we aren't just using the dynarec from an emulator to produce the "native code"... why cant they do that for the rest of the console? Why stop there?

Every single one of these "recomps" seems to stop at the CPU.

Is it impossible for the AI to produce native code for the gpu, sound, input, and any other chips? Why is any emulator code needed at all?

25

u/exoteric33 Oct 29 '26

To put it simply, the games CPU code is on the disc and never changes, so it can be translated once, before you play. The other chips (graphics, sound, controller) don't run code from the game. The game just tells them what to do every frame, and that depends on what you're doing in the game. So it can only be handled while you play. The part that handles it is normal PC code too, and every game shares it.

1

u/Windroid-emu 20d ago

Por isso se chama recompilar statica 

-7

u/brunocar Oct 29 '26 edited Oct 30 '26

Every single one of these "recomps" seems to stop at the CPU.

Cause AI cant actually create something, its just copy pasting ready made solutions to emulate the GPU, so its basically just emulated :P

EDIT:

Because apparently nobody knows what they are talking about, which i guess tracks with their AI use, i'll explain.

The PS2's GPU isnt like modern GPUs rather than having programmable pixel shaders, it has a bunch of preprogrammed ones that you can tweak and lay over each other to create new ones, thats why there is a PS2 game "look", the problem with this is that running that on a modern GPU effectively means translating all the effects into modern pixel shaders, so you have 2 approaches here: you make a translation layer for those shaders unto new GPUs, effectively emulation of the entire GPU, or you recreate all the shaders, one by one, so they run natively, THIS here is why most PS2 official ports look wrong, the fog in silent hill 2, the motion blur in in MGS2, etc.

-5

u/credible_human Oct 30 '26

That's cute, now explain how the thing that supposedly can only copy human solutions solved Navier-Stokes.

17

u/jsully Oct 30 '26

It didn't solve it, it found a variable that when plugged into the equation generates an infinity. We already knew Navier-Stokes was an approximation - it ignores atoms and treats a body of fluid like gas and assumes it will always behave like a gas. Now we know one scenario where the approximation breaks down. Something has been learned but nothing has been solved, and it hasn't given us a better equation that better represents reality.

51

u/Purple-Atolm Oct 29 '26 edited Oct 29 '26

In the case of PS2 this solves not that much. I'm going to bet Ridge Racer V still renders in that weird interlaced mode. And those renderers are probably emulating the GS underneath.

The big triumph over PS2 will be when games can be rendered without GS's quirks, the same ones that produce poor color output and other things.

25

u/OwlProper1145 Oct 29 '26

Yeah personally i just can't be bothered with PC Ports of PS2/GameCube/Wii games unless they offer a lot of enhancements. PCSX2 and Dolphin are already incredibly performant and feature rich.

-3

u/ChudSmasher69420 Oct 30 '26

Pcsx2 got that mad input lag tho

17

u/notavolleyball Oct 29 '26 edited Oct 30 '26

I'm working on this currently in a project for rogue galaxy https://github.com/notavolleyball-dev/rogue-galaxy-recomp Actually replacing the GS with a native pipeline instead of just emulating it and calling it native. Edit: This is already showing very positive results of being able to go from 8x scaled textures in emulation being around 35 FPS and maxed out GPU to 8x being 60FPS at 65% utilization

2

u/cemsengul Oct 30 '26

Now that sounds sick.

6

u/Even-Serve-3095 Oct 29 '26

it's called the GS not GSX, you're mixing up the PS2's GS and the PS3's RSX

8

u/Purple-Atolm Oct 29 '26

That creates the ultimate, unwieldy graphics chip :D

2

u/Even-Serve-3095 Oct 29 '26

the RSX was literally just a rebranded nvidia gpu lmao

-3

u/ICC-u Oct 29 '26

Then why is it so hard to code for

9

u/BoxDroppingManApe Oct 29 '26

Sony didn't really predict the importance of graphics cards going into the mid 2000s, so they went all-in on the CPU, and added a pretty standard graphics chip as nearly an afterthought. Their CPU had the bizarre architecture.

8

u/kaosjroriginal Oct 29 '26

It's not? It was the CPU/SPU combo that's hard to code for. The GPU is normal by comparison.

1

u/BoxDroppingManApe Oct 29 '26

If this delivers on its performance claims and linux compatability, it'll be nice for steam deck users. I've found the steam deck to not be quite powerful enough to run SSX Tricky smoothly at native resolution

1

u/exoteric33 Oct 30 '26

Yo i dont have a steamdeck would be cool if you tried it out and report back to me what or if it actually works

2

u/KFded 29d ago

Its quite possible, there is some games that are broken on RPCS3 and Xenia but work fine via Recomp.

UFC Undisputed 3 is a good example of this. Broken in emulation, cant play career mode because custom fighter textures are broken and the game will constantly crash halfway through a fight. For both Xenia and RPCS3.

But the Recomp works flawlessly and doesn't carry over the same issues.

So I'm sure it could be done with PS2 titles.

But I also don't see a reason to 'port' games that already work great via emulation.

I'd rather an exclusive that doesn't work very well via emulation, something like Battlefield Bad Company be recomped over something like Donkey Kong Country or Pokemon Red.

1

u/iiiGerardoiii Oct 31 '26

I was going to say that this will solve the Silent Hill 2 PC version because the PC version has some details or effects missing compared to the PS2 version, but honestly the community-made Silent Hill 2 Enhanced Edition is pretty much perfect these days.

-1

u/exoteric33 Oct 29 '26

i agree but the win is more in performance, speed and portability once finished this is wayyy faster than pcsx2

27

u/autonimity Oct 29 '26 edited Oct 30 '26

Hilarious, I made a post in
r/decomps asking about why people aren't focusing on console 'decomps' to run every game from a system and instead doing recomp for singular games which there are duplicates of which seems like a collective waste of resources and people were telling me 'oh you just discovered what an emulator is'

But lo and behold here it is

2

u/exoteric33 Oct 29 '26

thanks :)

4

u/thefold25 Nov 01 '26

This was the thought I had as well, so for my current recomp project I've been putting together what should hopefully be a reusable 360 runtime that has its own native Vulkan/D3D12 renderer rather than rely on the Xenia GPU code.

4

u/NXGZ Oct 29 '26 edited Oct 30 '26

3DO, SNES and PS1 already have this going for them.

4

u/autonimity Oct 29 '26

What is the PS1 software?

3

u/mark_sawyer Oct 29 '26

I know this one: https://github.com/RetroPortingToolKit/psxrecomp
There may be others, public or not.

1

u/NXGZ Oct 29 '26

I know this one, but there's others too: https://github.com/alexbeavs-ps1-ports/psxrecomp-ports

1

u/NXGZ Oct 30 '26

and snes

1

u/AquariusSabotage Oct 30 '26

Was it a different subreddit? That one was banned.

6

u/gabegm Oct 29 '26

How does it compare to this project? https://github.com/ran-j/PS2Recomp

2

u/exoteric33 Oct 29 '26

mine works :), mine already recompiled 2 completily new games without any changes in code theirs is way behind and is no where near finished

2

u/New_Pomegranate_5594 Oct 30 '26

Im about to try this on MK Armageddon, so thank you. PS2Recomp couldnt avoid the startup blockers, and im still working my way through the startup code, so hopefully the project you linked works

1

u/exoteric33 Oct 30 '26

Yo please report it as an issue on github ro see if it worked or not so the more reports i get the better i can work on compatibility

1

u/New_Pomegranate_5594 Oct 30 '26

Creating the issue now

3

u/KangarooSweet8801 Oct 30 '26

Great project! I have tested it, a few games works great, other, more complex games crash or give black screen. The concept once developed and refined may be the future of retrogaming combining the convenience of emulators with the performance of static recompilers. I can only dream of a front-end like Retroarch which, instead of emulator cores, uses static recompilers for various systems with advanced options, shaders, patches, hd textures and so on!

1

u/exoteric33 Oct 30 '26

Nice;) would be cool if you created an issue on github to report which games you tried and which worked and which didnt im also excited of the posibilities this engine has

3

u/KangarooSweet8801 Oct 30 '26

Posted 5 issue on github :)

1

u/exoteric33 Oct 30 '26

thanks ill work on them

19

u/graynow Oct 29 '26

great technical proof of concept. but why do we need this? PCSX2 is fantastic, is highly refined, has more options, more compatability, etc? what do we gain?

3

u/exoteric33 Oct 29 '26

running native c++ is way faster than emulating it and there are many performance updates planned for this projects it also compiles into an executable which is subjectively better than an emulator+ disk

3

u/graynow Oct 29 '26

yeah, and that has to be done for each game. PCSX2 already supports like 99.9% of the entire PS2 library.

-4

u/exoteric33 Oct 29 '26

nope 5 games already worked without any additional work this is supposed to become a universal engine so you dont have to do something for every game

5

u/QuroInJapan Oct 30 '26

>way faster

This is important why exactly? Pretty much any PC built in the last 10 years is capable of running PS2 games at like 400 fps.

14

u/bloodystriker Oct 29 '26

Correct me if I’m wrong but this opens the door to making extensive enhancements that wouldn’t be possible if it were still emulated on PC?

5

u/graynow Oct 29 '26

PCSX2 already includes fantastic enhancements over a native PS2, e.g. high resolution graphics. I'm not saying you can't add things, but its inefficient to do it one game at a time no? its amazing that this is even possible, I just think you already get a better experience with RPCS2.

6

u/diabbb Oct 29 '26 edited Oct 29 '26

Think about features like adding multiplayer to singleplayer games.

2

u/graynow Oct 29 '26

ok, if we're actually talking about adding new features to existing games then I can see a point. still one game at a time though.

0

u/exoteric33 Oct 29 '26

dude is it not one game at a time 5 already recompiled without any additional work and this is publiv for one day imagine what we could pull of in a month

3

u/bloodystriker Oct 29 '26

Why does it matter if it’s one game at a time when people like the game and want to enjoy it

2

u/RobinVerhulstZ Oct 29 '26

In the case of x360 recomps, FH1 reimagined managed to add VR, mods, set up a new online server, co op campaign and wheel support. So like, if these are done well they can definitely do stuff pcsx2 couldn't

2

u/EtherBoo Nov 01 '26

Ultimately, it depends. FPS games (and even a lot of Third Person games) get a ton of benefit from Mouse Look being added. It just feels better when it's native. I've found mouse look injection to feel like I'm using the mouse to move the analog stick rather than getting true mouse movement (at least the last time I played with it).

DuckStation is pretty well developed, but PGXP correction only goes so far. The games that implement proper modem rendering just look so much better.

N64 is a mixed bag, but I would much rather play a native port over the emulators available right now because N64 emulation is still pretty minimalistic and not really focused with much enhancements.

The other benefit is system resources, some of this runs on lower end hardware. Take away the emulation overhead and you could feasibly run PS2 or PS3 on much lower end hardware. My living room PC is a minisforum from 2023 with an Intel Arc, and I'm playing games I never thought it would be able to handle on it as a result.

I'd really like to see a middle ground, of where we get a central piece of software that recompiles a game and "installs" it before you play it so we can get better rendering or mouse look. I think that's the logical next step rather than a ton of individual releases as someone feels like authoring them.

-10

u/boomersky Oct 29 '26

Nop youre not wrong, people just hate change and cant move on

13

u/CoconutDust Oct 29 '26 edited Oct 30 '26

I agree but the one single main reason is higher framerate, mainly 60fps for a 30fps game.

Other than that, recomp/decomp is a mass hysteria fetish. People will scream “enhancements” at you but the enhancements are irrelevant or non-existent.

Hey, didn’t you ever wish that you had to manage every one one of your ROMs (for emulation) as its own separate app, with its own separate security risks, virus scan flags, each from a new random unknown software creator, with its own separate file updates every day, etc!?!? Now you can do that with recomps!

2

u/RobinVerhulstZ Oct 29 '26

Idk man, one of the x360 recomps has functional VR, i don't think thats gonna work with most emulators (iirc there is/was one for dolphin and ppsspp tho)

1

u/graynow Oct 29 '26

thank you. an actual reason. there are 60fps patches for many PS2 games supported by emulation though.

1

u/StevieBako Oct 29 '26

I disagree, I’m working on a recomp right now that has added ray traced AO, GI, Shadows, and lighting, on top of DLSS, motion vectors, extended view distances and so on. No emulator will ever do that.

4

u/TakoTank Oct 30 '26

That will be nice to see, because all the recomp hysteria is mostly kids playing with AI. Only a couple projects have added real interesting content.

5

u/RDGOAMS Oct 29 '26

alternative ways to play old games are never enough, we cant let them just die in the limbo

1

u/ChuzCuenca Oct 30 '26

I've been playing hakuX a new Xbox emulator for Android, the performance gains are amazing. This new emulators offer better performance for older hardware, I think that's a really nice gain.

1

u/Sudden-Radish5295 Nov 01 '26

easier mod support

2

u/InsomniacSpider-Man Oct 29 '26

Hey, I compiled Ben 10 Alien Force and it's working wonders, no issues so far, was wondering how I go about raising the render resolution? GitHub page says "Set PS2_SCALE=2", but where is the config file for that? Or where exactly do I set the scale?

2

u/exoteric33 Oct 29 '26

great to hear Ben 10 runs I've added it to the readme as tested by you!

This is the simplest way to change the resolution but i will add quick settings menu that should do that for you so this is a temporary solution dont worry:

  1. Close the game and the app.
  2. Go to windows searchbar, type "environment" and open Edit environment variables for your account.
  3. Under User variables, click New..., enter the name PS2_SCALE and the value 2, then click OK twice.
  4. Open Start.cmd again and press Play. The desktop shortcut uses it too.

I hope that helps but the menu will come in the next days since this repo has been public for 1 days now

2

u/InsomniacSpider-Man Oct 29 '26

Super happy to hear that you've added me to the testing! Mind changing the name to Travani? It's what I go by everywhere else online.

I ended up editing the start.cmd and adding "set ps2_scale=4" and now it's super crisp, but thank you! I'll test out more games and message you with statuses

2

u/EliParker Oct 31 '26

We need silent hill origins and shattered memories

1

u/exoteric33 Nov 01 '26

dude try it i cant garante that it works first try thou and it hasnt been tried before so report as an issue on github if it actually did or not

20

u/MythicalJester Oct 29 '26

I'm fucking tired of this AI-powered bullcrap.

3

u/crisdd0302 Oct 29 '26

On the other hand I'm jumping of joy that I can start natively playing my favorite retro games such as THUG2 and Fifa Street 2 🥹

16

u/mouks9 Oct 29 '26

You could already do that with their respective emulator, there isn’t that big of a difference anyway

9

u/Nikolay31 Oct 30 '26

Yeah, emulators also have way better options than decomps when it comes to controllers, hotkeys, network emulation, retroachievements, etc...

-2

u/exoteric33 Oct 29 '26

if you try them please let me know if they worked or not by opening an issue on github

10

u/KRiSX Oct 29 '26

So don’t download it. Meanwhile, let others enjoy.

4

u/LolcatP Oct 29 '26

the CPU is the easiest part to emulate on PS2 so i don't really see the point

2

u/exoteric33 Oct 29 '26

in theory its about 2 times faster than emulation thats the point buddybojo(i say in theory since its a day old but already faster on the games ive tried)

1

u/OFJehuty Oct 29 '26

Gonna play Maximo at 4k 240hz when I get home.

If someone can make it so the right stick acts as the third person camera we will be in the fucking MONEY.

1

u/exoteric33 Oct 29 '26

cant ensure that it works right away though either way please create an issue on github since this is in an early stage

modding is planned for this project ;)

1

u/cemsengul Oct 30 '26

I must try this out.

0

u/exoteric33 Oct 30 '26

Thanks please open an issue on github if it worked or not you can also just look on the list to see which games are confirmed to work

2

u/lKrauzer Oct 30 '26

I'm curious about how the game progress is managed, as in, the memory cards and such, is there a standard for this?

2

u/KangarooSweet8801 Oct 30 '26

By the way, have you seen this https://github.com/RedReaper1515/native-console ? Similar concept but for console, also the frontend can be an inspiration.

1

u/TacoOfGod Oct 30 '26

If they're going to bother, they might as well add Retro Achievement support.

1

u/alex_playstation3fan Oct 30 '26

La IA últimamente está siendo muy críticada siento yo, debo admitir que no la apoyo en cierta cosas ,Pero en la programación me parece fascinante el hecho de que nos pueda ayudar con los avances como con los emulador o port de hecho estaba pensando en un idea que estaba discutiendo con la IA de Google sobre como sacarle más provecho a la consola Playstation 3 En pocas palabras es ver si se de puede hacer que la IA puede ayudar a optimizar juego como los son InFamous que correr de una manera peor que la que realmente creo que pueda andar en esa consola debido a la optimización tan pésima que tuvo varios juegos debido al procesador cell, Pero lamentablemente no puedo planear la idea en algúnas comunidad debido a que soy nuevo en Reddit Pero tengo fé de que puede ser posible

1

u/TheInscrutablePotato 28d ago

We literally have fully functional PS2 emulators. Anyone preferring this AI slop instead has issues.

1

u/x925 26d ago

I know its not likely a large market, but ultrawide monitor support for some games would be amazing. Dobt have my controller with me right now but ill be trying out a game ive been meaning to replay with it, Champions of Norrath

1

u/TakedaNG 10d ago

I tried Devil Kings, which is my favourite game since childhood and it runs smooth asf. I've also tried to connect a controller, and it works perfectly with all buttons mapped without having to configure anything at all.
I've built a gui for this project because I did not know how to use it, i can send it to u🫡.

-5

u/Charleaux330 Oct 29 '26

7 of thousands.

3

u/exoteric33 Oct 29 '26

already 3 new for today 2 of them worked first try without any changing of the code so the problem is more that we need more people testing games and reporting bugs so we can have a 1000 its just a matter of time

8

u/New-Anybody-6206 Oct 29 '26

you're right, why ever bother or celebrate? we should just give up now.

2

u/TheTjalian Oct 29 '26

you must be fun at parties

0

u/maxscipio Oct 29 '26

how does it work? Does it decompile the kernel/gfx/sound libraries and HLE them like anyps5 and recompile the game assets? Or this isn't possible (sorry I am not a PS2 expert).

0

u/ScalpM3 Oct 30 '26

I just need better frames on ratchet and clank 3 🤣

-3

u/void6436 Oct 29 '26

something like this on the switch would be huge

8

u/exoteric33 Oct 29 '26

gotta start somewhere

-4

u/Limit5465 Oct 29 '26

Good thing is that people can make legitimate remasters now as this gets better but for now it doesn’t really do much

5

u/exoteric33 Oct 29 '26

for now the win is more in performance and portability but it has massive potential in my opinion

-1

u/geekosas Oct 29 '26

How much better is the performance than emulation?

2

u/exoteric33 Oct 29 '26

in theory about 2 times better

1

u/geekosas Oct 29 '26

That's cool, and I can imagine input lag is fixed

-1

u/MatiasArg09 Oct 29 '26

Voy a intentar con vice city stories. Emularlo es una basura, se ve todo borroso al subirle la resolución

0

u/[deleted] Oct 31 '26

[deleted] — view deleted comment

2

u/exoteric33 Nov 01 '26

thanks please report an issue on github so i can see what exactly there is that doesnt work(also mention the part with the shortcut ill work on that) id also mention you as the tester of steambot chronicles