Console Emus


linc186

Still Fresh
Hey all. Now, maybe this might not be all that is needed to emulate a console on the pandora, but ive reseached the the cpu of the gamecube is far below that of the pandora, totalling at 486mhz, and the graphics only at 162 mhz. With the pandora's 600mhz, shouldnt this be easy to emulate? please explain. The PS2's (i never thought this, but it's cpu is crap!) cpu totals in at 299mhz and the graphics at 147.456mhz. cant this console be easily emulated on the pandora as well? please explain. The sega saturn should also be easily emulated, totaling at 28.6 mhz. 2 32-bit processors gave it 64 bits, as apposed to the n64, actually having a 64 bit processor). The game Half-life should also be easily ported because of it requiring only 133 mhz processor. Please explain to me why (mainly the saturn, ps2, and gamecube, half-life if you have time) cant be ported to the pandora. Thank you!
 
Forget all you think you know about mhz and emulation. Seriously.. It's like arguing that if you grab a fan you can fly with that better than in an helicopter because its blades spin faster.
 
http://www.gp32x.de/board/index.php?/topic/53883-faq-is-it-possible/

Contents:

- Can I Run Windows?
- Can I run Xbox/PS2/Gamecube/Saturn/Dreamcast/DS/GBA/Game King games by "porting" them?
- Can I run games without Linux (unless the person who wrote the game is very dedicated)?
- Can I run Windows apps with WINE?


---------------------------------------------------------------------------------------------

Can I Run Windows?

Short Answer: No

Short Reason: Pandora is different hardware to a PC. Microsoft doesn't support it.


Long Answer:

It cannot run a modern Windows operating system, although with an emulator it can run very early incarnations from the early 1990's. The latest version of Windows for which you can expect to run is 'Windows 3.11 For Workgroups'. Due to the extreme age of these older versions, they aren't able to run applications targetted for Windows 95/98, XP, Vista or Windows 7.

The Pandora has a different type of proccessor compared to a standard computer. Microsoft has developed Windows so as to run only on Intel based chips, and they don't support the type of CPU used in the Pandora.

For our machine, we use an ARM design, which is used in many portable devices such as mobile phones, the Ipod range, the Iphone and Ipod Touch models and the Nintendo DS (although this doesn't make the Pandora compatible with those machines; ARM designs vary greatly, unlike Intel x86).

The main advantage of using an ARM processor is greatly impoved battery life, as the Intel x86 CPU design (used in your PC, laptop of netbook) is a continuation of a design established in the 1980's for the original IBM PC. Have you ever noticed your PC uses the same power cord as your kettle? That's because it uses hundreds of watts! For a handheld, the power consumption is required to be roughly less than 5 Watts.

Dosbox is an emulator for many platforms that supports running applications for early PCs. The earliest editions of Windows were built on DOS technology and will run on this emulator, but you'll be limited to very old application software.


Can I run Xbox/PS2/Gamecube/Saturn/Dreamcast/DS/GBA/Game King games by "porting" them?

Short Answer: No

Short Reason: Those games were made for specific systems. The Pandora is a different system.


Long Answer:

Unfortunately not. Any software created for a closed platform -- that doesn't have source code available -- cannot be ported, except by the original author(s).

Source code is the long document of programming instructions which becomes converted, or 'compiled' into machine code. It is called 'source' because this is where the created machine code executable has 'come from'.

Machine code is the millions or billions of instructions sent every second to the CPU in order to make your computer... compute! Because CPU designs differ (for example between Intel and ARM) the mahcine code from one machine will not be compatible with another that has a different CPU. Rebuilding a machine code executable from available source code effectively creates a translated copy that the target machine can understand.

'Porting' is the term used to create an application from source for a new machine. The computer term 'port' literally means to take something from one place to another - the name derives from shipping port, the means by which goods are taken into or out of a country. Without a shipping port, or an airport, an island cannot send or recieve goods.


Can I run games without Linux (unless the person who wrote the game is very dedicated)?

Short Answer: No

Short Reason: Hardware is now too complicated for this, unlike in the past.


Long Answer:

It isn't very likely. Having an operating system on your computer provides functions which save people writing software from repeating the same work as each other. For example, it will provide functions to access sound, video, hardware sockets, showing windows onto the screen and provide the ability to use networking.

Very early systems from the 1980's didn't have an operating system, and provided many of the system functions using an onboard chip called a 'ROM' or 'BIOS'. Because the CPU was not needed to provide this, games could take full advtange.

Since the IBM PC became the standard format for computers, hardware has since become modular; parts in a PC based system can be changed and upgraded and this was one of the reasons the PC succeeded. Because the amount of hardware combinations grew so large, software couldn't support it all! An operating system was needed - essentially an application that could interface with all the included hardware so that software developers can relax and concentrate on the functions of their application.

Linux today is such an operating system. It is open source and can be recompiled for many CPU types, and as such was chosen for the Pandora in order to re-use all the work that had already been completed by other Linux developers. Without Linux, the Pandora would require a development team of hundreds to support the sophisticated hardware of today. Four or five people adapted Linux for the Pandora, although working out the many bugs and issues was (and still is) a significant task.

Replicating all the man hours required for creating Linux (or any other operating system) for a single game isn't feasible, although it is technically possible! A more likely scenario is that developers will create a customised version of Linux that is made very small without any uneeded features - and then bundle this with a game. This game could then be put onto an SD card and booted, similar to disks or cartridges from early computers and consoles!

Can I run Windows apps with WINE?

Short Answer: Not yet.

Short Reason: It requires CPU emulation combined with Wine. This isn't available for the Pandora yet. The result when released will also be pretty slow.


Long Answer:

Not at the moment. Wine is a compatibility layer that translates all the functions given to programs by Windows - such as creating buttons, menus and other features provided by the operating system. It looks at what functions the program is asking for, and serves an approximation of that request for the Linux operating system.

The diadvantage with Wine is that because it doesn't emulate the Intel based CPU of a PC, it doesn't function on systems with an alternative CPU such as ARM. This includes the Pandora, which has an ARM CPU.

Qemu, is a CPU emulator that can translate machine code from one to another in real time. It can also be used in conjuction with the Wine compatibility layer to allow Windows programs to function on a machine other than a PC.

Qemu with Wine isn't available for the Pandora at the time of writing.

The performance will be approximately the equivalent of a Pentium 100, because of the computational requirements of translation. This may not be fast enough to run your intended software. It won't be fast enough to run anything intensive, especially games from the last 15 years.
 
Last edited by a moderator:
I'm always a little fascinated as to what gave people the idea that so long as you have "more MHz" you can emulate something.

EDIT: The Megahertz Myth is maybe 1% of the problem with this post, the sheer reality of what emulation is is the rest of it, I wouldn't lead people in that direction.
 
Exophase said:
I'm always a little fascinated as to what gave people the idea that so long as you have "more MHz" you can emulate something.
I wonder about this, too... I have yet to figure it out.

EDIT: The Megahertz Myth is maybe 1% of the problem with this post, the sheer reality of what emulation is is the rest of it, I wouldn't lead people in that direction.
I got quite mindboggled by all the "MHz"es, I think. :lol:
 
Last edited by a moderator:
Man I just saw that video from Apple about the "MHz myth" and it was full of so much typical pre-x86 era Apple marketing FUD. I wrote up a big post about all the little issues I had with it but I think I was getting pretty carried away ;D
 
linc186 said:
Hey all. Now, maybe this might not be all that is needed to emulate a console on the pandora, but ive reseached the the cpu of the gamecube is far below that of the pandora, totalling at 486mhz, and the graphics only at 162 mhz. With the pandora's 600mhz, shouldnt this be easy to emulate? please explain.
it's quite simple, actually. you can emulate only machines whose original MHz is a whole multiple of pandora's MHz. for instance, you can't emulate the cube because its cpu's 486MHz clock is not a whole multiple of 500MHz (pandora's stock clock), and that cube's puny 162 MHz graphics - that's so close to being easily emulated on the superior 500MHz clock, but no cookie (it would've been easily done if the pandora itself was 486MHz, as that'd be 162MHz x3).

The PS2's (i never thought this, but it's cpu is crap!) cpu totals in at 299mhz and the graphics at 147.456mhz. cant this console be easily emulated on the pandora as well? please explain.
easily indeed.. alas, the dreaded whole-multiples issue blocks us again from having a butter-smooth ps2 emulator on the superior 500MHz pandora. BTW, that leftfield 147.456MHz clock of the GS is the sole reason the ps2 is so notoriously difficult to emulate today.

The sega saturn should also be easily emulated, totaling at 28.6 mhz. 2 32-bit processors gave it 64 bits, as apposed to the n64, actually having a 64 bit processor).
that one is easy indeed.. i should have a bash script laying around here somewhere, that clocks the pandora at exactly 514.8MHz, but i can't seem to find it..
 
Last edited by a moderator:
Exophase said:
Man I just saw that video from Apple about the "MHz myth" and it was full of so much typical pre-x86 era Apple marketing FUD. I wrote up a big post about all the little issues I had with it but I think I was getting pretty carried away ;D

Oh go on, I like reading your rants. :)
 
Last edited by a moderator:
darkblu said:
it's quite simple, actually. you can emulate only machines whose original MHz is a whole multiple of pandora's MHz. for instance, you can't emulate the cube because its cpu's 486MHz clock is not a whole multiple of 500MHz (pandora's stock clock), and that cube's puny 162 MHz graphics - that's so close to being easily emulated on the superior 500MHz clock, but no cookie (it would've been easily done if the pandora itself was 486MHz, as that'd be 162MHz x3).

Please don't ;P
 
Last edited by a moderator:
Thanks a ton guys, I completely understand (I.e. We cant emulate the consoles because there closed scource and/or are not compatable with the ARM cortex. But i have a few questions.
1. If you need the scource code to emulate the console, where did we get the scource code for all the emulators in the first place?
2. I thouht then pandora could emulate some x86 os's or does his only aply to dos? I know there is a port of dosbox, so in theory could run windows 95 through dos... But because we cant emulate all x86 systems or whatever, we cant port half-life, correct?
3. If we obtained scource code from past consoles, were they released by the company (I'm expecting, HELL NO! as the companies don't want there consoles beige emulated) so how do we obtain the scource code. Thank you!
 
linc186 said:
Thanks a ton guys, I completely understand (I.e. We cant emulate the consoles because there closed scource and/or are not compatable with the ARM cortex. But i have a few questions.
1. If you need the scource code to emulate the console, where did we get the scource code for all the emulators in the first place?
2. I thouht then pandora could emulate some x86 os's or does his only aply to dos? I know there is a port of dosbox, so in theory could run windows 95 through dos... But because we cant emulate all x86 systems or whatever, we cant port half-life, correct?
3. If we obtained scource code from past consoles, were they released by the company (I'm expecting, HELL NO! as the companies don't want there consoles beige emulated) so how do we obtain the scource code. Thank you!

Sorry, I lol'ed.
 
Last edited by a moderator:
i can only apologise on behalf of all the other residents of the city in which i reside.

We are truly sorry
 
linc186 said:
Thanks a ton guys, I completely understand (I.e. We cant emulate the consoles because there closed scource and/or are not compatable with the ARM cortex. But i have a few questions.
Um... I don't think you understand.

linc186 said:
1. If you need the scource code to emulate the console, where did we get the scource code for all the emulators in the first place?
The emulators are 'open source', the emulator authors make the source code available and you can download it.

linc186 said:
2. I thouht then pandora could emulate some x86 os's or does his only aply to dos? I know there is a port of dosbox, so in theory could run windows 95 through dos... But because we cant emulate all x86 systems or whatever, we cant port half-life, correct?
Well you could probably emulate half-life very slowly, but that wouldn't be much fun.

linc186 said:
3. If we obtained scource code from past consoles, were they released by the company (I'm expecting, HELL NO! as the companies don't want there consoles beige emulated) so how do we obtain the scource code. Thank you!
If you mean the source code to the software on the console, then no, it's not available.
 
Last edited by a moderator:
linc186 said:
1. If you need the scource code to emulate the console, where did we get the scource code for all the emulators in the first place?
Consoles don't have "source code" - they're hardware. ;) The source code for emulators, to put it very, very basically, is the result of people studying how a given machine works, and then creating software which pretends to be that hardware. This can then be used to fool software written for that hardware, into running on something else.

2. I thouht then pandora could emulate some x86 os's or does his only aply to dos? I know there is a port of dosbox, so in theory could run windows 95 through dos... But because we cant emulate all x86 systems or whatever, we cant port half-life, correct?
Half-Life can't be ported because it's not open source. Being able to port something, and being able to emulate something, are two completely different things. To use an analogy that I've seen somewhere around here before (and probably completely mangle it - my apologies to its original author, as I currently can't remember who you are), emulating is somewhat like reading a foreign book with the assistance of someone translating each word for you as you read it, whilst porting would be more like learning the language in which the book is written in order to read the book by yourself.

As far as I'm aware, the only x86 emulation we've currently got is DOSBox, unless I missed something.

3. If we obtained scource code from past consoles, were they released by the company (I'm expecting, HELL NO! as the companies don't want there consoles beige emulated) so how do we obtain the scource code. Thank you!
As above, basically emulators are a result of people figuring out how the hardware works, and reimplementing it as a program. Very often, these emulators are nothing to do with the companies who produced the original machines.
 
Last edited by a moderator:
The guy who said "forget everything you think you know about MHz, and emulation, really meant it. I'm not going to get it to great detail, but it's like this. The Amiga has a 14MHz CPU, and a few co'processors. Nothing in there is really fast. It adds up to less then 100Mhz in total. But thats not the point. The thing is you got to trick the software that you are trying to run in to believing that you actually are running it on the hardware it's supposed to be running on. This means you have to "make pretend" to be something else. It's like you trying to pretend to be everyone in a apartment complex. You could open all the mail, you could pay all the bills, but you would be slower doing it then the real persons supposed to live in there. Unless your a lot faster then they are to start with. And it's not like you can start the mornin with checking all the mail, and be done with it. No, you got to keep checking the mail every few minutes, just to see if anything new dropped in. Add a few tasks, and this soon gets cumbersome. Thats why you cant just pile MHz on top of each other and think it's all it takes to emulate something.

And, anyone who actually know anything about emulation, is by now rolling on the floor trying to breath through the laughter. Yeah guys, sorry. Apartment complex was the best thing i could come up with, it's midnight here, and i'm high on painkillers, (Pulled out a mandibular third molar... I think... (wisdom tooth)) please cut me some slack.
B!
 
Is it something i said? I'm new to this, so chill out guys. Can you point it out to me?
edit: Crap, didn't see the other posts, thanks for your help and understandment for me being new :).
 
Mr B said:
The thing is you got to trick the software that you are trying to run in to believing that you actually are running it on the hardware it's supposed to be running on.

Not quite, but close - software doesn't need to be tricked.

For the benefit of the OP:

Think of a program that runs on a PC. This program is actually a block of numbers stored in a file. Those numbers, when taken in short sequences, represent (for the most part, disregarding data) instructions that the PC will execute in sequence.

To get this program running on say, a Pandora, you need to emulate - you need to run through those instructions, understand what they mean and what they make the PC do, and then do it in ARM (Pandora processor) instructions - which are different to x86 (PC) instructions. It usually takes many ARM instructions to:

1. Read the next PC instruction
2. Figure out exactly what the instruction tells the PC to do
3. do the operation
4. update the output (screen/sound etc)

Very simply, if the PC can do all that in one instruction, you're likely going to need many more Pandora instructions to do the same thing.

Now, there are some tricks like "dynamic recompilation" (dynarec) that you can do - you can translate blocks of PC instructions into Pandora instructions and execute those - this will be much faster, but the problems that then arise are usually related to the display and other hardware, which takes even more CPU time away from you. Emulation is in reality a fantastically simple thing which can get as complex as you want it to - and usually, the less complex your emulator, the slower it runs. If you want more speed, it gets very complex very quickly and becomes a "not very simple thing" in short order.

D.
 
Last edited by a moderator:
Back
Top