0

I have heard some random posts from people on forums claiming that Android's Dalvik Virtual Machine can't handle something of the magnitude of a PS2 emulator, such as this one ported somewhat.

Is this true?

Are there obvious limitations to a massive program running under Dalvik, or the DVM's workload?

With the obvious limitation being the hardware and most devices having major trouble with this for that very reason, is there any software aspect that may limit this, in short?

2 Answers 2

1

It's not a matter of Dalvik being incapable of running certain types of programs, it's a matter of performance.

Any runtime system based on non-native bytecode (e.g. Dalvik, JVM, .NET CLR) incurs some performance overhead in translating the bytecode into a form that the CPU can run. For most apps this isn't a problem, since most apps do relatively little CPU work and spend most of their time just waiting for input. But an emulator is typically a CPU-intensive program, so it's often better to implement it using native code, which doesn't incur the overhead of running on Dalvik.

1

Dalvik does effectively limit the maximum size of a program, in terms of the number of Java classes and methods you can have. I don't know any emulators written in Java, so I don't know if they would be too big or not, but that reveals a more important point: you wouldn't write an emulator in Java anyway.

Most emulators are written in C or C++, often with the crucial parts in the assembly language of the host platform for maximum efficiency in the inner loop. You would do this on Android just like on any other platform: Android apps don't have to be written in Java. If you don't write the emulator in Java, it doesn't matter what Dalvik can and can't do. So there's no reason at all you couldn't have a PS2 emulator on Android.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .