Dolphin, the GameCube and Wii emulator - Forums

Full Version: Pre-decode/process games
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
I still think you got the wrong image of the whole process. Code can't be "pre processed", its executed, literally. Data changes inside it, it's a dynamic mechanism. There is no magic trick, it will be aways hardware intensive. What you are saying wont be done here, not with the way dolphin works. It is a different thing.
1. The interpreter does not emit executable code. And many opcodes have to be interpreted even if you select the JIT core.

2. Even IF dolphin's JIT core could emit x86 code for every PPC opcode these programs contain self modifying code that would not work unless they are being emulated on the fly.

3. Thread syncing/management would be absolute madness

Number 2 is the main reason why every single software developer that has worked on the project and has been asked this question has said it's impossible.

Quote:So why do we have to have the program use valuable resources WHILE trying to play a game where it could just crunch its numbers before and allow your computer to focus on executing the code that has been "pre processed. The source code for dolphin, as with most programs, calls for different actions based on properties of the code being executed. By doing this optimization, dolphin will save time by not having to determine what to do.

It does that because it has to. The alternative that you propose is impossible according to every software developer that has ever worked on this project. If you would like to try and prove them wrong though, it's an open source project so by all means you're free to try.
So basically the code for the games can be edited but not saved? So once the code is executed and the emulator moves on to the next line the changes made to the line cannot be saved.
Quote:So basically the code for the games can be edited but not saved?

What? I'm not sure what you mean by that. Please use more specific terminology. Are you talking about the games source code or the emitted x86 code?

Quote:So once the code is executed and the emulator moves on to the next line the changes made to the line cannot be saved.

Again I cannot understand what you're trying to say, I think I have an idea though.

Self modifying code is usually interpreted, not translated. Dolphin has to clear the JIT cache (which stored the emitted x86 code) when code is modified.
Yeah, its stuff like that (JIT recompiler cache) that makes me think this is possible. Btw, i believe from looking at the code that the cache has a set capacity. When the size of the cache gets close to the limit, it is cleared. I looked up self modifying code and realized that i am an idiot. Still SOME of the code is stored in the cache after running.

(07-30-2011, 01:17 PM)NaturalViolence Wrote: [ -> ]
Quote:So basically the code for the games can be edited but not saved?

What? I'm not sure what you mean by that. Please use more specific terminology. Are you talking about the games source code or the emitted x86 code?

Quote:So once the code is executed and the emulator moves on to the next line the changes made to the line cannot be saved.

Again I cannot understand what you're trying to say, I think I have an idea though.

Self modifying code is usually interpreted, not translated. Dolphin has to clear the JIT cache (which stored the emitted x86 code) when code is modified.
Srry about the double post but out of curiosity, what do you think would happen if the cache wasnt cleared when code was modified.
Saving recompiled CPU code on disk for later use would provide little benefit.
JITing is hardly slowing down emulation, the execution of the code is the slow part.
Dolphin spends <1% of the time recompiling.
(07-30-2011, 04:23 PM)Billiard26 Wrote: [ -> ]Saving recompiled CPU code on disk for later use would provide little benefit.
JITing is hardly slowing down emulation, the execution of the code is the slow part.
Dolphin spends <1% of the time recompiling.

The installer said I have the latest version already installed.
Pages: 1 2 3 4