155 comments

[ 0.26 ms ] story [ 20.4 ms ] thread
[dead]
[flagged]
Are you sure about bit-exact floats? Can you show where Booth's multiplication is done?
if you're using the phrase "bit-exact", then you should probably go directly to the source and ask Claude.
[flagged]
I hope they'll be able to do that with Forza too !
Who would want to play Gran Turismo without long CD loading screens?
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?
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.
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.
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...

Would save states suffice? Because that already exists.
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.

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.

> 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.

[delayed]
It's just practice. I've been playing that way since GT1 so the ergonomics of anything else is awful to me.
This is exactly how I play GTx as well as Tourist Trophy.
>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 replacement of system firmware+games, surely a patch could fix that in both pcsx2 or this project

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.
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).
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.

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

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

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.
I wonder if it would be possible to build in support for keyboards with hall effect switches like the ones Wooting make. Those keyswitches are analog.
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?"
On the PSP recomp, I wish they could somehow target GL 2.1 video cards (ancient Intel iGPU's) so legacy users like me could play most of the games on an n270 netbook.
I don’t think it’ll happen. The market is too small, and the token costs don’t seem worth the potential upside.
What do you mean by token costs? Does it cost more to support an older graphics API than a newer one?
Yes, because it would not be an "or" but an "and", more features = more tokens.
It's not an "and". GL 2.1 has all the features necessary for PS2 games and is still supported on modern systems. Older APIs may be slightly more verbose than newer APIs but that shouldn't matter to an AI.
Verbose = tokens.

Newer APIs are also more flexible, making fewer assumptions about how things in the pipeline should run. E.g. the way a buffer clamps or overflows compared to the PS2 may be hardcoded in OpenGL 2.1 meaning you have to write emulation of that feature inside the older API to then run the code to emulate the buffer. In OpenGL the shaders types are limited in this manner, in WebGPU you can just use arbitrary compute shaders instead of having any assumptions at all about the rendering pipeline.

There are tradeoffs to selecting the older APIs just as there are tradeoffs selecting the newer APIs. Generally, the latter is easier on the implementation side for emulators.

That doesn't necessarily stop you from pointing an LLM at it and getting a working WebGL 1 version of course, it's just not a universal answer to "how should someone spend their tokens.

Man, the netbooks were amazing for their time, but even by 2008 standards, they were not powerful computers.

At the time you needed a fairly capable gaming PC for PS2 emulation, which is a far cry from the igpu in an atom. Given a PSP is basically a cut down PS2, I don’t think emulation on that calibre hardware is an achievable goal. An atom doesn’t even have a hardware programmable vertex shaders, on windows I don’t even think they had GL 2.1.

I never thought I’d see the day where an atom would be vintage tech, and people would still be rocking said vintage tech. It’s amazing you’ve kept it running and usable. Modern PCs can’t even keep up with modern OS, and you’re still rocking the good old days of single core single thread. Rock on!

I used to play GTA San Andreas on an n270 netbook, I believe at 1024x600. Didn’t run well, but was definitely playable.
Sounds like the epitome of amazing for its time but not a powerful computer.
'Recompiled' is not the same as emulated by any stretch. Native PSP games could perfectly run under an Atom if they used SSE2 instructions and GL 2.1 plus some hacks to mimick some FX (or just some reduced graphic settings).

I've got GL 2.1 running under n270 perfectly well, up to the point to test Yandex Maps to roam around Prypiat.

Even for emulation PPSSPP was far less demanding than PCSX2.

I agree with the sentiment, however it needs to be at least OpenGL 3.3, and take advantage of shaders.
VERY cool. I wish you could make this work for steam deck (and friends) though.
Why would you want this to work on a dedicated gaming device that can emulate the titles outright?

Have a look at Decky loader and Emudeck.

Can't get decky loader to work on my (Lenovo) steam deck
What's a Lenovo Steamdeck?
From an ars technica review of the steam deck "friends", a portable device that is way ahead of the actual steam deck, specs wise, but since it runs plain unmodified windows is a pain in the ass to use as a portable :)
You can install steam os (now even the Valve version) and that just works.
I guess it might be a nice way to distribute homebrew PS2 games in a platform agnostic way
but this is still an emulator! The platform agnostic way is to provide the emulator itself, not to embed the rom inside an emulator.

And can just port the emulator to wasm, and have people able to run their own roms. That would mean you're suddenly retroactively making all of those ps2 games platform agnostic.

This just makes one game playable, by artificially limiting the emulator to running this one game. If you're recreating a ps2 in software (which this project is), you should be able to run any game.

No GitHub pages so I can play?
The games themselves are copyrighted, no?
Yes they are, and Cloudflare gets DMCA requests to take them down.
ah yes, another recomp that still emulates a core system component.

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

its still under development, system components will compile to cpu and VU1 modules will translate to gpu shaders
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
I would say it could be less lying and more the various "authors" having not even the slightest idea what their creations actually do.
I don't see a difference tbh. The Human/AI cyborg knows what it is and is lying.
This is how you know that most coders that use claude never read the code, nor their own READMEs.
funniest one I found so far was "accurately recreated the hardware in software so it's running natively" :P
I am not an emulator. Here is how I'm emulating!

"PlayStation 2 games running in the browser without an emulator. The game's Emotion Engine machine code is translated ahead of time into C++, compiled to WebAssembly, and linked against a reimplementation of the PS2's operating system and hardware that draws with WebGPU."

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.
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.
No mention of AI at all in this repo.
I really don't like how AI changed my profession, but hey at least I get my programming hobbies ruined too.
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.
Big publishers have been pumping mtx riddled buggy crap for a good while now, I have no sympathy.
a big publisher just announced (today) that their new development is fully AI, from code to art. So it seems we're out of big games from them anyway.
Great, so maybe it means we are about to hit a small indie game developer renaissance!
At least the good thing about a hobby being a hobby is that no manager tells you what you should do.
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.
you could have just run the rom through an emulator, and it'd be doing exactly the same process in the background. But without crashing the game several times, and then the first couple of times it doesn't crash it's declared "good enough". Because when a dynamic recompiler discovers something new (which is impossible to do statically), it recompiles and patches the new code in seamlessly.
What about compiling the compiler to WebAssembly so it can be hosted anywhere and convert a project directly from a browser?
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.
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.

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...
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.
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.
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.
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.

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.
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.

In what world would emulation be stealing or piracy? In a functioning market, we would have e.g. a Steambox advertising fully supported PS5 compatibility, 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.

Emulation is primarily used for piracy. Easily 90% of emulator users are using ROMs that they do not have the rights to.
Possibly, but that's kind of a trivial observation when the only company selling ROMs is Sega, and everything else outside of PS1/PS2 requires a lot of technical sophistication to use original discs, by design of the companies complaining of piracy. Gen1 iPods were probably used for 90% or more pirated material too, but that's because the music industry really didn't want to sell music files. The iPod itself was still obviously legal.

You can also buy third party products that take original cartridges, but again the companies aren't interested in selling cartridges, so no surprise if they end up pirated.

Emulators and ROMs are so normalized at this point that even Apple are implicitly OK with it.
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 looks closer with the decompilation route

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.

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.
No mention of AI at all in this repo.
Yes, I feel for all those gaming studios who are no longer raking in all that sweet, sweet PS2 royalties from new sales.
The exact same as before. Emulators existed. This is literally an emulator running in a browser. But one that doesn't have a file dialog. It walks like an emulator, quacks like an emulator and everything. It also says it is not an emulator and then proceeds to describe, in the very same sentence, how it implements an emulator.
are there clean-room games?
But you can't clean room the art and assets.
This is good, I didn't know 3DS could handle PS2 emulation.

What's the performance like on heavier titles?

Does this means same can happen for ps3?
I won't be surprised if we see mention of this by the end of 2026.
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!

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.
I am already running NSA enabled and Chinese malw... ai agents on my PC with full access. As if it will make difference.
This security nihilism is probably the most relatable sentiment I’ve seen on HN in a while.
Is it still nihilism if you ran a proper risk assessment first?
It’s nihilism if you didn’t run a risk assessment at all because you know you’re already pwned.
What if, as a result of a risk assessment, I've learned that I'm already pwned? Nihilism or rationalism?
That’s the rationalism to nihilism pipeline in action.
Sounds like not being nihilistic is irrational.
It does make a difference.

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

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 review even more quickly by an LLM for a decent assurance. Age always helps though.
Exploiting an emulator through a ROM is significantly harder than inserting some malicious code into a binary.
You're thinking too much like an engineer who reads code all day.

What's actually happening is a 13 year old downloading Pokemon.rom.exe and clicking on it.

Nah it's super easy for the most common game system emus, and especially easy for 'modern' emulators like dolphin and rpcs3.
How about, we just run all the games through the same emulator, instead of writing a custom half-assed emulator individually for each game? Then we could just audit that one point of failure and completely secure ALL roms, past present and future.
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!
Wow! You've done it, you found software that is impervious to malicious software!
Open up the game console with ~ and type “tiananmen square 1989”. The Chinese operative monitoring your game will automatically disconnect.
I wonder how "legal" hosting this would be given that it would require the host to basically distribute the game for free for everyone else
i actually developed the project to play my own game dumps remotely via VPN from my home server; making it publicly available is not legal and will be consequences:)
Actually, it's more grey area than you think. See 'interoperability exception'. It does break copyright and EULAs however.