Hacker News

sn001
God of War on PSP, recompiled to WebAssembly and running in the browser github.com

accrual23 minutes ago

FWIW, the two God of War games released on PSP were considered some of the most graphically impressive on the platform. Both came out late in the console's lifetime (2008 and 2010).

An IGN review also described one of them as "it looks better than a big chunk of PS2 games". [0] I've played one of them and yes, it felt like playing a resized PS2 game.

[0] https://web.archive.org/web/20121020044819/http://www.ign.co...

wren69914 hours ago

> PSP games running in the browser without an emulator. The game's MIPS machine code is translated ahead of time into C++, compiled to WebAssembly, and linked against a small reimplementation of the PSP's operating system and graphics chip that draws with WebGL2.

Feels slightly pedantic to point this out, but this describes an emulation stack. A lot of emulators are already doing some kind of lift+JIT on the target's machine code (just not through WASM)

Rohansian hour ago

That's almost what WINE does which is, apparently, not an emulator. Small reimplementation of Windows userspace and translates DirectX to Vulkan/OpenGL. So if I do x86 -> ARM binary translation AOT and run that with WINE, is it an emulator?

gzalo4 hours ago

Most people would say that Ahead-of-time (AOT) compilation or static recompilation is not considered traditional emulation.

pjmlp2 hours ago

We called emulation back in the last century and it hasn't changed.

The original hardware doesn't exist on the target system.

Taking a famous example out of many others I could have reached for,

> Emulation had been around for a while as a concept, but FX!32 went one stage further. It analyzed the way programs worked and, after the program ran, used binary translation to produce dynamic-link library (DLL) files of native Alpha code that the application could execute the next time it ran. This way even in the early 1.0 release, the FX!32 achieved speeds for Win32 x86 applications that ran 40-50% as fast as native x86 code, with a 70% speed projected as likely with improved optimization. Version 1.5, released by Compaq in 1999, added support for the Alpha 21264 (EV6) CPU, including emulation of Intel's MMX instruction set.

https://en.wikipedia.org/wiki/FX!32

rowanG0774 hours ago

You are no longer emulating the CPU but the rest of the system you are absolutely emulating. So I think it's very close to traditional emulation.

wren69913 hours ago

The CPU is also in a bit of a funny place because the transpiled C++ looks to be translating instructions into manipulation of a MIPS CPU state object.

https://github.com/jessicanataliagta/PSPRecomp/blob/main/src...

wvenable2 hours ago

It appears to me like an emulator where the binary is just compiled in based on the huge amount of code like this:

https://github.com/jessicanataliagta/PSPRecomp/blob/main/pro...

tra34 hours ago

I think of an emulator as a separate project/product typically. Perhaps that's what they are saying?

wren69913 hours ago

Yeah, maybe that's the difference. I was trying to probe the semantics, not so much a "gotcha". Parts of this stack are quite bespoke for this one game.

pier252 hours ago

I wonder how long it'll take until Sony takes this down

cgijoean hour ago

Well, according to the repo, it contains no actual game assets. You need to supply your own PSP disc of the game. Might protect them legally, might not.

sigma54 hours ago

I remember trying to emulate this game on my i7 laptop a decade ago. It was running like 15 FPS.So for me this look like magic.

mamonoleechi3 hours ago

if you liked this topic, you might be interested in https://thegamingemporium.com/recent/

fb035 hours ago

AI is completely cracking up the emulation bubble. We're not even emulating things anymore, we're just reverse engineering things and directly porting games. This is an awesome timeline for old game preservation. These fuckers aren't profiting from the games anymore, yet they won't release their IP, or update their old games to newer, more accessible platforms. So I really appreciate the work these kinds of developers have been doing.

Gonxa62823 hours ago

Tbh, I think it's not an awesome timeline. AI is kinda motivating everyone to do everything on their own instead of gathering up and contributing to one (or two) projects, which is something I'm worried about in Open Source software as a whole. If we were using AI to contribute to a single decomp, making it as good as it could possibly be and gathering knowledge about the game, it would probably be much, much better. Instead, we are getting a mountain of shoddy, vibe-coded ports

nullify883 hours ago

> AI is kinda motivating everyone to do everything on their own instead of gathering up and contributing to one (or two) projects, which is something I'm worried about in Open Source software as a whole.

I think the people who are relying upon AI the most, might not contribute to OSS anyway. I can certainly say I am in that boat because I do not have software development skills and I do not want to learn how to do it. However I am very much using AI to write alternatives to some software I use like Kodi, because I can have something bespoke to my needs and perform "better" in terms of metrics that I care about, which may not align with metrics the contributors care about.

Have you tried making a skin for Kodi? Awful experience, poorly documented, and something only a handful of the community can do. They tend to perform poorly because of an over dependence on python plugins, have many foot guns, and can feel sluggish and unresponsive. But I can say make me a media player that looks like Netfix and pulls trending from trakt, and in one shot have something working on Android TV that performs far better for me.

There maybe arguments that AI couldn't have done that without OSS like Kodi to train on but I dont think thats accurate.

NitpickLawyer2 hours ago

> AI is kinda motivating everyone to do everything on their own instead of gathering up and contributing to one (or two) projects, which is something I'm worried about in Open Source software as a whole.

A huge reason for that is the knee-jerk reaction of some communities (gaming especially, for some weird reason) at AI usage. So people build for an audience of one (maybe sharing with their closed friend group), and move on with their lives.

jamesgeck0an hour ago

It's not that weird.

In the US at least, the gaming industry as a mismanaged trash fire. Workers are underpaid and unemployment is high. Executives are regularly shuttering studios responsible for highly acclaimed games and touting AI as the solution to all the problems. Given this framing, the way to support the studio making your favorite games is to make it clear that you don't want to replace everyone with AI. In fact, no AI use at all. It's one extreme in response to another.

From a hobbiest perspective, it's not great either. Translation projects that have been in the works for years have gotten beat to the punch by (extremely shoddy) AI projects helmed by people who don't speak the language they're supposedly translating. In one recent case, a half-completed human translation was stolen, finished with AI, and presented as an original work. Decompilation projects have had similar issues; AI use isn't disclosed until people start discovering that the result isn't accurate to the original.

flyingpenguinan hour ago

At this point, the anti-AI fight is over, and all of the communities trying to keep it going are just causing weird misshapen progress horizons.

Feel how you want about it, but as a in industry programmer, I have watched phrasing shift from

Coding: Writing code by hand

Vibe coding: writing code by prompt

to

Manual Coding: Writing code by hand

Coding: writing code by prompt

I have not seen a single person at work open an IDE. Nor have I talked to anyone that has in a year. Its over, coding via ai IS coding now.

shooly3 minutes ago

I think you forgot the #sponsored tag.

There is no reason why gamers should be OK with use of AI to make games - AI doesn't solve any problems currently haunting the industry, it only exacerbates existing problems. If people were suddenly OK with AI in games, games won't get better - they will get even worse.

hbn3 hours ago

In theory it would be great if we had a bunch of experts reverse engineering these things and making better decomps but in reality most people find the work miserably boring, no one's gonna pay you for it, and it almost never happens.

Kaze Emanuar has done so much great work in optimizing Mario 64's engine over the years (check out his YouTube videos, they're fantastic) but guys like him are such an anomaly, I'm fine if robots are breathing new life into retro games and empowering consumers to be able to play these games in more ways instead of paying the IP holder every ~7 years to play a (likely lazy) port of a game they already own on a new system.

epihelix43 minutes ago

> AI is kinda motivating everyone to do everything on their own instead of gathering up and contributing to one (or two) projects, which is something I'm worried about in Open Source software as a whole.

Ah, yes. Thank goodness the FOSS community never generated many different tools for the one purpose before, right? \s

flohofwoe3 hours ago

> This is an awesome timeline for old game preservation.

It's not preservation though, it's basically remastering. We'll still need to preserve as much data from the original games (including, if possible, original source assets and source code). And yeah, I have no qualms about the legality of it all, a proper legal definition of the concept of abandonware would be nice though.

whizzter2 hours ago

Original source assets isn't really feasible imho, could be custom toolchains and specific compiler versions that things were built with (and breaking on others), sure IF you manage to collect everything to rebuilding (probably needing some kind of VM image to preserve for rebuilding), what's the difference from just making sure the rebuild binaries is capable of running with the prepared assets?

(I'm not looking forward to people automatically AI-upressing of old games, I'd just prefer them to render-upscale and be faithful to the resolutions the games were built for back in the day).

NewsaHackO22 minutes ago

I wonder, with how aggressive most copyright holding companies are, if there is going to be a push to hold AI companies liable for reverse engineering like this. It possible AI companies designate it as forbidden knowledge, and “realign” models to not allow it

psygn895 hours ago

Isn't this technically illegal to reverse engineer and share? It's awesome but I feel like it'll hasten big companies to lobby and make some harsh laws around this type of thing. I'm surprised Claude/Fable allows this? Or do we trick them to do it?

theturtletalks4 hours ago

It’s legal to have a ROM of a game you actually owned and ripped. This is simply allowing the ROM that you actually own to be played on a different console, the web.

In this case, the user is distributing the ROM which is illegal. But the method to make it work on the web is fair use. The legal way to do it would be a website where users “insert” their own rom and the website simply lets you play that ROM on the web.

ahoy4 hours ago

there is no ROM in the linked github repo

theturtletalks4 hours ago

That’s fair, I saw a screenshot of God of War running in the browser in the ReadMe so assumed the person put it online.

accidc4 hours ago

Also pedantic but: it’s jurisdiction dependent

apefulsin4 hours ago

[dead]

rvz4 hours ago

> Isn't this technically illegal to reverse engineer and share?

Software engineers are devoid of copyright and trademark laws and want everything to $0 and will become the new starving artists without knowing it.

Don't be surprised to see far more mass layoffs in the games industry.

dandersch4 hours ago

I understand where you are coming from, but look at what else copyright protection has brought: studios and publishers are so insecure that they want to lock consumers out of 10+ year old games so that they don't have to compete with (their own) past games.

Maybe putting some pressure on making games that are actually new and different isn't a bad thing.

rvz4 hours ago

> I understand where you are coming from...

I don't think you do. But please continue.

> Maybe putting some pressure on making games that are actually new and different isn't a bad thing.

That's not the point. It is what comes afterwards and software engineers cannot have it both ways.

This will make game studios move to world models with the real game being never released, but only simulated and streamed to you.

So let's see what happens.

ThrowawayR23 hours ago

That genie escaped the bottle a couple decades ago when The Pirate Bay went online and game studios and publishers started focusing on MMOs and other live service games that couldn't be torrented to compensate. This is a pittance in comparison and it's for a long dead console platform to boot.

Pannoniae4 hours ago

And why do you think people won't be able to rip the streamed games too?

flohofwoe3 hours ago

It's a bit harder to reverse engineer a game from a video stream than from a binary+data dump ;) (of course an LLM can come up with a knock-off that roughly has the same theme of what it sees in the video-stream, but that would basically be "Italian Spiderman - the Game".

Pannoniae27 minutes ago

Sure, but the LLM can either 1. recreate the assets from the good old "view it from multiple angles" trick 2. exfil the running game from the servers :P

thereader124 hours ago

I don't think reverse engineering or open source is creating the starving artists.

Also, video game programmers are already starving artists comparatively. To many people want to make video games to exploitation is rife. Only publishers benefit from your rhetoric. At least artists get royalties

rvz4 hours ago

> Also, video game programmers are already starving artists comparatively.

So this is making it better for them?

> To many people want to make video games to exploitation is rife. Only publishers benefit from your rhetoric. At least artists get royalties

Now both the publisher and the artist (we can now include game developer) will get $0 and cannot have it both ways.

We can accept mass decompilation of games and existing ones being sold today and offered for free, and also accept significant layoffs and the collapse of an entire industry.

nullify882 hours ago

Have you not seen the mass layoffs from Microsoft and other major publishers? And the toxic work environment they are often associated with? AI has nothing to do with that. I hope we see a resurgence in Indie studios and studios that care about their community and customers and not pulling rug pulls like Ubisoft do. Or the union busting Rockstar did.

The industry needs a shake up.

ihuman4 hours ago

> This is an awesome timeline for old game preservation

How? The ISOs/ROMs were already preserved and playable on emulators on newer platforms

functionmousean hour ago

It's great for people who want to point and hype. Terrible for people who actually wish to play and preserve games, though.

dfxm1244 minutes ago

To add some context, in this case, PPSSPP exists and is certainly no less accurate, and you can get a psp and games for a reasonable amount of money.

It's like not this represents something like a cycle accurate Cave CV1K board, which are very expensive and imperfectly emulated.

satvikpendem2 hours ago

> cracking up the emulation bubble

and cracking up the cracks bubble. Denuvo, a very popular and until recently quite successful DRM solution was cracked repeatedly over the past year or so via AI which caused the company to try to sue this anonymous cracker.

seki2855 hours ago

Nothing will happen.

nikhilunni4 hours ago

Been working on this same idea for Super Smash Bros. Melee on the GameCube! Also runnable in the browser: https://github.com/nikhilunni/melee

Port is about 80% done, but completely mechanical with AI and an oracle (the Dolphin emulator)

lucasverra5 hours ago

maybe i will finally able to play MGSolid saga on a browser on my mac :)

Onavo3 hours ago

I saw one yesterday for GTA 6 it was taken down. Somebody can probably dig up the X link.

[deleted]3 hours agocollapsed

marinhero3 hours ago

You mean GTA 5?

Onavoan hour ago

Yup, I think it's playgta5.com but you will probably have to look for mirrors or on wayback

doublerabbit6 hours ago

Insane that we can now decompile PSP games to WebGL. Emulation has come far from 2006 where ePSXe the PS1 emulator would only run on a beefy Pentium.

0x000xca0xfe21 minutes ago

No need to decompile even.

I did a similar project for an old Pentium MMX 350MHz level game and instead vibecoded an x86-32 to WASM dynarec that runs the game at 1k+ MIPS in Firefox, on my old Zen2 PC. I was shocked that this is even possible. Still feels unreal to see.

glouwbug2 hours ago

AI excels at this because it can work at the function level to brute force decomp to C with void* fiascos and keep trialing and erroring until the compiled md5sum matches the original binary’s. The resulting source will be unreadable and unmaintainable but at least compiler and platform agnostic.

Humans are still better at this given time. Check out sm64’s decomp quality

anonymous9082134 hours ago

> A small PSP kernel. Whatever the game asks of the PSP's operating system is answered by high-level emulation in profile/host

So this is just an emulator with extra steps. The kind of bad emulator that requires game-specific patches instead of getting the emulation correct to begin with, and is embedding the emulator into a binary together with the game. Absolute slop.

woah4 hours ago

> The kind of bad emulator that requires game-specific patches instead of getting the emulation correct to begin with, and is embedding the emulator into a binary together with the game. Absolute slop.

There's kind of a bitter lesson variant with AI coding where the work to make a simple, consistent, flexible, DRY platform or library isn't really worth it when anyone can press a button and get a variant customized to their needs in minutes.

People playing the game don't care about the elegance of the emulator, and if there is a bug in the slop, they can just have their AI fix it immediately and keep playing.

anonymous9082134 hours ago

Or they can just save their time/money, use a human-crafted emulator, and not deal with their game crashing constantly and all manner of stupid bugs. It is genuinely insane that you believe your average joe video game player would rather spend $100~200 on a subscription, prompt for an emulator, then prompt it over and over to fix showstopping bugs rather than playing something that works for free, and yet that is what you are supposing when you suggest they "don't care" about the "elegance" of the emulator.

You would at least have a point if people were slopping out emulators for things that didn't exist but, surprise surprise, we still don't have a Switch 2 emulator. Almost like this entire notion is a complete fraud and all it can do is regurgitate existing code poorly.

RandomGerm4n2 hours ago

At first, the handmade emulators were just as buggy and crashed all the time. That’s just normal during development. With AI tools, however, you now have the advantage of being able to theoretically create a comprehensive testing environment where, eventually, an LLM will play the games on its own and fix any bugs it finds, so that the user ends up with a nearly perfect emulator.

The Switch 2 is a completely different story than other consoles. To create an emulator for it, you'd have to be able to reverse-engineer the Switch 2, and that won't be possible until there's a jailbreak.

dwood_dev17 minutes ago

Good news here, someone claims to have found a userland exploit in at least one game and dumped the game via HDMI capture of visual encoded data. They might be full of it, or we might have a path for Switch2 ROMs.

I say that as a Switch 2 owner with a pretty extensive Nintendo library. I dont actually have any interest in using Switch 2 ROMs this decade, but maybe next.

Source: https://x.com/gezine_dev/status/2100262587263037470

[deleted]2 hours agocollapsed

woah3 hours ago

Sounds like you've got an axe to grind

anonymous9082133 hours ago

I certainly do. I'm paying 300, 400% more for my PC/server parts and HN has been ruined because of fraudsters selling a con, among many other undesirable side effects. People like yourself selling incoherent hype like "people will just prompt an emulator for themselves" are part of the problem. It would be weird if I didn't have an axe to grind with hucksters doing their best to ruin things for everyone else.

[deleted]14 minutes agocollapsed

wren69913 hours ago

> There's kind of a bitter lesson variant with AI coding

Yeah, it feels like we've entered the era of disposable software.

Also I do like how everyone in this thread seemed to immediately and unanimously clock this project as slop.

jamesgeck0an hour ago

There have been A LOT of buggy game ports released and immediately abandoned. It's all well and good until you want to actually experience the game as intended. Running into a huge issue that will never be fixed several hours in radicalizes folks pretty quickly.

fzeroracer18 minutes ago

Unfortunately, all of these slop-ports will wow and amaze people that have zero intent of actually playing the game. They're the software equivalent of clickbait.

hn-front (c) 2024 voximity
source