Hacking Wii U support in Dolphin

Coto

-
Member
Joined
Jun 4, 2010
Messages
2,979
Trophies
2
XP
2,565
Country
Chile
IOS handle external interrupts from PPC (like threads tied to on-demand, specific to each component enumerated IRQ). It is able to connect PPC with ARM core and other devices.

ARM is able to use *glued* co-processors as well. I'm not sure AES is glued to ARM, but you could call a [MRS-MSR] move special processor opcode to carry data between PPC <-> ARM<-> external controller.

Also the IOS is used to run threads for networking and USB
 

CarlKenner

Member
OP
Newcomer
Joined
Jun 17, 2014
Messages
16
Trophies
0
Age
45
XP
87
Country
No, this is a terrible place to start because it is completely irrelevant to Wii U emulation. If you had started anywhere else you would have noticed that Wii U emulation is a completely different beast than GC/Wii and would have abandoned the idea of integrating that into Dolphin.
I guess it's a good thing I didn't start somewhere else then.

There is no way to introduce Wii U support in Dolphin that wouldn't require rewriting half of our codebase and compromising on GC/Wii emulation speed.
I think most people understand that. And I can live with that. Although there must be a way to do it without compromising GC/Wii emulation speed, even if it just loads a completely different DLL for each platform.
You're talking about changing from a kernel mode system emulation to a user mode system that runs under a kernel, from a single core system to a multi core system, from a fixed pipeline GPU to a complex programmable GPU, and that's not including the doubling in processing speed, the new hardware support, etc.
Yes. I'm counting on that. I think it will make things both easier and faster, and mean we don't have to worry as much about the new hardware. The GPU actually looks a lot easier to emulate than I was expecting, since it is basically just OpenGL, except for the fetch shader, the fact that shaders don't have to be in pairs, and the fact that the vertex indices have to be bigendian. We'll have to work out how the shaders are compiled and reverse that though.

There is no compelling reason to even try it - Dolphin is a fairly terrible codebase (though we're working on making that better), composed of a lot of old and hacky parts, and not up to modern programming standards.

Lots of people have worked on Dolphin though, and know how it works.
 
  • Like
Reactions: CydoniaDS

Foxi4

Endless Trash
Global Moderator
Joined
Sep 13, 2009
Messages
30,825
Trophies
3
Location
Gaming Grotto
XP
29,843
Country
Poland
SO new GPU + GX + ARM + I/O are in same chip, while PPC is seperate chip?
They're all on the same chip now, but two separate pieces of silicone. PPC cores and the BootROM are in Espresso, the GPU, Starbuck and everything else are in Latte. It's a very similar setup to Hollywood (GPU on one piece of silicone, ARM on the other called Starlet) and Broadway (PPC CPU). It's all been integrated into one chip now, but the overall structure is exactly the same (see: photos on the previous page).
 

TheChield

Ugly Troll
Member
Joined
Jul 10, 2013
Messages
210
Trophies
0
XP
112
Country
France
I have a really stupid question...
Is there someone here who noticed that Wii U has a multi core CPU ?
NDS emulation is quite slow with its 2 ARM to emulate. So emulate Wii U will be really useless...
 

uyjulian

Homebrewer
Member
Joined
Nov 26, 2012
Messages
2,567
Trophies
2
Location
United States
Website
sites.google.com
XP
3,882
Country
United States
They're all on the same chip now, but two separate pieces of silicone. PPC cores and the BootROM are in Espresso, the GPU, Starbuck and everything else are in Latte. It's a very similar setup to Hollywood (GPU on one piece of silicone, ARM on the other called Starlet) and Broadway (PPC CPU). It's all been integrated into one chip now, but the overall structure is exactly the same (see: photos on the previous page).

Exactly the same? I thought Wii U has one less chip than the Wii? (Wii : 3, Wii U : 2)
 

Foxi4

Endless Trash
Global Moderator
Joined
Sep 13, 2009
Messages
30,825
Trophies
3
Location
Gaming Grotto
XP
29,843
Country
Poland
Exactly the same? I thought Wii U has one less chip than the Wii? (Wii : 3, Wii U : 2)
*Structurally* the same. And the Wii has only two main chips - Broadway and Hollywood, Starlit is a part of Hollywood, it's not a separate chip. In the Wii U the GPU and the CPU were integrated together, along with Starbuck, so there's just one chip.
 
  • Like
Reactions: Margen67 and st4rk

uyjulian

Homebrewer
Member
Joined
Nov 26, 2012
Messages
2,567
Trophies
2
Location
United States
Website
sites.google.com
XP
3,882
Country
United States
*Structurally* the same. And the Wii has only two main chips - Broadway and Hollywood, Starlit is a part of Hollywood, it's not a separate chip. In the Wii U the GPU and the CPU were integrated together, along with Starbuck, so there's just one chip.

Okay the picture is confusing me.
Wii = 3 black things on 2 PCBs
Wii U = 2 black things on 1 PCBs

?
 

Foxi4

Endless Trash
Global Moderator
Joined
Sep 13, 2009
Messages
30,825
Trophies
3
Location
Gaming Grotto
XP
29,843
Country
Poland
Okay the picture is confusing me.
Wii = 3 black things on 2 PCBs
Wii U = 2 black things on 1 PCBs

?
That's the de-packaged chips. Here's how they look like still packaged:

Fn0osNN.jpg

On the Wii you can see Hollywood, the GPU, with two pieces of silicon (one is the AMD GPU and the other is the Starlit ARM core) and Broadway which is the CPU.


O1LNKGh.jpg

On the Wii U you can see one chip with two pieces of silicon - one is called Espresso (three PPC cores CPU) and one is called Latte (AMD GPU and the Starbuck ARM core). Since the GPU has been integrated onto the same chip as the CPU, you only see two "black things", meaning pieces of silicon.

Long story short, the setup is *exactly* the same, except on the Wii the chips were connected externally on the PCB and on the Wii U they're connected on the same chip.
 

delroth

Well-Known Member
Newcomer
Joined
Nov 19, 2013
Messages
45
Trophies
0
Age
30
XP
296
Country
Swaziland
Translating an ISA is still translating an ISA, at least for the common, not-too-weird ISAs (MIPS, ARM, PPC, X64, SH4, ...). Translating a program that's made to run in kernel mode is NOT the same as translating a program that's made to run under a kernel. Translating a program that's made to run in an environment where pages are W^X is also NOT the same as translating a program made to run in an environment where self-modifiable code is the standard and where games implement their own paging to work around RAM limits. Translating a program that is single-core requires way less carefulness and synchronization in the implementation than translating a program that uses several core on a CPU.

The fact that Espresso and Broadway are both PPCs are really irrelevant to emulation. ISA translation is probably the least important part of Dolphin's JIT, and a JIT for Espresso would look nothing like a JIT for Broadway. In fact, something like PCSX2's EE JIT is probably way more similar to Dolphin's JIT than an imaginary Wii U JIT would look like, even though the EE is MIPS and Broadway/Espresso are PPC. In terms of similarity to Wii U emulation, I still stand on my position that Xbox 360 emulators are the closest you have: the ISA is not identical to Espresso (64 bits, more recent PPC) but it's also user side emulation, for a multi core CPU, without self-modifiable code. Same with RPCS3, for that matter.

If you don't agree, please back your argument with something less idiotic than die shots to compare emulation of two platforms.
 

CarlKenner

Member
OP
Newcomer
Joined
Jun 17, 2014
Messages
16
Trophies
0
Age
45
XP
87
Country
Except for the multi-core part, it sounds like your objection is not that Dolphin couldn't run Wii U code, and not that Dolphin couldn't run Wii U code as fast as it runs Wii Code, but rather that it would be possible to run Wii U code much faster than Dolphin runs Wii code if we started writing an emulator from scratch.

What Xbox360 emulators are there though?

There are political reasons, not just technical reasons, why it's good to start with Dolphin. Who is going to want to work on an Xbox360 emulator to make it into a Wii U emulator?

Anyway, for now, I just want to use the interpreter and debugger. I'm not talented enough to go straight to JIT.
 
  • Like
Reactions: CosmoCortney

CosmoCortney

i snack raw pasta and chew lollipops
Member
Joined
Apr 18, 2013
Messages
1,768
Trophies
2
Location
on the cool side of the pillow
Website
follow-the-white-rabbit.wtf
XP
3,007
Country
Germany
Except for the multi-core part, it sounds like your objection is not that Dolphin couldn't run Wii U code, and not that Dolphin couldn't run Wii U code as fast as it runs Wii Code, but rather that it would be possible to run Wii U code much faster than Dolphin runs Wii code if we started writing an emulator from scratch.

What Xbox360 emulators are there though?

There are political reasons, not just technical reasons, why it's good to start with Dolphin. Who is going to want to work on an Xbox360 emulator to make it into a Wii U emulator?

Anyway, for now, I just want to use the interpreter and debugger. I'm not talented enough to go straight to JIT.


I agree.
The Wii U has more cores than the Wii and GCN. So the emulator could use more Cores of the CPU (maybe 3 or even 6? (please correct me if i'm wrong))
So... emulated Wii U games won't run that slow at all because the clock speed isn't much higher than on the wii?
 

driverdis

I am Justice
Member
Joined
Sep 21, 2011
Messages
2,867
Trophies
2
Age
31
Location
1.048596β
XP
2,838
Country
United States
I agree.
The Wii U has more cores than the Wii and GCN. So the emulator could use more Cores of the CPU (maybe 3 or even 6? (please correct me if i'm wrong))
So... emulated Wii U games won't run that slow at all because the clock speed isn't much higher than on the wii?

clock speed is roughly double, and that should cause games that utilize a lot of of the processor to run slow with current processors. eventually, this will not be a problem as newer faster processors will come out. faster processors along with code optimization of the emulator is a big part of why most Wii games can hit close to or at 100% emulation speed with the last couple generations of processors.
 

Kargaroc

Well-Known Member
Member
Joined
Nov 29, 2013
Messages
183
Trophies
0
XP
231
Country
United States
Well the Dolphin codebase was started over a decade ago, and even the developers have said that it's not the greatest possible quality. Add on all the other stuff and you already have a pretty good reason to make it from scratch.
 
  • Like
Reactions: uyjulian and daicon

Praxis

Well-Known Member
Member
Joined
Mar 26, 2009
Messages
117
Trophies
0
XP
240
Country
United States
even if we can get Wii U games to start on dolphin, they will be unplayable for years to come, as the processor is roughly a 3 core Wii running at twice the clock speed. The problem is that currently, high end PCs struggle emulating some Wii games, yet alone any Wii U games.


This might not be as bad as it sounds. I'm fairly certain most emulators don't get to take advantage of multi-core processors simply because all Wii/GameCube games are single threaded. So people running Dolphin on their quad-core i5's at full performance are mostly using one core.

Tripling the cores shouldn't hurt performance that bad since the other cores are mostly idle anyway- most of us have quad core CPUs.

Of course, the double click speed part might take a few years to catch up to...
 

Roger Carvalho

New Member
Newbie
Joined
Jun 24, 2014
Messages
1
Trophies
0
Age
41
XP
51
Country
Brazil
If the biggest problem of the discussion is only about the power of the PC,

then we have a problem that cannot be overcome naturally.

only after all the consoles stop in time with your static hardware.

Unlike the PC to do the opposite, namely large constant evolution and continues ...

emulation has always been something that walks evolving with new hardware on PC (nowadays even in smartphones) year after year so it's not something considerable to be discussed as if it were something that could prevent the evolution of emulation

pc power is not a relevant discussion.

Never had any problem to run Wii games on my current pc

even using Ultra settings.

next year I'm going to change my PC, I will ride a fifth generation Intel, Intel Core, Intel instructions Broadwell ADX, AVX-512, AVX-2 ...

with graphics cards and DDR4 memory with GDDR6 memories.

I will do the same as I did with this one I have now, go riding slowly, when I bought it used the cpu's integrated video or apu as they say now since there is more on the motherboard and the processor itself.

The graphics card I'm going to buy in the second half of 2015 onwards when they leave the native DirectX 12 plates with GDDR6
 

Silentsurvivor

Banned!
Banned
Joined
Sep 13, 2009
Messages
249
Trophies
0
XP
239
Country
United States
If the biggest problem of the discussion is only about the power of the PC,

then we have a problem that cannot be overcome naturally.

only after all the consoles stop in time with your static hardware.

Unlike the PC to do the opposite, namely large constant evolution and continues ...

emulation has always been something that walks evolving with new hardware on PC (nowadays even in smartphones) year after year so it's not something considerable to be discussed as if it were something that could prevent the evolution of emulation

pc power is not a relevant discussion.

Never had any problem to run Wii games on my current pc

even using Ultra settings.
Hahahaha oh god what
 

wallaertq

New Member
Newbie
Joined
Aug 17, 2013
Messages
4
Trophies
0
Age
24
XP
63
Country
France
Hello. On Windows8, Visual Studio 2013 cannot correctly compile Dolphin. Could anyone make available a link -> a compiled version of DolphinWiiU on a file hoster like Mediafire/4shared/MEGA... ? Thanks in advance.
 

Site & Scene News

Popular threads in this forum

Recent Content

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: https://www.youtube.com/watch?v=A0FyqCEfD0E