# Sunday, March 25, 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, March 25, 2007 12:41:43 PM (W. Europe Daylight Time, UTC+02:00)  #    Comments [2]
Sunday, March 25, 2007 2:05:20 PM (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, March 30, 2007 10:41:43 AM (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 ;-)
Comments are closed.