Dolphin, the GameCube and Wii emulator - Forums

Full Version: How did dolphin emulator become functional?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
How were the developers able to make the software emulate the hardware.... or rather, how were the dev able to know what to emulate, how the hardware works etc etc? Did people have to acid bath the chips in the wii/gc to see what the chips look like or how they work? OR was it born from home brew on the wii/gc and how code is manipulated and or runs?
Lots of guessing.
Is there any possible however unlikely ways/scenarios to take the guess work out? I think we know there are no data sheets on the CPU and or GPU.

It is almost mind blowing it took trial and error.
I mean, there was some data, hardware testing, homebrew, but it has a lot of guess work and trial and error too.
Pretty sure there are data sheets (well, entire bookish-manuals really) about the CPU, at least as it concerns the Gamecube's PPC. There was even a topic here about one that was found at a garage sale of some sort.

The rest is poking and prodding. It wasn't as if those working on Dolphin were the only ones investigating the hardware, mind you. There were actually several Gamecube emulators in existence back in the day, and there were incomplete references to various parts of the hardware. The homebrew community (nowadays it seems anyway) often digs into the hardware first before emulation starts, and they're keen to document what the hardware does (obviously, the make better homebrew, but it helps emulation). Almost forgot to mention that sometimes looking through the patents the makers of a console have filed leads to clues about how a system works. But if you're not willing to do some reverse engineering, you'll be taking a very limited approach to making an emulator.

If you want to see the process in action, just look at the 3DS or PS3. Citra is an early emulator (can't run commercial games yet) and RPCS3 is just this year starting to pick up steam. A lot of the work going on right now involves figuring out what the hardware does. Guess and check work, though it may seem haphazard, is actually effective as long as it's verified on hardware thoroughly.
I assume these datasheets and or manuals were long after the fact. Hence why it takes so many years to develop an emulator after a console's after a consoles debut/lifetime. Nothing short of the help from the parties enveloped in the console's conception could change that... or so it might seem?
Well the GC used a modified PPC CPU that was already in production, so they could use some of that documentation to get Dolphin started, considering Dolphin was first released only 2 years after the GC was launched.
(09-02-2014, 01:49 PM)cdoublejj Wrote: [ -> ]I assume these datasheets and or manuals were long after the fact.

No, not really. As KHg8m3r pointed out, the IBM PowerPC Gekko is based on a CPU that IBM had already started producing (the PowerPC 750CXe). The biggest differences (outside of frequency changes to the CPU, memory bus, etc) were the extra instructions added to it and the modified FPU (at least this is what wikipedia tells me). Not to mention, this manual has been floating around for some time among those knowledgeable with GC emulation.

That's pretty much what console systems do, in regards to the CPU at least. They take an existing CPU from someone else, change it up a little if need be, then proceed with development. A handful of systems (PS3 would be an great modern example) use exotic or arcane CPUs, but for the most part, when a system came out, there was a lot of understanding about what kind CPU it was, more or less, and where to start looking for information. That's why it's technically possible for someone to start emulating a WiiU (because the CPU is largely a known quantity) and get a working 3DS emulator for homebrew (ARM architectures tend to be extremely well documented).

If you wanted to start emulating a console with a lot of unknowns, I'd start with the CPU, not simply because that'll be the heart of many emulated operations, but also due to the fact that there'll usually be the most info immediately available to start developing something. Wink
what aobut the GC and Wii's GPUs?
Reverse engineering. The "Flipper" GPU is still a GPU, so those who know how GPUs work can figure things out. You watch what commercial games do, what kind of commands they send where and at what time, you look for large scale behaviors and patterns and try to draw conclusions before examining smaller, individual processes, and above all you experiment (change things, even as small as a single bit, then view the results).

I get the feeling you don't seriously believe that poking and prodding could eventually lead to such a great emulator, but it's no different than anything else in life. :p We surely had no idea how most of our physical world worked on extremely low levels, but we kept studying things to get to the point we are now.
Pages: 1 2 3 4