# Sunday, 25 March 2007
« ThinkPad Z61p & Vista x64 | Main | New Snapshot »
Running DOS Games

Since I'm running Vista x64, I can't run DOS apps anymore (since the AMD64 arch doesn't support VM86 when running in 64 bit mode). I can, of course, still run DOS inside the VMWare image of my old machine, but now there something much cooler JPC. An x86 PC emulator written in Java. Naturally, I had to try running it on IKVM:

Lemmings for DOS running on IKVM

The image shows Lemming for DOS running on the JPC x86 emulator running on IKVM.NET running on the x64 CLR.

Unfortunately IKVM's AWT support is not good enough for this app to work, so I had to do some pretty gross app specific hacks to make it "work" (that I obviously won't check in). It's also awfully slow (on JDK 1.6 the game is actually playable, but on IKVM definitely not.)

If any of the other GNU Classpath hackers want to try running JPC. Here's the AppletViewer class I used:

import java.awt.*;

class AppletViewer
  public static void main(String[] args)
    Frame f = new Frame();
    f.setSize(640, 480);
    f.setLayout(new GridLayout(1, 1));
    org.jpc.j2se.JPCApplet applet = new org.jpc.j2se.JPCApplet();

The JPC applet jar can be downloaded here.

Sunday, 25 March 2007 12:41:43 (W. Europe Daylight Time, UTC+02:00)  #    Comments [2]
Sunday, 25 March 2007 14:05:20 (W. Europe Daylight Time, UTC+02:00)
Wow, that is so cool on several levels:
- Lemmings, yay!
- This app running on IKVM/Classpath, hurray!
- How many levels of VM is that? x86 VM on a JavaVM on a .NET VM? And if you count in that the x86 processor is also a kind of VM on top of some RISC core, that's almost 4 layers of VM :-) Yippie!
Friday, 30 March 2007 10:41:43 (W. Europe Daylight Time, UTC+02:00)
You can also launch the emulator with:
java -cp JPCAppletObfs.jar org.jpc.j2se.PCMonitor

So you don't need the AppletViewer class ;-)
Home page

I apologize for the lameness of this, but the comment spam was driving me nuts. In order to be able to post a comment, you need to answer a simple question. Hopefully this question is easy enough not to annoy serious commenters, but hard enough to keep the spammers away.

Anti-Spam Question: What method on java.lang.System returns an object's original hashcode (i.e. the one that would be returned by java.lang.Object.hashCode() if it wasn't overridden)? (case is significant)

Comment (HTML not allowed)  

Live Comment Preview