Dolphin, the GameCube and Wii emulator - Forums

Full Version: Nvidia cuda and ati stream
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Would implementing nvidia cuda and ati stream be possible? I mean, if it's possible then dolphin would be faster right?
Cuda and Stream utilize massive paralleling of code. Dolphin doesn't work this way, so there wouldn't be any difference unless the devs recoded the entire emulator, which wouldn't be worth the hassle for what little improvement would come.
ummmmmmm have you checked the last 2000 revisions? there is an option for open cl but i dont know how much ow an effect that it has because ati has really half-assed it.
Quote:ummmmmmm have you checked the last 2000 revisions? there is an option for open cl but i dont know how much ow an effect that it has because ati has really half-assed it.

That's different. The opencl texture decoder allows texture decoding to be done on the gpu which can improve the speed of texture streaming, but it does not help improve framrates. He is talking about reworking dolphin to run on the gpu with cuda or ati stream. This would be stupid due to the massive amount of work needed to rewrite the core and since gpus lack branch prediction even after the multiple years spent rewriting the core were over the result would be slower, not faster.

And what do you mean ati has half assed opencl? ATI has supported opencl as well if not better than nvidia, especially since nvidia wanted to hold onto cuda and opencl was a potential threat to that.
i'm really confused because cuda/stream/3 core/4 core, i thought would be the only way to add decent performance although people keep saying too much work, so maybe that's what is actually keeping permance back.

However, i did a bit of wiki-ing and i found that wii has cpu's by ati, ibm and a 3rd.

now, does wii contain all these, or just one of these. I mean, if wii is using 3 cpu's then what on earth makes dual core sufficient right?
It has CPU by IBM, GPU by ATI, and some additional chips from various people.
@daaceking

I'll help you out and make an ultra oversimplified step by step list of what the wii does and what dolphin does to emulate it.

But first a glossary of terms you might not know:
DSP = Digital Signal Processor, a chip that creates a digital audio signal by carrying out instructions
GPU = graphics processing unit, a chip that draws images by carrying out instructions (what you see on your display is a video, and videos are made up of images that the gpu draws)
CPU = a microprocessor that carries out the instructions of a program

Wii:
1. CPU carries out the instructions of a program (a game is a type of program). The output of the program are dsp functions and gpu functions.
2. The DSP carries out those functions to create an audio signal. The GPU carries out it's functions to create a video signal (made up of many images per second).
3. The video signal is sent to your display and displayed. The audio signal is sent to your speakers and the speakers produce sound from it.

Dolphin:
1. Takes machine code that is meant for the wii and decompiles it to C++.
2. Recompiles C++ into x86 code (code that can run on our cpus).
3. Runs the x86 code, the output is gpu and dsp functions.
4. Compiles the dsp and gpu functions into code that our chips can use.
5. Our gpu carries out the gpu functions to create a video signal and our dsp carries out the dsp functions to create an audio signal.
6. Send the video signal to a monitor and the audio signal to speakers.

What dolphin essentially does is take code that is meant to be run on completely different chips that the wii uses and turn it into code that the chips in our systems can recognize and understand.

The CPU recompiler (emulated cpu) runs on the first core (steps 1-3) and the gpu and and dsp recompiler run on the second core (step 4). Step 5 runs on our gpu and dsp.

We could get dolphin to use 3 cores by having the dsp and gpu compilers on separate threads but since compiling audio functions requires so little processing power compared to gpu functions we would get less than a 5% speedup from doing this (so it's not worth the extra effort). And since the wii has only 3 chips involved in the process we can only use up to 3 cores, one for emulating each chip. For anyone who already understands how dolphin works please don't attack me for this, I know it's not a completely accurate description I'm just trying to explain it to him in a way he'll understand.
(09-18-2010, 06:00 AM)NaturalViolence Wrote: [ -> ]@daaceking

I'll help you out and make an ultra oversimplified step by step list of what the wii does and what dolphin does to emulate it.

But first a glossary of terms you might not know:
DSP = Digital Signal Processor, a chip that creates a digital audio signal by carrying out instructions
GPU = graphics processing unit, a chip that draws images by carrying out instructions (what you see on your display is a video, and videos are made up of images that the gpu draws)
CPU = a microprocessor that carries out the instructions of a program

Wii:
1. CPU carries out the instructions of a program (a game is a type of program). The output of the program are dsp functions and gpu functions.
2. The DSP carries out those functions to create an audio signal. The GPU carries out it's functions to create a video signal (made up of many images per second).
3. The video signal is sent to your display and displayed. The audio signal is sent to your speakers and the speakers produce sound from it.

Dolphin:
1. Takes machine code that is meant for the wii and decompiles it to C++.
2. Recompiles C++ into x86 code (code that can run on our cpus).
3. Runs the x86 code, the output is gpu and dsp functions.
4. Compiles the dsp and gpu functions into code that our chips can use.
5. Our gpu carries out the gpu functions to create a video signal and our dsp carries out the dsp functions to create an audio signal.
6. Send the video signal to a monitor and the audio signal to speakers.

What dolphin essentially does is take code that is meant to be run on completely different chips that the wii uses and turn it into code that the chips in our systems can recognize and understand.

The CPU recompiler (emulated cpu) runs on the first core (steps 1-3) and the gpu and and dsp recompiler run on the second core (step 4). Step 5 runs on our gpu and dsp.

We could get dolphin to use 3 cores by having the dsp and gpu compilers on separate threads but since compiling audio functions requires so little processing power compared to gpu functions we would get less than a 5% speedup from doing this (so it's not worth the extra effort). And since the wii has only 3 chips involved in the process we can only use up to 3 cores, one for emulating each chip. For anyone who already understands how dolphin works please don't attack me for this, I know it's not a completely accurate description I'm just trying to explain it to him in a way he'll understand.

thanks, that's a very good explanation. but does the wii use 3 cpu's or one cpu?

and how powerful is the cpu/cpu's the wii uses?

why not try to decompile in core 1 recompile in core 2 execute in core 3 and exucute dsp and gpu (step 4) in core 4?

whouldn't that reduce the load over all 4 cores? Hence lower requirement in terms of Ghz?
No, because we would run into desync issues.
Wii has one cpu clocked at 729 Mhz.
Why would it desync? If it decompiled, put it memory until core 2 recompiler needs it, then stick it into memory until core 3 execute needs it. Can't that be done?
Pages: 1 2