js-dos 8.xx Help

Getting Started (sockdrive)

Typically, js-dos bundle contains everything needed to run DOS program in a browser, including game files. This creates a straightforward and effective way to run and share dos programs.

Some games, especially designed for Windows, can be huge. They easily take up to gigabytes on HDD drive. In that case, packaging game files into a bundle is no sense, resulting bundle will be big to download and can reach the memory limit of browser in runtime.

Especially for such intergations, sockdrive was designed.

Remote HDD drives

sockdrive is like a remote hdd drive for DOSBox. You can connect it to DOSBox-X with command:

imgmount N sockdrive wss://sockdrive.js-dos.com:8001 <owner> <drive>
  • N - is a drive number (2 is C:, 3 is D:).

  • sockdrive - is a keyword, must present, otherwise imgmount will not understand the command

  • wss://... - address of sockdrive backend

  • owner - is a token of drive owner (usually the same as an email that was used for subscription)

  • drive - is a drive name

Diablo I in browser

js-dos player with sockdrive integration is absolutely the same as for bundles. But instead of mounting FS as drive C:, you should mount sockdrive. In the case of diablo:

[autoexec] echo off imgmount 2 sockdrive wss://sockdrive.js-dos.com:8001 dos.zone diablo_109_c imgmount 3 sockdrive wss://sockdrive.js-dos.com:8001 dos.zone diablo_109_d boot c:

As you can see, we:

  1. Mount drive dos.zone/diablo_109_c to C:

  2. Mount drive dos.zone/diablo_109_d to D:

  3. boot c:, this is DOSBox-X command to start boot from one of the provided drives

Save the following code somewhere to test locally:

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>js-dos Diablo I</title> <style> html, body { height: 100%; } #dos { width: 100%; height: 100%; } </style> <!-- js-dos style sheet --> <link rel="stylesheet" href="https://v8.js-dos.com/latest/js-dos.css"> <!-- js-dos --> <script src="https://v8.js-dos.com/latest/js-dos.js"></script> </head> <body> <div id="dos" style="width: 100%; height: 100%"></div> <script> const diabloConf = ` [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=auto 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://sockdrive.js-dos.com:8001 dos.zone diablo_109_c imgmount 3 sockdrive wss://sockdrive.js-dos.com:8001 dos.zone diablo_109_d boot c: `; Dos(document.getElementById("dos"), { dosboxConf: diabloConf, }); </script> </body> </html>

If you run this snippet in browser, you will be able to play Diablo I game.

Diablo I in the Browser

Read access

Everybody even anonymous users can use js-dos with attached sockdrives.

Write access

Only users with active subscription will be able to write into remote hdd and store progress, as well as create new hdd drives.

Last modified: 18 ноября 2024