Dolphin, the GameCube and Wii emulator - Forums

Full Version: A random thought
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Liqu1D133

So, seeing as my PC is not fast enough to play F-Zero GX, I was thinking, and then it struck me.

Emulation right now has four basic nodes (at least as far as I can tell)

The game <---> the emulator <---> the operating system <--->the hardware

So I thought: what if the game was recompiled as a whole (while retaining the emulators settings, like controls, graphics, etc etc) and then made executable in some way?

One limitation I can think of is that the game would need custom hooks into the operating system or even hardware drivers to be able to interact properly, seeing that gamecube games refer to hardware directly.

Anyway, I believe it is possible with enough time and manpower.


PS. My setup Dual Core 2.3 GHz, ge-force 7900gs 256MB, 1GB DDR2 RAM gets ~10-15 FPS in F-Zero GX, how do I speed it up (default settings)
get a better computer , dolphin emulator is use most cpu performance which your are lacking

Liqu1D133

(12-19-2010, 10:50 AM)knglrk Wrote: [ -> ]get a better computer , dolphin emulator is use most cpu performance which your are lacking
Well this is my problem, I can not get a better computer, cause of money.
So either I find a way to run my games, or I sell my PC and get a gamecube or wii. And the latter part is just dumb.

So, I need to create a recompiled dump of a game, then add a layer that will take care of controls, graphics and sound.

It can't be THAT hard, right? Given that recompiling is already done, would there be a way to make dolphin recompile a whole dump and then act like an abstraction layer?

Would be great as far as I am concerned.
Quote:So I thought: what if the game was recompiled as a whole (while retaining the emulators settings, like controls, graphics, etc etc) and then made executable in some way?

That is impossible. It must be done in real time.

Quote:It can't be THAT hard, right? Given that recompiling is already done, would there be a way to make dolphin recompile a whole dump and then act like an abstraction layer?

Not that hard? *facepalm* Ok you go try and write a jit recompiler for a microprocessor with almost no documentation and then tell me about how easy it is. Hell just take a look at the source code for the jit recompiler and tell me that looks easy!

I should also point out that dolphin can only recompile 155 of the 224 PPC instructions, the rest need to be interpreted no matter what.

Liqu1D133

So... could you point out why exactly it has to be done in real time?
If some of the instructions have to be interpreted, they still are translated to machine code to be actually executed.
As for the PPC, as far as I know there are PPC compilers, which means that the architecture is documented, and I am pretty sure that the gamecubes processor is compatible with the PPC instructon set.

Now, aside from the real-time thing you said, I don't see why this would be impossible.
My thoughts on this real-time thing are:
The emulator right now does:
- read game info
-recompile and run code
- get input
- read info and recompile a again, run
- get more input etc etc

What could be done is:
- recompile the whole code
- read & run
- get input
- read & run
This would cut out the recompiling thing, which if I understand correctly is the main bottleneck.

HOW this would be done?
Correct me if I'm wrong, but for what I know, dolphin recompiles segments of game code based on what the game refers to at the moment. What this means is, that the game has to be constantly recompiled to be able to run. A fix to this would be adding custom flags to the recompiled game code to ensure that after recompilation to another arch, the game would still refer to the exact same functons so as not to break the game.

I know there's lots of stuff that I probably missed, and I don't know much of how dolphin of gamecube work, however i beliueve it is a possible and viable way of solving the speed issue with recompiling.

Learn about the difference between static and dynamic recompilation, you'll know why it's too hard to do what you want then...

Liqu1D133

Alright, so the main problem concerning this is creating a static recompiler.
It's a damn shame it's so hard to do ;(

On the up side, I learned some interesting stuff, and for that, I thank you guys.
(12-19-2010, 05:23 PM)NaturalViolence Wrote: [ -> ]
Quote:So I thought: what if the game was recompiled as a whole (while retaining the emulators settings, like controls, graphics, etc etc) and then made executable in some way?

That is impossible. It must be done in real time.

As long as the Wii games does not contain self modifying code, that is IMHO dead since instruction cache was born, it is hard, but not impossible.