r/pcmasterrace • Ryzen 1600X, 250GB NVME (FAST) • 4h ago

Meme/Macro What a week it's turning out to be

Post image
12k Upvotes

1.0k comments sorted by

View all comments

13

u/Ok_Wolf8356 2h ago

Can someone explain to me how this is done? So someone buys the game and rips it from PlayStation or Xbox and puts code into Claude? And Claude has to start building it from beginning to end?

12

u/stevecrox0914 1h ago

When you compile an application you create "machine code" that the operating system  passes to the CPU.

XBox and Playstation use the same Ryzen CPU and Radeon GPU's found in a PC, so decompiling its machine code will produce something that in theory runs on a PC.

Decompilers have existed for decades, they look at machine code and convert it into source code. Unfortuntely all the code comments, class, variable names are lost, compilers also optimise certain actions and so the decompiled source code doesn't necessarily work and even more context is lost. You also have compiler obfuscation tools to really make it difficult.

As a result most humans wouldn't attempt to decompile and rebuild something as complicated as GTA VI. It would be much faster to design/build your own engine from scratch (see OpenRA, OpenRCT  etc..)

AI doesn't see a difference between decompiled source code and normal source code and its able to suggest fixes, naming, etc.. In the same way. People have been spending tokens to fix the decompiled source  its an iterative process where each pass gives better context.

A Playstation 5 runs a BSD based operating system (Open Source), Sony have written a number of helper libraries and they provide a modified OpenGL interface for games to use. BSD users can decompile but they would need to reverse engineer the OpenGL differences and write a driver.

The Xbox runs a modern Windows Kernel, has a cut down Windows userspace and uses DirectX. Basically its a Windows 11 PC.

So they are taking obfuscated decompiled windows source code and making it work

16

u/jbeck26 2h ago

The files for the Xbox version were leaked, everyone is using those to recreate it on PC

8

u/ch4os1337 LICZ 1h ago edited 1h ago

The game itself is not being recreated since it's already mostly a PC game designed to work on the same architecture, it's more accurate to say it's being added to and modified to be compatible.

6

u/Ok_Wolf8356 2h ago

This made it a whole lot easier to grasp thanks.

6

u/Ramburglar77 2h ago

The developers built the game on PC first so it's probably easier than a built for console exclusive but I have no coding experience so could be very wrong.

But it's more like a translation than rebuilding it as far as I know. They translate it from Xbox language to Windows language. It's a process that could be done manually but would be very time consuming, and Claude just helps with the busy work. It still takes a lot of fine-tuning actual humans.

Claude is kind of like Google translate but people that actually speak both languages have to go through to make the translation make actual sense, feel more natural, and fix mistakes.

Like I said, no coding knowledge, this is just my way of trying to explain my limited understanding of it.

14

u/ZombieJasus 2h ago

At the end of the day a console is just a PC with a bunch of proprietary software

2

u/Optimaximal 49m ago

It's not like the 360/PS3 era when they were a different architecture to the PC - both consoles have been X86-64 since the PS4/One.

Only Switch games need translation (as they're based on ARM instructions, which makes mobile porting easier).

1

u/LLestat89 35m ago

I think you are giving the humans a bit too much credit, weren't some of the console demands just "Claude, compile and do better"

-4

u/Huge_Swimming_5968 2h ago

Sounds a lot like guessing.

3

u/reformed_recidivist 2h ago

Seems to be fairly effective guessing

2

u/Ramburglar77 2h ago

Fair, I'm also trying to explain it simply.

I don't think saying that they just use Claude to decompile the files means much to the person I was responding to.

How would you describe it?

1

u/PurbulentTriest 2h ago

Does it look like guessing? 

1

u/OddballDave 1h ago

They create an emulation layer. The game thinks it's giving instructions to an Xbox and the emulation layer converts those instructions into something the PC understands. The PC thinks it's getting instructions from a PC game and does as it's told. And vice versa.

1

u/Kazer67 1h ago

It start to build to compatibility layers.

1

u/mooptastic 49m ago

it's still gotta get released, ppl are chomping at the bit though