Top
Best
New

Posted by deadxwarrior 15 hours ago

Show HN: PS2 games statically recompiled to WebAssembly(github.com)
246 points | 132 comments
aceazzameen 6 hours ago|
I don't know. There's suddenly so many decomps that run native (granted this post is about WebAssembly). Is there no concern about hidden malware? IMO it doesn't have the same level of trust and vetting that the emulator scene has. At least not yet.
zamadatix 5 hours ago||
The emulator scene could have all the trust it wants and it was still ruined 99% of the time by people downloading ROMs from the first sketchy site that gave them a file download. At least here what is made quickly by an LLM can have its source reviewed even more quickly by an LLM for a decent assurance. Age always helps though.
edflsafoiewq 50 minutes ago||
Exploiting an emulator through a ROM is significantly harder than inserting some malicious code into a binary.
artisinal 1 hour ago|||
Open up the game console with ~ and type “tiananmen square 1989”. The Chinese operative monitoring your game will automatically disconnect.
johnfn 4 hours ago|||
I mean I’m kind of curious why you left this comment about WASM decomp, which is about as malware safe as one could possibly get!
cbluth 3 hours ago||
Wow! You've done it, you found software that is impervious to malicious software!
ReptileMan 5 hours ago||
I am already running NSA enabled and Chinese malw... ai agents on my PC with full access. As if it will make difference.
natpalmer1776 4 hours ago|||
This security nihilism is probably the most relatable sentiment I’ve seen on HN in a while.
Xirdus 1 hour ago||
Is it still nihilism if you ran a proper risk assessment first?
natpalmer1776 1 hour ago||
It’s nihilism if you didn’t run a risk assessment at all because you know you’re already pwned.
j45 4 hours ago|||
It does make a difference.

The price of carelssness is too high of an irreversible lesson.

zuInnp 10 hours ago||
All of this recomp stuff is pretty amazing. I really don't like how AI changed my profession, but hey at least I get something good from it.
yuriks 2 hours ago||
I really don't like how AI changed my profession, but hey at least I get my programming hobbies ruined too.
jonwinstanley 27 minutes ago||
And it will make less sense for big publishers to invest in building great games if people are just going to be able to decompile and run them on their own hardware.
matheusmoreira 1 hour ago|||
Indeed. Programming feels so meaningless now, but at least we can replay cherished games natively. I'm doing a video game decompilation with AI as well.
dfxm12 54 minutes ago|||
There were already a couple of ways to play PS2 games though. Is it meaningful to put it in WebAssembly (especially when we were promised things like a cure for cancer [0])?

0 - https://www.theguardian.com/business/2026/sep/08/ai-cure-can...

exhumet 7 hours ago|||
same lol. but hey, ive been able to play the xbox 360 version of NFS most wanted perfectly on steamdeck in one press of a button due to the efforts of the fine folks working on these recomps so ill take a small win here and there. ive heard theyve also got the original forza horizon working too. so im stoked.
patrickk 6 hours ago||
Here's a guy who put together this recomp of NFS the Xbox 360 version, running on the Steam Deck:

https://old.reddit.com/r/SteamDeck/comments/1x0vzyb/speedbre...

Forza Horizon recomp: https://github.com/arcanite24/pinyon-shift

More Xbox 360 projects here:

https://fangamesdb.com/consoles/xbox-360.html

mwkaufma 4 hours ago||
No mention of AI at all in this repo.
IshKebab 4 hours ago||
Not explicitly but it's clearly all done using AI. Read the prose.
Megabinator 9 hours ago||
What about compiling the compiler to WebAssembly so it can be hosted anywhere and convert a project directly from a browser?
kodablah 9 hours ago||
Mentioned in other comment, but this is what I did at https://github.com/cretz/vitaslop for Vita. Generic ARM-to-WASM transpiler.
deadxwarrior 9 hours ago||
yes, and its probably where this should go. The recompiler itself is plain C++ and builds for wasm easily, the heavy part is compiling its output (GoW2 becomes about 670k lines of Cpp), which would need clang running in the browser. The nicer route is to have the recompiler emit WebAssembly directly and let the browsers own engine compile it. I already do that for VU1 microprograms that were not seen AOT. It also solves distribution you'd pick your own ISO and the conversion would happen locally, so nothing derived from the game is ever hosted.
kodablah 9 hours ago||
I did similar for PS Vita over the past few months: https://github.com/cretz/vitaslop

But instead of single games, I "built" an ARM-to-WASM transpiler in WASM. Also cool transcoding of WebGPU shaders, audio, and more.

Only have tested a few games so far, it's early days, but works quite well in Chrome mobile on flagship Android phones.

eluusive 12 hours ago||
Who would want to play Gran Turismo without long CD loading screens?
easyThrowaway 11 hours ago||
A better question: who would want to play Gran Turismo 3 or 4 without pressure sensitive controllers?

Even using the original ps2 or ps3 controller with the right drivers on PCSX2 doesn't really reproduce the same smooth acceleration/brake curve of the PS2.

Playing them on a keyboard or fully digital inputs is just a miserable experience.

sigmar 8 hours ago|||
>Even using the original ps2 or ps3 controller with the right drivers on PCSX2 doesn't really reproduce the same smooth acceleration/brake curve of the PS2.

why not? if we're at the point of byte perfect recomp of system firmware+games, surely we could find a patch that would fix that in both pcsx2 or this project

easyThrowaway 2 hours ago|||
I think the game is simply hardcoded with a sensitivity curve and deadzone specific for the Dualshock 2 pressure buttons on a regular PS2. Some third-party controls aren't too great to use with PS2 GT games, too.

Patching that is possible I guess, but it would also require setting up some sort of calibration in the game.

artisinal 1 hour ago||
Most people I know use the DualShock 4 for PS2 emulation. All you need is to write a mapping for the DS3, 4 and 5 to the DS2 curve and you can cover a big part of the users.
Xirdus 6 hours ago|||
Generic PS2-to-USB adapters ignore that part of the spec, so the PC doesn't receive these inputs at all. You'd need to build your own adapter out of Arduino or something.
unleaded 4 hours ago||
There are two types of generic PS2 to usb adapters, the one designed for pc (usually has two ports) and the one designed for PS3. The PS2 to PS3 controller adapters work perfectly with the right drivers (DSHidMini on Windows).
Xirdus 1 hour ago||
Cool, didn't know that. I thought they've got rid of pressure sensitive buttons in PS3 already, not PS4. Thanks!

So apparently, to make pressure sensitive PS2 controller work in PCSX2, you need ShanWan PS2-to-PS3 adapter (or equivalent), DSHidMini, and set input mode to SDL. Since I lack both pieces of hardware, I can't test it myself. Or skip the middleman and get a PS3 controller, which is a better option anyway for several reasons.

suprjami 9 hours ago|||
Right analog should be accelerate and brake.

Analog buttons were always a bad idea and should never be used.

These days you can map analog triggers to the sticks for a modern experience if you want that.

easyThrowaway 9 hours ago|||
> These days you can map analog triggers to the sticks for a modern experience if you want that.

It gets wonky if you press both analog triggers at the same time though. I've also tried mapping them to X and O to simulate the pressure, but the range is also somewhat off, with a way steeper curve (half pressing a trigger gives nearly 100% intensity of the OG buttons).

An alternate solution I've seen around is using a GMIX or similar devices and mapping the g29 wheel controls from the game to a modern Xbox/PS controller, but I've never tried it myself.

sgalbincea 4 hours ago||||
This is exactly how I play GTx as well as Tourist Trophy.
fwip 7 hours ago|||
I think the ergonomics of right stick for that is horrendous, but aside from that, for a racing sim game, you're gonna need to be able to hit the brake and the gas at the same time.
suprjami 2 hours ago||
It's just practice. I've been playing that way since GT1 so the ergonomics of anything else is awful to me.
rickdeckard 11 hours ago|||
wow, how awesome it would be to play those games with Trackmania-like reload-times (if you restart the race in Trackmania, you're immediately at the starting line again).

I assume it would require some additional patching in those GT / NFS games though...

bpye 4 hours ago||
Would save states suffice? Because that already exists.
embedding-shape 11 hours ago|||
Or without the very-much-needed hold-your-breath moment at startup, where you listen to the sounds to see if the DVD actually loaded correctly. You get a ~1 second moment in there where life itself suddenly stops, before you hear the "viump" that tells you everything is OK in the world.
Xirdus 6 hours ago||
PS1 was more fun. You could tell it's failing to load before it failed to load. Then you give it a good smack and it tries harder before giving up. You could get almost any game disc to play reliably in 3 hits or less.
ssl-3 12 hours ago|||
That's easy enough to simulate, too, isn't it? Just pause the game manually at the right spots to make time to get up, make a sandwich, eat the sandwich, take the dog out, walk the dog around the block, and then use the bathroom before resuming. No worries.
ErroneousBosh 9 hours ago|||
ITYM "Who would want to play Gran Turismo" [Preparing...] <fwsssssssssss rrrmp fssswsss grmp fsswsss grmp fssswsss grmp> <ejects disc, polishes on T-shirt> <fwsssssssssssssssssssssss> "without long CD" [Preparing...] <aw no not again...> "loading screens?"
styleio 10 hours ago||
And you lose the acoustic error handling too: one seek noise meant resolve(), another meant reject().
mamonoleechi 5 hours ago||
- related thread:https://news.ycombinator.com/item?id=49991243 (God of War on PSP, recompiled to WebAssembly and running in the browser)

- might interest you, if you like the topic you're currently reading: https://thegamingemporium.com/recent/

anonymous908213 3 hours ago||
> This is the sibling of psp-web-recomp and follows the same method

Fucking amazing that this person can prompt to embed an emulator into a binary and call it "no emulation recompilation" and get not one but two threads on the front page. LLMs are such an amazing tool for liars to produce upvotable slop, nobody gives a fuck about verifying whether the claims are true.

Elizer0x0309 8 hours ago||
With the slew of recomps these days enabled by AI, How much incentive is there for a game studio to pour their heart, soul and money in a product when it can be easily "stolen" and shared for free...
goosejuice 8 hours ago||
It's been 27 years since Napster. People are still making albums and movies. I don't think piracy moves the needle in any meaningful way, not with enforcement anyway.
Laremere 7 hours ago||
Look at a graph of music industry earnings. Earnings peaked around 2000 mostly from CDs, before plumiting because of piracy and the transition to digital. To the people trying to make a living, it changed everything in every meaningful way. Sure enforcement happened eventually, but only after setting everything on fire and changing consumer expectations to be unaligned with artists actually making money for people listening to their music (foreshadowing). The industry has maybe only just recovered with streaming revenue, only for AI to come in like a wrecking ball again.
jasomill 40 minutes ago|||
How is this relevant to the game industry?

Sharing cracked PC games has been a thing since the dawn of the industry, yet it has continued to grow and thrive.

Console…maybe? But good Switch emulators have been around for years, yet Switch hardware and exclusive games that ran better-than-native under emulation continued to sell in record numbers, and Sony has always delayed the release of PC ports of PlayStation exclusive titles to ensure healthy console sales.

axus 4 hours ago||||
It looks like it's recovered to inflation-adjusted levels of the 1980s, while consumers have more music than ever before. Perhaps the percentage of the money going to large corporations is higher than before?
sublinear 6 hours ago||||
I think it's still debatable whether piracy was the sole cause, or if it was a watershed moment for all the problems that already existed long before napster.

The internet sparked interest in independent music, artists had been fed up for a long time regarding earnings, and the music being made by the big labels was already pretty lackluster by this point in time.

doublerabbit 5 hours ago|||
The music industry is a racketeering front; they sabotage themselves.

If they actually embraced the digital era of mp3s rather than throwing lawsuits at the problem they would of been on top.

Music should be free, however these dinosaurs are stuck in tar and will continue to sue, hoard and milk their old ways restricting innovation and progress.

No sympathy for any of the wet teabags in the music industry.

diath 8 hours ago|||
People who want to support a game studio will buy the game anyway. People who do not want to support the studio will pirate the game anyway. It's the same reason why piracy does not matter at all, those people weren't going to pay for your game either way.
nullishdomain 6 hours ago|||
If GTA6 shows up for free in a web browser day one, it will for sure hurt sales. Not sure how anyone could argue otherwise: people are paying to play GTA, not paying to support Rockstar. These older games though, I agree with you.
matsemann 4 hours ago||||
I don't think that's true. I'm contemplating buying a Switch 2 just to play the new Zelda remake. But I might also now just play an upscaled emulation of the old game or even perhaps a recomp of the remake if it gets made fast.

Aka lost sales.

jgalt212 6 hours ago|||
Relying on support / the kindness of strangers is quick way to financial ruin. It's about providing a service / product that has value that consumers will, if forced to, pay for.
arshxyz 5 hours ago|||
Video game piracy isn't new and indie games have always been trivial to pirate. In fact a lot of indie studios opt to put their catalog up on GOG, which is a famously DRM-Free store.
treyd 8 hours ago|||
I don't understand this framing of recomps using the word "stolen". For most games the hard part and the valuable part is not "writing the code", it's everything else.
fwip 7 hours ago||
I think it's less that recompilation is stealing the code, and more that it is a piece of the puzzle to 'stealing' the game experience (the thing that you would pay for).

Emulators + ROM is one way to do that. Recompiling from the ROM is another. I think that for most people, your stance on if emulating is stealing or piracy, will well-predict how you feel about recompilation tools.

ndriscoll 5 hours ago||
In what world would emulation (i.e. product compatibility) be stealing or piracy? In a functioning market, we would have e.g. a Steam Machine advertising fully supported PS5 compatibility (and PS4 and PS3 and PS2 and PS1 and Wii and Gamecube and N64 etc. etc.), or a Legion Go advertising Switch compatibility. We should all want competition. You shouldn't need to purchase an overpriced crappy handheld to play specific titles when a better, cheaper one could do it just as well.

I swear gamers have the most insane Stockholm syndrome. It's super common to see them say that it's a problem that there aren't enough "exclusives" for a console. Like, dude, the problem is that the console sucks next to its competition. You shouldn't want product tying to try to make you buy it. They're literally all just branded commodity computers that are locked down to tie purchases (an illegal, anti-competitive practice) at this point. This was already litigated multiple times 20-30 years ago and the big companies consistently lost every case. Sega even lost a case where a company displayed the message "PRODUCED BY OR UNDER LICENSE FROM SEGA ENTERPRISES LTD" for a game that Sega had not approved because it was required for the console to boot, and they couldn't try to use trademarks to stop someone from developing for their console.

vjsrinivas 8 hours ago|||
The incentive will always be there for games that build an organic community. Good examples are a lot of Valve games.
chaosharmonic 5 hours ago|||
I mean, how much incentive is there to buy when the studios won't let you legally purchase from them, or at best don't actually consider it a purchase when they do?

Especially when, for games of this age, we're talking about going through the secondary market, and paying potentially hundreds of dollars for a physical copy, without the creators seeing a dime of that transaction to begin with.

mwkaufma 4 hours ago|||
No mention of AI at all in this repo.
iugtmkbdfil834 8 hours ago|||
Because good stuff will defend itself regardless. If Pratchett or Carlin was alive, I would still be waiting for his new stuff.. maybe even more so in the age of AI. Hell, I am doing a ton of personal projects now and I am still waiting for new divinity, because by know I trust them to do the stuff right. And this is the point: no more corporate slop! All hail AI slop. Second golden gaming age is upon us brothers!
yieldcrv 5 hours ago|||
The market doesn’t want them to invest half a decade to a decade into games anyway

Anything that shows its no longer worth it will accelerate that industry using newer tools to make games faster with multimodal language models powering audio, voice, asset generation, rendering as well as agentic workflows for the manual work humans would still be involved in

right now, AAA studios won’t do it and their audiences wont want them to do it, but any dedicated indie developer that would have never hired the teams of people needed for those aspects can do it. a nearby parallel reality where AAA do it based on no ability to protect high valued IP now looks closer with the decompilation route

squidmaster 8 hours ago||
[dead]
Hyperlisk 7 hours ago||
Very cool! I'm working on something similar but am taking it much slower with a focus on accuracy. Mine recompiles into Golang to take advantage of built-in SIMD support.

I've been building the tooling around the PS2 binaries and hope to have a standalone PSS player out soon that can play PSS files as they are encoded, via simulated renderer, and via in-game engine renderer. The future is so bright with LLMs!

krystalgamer 11 hours ago|
ah yes, another recomp that still emulates a core system component.

https://github.com/snuri00/ps2-web-recomp/blob/1066c9eea78c2...

popcar2 9 hours ago||
It's really getting annoying. There are a lot of people advertising "decompilations" and "native PC ports" that just turn out to be the emulator packaged into an exe that immediately runs the game... Makes it hard to find actual recompilations of games now.
squidmaster 8 hours ago||
[dead]
rvz 8 hours ago|||
This is how you know that most coders that use claude never read the code, nor their own READMEs.
krystalgamer 3 hours ago||
funniest one I found so far was "accurately recreated the hardware in software so it's running natively" :P
xyzsparetimexyz 10 hours ago|||
Theres a lot of lying going on with these types of AI projects. What I want to see is more 100% matching decompilation so that people who dont use AI can modify the rendering eyv glue and port them to new platforms
wasabinator 9 hours ago|||
I would say it could be less lying and more the various "authors" having not even the slightest idea what their creations actually do.
xyzsparetimexyz 8 hours ago||
I don't see a difference tbh. The Human/AI cyborg knows what it is and is lying.
dmonterocrespo 8 hours ago|||
This is exactly the approach we've been taking with Metal Gear Solid. We’ve been working on a fork of mgs_reversing (which is targeting 100% matching decompilation of MGS Integral) to bring the game natively to microcontrollers: https://github.com/davidmonterocrespo24/mgs_reversing

Instead of high-level emulation, the decompiled C source is compiled directly to Xtensa machine code for the ESP32-S3. We replaced the PlayStation SDK/GPU/GTE with custom software routines, running on a DIY handheld built around a Seeed XIAO ESP32-S3 Sense.

To speed up development without constantly flashing hardware, we run the compiled firmware image directly inside a browser-based hardware simulator CLI (velxio-cli) to verify serial outputs and execution in seconds.

Having 100% matching C code makes native ports to embedded platforms completely feasible without relying on heavy JIT/interpreter glue.

ekremabiii01 10 hours ago|||
its still under development, system components will compile to cpu and VU1 modules will translate to gpu shaders
deadxwarrior 9 hours ago||
Fair point, the IOP is interpreted. Its the PS1-class I/O CPU, and here it only runs the driver modules a game ships on its disc (sound engine, pad, memory card). The IOP kernel and the 20 core Sony libraries are reimplemented natively. In a God of War2 fight that interpreter is about 2% of cpu time, so it hasnot been worth recompiling yet for me. Its the same relocatable module problem i already handle for SN systems overlays, so its on the list. The EE game code is fully recompiled AOT (a missing function is a hard error, there is no interpreter fallback), and VU1 microprograms are recompiled per game, with a JIT and an interpreter only for programs not seen before. Whats left is hardware; the GS runs on the GPU, plus DMA, VIF, SPU2 and CDVD. Every recomp has to model that part, the same way N64Recomp uses RT64 for the RDP as i checked.
foltik 4 hours ago||
Thanks for clarifying, Claude.
More comments...