Dolphin, the GameCube and Wii emulator - Forums

Full Version: Sony Playstation 3 - lvl0 key hacked (PS3)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7
The speed problems in dolphin have nothing to do with rendering and graphics. When CPU instructions are recompiled (think of it like translating a language to another language), sometimes the resulting list of instructions ends up being longer. This happens with every game in dolphin, so it runs slower than on the actual Wii.

An analogy using languages:

You are a translator, and some guy is speaking Spanish that you have to translate for someone else. Not only do you have to listen and translate the meaning of what he is saying, you also have to say it. Each and every sentence ends up bein longer than it was in Spanish.
(10-25-2012, 02:33 AM)Axxer Wrote: [ -> ]Each and every sentence ends up being longer than it was in Spanish.

In such an analogy, however long the translated sentence is depends on the translator's fluency with both languages and how literal the translations are. That's not even considering what language the Spanish is being translated into. Some sentences may be longer and some may be shorter. You may want to reconsider this analogy.

Markos

btw, I noticed that both Wii and PS3 are PowerPC based

Quote:The PS3 uses the Cell microprocessor, which is made up of one 3.2 GHz PowerPC-based "Power Processing Element" (PPE) and six accessible Synergistic Processing Elements (SPEs).
Quote:Wii: CPU: PowerPC-based "Broadway" processor, made with a 90 nm SOI CMOS process, reportedly† clocked at 729 MHz

This can't be an advantage to avoid the "language translation"? Tongue
To keep the analogy, is it in the same language, but with a different dialect? Big Grin
It's the best analogy I could think of on the fly Tongue

You get the idea though.

@Markos PPC is an architecture, not an instruction set. There is still a necessary translation.
(10-25-2012, 04:54 AM)Shonumi Wrote: [ -> ]
(10-25-2012, 02:33 AM)Axxer Wrote: [ -> ]Each and every sentence ends up being longer than it was in Spanish.

In such an analogy, however long the translated sentence is depends on the translator's fluency with both languages and how literal the translations are. That's not even considering what language the Spanish is being translated into. Some sentences may be longer and some may be shorter. You may want to reconsider this analogy.

That's actually a good analogy, the host CPU might have a way to express some common patterns from the emulated CPU in a shorter way, and stuff could be optimized that way in an emulator. We actually do that in Dolphin in some cases (cmp/bcc is the first that comes to my mind).
Hooray! My analogy was right but I was partially wrong.
@delroth - Even though part of the analogy holds up as it applies to computer science, it doesn't when applied to human language. As one who studied English for 4 years (plus Spanish in class, Japanese in my free time) I just can't say it's good in that regard at all. Analogies become less useful the more inaccurate one side of the comparison becomes. The fact is, not every sentence translated from Spanish will be longer than the original. In cases like these, it's probably better to explain by basic example so the OP has a clear idea of what's going on rather than comparing it to other things (which is always prone to caveats).
What delroth just said is that not every instruction translated will be longer either. Some will be shorter. Some will be the same. Some will be longer. Just like a language.
Axxer Wrote:@Markos PPC is an architecture, not an instruction set. There is still a necessary translation.

lolwut?

Instruction set = instruction set architecture (ISA), sometimes just shortened to architecture

PPC is an ISA, also called an instruction set. They do use the same ISA.

The PS3 ISA likely supports some newer extensions that the GC/Wii doesn't have (just like newer x86 cpus support some new instructions that older x86 cpus might not have) and the GC/Wii cpu probably has some custom instructions that the PPE doesn't support. But most of the GC/Wii PPC instructions should be supported natively by the PS3s PPE.

Now that doesn't mean that you would be able to completely eliminate cpu emulation. But it does make it a lot easier and reduce overhead a lot.

Axxer Wrote:What delroth just said is that not every instruction translated will be longer either. Some will be shorter. Some will be the same. Some will be longer. Just like a language.

1. Delroth is referring to the number of x86 instructions needed to emulate the behavior of a given PPC instruction. "longer" implies that you're talking about longer instructions, not more instructions. But I know what you meant.
2. Language works that way but in emulation it almost always ends up being much longer.

It is still a good analogy though. The best one that I've seen so far in fact.

Quote:To keep the analogy, is it in the same language, but with a different dialect?

Yes basically.

The PS3s processor actually has two different kinds of cpus with two different ISAs.
The PPE which uses a PPC ISA.
And the SPEs which uses a different ISA (I can't remember the name of it or be bothered to look it up right now).

Markos Wrote:The PS3 has a horrible set up for Dolphin - it relies heavily on multiple processes running on different processing units concurrently.

But it would reduce overhead significantly if a properly optimized JIT recompiler could be written. Doing so would require skilled programmers that understand the ins and outs of both systems and actually want to do it, and those are going to be hard to come by.

It's not a great processor for emulation in general but the whole multithreaded emphasis is not really why. The SPEs are basically designed for stream processing (similar to a GPU) and are basically the exact opposite of the type of processor you would want to run dolphins code (except for the graphics and audio backends of course). That leaves the PPE for cpu emulation. The PPE doesn't produce particularly good "general purpose" performance due to its 2 wide in-order pipeline, small cache, and piss poor branch prediction (among other things). It was designed to be small and low power so that the bulk of the chip could be dedicated to the SPEs.

It would be interesting to see if the reduced overhead would be enough to offset the disadvantages of the architecture. But even if you managed to get a couple of programmers that are as good as our developers are for that platform it would take MANY years of optimizing and debugging to get dolphin on the PS3 anywhere close to the status it currently enjoys on x86 PCs.

Also debugging on the ps3 is a bitch and I would imagine any complex emulator developer would become deeply insane within a few months of having to deal with it (lol simulators).

Markos Wrote:I guess the answer is quiet obvious but I'll ask it anyway. There isn't a possibility to make the emulator more gpu dependent? I can imagine it is now more cpu dependent because of the viaratie of videocards. (cpu's are more related to each other then gpu's right?) But because of the large scale of PS3 owners, there is a large group of users with the same hardware. I guess it will be a massive load of work, but if it works, it covers a large group of users.
Or is the answer just simple no. It isn't possible to make it gpu dependent?

The consistent hardware would allow for a PS3 version of the emulator to be optimized further than a PC version. There are a number of optimizations that developers can't use with PC applications due to differences in common cpu and gpu architectures used by clients. For example our developers don't have direct access to the full register set on x86 cpus thanks to hardware level register renaming. And GPU assembly programming or compiling GPU machine code is completely out of the question on a PC.

But whether these optimizations would be enough to power through the PS3s inferior hardware is likely unknown.

Lack of developer interest is really the bigger issue here though.
Quote:Instruction set = instruction set architecture (ISA), sometimes just shortened to architecture

:'( I'm done getting info from people on the forums. Someone told me this on the forums. Someone asked about running Dolphin on a PPC-based Mac because it used PPC, and then someone rejected the idea saying that it wasn't the same PPC, just the same micro-architecture series.
Pages: 1 2 3 4 5 6 7