Create a web-based retro-gaming system you can play from anywhere on just about anything

December 29th, 2009 | by Pyro222 |

Wouldn’t it be great if you could play your old dos games from just about anywhere on just about any device. Accessible only by you, available anywhere you have Internet access, and all on glorious port:80. With JPC, a Java x86 emulator, this can be a simple task. We can easily create a disk image that will contain your greatest hits of abandonware, and then run them from your browser through the power of the JPC applet. Read on for step by step instructions.

Download Files

You will need to download the following files before we begin.

Create Game Images

  1. Create a folder somewhere called “jpc/”.
  2. Copy “JPCApplication.jar” to the “jpc/” folder.
  3. Now you must extract a file called “floppy.img” from “JPCApplication.jar” into the “jpc/” folder. If you are using Linux, this will most likely be as simple as opening up the jar file in your archive manager. Windows and Linux users can also use the jar command. “floppy.img” is located in the jar archive under “resources/images“.
  4. Create a folder under “jpc/” called “games/“.
  5. Copy some games to the “jpc/games/” folder. (Visit abandonia for some of the classics)
  6. Open the “JPCApplications.jar” applet by executing the command “java -jar JPCApplication.jar” under your “jpc/” folder.
  7. Once the applet has loaded, click on “Disks“, “Create Disk“.
  8. Browse to your “jpc/” folder and create a new image called “games1.img“.
  9. For the size of the image, I recommend keeping it around 25MB. JPC will download this image every time you access it from the web so your best bet will be to create multiple disk images which contain different collections of games.
  10. Now click “Disks“, “HD0“, “Choose Image” and select the “games1.img” you just created. (note: the system will most likely boot dos after each time you mount an image, just let it do its thing and then continue on)
  11. Now click “Disks“, “HD1“, “Choose Directory“, and then select the “jpc/games/” folder.
  12. Click on “File“, “Reset” to re-boot the system.
  13. You should now be booted into dos. Now we must partition the new .img file we created. Run “fdisk” at the dos prompt and if it asks if you want fat32 support just choose yes.
  14. Choose “5” to “Change current fixed drive” and at the following screen you should see your 25mb (or whatever size) partition in the list. Select the number of that partition (Mine was partition 1) and press enter.
  15. once you return to the main menu, select “1” to create a new partition.

  16. Select “1” for primary partition and select yes at the next screen when it asks if you want to use the maximum space available. If all went well, you should get a screen stating “partition created successfully” at the bottom.

  17. Press “esc” to return to the main menu.
  18. Press “esc” to exit fdisk and it will tell you to reboot. Press “esc” again to exit and simply select “file“, “reset” in the JPC applet to reboot.
  19. Now you must format the the new drive image. Type “format c:” and follow the on-screen format instructions.
  20. Once you have finished formatting, type “c:” and then “dir” to make sure the format worked properly.
  21. Now change to d: drive by typing “d:” at the dos prompt and type “dir” to make sure it displays the contents of the “jpc/games/” folder we created earlier.
  22. Copy the Contents of the d: to the c: by typing “xcopy d: c: /s“.
  23. Restart jpc one more time and once it re-boots, type “c:” and then “dir” to verify the image file took the copy. If not, you may have some space issues and either need to use less games or create a larger image file.
  24. You have now just created your first game disk image. Delete the “games/” folder under “jpc/“. (or leave it if you wish to create more game images)
  25. To verify, you should now have a folder somewhere on your pc called “jpc/“. The “jpc/” folder contains only the “JPCApplication.jar“, “floppy.img“, and “games1.img” files.

Let the games begin

To be able to run your new retro gaming setup from any java enabled browser, you will need to first create an html document that will launch the applet for us.

  1. Copy and paste the following code into a file called “gamesjpc.html” under your “jpc/” folder. (You may also wish to play with this code from JPC)
  2. 1
    2
    3
    4
    5
    6
    7
    8
    9
    
    <html><body>
    <applet code=org.jpc.j2se.JPCApplet.class
            archive="JPCApplication.jar"
            width=800 height=600>
    <PARAM NAME = boot VALUE = fda>
    <PARAM NAME = fda VALUE = floppy.img>
    <PARAM NAME = hda VALUE = games1.img>
    </applet>
    </body></html>
  3. Upload the “jpc/” folder to an obscure location (or password protected folder if you prefer) on your web server.
  4. Visit your new secret location (http://server.com/secretlocation/gamesjpc.html) and you should be ready to rock n’ roll.

NOTES

Although JPC is a powerful application, it is still not perfect hence you may experience trouble playing certain games. My original intent was to write this tutorial for creating a mame system, however I was unsuccessful in getting dosMAME to run properly. You may wish to tinker with DIOSCURI. DIOSCURI allows you to tweak almost every aspect of their x86 computer hardware emulator which makes use of JPC’s memory and processor technology. You can also find an alternative floppy.img image file in the DIOSCURI zip download under “dioscuri_040/images/floppy/FreeDOS/”. Also, if you require a speed increase in JPC, visit this link and read the section at the bottom of the page on how to precompile classes. If anyone has any comments or suggestions, please feel free to email us at admin@phatus.com

Resources

Tags: , ,

Similar Entries

Sorry, comments for this entry are closed at this time.