• Please wait while Windows boots, as it may take a bit.

  • To run the game, double-click on the shortcut on the desktop.

  • Please ensure that you shut down Windows properly before closing the browser. Failing to do so can damage the FAT32 filesystem and result in loss of your progress. The quickest method is to select "Restart the computer in MS-DOS mode?".

Diablo

Diablo is a legendary game from Blizzard Entertainment. It has brought a lot of fun and fond memories to players. Thanks to js-dos v8, it is now possible to run it directly in a browser. Additionally, we are pleased to introduce a brief tutorial on how to run it on your own website.

How to create your own website for playing the Diablo game

Firstly, you should have a static web server to host your website. For the purposes of this tutorial, a local server will suffice. Personally, I use the http-server (node.js package).

Next, you need to create an index.html page, which will serve as the entry point of your website. You can use any HTML template you prefer, as js-dos does not require any specific structure.

Let's start with empty template:

    
        
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title>My Awesome Website</title>
  </head>
  <body>
	<h1>Diablo The Game</h1>  
  </body>
</html>
        
    

This is the simplest website that you can create. To run a DOS/Windows 9x program in a browser, you should use js-dos. To achieve this, let's add the js-dos scripts and styles to our website. We will use the js-dos CDN to access the latest version. Let's add this to the head section of our HTML.

    
        
	<link rel="stylesheet" href="https://v8.js-dos.com/latest/js-dos.css">
    <script src="https://v8.js-dos.com/latest/js-dos.js"></script>
        
    

Now, we need to create a <div> element in the body section and instruct js-dos to use it as the output element.

    
        
    <div id="dos" style="width: 100vw; height: 60vw;"></div>
    <script>
        Dos(document.getElementById("dos"), {});
    </script>
        
    

Pay attention to the fact that we use the id "dos" to indicate to js-dos which element to use. This is already enough to start an empty DOS session! Now, we need to perform the last step: providing DOSBox-X configuration for js-dos. You can use triple backticks ` to create multiline strings in JavaScript. Here is a full code of index.html.

    
        
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title>My Awesome Website</title>
 
	<link rel="stylesheet" href="https://v8.js-dos.com/latest/js-dos.css">
    <script src="https://v8.js-dos.com/latest/js-dos.js"></script>
  </head>
  <body>
	<h1>Diablo The Game</h1>  
    <div id="dos" style="width: 100vw; height: 60vw;"></div>
    <script>
        Dos(document.getElementById("dos"), {
            dosboxConf: `
[sdl]
autolock=false
mouse_emulation=integration

[dosbox]
title=Windows 95
memsize=128

[video]
vmemsize=8
vesa modelist width limit=0
vesa modelist height limit=0

[dos]
ver=7.1
hard drive data rate limit=0
floppy drive data rate limit=0

[cpu]
cputype=pentium_mmx
core=normal
integration device=true

[sblaster]
sbtype=sb16vibra

[fdc, primary]
int13fakev86io=true

[ide, primary]
int13fakeio=true
int13fakev86io=true

[ide, secondary]
int13fakeio=true
int13fakev86io=true
cd-rom insertion delay=4000

[render]
scaler=none

[autoexec]
echo off
imgmount 2 sockdrive wss://backend.make-vm.com:8001 dos.zone diablo_109_c
imgmount 3 sockdrive wss://backend.make-vm.com:8001 dos.zone diablo_109_d
boot c:
`,
        });
    </script>
  </body>
</html>
        
    

DOSBox-X configuration

The configuration we passed into the variable 'dosboxConf' in the script above is typical for DOSBox-X and is documented here. We have only two lines that are specific to js-dos v8.

    
        
imgmount 2 sockdrive wss://backend.make-vm.com:8001 dos.zone diablo_109_c
imgmount 3 sockdrive wss://backend.make-vm.com:8001 dos.zone diablo_109_d
        
    

Please refer to the js-dos documentation for a detailed explanation of what 'sockdrive' is. Essentially, these two lines specify which HDD images to use for drives C and D. Diablo is installed on drive D.

That's all! Enjoy your game!

Catalog of DOS Games:

Mobile Multiplayer # A B C D E F G H I J K L M N O P Q R S T U V W X Y Z