Emulation


12 posts
by jptech7 » Sat Jul 07, 2012 11:33 pm
Firstly, trust me, I do know some about what I am asking, but I am not familiar with the Pi as I do not have one yet. Now, for the question...

Is emulation feasible at all on the Pi? Would something older like Win95 or DOS be able to run in a manner which is somewhat usable? I haven't used a Pi, and I am not familiar with the Broadcom SoC used. I know emulators exist for Linux to emulate x86, for example, on ARM. Another potential emulation would be MAME (or similar) for arcade games.

Ideas? Sorry if this question seems ridiculous. I know the Pi is just a 700mhz ARM11 /w 256MB of RAM, but miracles do happen from time to time.
Posts: 4
Joined: Sat Jul 07, 2012 11:23 pm
by mahjongg » Sat Jul 07, 2012 11:46 pm
Well its a Turing complete computer, so mathematically its possible to emulate any other Turing complete machine.
But I'm not answering your question, do I.

Some, ahem, person already did just what you asked, and emulated Windows 3.1 to a useable degree, from there it rapidly degraded.

I assume whether its "feasable" is up to the degree of patience the observer has.

Remember the R-PI doesn't use an X86 compatible CPU, so it not only has to emulate the computing platform, it also has to emulate the CPU.
User avatar
Forum Moderator
Forum Moderator
Posts: 5863
Joined: Sun Mar 11, 2012 12:19 am
by jptech7 » Sun Jul 08, 2012 12:24 am
mahjongg,

Thank you for your reply. Is there a thread about the Windows emulation? I would be interested in speaking with them as to the performance of x86 emulation on an ARM platform.

I do understand what x86 is versus ARM on a system level. I have done emulation on an x86 CPU of other CPUs (PPC, ARM, etc.), but I have never done the reverse. It seems that DOS is possible, but Win 95 may be too much. Considering how inefficient emulation of a completely different CPU architecture is and the ~300mhz Pentium II level performance (when running ARM code according to the FAQ) of the Broadcom SoC, I guess the performance would be pre-Pentium levels. If it could be Pentium 1 level in emulation, that would satisfy what I am looking to do, but 486 or worse levels of performance are not sufficient. Additionally, with 256MB of RAM, one would be pushing even with greater processing power.
Posts: 4
Joined: Sat Jul 07, 2012 11:23 pm
by mahjongg » Sun Jul 08, 2012 12:29 am
at last count there were 530 hits or so when searching for "emulation", so there is a lot of material to read. :lol:

Also do a search for MAME.
User avatar
Forum Moderator
Forum Moderator
Posts: 5863
Joined: Sun Mar 11, 2012 12:19 am
by jptech7 » Sun Jul 08, 2012 12:36 am
Alright, thanks again for the help. I am wanting to get a Rapsberry Pi for educational/tweaking purposes, but I was also looking at possible other uses for it. I'll look around for some other threads that may overlap with this question.

Thanks,
jptech7
Posts: 4
Joined: Sat Jul 07, 2012 11:23 pm
by Squiffy » Sun Jul 08, 2012 3:08 am
I bet it could be done. The iPhone 3G has emulated Windows 95 before. The two devices have similar specs so this is possible. The performance on the other hand, was pretty bad.
Posts: 14
Joined: Sat Jun 30, 2012 9:11 pm
by mahjongg » Sun Jul 08, 2012 2:37 pm
Well windows 95 has indeed been emulated already on the PI, as can be read in another thread.
User avatar
Forum Moderator
Forum Moderator
Posts: 5863
Joined: Sun Mar 11, 2012 12:19 am
by nick.mccloud » Sun Jul 08, 2012 2:54 pm
Emulation of Windows 95 was of the order of hours to boot. So unless you are glacially slow yourself, it's only really of academic interest.
User avatar
Posts: 795
Joined: Sat Feb 04, 2012 4:18 pm
by Joe Schmoe » Sun Jul 08, 2012 2:57 pm
nick.mccloud wrote:Emulation of Windows 95 was of the order of hours to boot. So unless you are glacially slow yourself, it's only really of academic interest.


This whole idea/concept is, really, of only academic interest. But that doesn't take anything away from its being quite interesting. In fact, the best things in life are "academic".

If I want a Windows PC, I know where to find one...
Never answer the question you are asked. Rather, answer the question you wish you had been asked.

- Robert S. McNamara - quoted in "Fog of War" -
Posts: 2851
Joined: Sun Jan 15, 2012 1:11 pm
by jptech7 » Mon Jul 09, 2012 6:05 pm
I didn't expect it to run like it is emulated on (anything even resembling) a modern consumer PC, but I appreciate the replies. I didn't think about the iPhone 3G, so that works as a good reference point for performance. I was crossing my fingers that it was bad performance but better than "hours to boot" performance. Le sigh... The reason that I wondered about Windows 95 was to see if I could get a few of these as a simple, cheap way to have both a programming terminal and be able run a certain legacy x86 application while connected to a TV. This legacy application required Windows 95, so if Win95 doesn't run, it isn't worth trying the application.

Thanks for all the replies.. Hopefully, I will be back on the forums with a Raspberry Pi in the (preferably near) future. I'd love to get one, but I'd have to import it (I'm in the USA). I love to mess with Linux, and I currently consider myself a very proficient web developer (HTML, CSS, PHP, MySQL, etc.). I am looking to expand my ability to cover some basic C and/or Python, so this would be great to have as a dedicated learning machine.

-jptech7
Posts: 4
Joined: Sat Jul 07, 2012 11:23 pm
by Squiffy » Mon Jul 09, 2012 11:13 pm
Maybe you could use a Linux OS with Wine? That would be able to run some .exe's. Although you will have to build Wine for ARM to get it to work.
Posts: 14
Joined: Sat Jun 30, 2012 9:11 pm
by mahjongg » Mon Jul 09, 2012 11:46 pm
Wine wouldn't work, as itself is simply written in x86 code, to interface with other x86 code.

Granted, Wine itself could probably be recompiled (or rewritten for the parts written in assembler) into ARM code, (because the source code is available) but even then it still would attempt to interface to x86 code (windows applications), it wouldn't (could not) make any effort to interpret that x86 code using its ARM processor.

again, windows code is written in x86 (intel) code, and an ARM cannot execute x86 code, it is executing Advanced Risk Machine (ARM) code, not x86 code!

a Wine system will only work if you run it with an X86 CPU, or if you attempted to emulate that CPU using ARM instructions, in a process called an interpreter, but this runs the interpreted x86 code ten to a hundred times slower than when executing its own ARM code, it also uses up a lot of RAM while doing it.
User avatar
Forum Moderator
Forum Moderator
Posts: 5863
Joined: Sun Mar 11, 2012 12:19 am