• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › General Discussion v
« Previous 1 ... 254 255 256 257 258 ... 357 Next »

Why JIT ?
View New Posts | View Today's Posts

Pages (2): 1 2 Next »
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
Why JIT ?
01-09-2011, 03:09 AM
#1
nowid50 Offline
Junior Member
**
Posts: 16
Threads: 1
Joined: Nov 2010
Hello,

I've got a - silly ? - question : Why Dolphin use only Just-In-Time Recompiler and not a Full Recompiler ?

And bonus : what is JIT LLE for ? Is it for "Low Level Emulation" ?

It would greatly improve the games speed if wii code was already "translated" into pc code, wouldn't it ?

THanks in advance for your answers Smile
Find
Reply
01-09-2011, 05:59 AM
#2
Squall Leonhart Offline
Friend of local jackass
*******
Posts: 1,177
Threads: 27
Joined: Apr 2009
Quote:Traditionally, computer programs had two modes of runtime operation, either interpreted or static (ahead-of-time) compilation.[citation needed] Interpreted code is translated from a high-level language to a machine code continuously during every execution, whereas statically compiled code is translated into machine code before execution, and only requires this translation once.

JIT compilers represent a hybrid approach, with translation occurring continuously, as with interpreters, but with caching of translated code to minimize performance degradation. It also offers other advantages over statically compiled code at development time, such as handling of late-bound data types and the ability to enforce security guarantees.

JIT builds upon two earlier ideas in run-time environments: bytecode compilation and dynamic compilation. It converts code at runtime prior to executing it natively, for example bytecode into native machine code.

man, i dunno either
[Image: squall_sig2.gif]
[Image: squall4rinoa.png]
VBA-M
Website Find
Reply
01-09-2011, 06:54 AM
#3
NaturalViolence Offline
It's not that I hate people, I just hate stupid people
*******
Posts: 9,009
Threads: 24
Joined: Oct 2009
Quote:I've got a - silly ? - question : Why Dolphin use only Just-In-Time Recompiler and not a Full Recompiler ?

Because it's an emulator and therefore a regular recompiler can't be implemented safely.

Quote:And bonus : what is JIT LLE for ? Is it for "Low Level Emulation" ?

Dolphin has two methods of emulating audio. High Level Emulation (HLE), which emulates the behavior of the software related to audio. Or Low Level Emulation (LLE), which emulates the behavior of the dsp, which is the chip that handles audio in the gc/wii. Normally the LLE audio plugin uses an interpreter but with the LLE jit option you can use a recompiler instead which is much faster but may be less accurate since it's still a work in progress.

Quote:It would greatly improve the games speed if wii code was already "translated" into pc code, wouldn't it ?

If it was possible yes. But it's not.
"Normally if given a choice between doing something and nothing, I’d choose to do nothing. But I would do something if it helps someone else do nothing. I’d work all night if it meant nothing got done."  
-Ron Swanson

"I shall be a good politician, even if it kills me. Or if it kills anyone else for that matter. "
-Mark Antony
Website Find
Reply
01-10-2011, 04:35 AM (This post was last modified: 01-10-2011, 04:37 AM by nowid50.)
#4
nowid50 Offline
Junior Member
**
Posts: 16
Threads: 1
Joined: Nov 2010
Quote:If it was possible yes. But it's not.
Huh... Dolphin can recompile code on the fly, so why it is not possible to recompile it off-game ?...Undecided I don't really understand the difference between both of them...
Find
Reply
01-10-2011, 05:42 AM
#5
Squall Leonhart Offline
Friend of local jackass
*******
Posts: 1,177
Threads: 27
Joined: Apr 2009
and you never will if you keep expecting us to tell you.
[Image: squall_sig2.gif]
[Image: squall4rinoa.png]
VBA-M
Website Find
Reply
01-10-2011, 06:15 AM
#6
Jack Frost Offline
aka. BhaaL
**********
Developers (Some Administrators and Super Moderators)
Posts: 498
Threads: 3
Joined: Oct 2009
Just-in-time recompilation as we do it only compiles code thats actually used, and when it is used. Doing the recompilation statically and possibly ahead-of-time is not really possible for all games. Zelda for example dynamically loads stuff at runtime, and many other games use similar mechanisms to rewrite/modify code and/or load it at runtime - such code cannot be known at compile time, and would be missing.
Find
Reply
01-10-2011, 06:36 AM
#7
nowid50 Offline
Junior Member
**
Posts: 16
Threads: 1
Joined: Nov 2010
Oh I see. Smile I thought that the wii "executables" where only basic procedural engines. I didn't thought it could be so dynamical. Rolleyes

Sorry for the silly question again. Undecided
Find
Reply
01-10-2011, 06:57 AM
#8
Jack Frost Offline
aka. BhaaL
**********
Developers (Some Administrators and Super Moderators)
Posts: 498
Threads: 3
Joined: Oct 2009
Your general "basic procedural engine" may be able to do the same just aswell. In the end, it comes down to some sort of assembly, and pretty much everything is possible there.
Find
Reply
01-10-2011, 07:16 PM
#9
KarstenS Offline
Member
***
Posts: 125
Threads: 7
Joined: Jan 2010
(01-10-2011, 06:15 AM)Jack Frost Wrote: and many other games use similar mechanisms to rewrite/modify code

Are you sure, that self modifying code is still used today? I remember this coding stuff from Amiga with Motorola 68000 CPU to speed up loops. But it died with the 68020 CPU because the code modifications got only stored into ram und not into instruction cache too, what caused wrong code execution. I can't believe that this coding style should be back today.
Find
Reply
01-10-2011, 09:19 PM
#10
skid Offline
skidau / skid_au
**********
Developers (Some Administrators and Super Moderators)
Posts: 2,004
Threads: 8
Joined: Aug 2009
Yes, Rogue Leader and a very few other games use self modifying code. The MMU emulation handles that situation. The SMC used on the GC is fed into the instruction cache, and the game has to specifically flush the old instructions from the cache for the new code to take effect. It was a nightmare to emulate under JIT.
Find
Reply
« Next Oldest | Next Newest »
Pages (2): 1 2 Next »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode