This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Alphakill
#11
(02-06-2016, 11:16 AM)tambre Wrote: That sounds very wrong. Either that or my basic knowledge of emulation is very wrong.
Okey, here we go!

What is emulation?
Emulation is (usually) software, that behaves like another hardware/system would behave.
This means, that the software will need to emulate the processor, RAM, instruction set, GPU, or whatever other stuff the hardware has (interrupts, IO registers, timings, etc).

What is HLE emulation?
HLE (High Level Emulation) is a process, where calls to the libraries of the system (in this case the modules for the interaction with hardware) are replaced with calls to code, that (should) behave and perform the same actions and output, as the calls on the system itself.
For an example, a call to a file system library, would be replaced with a custom function in the emulator, that takes the inputs given to the function, then calls the file system libraries on the current system/OS.

What is LLE emulation?
LLE (Low Level Emulation) is a process, in which calls to the libraries of the system are emulated using the actual instructions, that would be executed on the system. This usually means obtaining the BIOS/firmware files, that include the instructions, and then interpreting and emulating them same as they would be executed on the system's CPU. This is almost always slower, but a lot more accurate.

This is the basic gist of HLE vs LLE, from what I know and understand. Probably a couple mistakes slipped by, and I'd appreciate if they would be corrected.
There are probably '''levels''' of HLE and LLE. Rpcs3 seems to be high level LLE then because emularors like Dolphin, PCSX2, all PS1 emulators and almost all emulators of old 2D consoles indeed emulate actual hardware not just calls so basicaly create virtual version of hardware down to hardware registers.

http://forums.pcsx2.net/Thread-How-is-th...#pid362981

Well it's important to note that it has nothing to do with skipping the boot process, as PCSX2 can also do that on 'fast boot' mode Wink
What is the difference? Well, a LLE emulates the state of an entire Virtual Machine; that is, it is running a guest kernel (in the case of PCSX2, a BIOS) and can run unmodified software; this is because it does more than just wrapping calls to the kernel and translating them for the native kernel, it actually emulates a virtual hardware that the guest kernel interacts with and translates those interactions to the host kernel calls. Let me give you an example:

a HLE has a running piece of software that calls the kernel function 'drawSquare':
The equivalent function is found on the host kernel and is ran.

a LLE has a running piece of software that calls the kernel function 'drawSquare':
The virtual kernel IS running inside the virtual machine, and this virtual machine has a virtual GPU; the kernel runs drawSquare
drawSquare runs a routine on the GPU driver that sets the virtual Video Memory to display a square
A translation is done by the emulator to display the raw virtual Video Memory as a window on your host system.

The LLE approach is harder to understand but let us imagine a 3D game running on Windows XP running on VirtualBox on Linux:
The game calls a DirectX 9 function
The Windows kernel calls the equivalent function(s) on the GPU driver
The GPU driver runs the code as it would on the emulated GPU and sets a HW state
The image is drawn on-screen.

Modern emulators are a lot more complex than that an actually translate virtual calls to DirectX into OpenGL for example, and run it on the host, to improve performance.

This is the reason why PCSX2 can run the PS2 BIOS but RPCS3 can not run the PS3 OS:
The PS3 OS expects to interact with hardware which is NOT emulated and hence cannot run; instead calls to the kernel are wrapped and emulated by RPCS3, removing the need for the OS dump.
The PS2 BIOS expects to interact with hardware which IS emulated, hence it does make changes in the virtual hardware that PCSX2 can then convert to native system calls.
Reply


Messages In This Thread
Alphakill - by Inue - 01-31-2016, 11:04 AM
RE: Alphakill - by tambre - 01-31-2016, 11:41 AM
RE: Alphakill - by vlj - 01-31-2016, 11:04 PM
RE: Alphakill - by tambre - 02-01-2016, 05:40 AM
RE: Alphakill - by Inue - 02-02-2016, 09:08 PM
RE: Alphakill - by vlj - 02-02-2016, 10:18 PM
RE: Alphakill - by Inue - 02-06-2016, 08:28 AM
RE: Alphakill - by tambre - 02-06-2016, 10:04 AM
RE: Alphakill - by Inue - 02-06-2016, 10:45 AM
RE: Alphakill - by tambre - 02-06-2016, 11:16 AM
RE: Alphakill - by Inue - 02-06-2016, 11:48 AM
RE: Alphakill - by tambre - 02-06-2016, 12:49 PM
RE: Alphakill - by vlj - 02-06-2016, 05:40 PM
RE: Alphakill - by Mindinis - 02-06-2016, 07:08 PM
RE: Alphakill - by tambre - 02-06-2016, 07:49 PM
RE: Alphakill - by Mindinis - 02-06-2016, 08:02 PM
RE: Alphakill - by vlj - 02-06-2016, 08:34 PM
RE: Alphakill - by Inue - 02-06-2016, 10:31 PM
RE: Alphakill - by tambre - 02-07-2016, 06:55 AM
RE: Alphakill - by Inue - 02-07-2016, 07:45 AM
RE: Alphakill - by tambre - 02-07-2016, 08:10 AM
RE: Alphakill - by vlj - 02-07-2016, 12:15 AM
RE: Alphakill - by vlj - 02-10-2016, 01:03 AM
RE: Alphakill - by Inue - 02-14-2016, 06:05 PM
RE: Alphakill - by vlj - 02-18-2016, 05:05 PM
RE: Alphakill - by Inue - 02-19-2016, 07:42 PM
RE: Alphakill - by flashmozzg - 02-19-2016, 08:13 PM
RE: Alphakill - by kd-11 - 02-25-2016, 08:12 PM
RE: Alphakill - by Inue - 03-01-2016, 12:29 AM
RE: Alphakill - by vlj - 03-02-2016, 02:11 AM
RE: Alphakill - by vlj - 03-02-2016, 02:11 AM
RE: Alphakill - by Inue - 03-02-2016, 08:32 PM
RE: Alphakill - by vlj - 03-03-2016, 01:31 AM
RE: Alphakill - by Inue - 03-03-2016, 06:33 PM
RE: Alphakill - by Inue - 03-16-2016, 05:26 AM

Forum Jump:


Users browsing this thread: 3 Guest(s)