Emu Talk Goes Here
Smileyboy
Newbie
 
Posts: 4
Joined: Fri Jan 18, 2013 3:01 pm

Understanding emulation

by Smileyboy Sun Jan 20, 2013 9:38 pm

I'm trying to understand emulating. From my experience little experience with programming and the small bit of emulation I partake in... I don't understand why it's so difficult. if a dreamcast ran at 200mHz why can't a 1GHz PS Vita run the games or the Cell microprocessor of the PS3?

I know the "engine" has to be designed..But, it is curious. Please bear with me as I'm a noob
PS3 slim
PS Vita white running CFW
PSP 2000 running CFW
Dreamcast (black)
tintinmayo
24-bit
 
Posts: 121
Joined: Fri Nov 09, 2012 8:28 pm

Re: Understanding emulation

by tintinmayo Sun Jan 20, 2013 10:27 pm

It's because CPUs with different architectures have different capabilities that cannot be compared apples to apples just by clockspeed. It's the reason why a 1.8 ghz Core 2 Duo is way faster than a 3.0 ghz Pentium 4 even in non-threaded applications - and those are just between x86 processors. It gets even harder when the comparison is between ARM, RISC, etc against x86.

The CPU doing the emulating can't just lower its clockspeed to match the processor it wants to emulate and run native code - it has to reconstruct the entire CPU virtually, along with the other components such as video coprocessor, sound coprocessor, etc. And as said above, it's not exactly 1:1. The original CPU only has to execute a single line of code to print something on the screen, but the emulator has to emulate the original CPU (and any coprocessor/featureset that helped it execute the code) executing the single line of code in order to get the same output.
User avatar
Cronozilla
Next-Gen
 
Posts: 2610
Joined: Wed Mar 14, 2012 8:15 pm
Location: Oregon, USA.

Re: Understanding emulation

by Cronozilla Mon Jan 21, 2013 12:35 am

You're creating an entire virtual environment. You should already understand this (from a programmers perspective) that it's going to be massively slower. None of it is implemented in hardware, for example.

The "better" emulators will not just create a virtual environment, but will actually re-write the entire system making it compatible with the existing hardware (functioning more like a wrapper) .. but that's a lot of work (we're talking about re-imagining hardware within software here) and it's not exactly correct either, because you won't have the specifications of the software behind the machines. So, most people have to reverse engineer it looking at values that come out from doing various computations.

It's really hard intensive work and none of these architectures are the same (x86 may be the same computer architecture, but IA32 and IA64 are entirely different CPU architectures) So, it's very complex.

And even if you do get something to show up, there's no guarantee it'll be correct.

The easy answer is, like tintinmayo pointed out, several added layers of complex computations all of which are being done in software, not hardware.
Return to Emulation

Who is online

Users browsing this forum: No registered users and 3 guests