Live data from Hacker News

RPCS3: An open-source PlayStation 3 emulator for Windows written in C++

github.com

41–50 of 50 posts

Re: RPCS3: An open-source PlayStation 3 emulator for Windows written in C++

#41
post #38

Earlier quoted context omitted.

"The real problem is that any modern x86 processor including the Pentium III can execute multiple instructions at once. So it's not like emulating a Z80 doing one instruction at a time. The actual algorithm and how x86 does this is undocumented and still unknown. In short, the Xbox's CPU can be emulated, but not accurately." How is that relevant? Is there any code compiled for the Xbox that actually relies on how the…

Perhaps they know the PowerPC's algorithm for performing out of order execution? It might have been available for a long time, or have been shared to the public after IBM started opening up the Power architecture since 2004.

Or most probably: it doesn't matter at all since compilers aren't generating code that depends on such details?

Re: RPCS3: An open-source PlayStation 3 emulator for Windows written in C++

#42
post #38

Earlier quoted context omitted.

"The real problem is that any modern x86 processor including the Pentium III can execute multiple instructions at once. So it's not like emulating a Z80 doing one instruction at a time. The actual algorithm and how x86 does this is undocumented and still unknown. In short, the Xbox's CPU can be emulated, but not accurately." How is that relevant? Is there any code compiled for the Xbox that actually relies on how the…

Perhaps they know the PowerPC's algorithm for performing out of order execution? It might have been available for a long time, or have been shared to the public after IBM started opening up the Power architecture since 2004.

[deleted]

Re: RPCS3: An open-source PlayStation 3 emulator for Windows written in C++

#43
post #38

Earlier quoted context omitted.

Perhaps they know the PowerPC's algorithm for performing out of order execution? It might have been available for a long time, or have been shared to the public after IBM started opening up the Power architecture since 2004.

Or most probably: it doesn't matter at all since compilers aren't generating code that depends on such details?

CPUs (x86 or PPC) only do out-of-order execution when it is provably the case that it doesn't matter. The result of running any given sequence of instructions in lock-step, or out-of-order should be exactly the same. If not, you found a CPU bug!

That said, timing matters in these tight inner loops, and that is where the details of the CPU pipeline matter, with respect to emulators. How many nanoseconds would it have taken for the emulated CPU to execute those instructions? That requires knowledge of how the CPU works. And sometimes, unfortunately, game code stupidly depends on these details.

Re: RPCS3: An open-source PlayStation 3 emulator for Windows written in C++

#44

How will this finesse the (hardware-based) DRM on PS3 games?

Most of the encryption done on the PS3 is actually performed in software on an isolated SPU core. The crypto code has been dumped and the algorithms reversed. This emulator leverages naehrwert's excellent scetool to decrypt the SELF files.

Re: RPCS3: An open-source PlayStation 3 emulator for Windows written in C++

#45

Earlier quoted context omitted.

They are not, the problem is how you use them. For example - fetching a texture data on PS3 takes about 50 clock cycles, while on a PC it takes 1000-2000 cycles, because the request has to go through all the driver layers first. PS3 uses its own version of OpenGL(PSGL) which has a much more low level access to hardware. That level of access is simply not provided by PC hardware, so it has to be somehow emulated - and…

Do you think DX12 or Mantle will help with overcoming the high-level API overhead?

The 360 emulator (Xenia) dev seems to think so.

Re: RPCS3: An open-source PlayStation 3 emulator for Windows written in C++

#46
post #10

Earlier quoted context omitted.

Do you think this is because of difficulty in emulation or because the X-Box was so easy to hack? It was not super expensive to buy a used X-Box and mod it even back when new games were coming out for it, so maybe it just didn't seem like a worthwhile investment to spend time writing an emulator?

I'd recommend reading this post [1] by the dev of an existing Xbox emulator. It's a summary of the issues inherent to the emulation of the original Xbox, highlighting some major hurdles and technical difficulties that would have to be overcome. [1] http://www.neogaf.com/forum/showpost.php?p=48088464&postcoun...

Having spent a lot of time doing Xbox emulation, the biggest issue is simple: statically linked XDKs meant that doing high-level emulation was next to impossible. You had to find signatures for every XDK, which isn't viable considering that most of them weren't publicly released.

LLE/MME can work, but it's significantly more effort to pull it off; that's the approach I was taking, when I was still working in it.

Re: RPCS3: An open-source PlayStation 3 emulator for Windows written in C++

#47
post #29

Earlier quoted context omitted.

I was talking specifically about the PS4. I don't know why I thought they'd use OpenGL, I just naively thought Xbox == DirectX and PS4 == OpenGL. Seemed easier for the devs to port their games on a well known and documented API. What do they use instead? A custom API?

The PS4 uses a couple APIs for game graphics, GNM and GNMX[1]. I've heard that their shader language is similar to GLSL (corrected by lunixbochs). The menus are built in WebGL running inside a stripped-down Webkit browser. Developers are unable to use WebGL for games, but it isn't out of the question that will be supported in the future. [1] https://en.wikipedia.org/wiki/PlayStation_4_system_software

The shading language is similar to CG and HLSL, not very similar to GLSL.

Re: RPCS3: An open-source PlayStation 3 emulator for Windows written in C++

#48

Earlier quoted context omitted.

The PS4 uses a couple APIs for game graphics, GNM and GNMX[1]. I've heard that their shader language is similar to GLSL (corrected by lunixbochs). The menus are built in WebGL running inside a stripped-down Webkit browser. Developers are unable to use WebGL for games, but it isn't out of the question that will be supported in the future. [1] https://en.wikipedia.org/wiki/PlayStation_4_system_software

HLSL is Microsoft's shading language. GLSL is the OpenGL shading language.

You're point?

Re: RPCS3: An open-source PlayStation 3 emulator for Windows written in C++

#49

Uhh... it's also for Linux. Comments in the forums look like the Linux version is just as mature as the Windows one. Also the FAQ says nothing about "windows only." Gotta make sure Windows doesn't get all the gaming glory, eh? Eh?! Eh?!?!?!

Top lines of the FAQ currently > What is RPCS3? > RPCS3 is an open-source Sony PlayStation 3 emulator for Windows written in C++. It currently runs only small homebrew applications. The source code for RPCS3 is hosted at: https://github.com/DHrpcs3/rpcs3/

It doesn't say "only," and at the bottom of the page:

As long as this platform is powerful enough to emulate the PlayStation 3, yes, there is a high chance that RPCS3 will be ported there. However, at the moment we only target Windows and Linux.

Boo-ya-ka-sha? FAQ is probably just outdated. Never seen that on an open source project ;-) luckily I read the whole thing <3

Re: RPCS3: An open-source PlayStation 3 emulator for Windows written in C++

#50
post #43

Earlier quoted context omitted.

Or most probably: it doesn't matter at all since compilers aren't generating code that depends on such details?

CPUs (x86 or PPC) only do out-of-order execution when it is provably the case that it doesn't matter. The result of running any given sequence of instructions in lock-step, or out-of-order should be exactly the same. If not, you found a CPU bug! That said, timing matters in these tight inner loops, and that is where the details of the CPU pipeline matter, with respect to emulators. How many nanoseconds would it have…

With newer-gen high-level consoles and emulators, is that really the case? Having cycle/instruction accurate emulation only seems to be an issue for older consoles (PS2 and before?) where programmers actually relied on all sorts of things to eek out every cycle's worth.

On the Xbox, is that really the case?

Post reply on HN