diff --git a/advanced-topics.html b/advanced-topics.html index e4dc1bac..e7852513 100644 --- a/advanced-topics.html +++ b/advanced-topics.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

Browser

In this example, you will learn how to use emulators with three.js renderer. We will create a rotating cube with a digger game.

threejs.jpg

First, you need to include emulators.js:

+

js-dos 8.xx Help

Browser

In this example, you will learn how to use emulators with three.js renderer. We will create a rotating cube with a digger game.

threejs.jpg

First, you need to include emulators.js:

<script src="https://v8.js-dos.com/latest/emulators/emulators.js"></script> -
+
<script src="https://v8.js-dos.com/v7/emulators/emulators.js"></script> <script src="https://v8.js-dos.com/v7/emulators-ui/emulators-ui.js"></script> -

Then set emulators.pathPrefix pointing to the correct location:

+

Then set emulators.pathPrefix pointing to the correct location:

<script type="module"> emulators.pathPrefix = "https://v8.js-dos.com/latest/emulators/"; -
+
<script type="module"> emulators.pathPrefix = "https://v8.js-dos.com/v7/emulators/"; -

Then you need to download js-dos bundle (for example, Digger game), and instantiate emulators:

+

Then you need to download js-dos bundle (for example, Digger game), and instantiate emulators:

const bundle = await fetch("https://cdn.dos.zone/original/2X/9/9ed7eb9c2c441f56656692ed4dc7ab28f58503ce.jsdos"); const ci = await emulators.dosWorker(new Uint8Array(await bundle.arrayBuffer())); -

Now the DOS program is started in worker, and we need to render it on the screen. To do this, we need to subscribe to frame event and update texture:

+

Now the DOS program is started in worker, and we need to render it on the screen. To do this, we need to subscribe to frame event and update texture:

const rgba = new Uint8ClampedArray(320 * 200 * 4); ci.events().onFrame((rgb) => { @@ -54,7 +54,7 @@ ctx?.putImageData(new ImageData(rgba, 320, 200), 0, 0); // ... } -

Where rgb is an actual DOS screen frame.

<!doctype html> +

Where rgb is an actual DOS screen frame.

<!doctype html> <html> <head> <meta charset="utf-8"> diff --git a/cloud-overview.html b/cloud-overview.html index 16605538..5b87a5c9 100644 --- a/cloud-overview.html +++ b/cloud-overview.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

js-dos cloud

js-dos offers cloud services that improve user experience. They include:

  • Storing saves in the cloud, that means you can restore your progress on any browser.

  • Networking that allows you to play multiplayer dos games.

  • Fat16, Fat32 network drives (sockdrive)

To activate cloud services, you need to provide your secret key.

  1. In UI of player (type key in input):

    Enter key
  2. Using player options

Secret key

You can get secret key here

Last modified: 18 ноября 2024
\ No newline at end of file +

js-dos 8.xx Help

js-dos cloud

js-dos offers cloud services that improve user experience. They include:

  • Storing saves in the cloud, that means you can restore your progress on any browser.

  • Networking that allows you to play multiplayer dos games.

  • Fat16, Fat32 network drives (sockdrive)

To activate cloud services, you need to provide your secret key.

  1. In UI of player (type key in input):

    Enter key
  2. Using player options

Secret key

You can get secret key here

Last modified: 18 ноября 2024
\ No newline at end of file diff --git a/cloud-storage.html b/cloud-storage.html index ee696ede..b2ce32a7 100644 --- a/cloud-storage.html +++ b/cloud-storage.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

Cloud saves

By default, js-dos store your game progress in the browser's indexed database. This is a great no-cost solution, but it has some limitations:

  • The browser can clear the database at any moment.

  • It's not possible to play the same game using different devices.

To address these problems, js-dos offers a cloud saves service. For subscribed users, js-dos automatically stores the saves in the cloud, allowing you to have your progress synced across all your devices. With this feature, you can now enjoy seamless gameplay experiences across different platforms.

Save and Load in DOS Games

js-dos offers you a great and free service to play DOS games. Many DOS games are fantastic and can provide hours of gameplay. Obviously, it's not possible to finish these games in one session. Luckily, js-dos fully supports saving and restoring game progress.

First things first: DOS games were developed at the beginning of the gaming industry, and typically they do not have auto-saving or continuous saving while you play. You should explicitly save your progress within the game.

To save your progress, you need to follow the game's original saving mechanism, as js-dos emulates the DOS environment, allowing games to run as they did on original hardware. Here's a general approach you might find helpful:

  1. Access the Game's Save Menu: Most DOS games have an in-game save option. This is usually accessed through the game's main menu, which can often be brought up by pressing the "Esc" key or a specific function key (e.g., F1, F2, etc.). From there, navigate to the save game option using the arrow keys and select it by pressing "Enter".

  2. Use In-game Commands: Some games, especially text-based or adventure games, allow you to save by typing in a save command. Common commands include "save", "save game", or something similar. After typing the command, you might need to specify a file name for your save game.

  3. Check the Game's Manual: Since the saving process can vary significantly from one game to another, it's a good idea to check the game's manual or any available help files. These documents often include specific instructions on how to save your game. Manuals can sometimes be found online or within the game's folder on dos.zone.

  4. Keyboard Shortcuts: Some games implement quick save/load features through keyboard shortcuts. Common shortcuts include pressing keys like F5 to save and F9 to load (though these can vary). Try to look for these shortcuts in the game's manual or settings menu.

  5. Emulator Options: dosbox-x also offer specific options for saving your game state. This feature saves the exact state of the emulator, allowing you to resume from the exact moment you saved, regardless of the in-game save system. Look for this option in js-dos sidebar. (dosbox-x only!)

Great, your game progress has been saved! To load it, simply follow the same load mechanism provided by the game.

Keep saves between page reload

After saving the game using the game's built-in mechanism, you should explicitly inform the JS-DOS player that the game saves have been updated and that you want to store them persistently (in the cloud, IndexedDB, etc.). To do this, you must click the "diskette" button in the JS-DOS sidebar. If you do not do this, your progress will be immediately lost upon restarting the page.

save-button.jpg

Upon successfully storing the saves in persistent storage, you will receive a green toast notification. Now, you can reload the page, and your saves will be retained!

Keep saves between sessions/browsers/devices

For non-subscribed users, js-dos offers a free service that stores your saves inside the browser's IndexedDB. However, this has limitations: it only works within the same browser, and the saves can be wiped suddenly by the browser.

For subscribed users, saves are automatically stored in cloud storage and will be available on all your devices.

Wait, I don't see save button in js-dos sidebar

This means that the game works over a FAT network drive, which is a feature typically used by large games. The FAT drive is fully managed by js-dos cloud, and all changes made to it are automatically stored in the cloud. This means that to save and load your progress, you need to follow the DOS game's built-in mechanism, and js-dos will take care of your saves automatically.

For now, this feature is available only for premium users.

Last modified: 18 ноября 2024
\ No newline at end of file +

js-dos 8.xx Help

Cloud saves

By default, js-dos store your game progress in the browser's indexed database. This is a great no-cost solution, but it has some limitations:

  • The browser can clear the database at any moment.

  • It's not possible to play the same game using different devices.

To address these problems, js-dos offers a cloud saves service. For subscribed users, js-dos automatically stores the saves in the cloud, allowing you to have your progress synced across all your devices. With this feature, you can now enjoy seamless gameplay experiences across different platforms.

Save and Load in DOS Games

js-dos offers you a great and free service to play DOS games. Many DOS games are fantastic and can provide hours of gameplay. Obviously, it's not possible to finish these games in one session. Luckily, js-dos fully supports saving and restoring game progress.

First things first: DOS games were developed at the beginning of the gaming industry, and typically they do not have auto-saving or continuous saving while you play. You should explicitly save your progress within the game.

To save your progress, you need to follow the game's original saving mechanism, as js-dos emulates the DOS environment, allowing games to run as they did on original hardware. Here's a general approach you might find helpful:

  1. Access the Game's Save Menu: Most DOS games have an in-game save option. This is usually accessed through the game's main menu, which can often be brought up by pressing the "Esc" key or a specific function key (e.g., F1, F2, etc.). From there, navigate to the save game option using the arrow keys and select it by pressing "Enter".

  2. Use In-game Commands: Some games, especially text-based or adventure games, allow you to save by typing in a save command. Common commands include "save", "save game", or something similar. After typing the command, you might need to specify a file name for your save game.

  3. Check the Game's Manual: Since the saving process can vary significantly from one game to another, it's a good idea to check the game's manual or any available help files. These documents often include specific instructions on how to save your game. Manuals can sometimes be found online or within the game's folder on dos.zone.

  4. Keyboard Shortcuts: Some games implement quick save/load features through keyboard shortcuts. Common shortcuts include pressing keys like F5 to save and F9 to load (though these can vary). Try to look for these shortcuts in the game's manual or settings menu.

  5. Emulator Options: dosbox-x also offer specific options for saving your game state. This feature saves the exact state of the emulator, allowing you to resume from the exact moment you saved, regardless of the in-game save system. Look for this option in js-dos sidebar. (dosbox-x only!)

Great, your game progress has been saved! To load it, simply follow the same load mechanism provided by the game.

Keep saves between page reload

After saving the game using the game's built-in mechanism, you should explicitly inform the JS-DOS player that the game saves have been updated and that you want to store them persistently (in the cloud, IndexedDB, etc.). To do this, you must click the "diskette" button in the JS-DOS sidebar. If you do not do this, your progress will be immediately lost upon restarting the page.

save-button.jpg

Upon successfully storing the saves in persistent storage, you will receive a green toast notification. Now, you can reload the page, and your saves will be retained!

Keep saves between sessions/browsers/devices

For non-subscribed users, js-dos offers a free service that stores your saves inside the browser's IndexedDB. However, this has limitations: it only works within the same browser, and the saves can be wiped suddenly by the browser.

For subscribed users, saves are automatically stored in cloud storage and will be available on all your devices.

Wait, I don't see save button in js-dos sidebar

This means that the game works over a FAT network drive, which is a feature typically used by large games. The FAT drive is fully managed by js-dos cloud, and all changes made to it are automatically stored in the cloud. This means that to save and load your progress, you need to follow the DOS game's built-in mechanism, and js-dos will take care of your saves automatically.

For now, this feature is available only for premium users.

Last modified: 18 ноября 2024
\ No newline at end of file diff --git a/command-interface.html b/command-interface.html index 6c654cf7..98a4e820 100644 --- a/command-interface.html +++ b/command-interface.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

Command Interface (CI)

The Command Interface is only one object that allows you to communicate with js-dos instance. Once you run some js-dos bundle you will receive Command Interface instance.

+

js-dos 8.xx Help

Command Interface (CI)

The Command Interface is only one object that allows you to communicate with js-dos instance. Once you run some js-dos bundle you will receive Command Interface instance.

Dos(/*element*/, { url: /* bundle url */, onEvent: ("ci-ready", ci: CommandInterface) { // now ci s ready }, ); -
+
const ci = await Dos(/*element*/).run(/*bundle url*/); -

CI interface:

+

CI interface:

export interface CommandInterface { config: () => Promise<DosConfig>; height: () => number; @@ -64,7 +64,7 @@ fsWriteFile(file: string, contents: ReadableStream<Uint8Array> | Uint8Array): Promise<void>; fsDeleteFile(file: string): Promise<void>; } -

Events interface:

+

Events interface:

export type MessageType = "log" | "warn" | "error" | string; export interface CommandInterfaceEvents { diff --git a/contributing-emulators.html b/contributing-emulators.html index 5b660c4f..96c6a191 100644 --- a/contributing-emulators.html +++ b/contributing-emulators.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

Contributing

To contribute to the emulators package, do the following:

  1. Checkout emulators repository

git clone https://github.com/js-dos/emulators

  1. Install emscripten sdk, and confgure environment to use it.

  2. Install cmake and gulp 4.

  3. Now you can build everything with gulp command

Native part of emulators is a plain cmake project, you can open it in your favorite editor. The Project has the following targets:

  1. sokol - js-dos v7 native version: dosbox + UI based on sokol. This version is exactly the same as the web version. You should use this target to contribute to js-dos v7.

  2. direct - target is used to build the web-direct version of js-dos v7. You can compile it only with emscripten.

  3. worker - target is used to build the web-worker version of js-dos v7. You can compile it only with emscripten.

  4. dosbox - original version of dosbox (UI based on SDL). You can use it to compare behaviour between original dosbox and js-dos v7.

  5. libzip - shared codes that contain implementation of zip.

  6. jsdos - shared codes that contain implementation of dosbox.

Protocol

The idea of new js-dos v7 is that all targets (native and web) have exactly the same way to communicate between a client (native UI, browser UI) and dosbox.

+

js-dos 8.xx Help

Contributing

To contribute to the emulators package, do the following:

  1. Checkout emulators repository

git clone https://github.com/js-dos/emulators

  1. Install emscripten sdk, and confgure environment to use it.

  2. Install cmake and gulp 4.

  3. Now you can build everything with gulp command

Native part of emulators is a plain cmake project, you can open it in your favorite editor. The Project has the following targets:

  1. sokol - js-dos v7 native version: dosbox + UI based on sokol. This version is exactly the same as the web version. You should use this target to contribute to js-dos v7.

  2. direct - target is used to build the web-direct version of js-dos v7. You can compile it only with emscripten.

  3. worker - target is used to build the web-worker version of js-dos v7. You can compile it only with emscripten.

  4. dosbox - original version of dosbox (UI based on SDL). You can use it to compare behaviour between original dosbox and js-dos v7.

  5. libzip - shared codes that contain implementation of zip.

  6. jsdos - shared codes that contain implementation of dosbox.

Protocol

The idea of new js-dos v7 is that all targets (native and web) have exactly the same way to communicate between a client (native UI, browser UI) and dosbox.

// // Created by caiiiycuk on 27.02.2020. // @@ -78,13 +78,13 @@ extern void server_network_disconnect(NetworkType networkType); #endif // JS_DOS_JS_DOS_PROTOCOL_H -

Server

For simplicity, you can think that the server is a dosbox. In the future, servers can be implemented with different emulators. Now we support only dosbox implementation (look at jsdos.cmake).

server_run()

Client should run this function when it's ready to start dosbox. This function will start the emulator. Client should prepare a file system for dosbox it expects that cwd contains .jsdos/dosbox.conf file.

So you need to extract js-dos bundle in some directory and start sokol binary in this directory, and it will act exactly in the same way as direct/worker dosbox.

server_add_key(keycode, pressed, timeMs)

This function adds keycode to the queue. They will be processed when dosbox poll keyboard events.

server_exit()

Terminates execution of dosbox and free resources.

Client

Direct, worker, and sokol implementations share the same code for server part. But they are completely different, because they implement UI and sound system for different platforms. In the original dosbox this was made by SDL, it was hard-coupled with dosbox. js-dos clearly detach the emulator from its ui. You can easily add new UI/sound system to dosbox.

For example, let's look at sokol UI implementation. You can use it to debug and develop new features for js-dos. Worker is a primary web implementation for js-dos v7. sokol implementation tries to work in a similar way: we start dosbox emulator in main thread and client in new thread.

+

Server

For simplicity, you can think that the server is a dosbox. In the future, servers can be implemented with different emulators. Now we support only dosbox implementation (look at jsdos.cmake).

server_run()

Client should run this function when it's ready to start dosbox. This function will start the emulator. Client should prepare a file system for dosbox it expects that cwd contains .jsdos/dosbox.conf file.

So you need to extract js-dos bundle in some directory and start sokol binary in this directory, and it will act exactly in the same way as direct/worker dosbox.

server_add_key(keycode, pressed, timeMs)

This function adds keycode to the queue. They will be processed when dosbox poll keyboard events.

server_exit()

Terminates execution of dosbox and free resources.

Client

Direct, worker, and sokol implementations share the same code for server part. But they are completely different, because they implement UI and sound system for different platforms. In the original dosbox this was made by SDL, it was hard-coupled with dosbox. js-dos clearly detach the emulator from its ui. You can easily add new UI/sound system to dosbox.

For example, let's look at sokol UI implementation. You can use it to debug and develop new features for js-dos. Worker is a primary web implementation for js-dos v7. sokol implementation tries to work in a similar way: we start dosbox emulator in main thread and client in new thread.

void runRuntime() { std::thread client(client_run); server_run(); client.join(); } -

client_frame_set_size(width, height)

When the server starts, it will send the frame size of the dosbox window by invoking client_frame_set_size. You should allocate rgba buffer to store frame content. This function will be called each time when dosbox window size is changed.

+

client_frame_set_size(width, height)

When the server starts, it will send the frame size of the dosbox window by invoking client_frame_set_size. You should allocate rgba buffer to store frame content. This function will be called each time when dosbox window size is changed.

extern int frameWidth = 0; extern int frameHeight = 0; extern uint32_t *frameRgba = 0; @@ -99,7 +99,7 @@ frameHeight = height; frameRgba = new uint32_t[width * height]; } -

client_frame_update_lines(lines, count, rgba)

This method will be called each time if contents of dosbox window are changed. dosbox implementation will send only changed lines. You need to update your frame buffer correctly.

Dirty region format (lines argument):

  • line number [0, height)

  • count of changed lines

  • offset in passed buffer (rgba argument)

+

client_frame_update_lines(lines, count, rgba)

This method will be called each time if contents of dosbox window are changed. dosbox implementation will send only changed lines. You need to update your frame buffer correctly.

Dirty region format (lines argument):

  • line number [0, height)

  • count of changed lines

  • offset in passed buffer (rgba argument)

void client_frame_update_lines(uint32_t *lines, uint32_t count, void *rgba) { std::lock_guard<std::mutex> g(mutex); @@ -116,7 +116,7 @@ sizeof(uint32_t) * count * frameWidth); } } -

Implementing client_frame_set_size and client_frame_update_lines is enough to render dosbox window:

+

Implementing client_frame_set_size and client_frame_update_lines is enough to render dosbox window:

// ... appDescription.frame_cb = []() { sokolFrame(); }; // ... @@ -143,7 +143,7 @@ renderedFrame = frameCount; } -

client_sound_init(freq);

Called when the dosbox needs to initialize the sound system.

+

client_sound_init(freq);

Called when the dosbox needs to initialize the sound system.

void client_sound_init(int freq) { saudio_desc audioDescription = {}; audioDescription.sample_rate = static_cast<int>(freq); @@ -152,11 +152,11 @@ saudio_setup(&audioDescription); assert(saudio_isvalid()); } -

client_sound_push(samples, num_samples)

This method is called each time when new sound samples should be pushed to audio device. With sokol implementation is very simple:

+

client_sound_push(samples, num_samples)

This method is called each time when new sound samples should be pushed to audio device. With sokol implementation is very simple:

void client_sound_push(const float *samples, int num_samples) { saudio_push(samples, num_samples); } -

client_stdout(data, amount)

This method will be called each time when dosbox prints something to its console.

Communicate to server

Each time when key is pressed we should send event to dosbox:

+

client_stdout(data, amount)

This method will be called each time when dosbox prints something to its console.

Communicate to server

Each time when key is pressed we should send event to dosbox:

// ... appDescription.event_cb = [](const sapp_event *event) { switch (event->type) { @@ -176,18 +176,18 @@ event->type == SAPP_EVENTTYPE_KEY_DOWN, GetMsPassedFromStart()); } -

When user closes sokol window we need to stop server:

+

When user closes sokol window we need to stop server:

appDescription.cleanup_cb = []() { server_exit(); }; -

That is. Check complete source of sokol implementation.

Testing

If the gulp command is finished successfully then you can run emulators tests. To do this, run a static web server to host the dist directory. For example, with http-server:

+

That is. Check complete source of sokol implementation.

Testing

If the gulp command is finished successfully then you can run emulators tests. To do this, run a static web server to host the dist directory. For example, with http-server:

http-server dist -

and open test page in browser:

+

and open test page in browser:

firefox http://127.0.0.1:8080/test/test.html -

all tests should pass.

Running native js-dos v7

As said above, you need to compile a sokol target with your favorite C++ toolkit. It will generate sokol executable. Next, you need to download some js-dos bundle for example digger.

js-dos bundle is a plain zip archive, you need to extract it in some folder. After that you should run sokol executable from that folder (cwd must be the root of the extracted bundle).

Using Docker

You can use docker image to develop emulators core. The image has already configured everything to build emulators core and start emulators tests.

Build image

+

all tests should pass.

Running native js-dos v7

As said above, you need to compile a sokol target with your favorite C++ toolkit. It will generate sokol executable. Next, you need to download some js-dos bundle for example digger.

js-dos bundle is a plain zip archive, you need to extract it in some folder. After that you should run sokol executable from that folder (cwd must be the root of the extracted bundle).

Using Docker

You can use docker image to develop emulators core. The image has already configured everything to build emulators core and start emulators tests.

Build image

docker build -t emulators .

Test image

docker run -p 8080:8080 -ti emulators -

Open http://localhost:8080 in browser, all tests should pass

Development

Run inside the project directory:

+

Open http://localhost:8080 in browser, all tests should pass

Development

Run inside the project directory:

docker run -v `pwd`/src:/app/src -v `pwd`/test:/app/test -v `pwd`/dist:/app/dist -ti emulators bash source /emsdk/emsdk_env.sh gulp OR ./node_modules/.bin/tsc --watch -

Use your code editor to edit the content of src and test. In the docker VM you can run gulp to build everything into dist OR use ./node_modules/.bin/tsc --watch if you need only compile time checks.

Contributing on github

To contribute your code please create PR on github, and check if all tests passed.

Last modified: 18 ноября 2024
\ No newline at end of file +

Use your code editor to edit the content of src and test. In the docker VM you can run gulp to build everything into dist OR use ./node_modules/.bin/tsc --watch if you need only compile time checks.

Contributing on github

To contribute your code please create PR on github, and check if all tests passed.

Last modified: 18 ноября 2024
\ No newline at end of file diff --git a/create-a-game-bundle.html b/create-a-game-bundle.html index 79af9f84..79a135c8 100644 --- a/create-a-game-bundle.html +++ b/create-a-game-bundle.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

\ No newline at end of file +

js-dos 8.xx Help

\ No newline at end of file diff --git a/deployment.html b/deployment.html index 012a14c1..d94c108a 100644 --- a/deployment.html +++ b/deployment.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

Deployment

Currently, sockdrive reporistory has only one active deployment, is sockdrive.js-dos.com:8001. Geographically it is located in Europe, because of that speed can vary between regions.

We are looking forward to maintainers from other regions. If you want to create a sockdrive mirror, please let me know.

New deployment

You are also able to create your own sockdrive server with own drives, and run it locally or globally.

sockdrive server should work fine on any linux distribution like Ubuntu. Download the server and unpack it somewhere.

Folder structure:

+

js-dos 8.xx Help

Deployment

Currently, sockdrive reporistory has only one active deployment, is sockdrive.js-dos.com:8001. Geographically it is located in Europe, because of that speed can vary between regions.

We are looking forward to maintainers from other regions. If you want to create a sockdrive mirror, please let me know.

New deployment

You are also able to create your own sockdrive server with own drives, and run it locally or globally.

sockdrive server should work fine on any linux distribution like Ubuntu. Download the server and unpack it somewhere.

Folder structure:

- backend // sockdrive server executable - cli // sockdrive cli interface - config/ // configuration directory - props.json // configuration file - drives/ // drive storage - templates/ // drive templates -

included templates:

  • fat16-256m — empty 256Mb drive formatted in fat16

  • fat32-2gb — empty 2Gb drive formatted in fat32

included drives (./cli list system):

owner

name

description

system

fat16-256m

Blank drive based on corresponding template

system

fat32-2gb

Blank drive based on corresponding template

system

test

Test drive used in backend unit tests

system

dos7.1-v1

DOS 7.1 with CDROM support

system

win95-v1

Minimal (256Mb) Windows 95 installation

system

win95-v2

Windows 95 (2Gb) with daemon tools

system

win98-v1

Windows 98 (2Gb) with daemon tools

configuration file properties (config/props.json):

property

description

default value

cert

path to ssl certificate file for wss:// support

js-dos.com certificate

key

path to ssl certificate key file for wss:// support

js-dos.com certificate

port

server port to use

8001

templates

path to folder with templates

./config/templates

drivers

path to folder with drives

./config/drives

premium

list of emails that have full access to sockdrive even if this emails does not have js-dos subscription

dos.zone, caiiiycuk@gmail.com

To start the server run backend executable:

+

included templates:

  • fat16-256m — empty 256Mb drive formatted in fat16

  • fat32-2gb — empty 2Gb drive formatted in fat32

included drives (./cli list system):

owner

name

description

system

fat16-256m

Blank drive based on corresponding template

system

fat32-2gb

Blank drive based on corresponding template

system

test

Test drive used in backend unit tests

system

dos7.1-v1

DOS 7.1 with CDROM support

system

win95-v1

Minimal (256Mb) Windows 95 installation

system

win95-v2

Windows 95 (2Gb) with daemon tools

system

win98-v1

Windows 98 (2Gb) with daemon tools

configuration file properties (config/props.json):

property

description

default value

cert

path to ssl certificate file for wss:// support

js-dos.com certificate

key

path to ssl certificate key file for wss:// support

js-dos.com certificate

port

server port to use

8001

templates

path to folder with templates

./config/templates

drivers

path to folder with drives

./config/drives

premium

list of emails that have full access to sockdrive even if this emails does not have js-dos subscription

dos.zone, caiiiycuk@gmail.com

To start the server run backend executable:

./backend -

At the beginning server will print configuration used and information about port used, like this:

+

At the beginning server will print configuration used and information about port used, like this:

2024-06-28T03:26:21.456339Z INFO backend: started non-secured server on 0.0.0.0:8001 -

Now you can use it with js-dos player, just add your server as sockdrive endpoint:

+

Now you can use it with js-dos player, just add your server as sockdrive endpoint:

Dos(document.getElementById("dos"), { sockdriveBackend: { name: "custom", host: "localhost:8001", }, }); -

Open file limits

You should increase the limit of open files, edit /etc/security/limits.conf add the following lines:

+

Open file limits

You should increase the limit of open files, edit /etc/security/limits.conf add the following lines:

* soft nofile 1000000 * hard nofile 1000000 -

And restart PC.

Cli commands

Command

Description

create (owner) (name) (template)

Creates new drive owner/name from template

./cli create me empty fat16-256m

Will create me/empty drive based on fat16-256m template

fork (owner) (name) (fork_owner) (fork_name)

Create new drive from existent one

./cli fork system win95-v1 me mywin

Will create me/mywin from system/win95-v1

list (owner)

List all drives of owner + system drives

./cli list me

Will list all drives of me

delete (owner) (name)

Delete specified drive

./cli delete me mywin

Will delete drive my/mywin

Last modified: 18 ноября 2024
\ No newline at end of file +

And restart PC.

Cli commands

Command

Description

create (owner) (name) (template)

Creates new drive owner/name from template

./cli create me empty fat16-256m

Will create me/empty drive based on fat16-256m template

fork (owner) (name) (fork_owner) (fork_name)

Create new drive from existent one

./cli fork system win95-v1 me mywin

Will create me/mywin from system/win95-v1

list (owner)

List all drives of owner + system drives

./cli list me

Will list all drives of me

delete (owner) (name)

Delete specified drive

./cli delete me mywin

Will delete drive my/mywin

Last modified: 18 ноября 2024
\ No newline at end of file diff --git a/documentation.html b/documentation.html index 186426f2..47efe183 100644 --- a/documentation.html +++ b/documentation.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

\ No newline at end of file +

js-dos 8.xx Help

\ No newline at end of file diff --git a/dos-api.html b/dos-api.html index 9e3a2ce0..90dc3641 100644 --- a/dos-api.html +++ b/dos-api.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

Getting Started

js-dos do not require any backend to start. You need to have some static website hosting where you put your webpage with DOS.

You can start with any template of webpage you want. You only need some div element where to put a dos window.

For example, you can use following template:

+

js-dos 8.xx Help

Getting Started

js-dos do not require any backend to start. You need to have some static website hosting where you put your webpage with DOS.

You can start with any template of webpage you want. You only need some div element where to put a dos window.

For example, you can use following template:

<!DOCTYPE html> <html lang="en"> <head> @@ -39,15 +39,15 @@ <h1>My Awesome game</h1> </body> </html> -

Adding js-dos to your web page

This is a common thing in web development, you need to add js-dos related scripts to your webpage. js-dos provides a CDN with the latest version, just add this html to <head> section of page:

+

Adding js-dos to your web page

This is a common thing in web development, you need to add js-dos related scripts to your webpage. js-dos provides a CDN with the latest version, just add this html to <head> section of page:

<!-- 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> -

Alternatively, you can download the latest version of js-dos from releases page. Or, install it via npm.

Provide js-dos bundle to run

The easiest way to run some program is to prepare js-dos bundle. You can do it manually, but the easier way is to use Studio.

In this example, we will use a bundle of Digger game. Direct link to it:

+

Alternatively, you can download the latest version of js-dos from releases page. Or, install it via npm.

Provide js-dos bundle to run

The easiest way to run some program is to prepare js-dos bundle. You can do it manually, but the easier way is to use Studio.

In this example, we will use a bundle of Digger game. Direct link to it:

https://cdn.dos.zone/original/2X/9/9ed7eb9c2c441f56656692ed4dc7ab28f58503ce.jsdos -

Create div element and run game

Now, we need to create a <div> element in the body section and instruct js-dos to use it as the output element. Now, we need to provide some div element and tell js-dos to run bundle using t:

+

Create div element and run game

Now, we need to create a <div> element in the body section and instruct js-dos to use it as the output element. Now, we need to provide some div element and tell js-dos to run bundle using t:

<div id="dos" style="width: 100vw; height: 60vw;"></div> <script> @@ -55,7 +55,7 @@ url: "https://cdn.dos.zone/original/2X/9/9ed7eb9c2c441f56656692ed4dc7ab28f58503ce.jsdos", }); </script> -

That is, Dos constructor takes two arguments:

  1. div element where to put a dos window. We used the id dos to indicate to js-dos which element to use.

  2. options with initial configuration. We specify url with game bundle.

<!DOCTYPE html> +

That is, Dos constructor takes two arguments:

  1. div element where to put a dos window. We used the id dos to indicate to js-dos which element to use.

  2. options with initial configuration. We specify url with game bundle.

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> @@ -88,4 +88,4 @@ }); </script> </body> -</html>

Test in browser

Open your test webpage in browser, you should see something like this:

startup window
Last modified: 18 ноября 2024
\ No newline at end of file +</html>

Test in browser

Open your test webpage in browser, you should see something like this:

startup window
Last modified: 18 ноября 2024
\ No newline at end of file diff --git a/dosbox-direct.html b/dosbox-direct.html index 7059eedc..7969cca9 100644 --- a/dosbox-direct.html +++ b/dosbox-direct.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

DOSBox Direct

DOS Direct is an emulation backend based on DOSBox, you can create it with the following command:

+

js-dos 8.xx Help

DOSBox Direct

DOS Direct is an emulation backend based on DOSBox, you can create it with the following command:

const ci = await emulators.dosboxDirect(bundle); -

Direct version is universal, it can work in Node.js environment. But it has a strong disadvantage: it's working on the main browser thread. So it can easily the app froze a browser for some amount of time, and not be very responsive.

Accessing file system

In direct mode you can easily access emscripten module:

+

Direct version is universal, it can work in Node.js environment. But it has a strong disadvantage: it's working on the main browser thread. So it can easily the app froze a browser for some amount of time, and not be very responsive.

Accessing file system

In direct mode you can easily access emscripten module:

const ci = await emulators.dosboxDirect(bundle); ci.transport.module // <-- emscripten module -

Emscripten module provide lowlevel api to change file system:

+

Emscripten module provide lowlevel api to change file system:

const ci = await emulators.dosboxDirect(bundle); ci.transport.module.FS // <-- emscripten FS api -

You can also rescan DOS devices:

+

You can also rescan DOS devices:

const ci = await emulators.dosboxDirect(bundle); ci.transport.module._rescanFilesystem(); -

Accessing memory

In direct mode you can dump whole memory of dos:

+

Accessing memory

In direct mode you can dump whole memory of dos:

const ci = await emulators.dosboxDirect(bundle); ci.transport.module._dumpMemory(copyDosMemory); ci.transport.module.memoryContents // <-- now you can access contents using this var -

If you need to copy the entire memory, pass true as argument. The memoryContents contains the following:

+

If you need to copy the entire memory, pass true as argument. The memoryContents contains the following:

{ "memBase": ..., "ip": ..., @@ -74,9 +74,9 @@ "numPages": ..., "memoryCopy": ... } -

Pausing execution

In direct mode, you can pause the Dosbox execution loop without pausing the emscripten loop. This lets you pause and inspect the current memory, for instance.

+

Pausing execution

In direct mode, you can pause the Dosbox execution loop without pausing the emscripten loop. This lets you pause and inspect the current memory, for instance.

const ci = await emulators.dosboxDirect(bundle); ci.transport.module._pauseExecution(true); -

The _pauseExecution function takes as its argument whether it should be paused or should resume. To resume once you have completed:

+

The _pauseExecution function takes as its argument whether it should be paused or should resume. To resume once you have completed:

ci.transport.module._pauseExecution(false);
Last modified: 18 ноября 2024
\ No newline at end of file diff --git a/dosbox-worker.html b/dosbox-worker.html index f1bd7cd2..ec2eadf4 100644 --- a/dosbox-worker.html +++ b/dosbox-worker.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

DOSBox Worker

DOSBox Worker is the worker version of DOSBOX Direct backend. It runs in its own browser thread, so it's never block the browser. This version is recommended to use in most cases.

You can create it like this:

+

js-dos 8.xx Help

DOSBox Worker

DOSBox Worker is the worker version of DOSBOX Direct backend. It runs in its own browser thread, so it's never block the browser. This version is recommended to use in most cases.

You can create it like this:

const ci = await emulators.dosboxWorker(bundle); -

Read Estimating performance if you want to compare performances of Direct and Worker versions.

Last modified: 18 ноября 2024
\ No newline at end of file +

Read Estimating performance if you want to compare performances of Direct and Worker versions.

Last modified: 18 ноября 2024
\ No newline at end of file diff --git a/dosbox-x.html b/dosbox-x.html index d8210f26..957bb214 100644 --- a/dosbox-x.html +++ b/dosbox-x.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

DOSBox-X

The DOSBox-X emulation backend is capable of running operating systems up to Windows 98/ME. You can use it to run Windows games or arbitrary Windows programs. It may be a bit slower than traditional DOSBox emulation.

DOSBox-X emulation supports execution in worker, networking, and all other features that js-dos provides.

Typically, Windows distributions are known for their larger file sizes. To address this, we recommend using virtual makevm drives. Additionally, we offer prebuilt images of fully configured Windows 95/98, streamlining the installation process for your chosen game.

Worker instance:

+

js-dos 8.xx Help

DOSBox-X

The DOSBox-X emulation backend is capable of running operating systems up to Windows 98/ME. You can use it to run Windows games or arbitrary Windows programs. It may be a bit slower than traditional DOSBox emulation.

DOSBox-X emulation supports execution in worker, networking, and all other features that js-dos provides.

Typically, Windows distributions are known for their larger file sizes. To address this, we recommend using virtual makevm drives. Additionally, we offer prebuilt images of fully configured Windows 95/98, streamlining the installation process for your chosen game.

Worker instance:

const ci = await emulators.dosboxXWorker(bundle); -

Direct instance:

+

Direct instance:

const ci = await emulators.dosboxXDirect(bundle);
Last modified: 18 ноября 2024
\ No newline at end of file diff --git a/doszone.html b/doszone.html index 0a2416f8..95704826 100644 --- a/doszone.html +++ b/doszone.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

dos.zone

DOS.Zone - is a js-dos community project. The main target of it is to build repository of js-dos bundles, that can be easily used to integrate DOS programs on any website.

DOS.Zone consists of:

Publishing your program

  1. Follow steps to create bundle

  2. Send the publishing request using one of the channels above

Last modified: 18 ноября 2024
\ No newline at end of file +

js-dos 8.xx Help

dos.zone

DOS.Zone - is a js-dos community project. The main target of it is to build repository of js-dos bundles, that can be easily used to integrate DOS programs on any website.

DOS.Zone consists of:

Publishing your program

  1. Follow steps to create bundle

  2. Send the publishing request using one of the channels above

Last modified: 18 ноября 2024
\ No newline at end of file diff --git a/emulators.html b/emulators.html index 1b661255..980c8358 100644 --- a/emulators.html +++ b/emulators.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

emulators

emulators - npm package, that provide emulator backends which can work in different environments. It is a core of js-dos, emulators has standardized api and can run emulation in different environments. Perfect solution for custom embedding.

emulators-logo.jpg
Last modified: 18 ноября 2024
\ No newline at end of file +

js-dos 8.xx Help

emulators

emulators - npm package, that provide emulator backends which can work in different environments. It is a core of js-dos, emulators has standardized api and can run emulation in different environments. Perfect solution for custom embedding.

emulators-logo.jpg
Last modified: 18 ноября 2024
\ No newline at end of file diff --git a/estimating-performance.html b/estimating-performance.html index 6fc54ab1..f448b869 100644 --- a/estimating-performance.html +++ b/estimating-performance.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

Performance testing

To measure performance, we used a variant of Dhrystone 2 Test originally taken from this page. The Original version used clock() to calculate delta time. Which is good for a real pc, but is not very accurate for a dosbox emulator. When the clock() call happened, a modified version sends ~>dtime marker to stdout which is intercepted by the test page and used to calculate delta time with performance.now() from the browser. Source code of the modified test is here.

Basically, this test produces a lot of int operations and measures the amount of operations (Dhrystones) produced per second. Output is a VAX MIPS RATING which is Drhystones per second divided by 1757 (is as DEC VAX 11/780 result).

Running the test

To run the test visit Test page. You can choose any backend you want.

dhry2.png
Last modified: 18 ноября 2024
\ No newline at end of file +

js-dos 8.xx Help

Performance testing

To measure performance, we used a variant of Dhrystone 2 Test originally taken from this page. The Original version used clock() to calculate delta time. Which is good for a real pc, but is not very accurate for a dosbox emulator. When the clock() call happened, a modified version sends ~>dtime marker to stdout which is intercepted by the test page and used to calculate delta time with performance.now() from the browser. Source code of the modified test is here.

Basically, this test produces a lot of int operations and measures the amount of operations (Dhrystones) produced per second. Output is a VAX MIPS RATING which is Drhystones per second divided by 1757 (is as DEC VAX 11/780 result).

Running the test

To run the test visit Test page. You can choose any backend you want.

dhry2.png
Last modified: 18 ноября 2024
\ No newline at end of file diff --git a/fork-drive.html b/fork-drive.html index b4093fc5..d8803c9d 100644 --- a/fork-drive.html +++ b/fork-drive.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

Fork (Clone) Drive

sockdrive acts as a repository of disks, allowing you to choose any available disk and make a copy of it. However, to do this, you need to be registered on the js-dos platform and have a subscription.

After successful authentication, you will see a list of all your disks.

My Drives

How to Fork

You are able to fork any drive that in visible list. The list contains your drives as well as system drives.

  1. Open drives sidebar

  2. Press Fork button

  3. Enter the drive name (rember it)

  4. Press Fork button

How to fork

Delete drive

Press the corresponding Delete button.

How to boot with empty drive

Empty drives are just formatted drives without any data. It's a good choice if you want to start with blank image. But because they are empty, you can't boot from it. You need to install some OS to boot from empty drive.

  1. To do this, you need first boot with newly created drive. The easiest way to do it is to download DOS bootable diskette. You can get one here (dos.img).

  2. Open studio, pick your forked drive as C: and press Play

    pick drive

  3. Open FS sidebar, press upload file select dos.img from.

    boot from A:

  4. Type imgmount a: dos.img to mount image as drive A:

  5. Now boot from A: by typing boot a:

  6. When you booted, you can change to drive C:. Do what you want: copy files, install OS, etc.

    drive C:

Last modified: 18 ноября 2024
\ No newline at end of file +

js-dos 8.xx Help

Fork (Clone) Drive

sockdrive acts as a repository of disks, allowing you to choose any available disk and make a copy of it. However, to do this, you need to be registered on the js-dos platform and have a subscription.

After successful authentication, you will see a list of all your disks.

My Drives

How to Fork

You are able to fork any drive that in visible list. The list contains your drives as well as system drives.

  1. Open drives sidebar

  2. Press Fork button

  3. Enter the drive name (rember it)

  4. Press Fork button

How to fork

Delete drive

Press the corresponding Delete button.

How to boot with empty drive

Empty drives are just formatted drives without any data. It's a good choice if you want to start with blank image. But because they are empty, you can't boot from it. You need to install some OS to boot from empty drive.

  1. To do this, you need first boot with newly created drive. The easiest way to do it is to download DOS bootable diskette. You can get one here (dos.img).

  2. Open studio, pick your forked drive as C: and press Play

    pick drive

  3. Open FS sidebar, press upload file select dos.img from.

    boot from A:

  4. Type imgmount a: dos.img to mount image as drive A:

  5. Now boot from A: by typing boot a:

  6. When you booted, you can change to drive C:. Do what you want: copy files, install OS, etc.

    drive C:

Last modified: 18 ноября 2024
\ No newline at end of file diff --git a/getting-started.html b/getting-started.html index 4f5428d1..08e70af7 100644 --- a/getting-started.html +++ b/getting-started.html @@ -1,5 +1,5 @@ - -

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:

+

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:

+
  • 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> +

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"> @@ -116,4 +116,4 @@ }); </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
\ No newline at end of file +</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
\ No newline at end of file diff --git a/install-windows.html b/install-windows.html index 949ad39b..f1f62f86 100644 --- a/install-windows.html +++ b/install-windows.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

Installing Windows

The process of installing is typical for all OSes. You can use this instruction not only for Windows. Installing process includes:

  1. Fork drive

  2. Setup configuration of DOSBox

  3. Create js-dos bundle

  4. Get installation CD and bootable diskette or bootable CD

  5. Upload this images to FS

  6. Boot from CD or diskette

  7. Install OS

Here is a tutorial video with a Windows 95 installation process.

Tune your installation

Seamless mouse integration (windows 9x)

  1. Download binary drivers

  2. Mount install.dsk from doslib\windrv\dosboxpi\bin as A: drive

    +

    js-dos 8.xx Help

    Installing Windows

    The process of installing is typical for all OSes. You can use this instruction not only for Windows. Installing process includes:

    1. Fork drive

    2. Setup configuration of DOSBox

    3. Create js-dos bundle

    4. Get installation CD and bootable diskette or bootable CD

    5. Upload this images to FS

    6. Boot from CD or diskette

    7. Install OS

    Here is a tutorial video with a Windows 95 installation process.

    Tune your installation

    Seamless mouse integration (windows 9x)

    1. Download binary drivers

    2. Mount install.dsk from doslib\windrv\dosboxpi\bin as A: drive

      imgmount a: install.dsk -
    3. Boot your Windows 98 image

    4. Open Control Panel -> Add New Hardware -> Mouse -> Have Disk

    5. In the file selector, please select folder related to your Windows version, e.g., win98.

    6. Install DOSBox-X Mouse Pointer Integration

    7. Open Control Panel -> System -> Device Manager

    8. Select Standard PS/2 Port Mouse and press Properties

    9. Check Disable in this hardware profile

    10. Reboot

    Install 3Dfx driver (windows 9x)

    1. Download 3.01 Driver

    2. Extract it somewhere

    3. Upload this folder to js-dos before windows boot

    4. Mount FS as drive D:

      +
    5. Boot your Windows 98 image

    6. Open Control Panel -> Add New Hardware -> Mouse -> Have Disk

    7. In the file selector, please select folder related to your Windows version, e.g., win98.

    8. Install DOSBox-X Mouse Pointer Integration

    9. Open Control Panel -> System -> Device Manager

    10. Select Standard PS/2 Port Mouse and press Properties

    11. Check Disable in this hardware profile

    12. Reboot

    Install 3Dfx driver (windows 9x)

    1. Download 3.01 Driver

    2. Extract it somewhere

    3. Upload this folder to js-dos before windows boot

    4. Mount FS as drive D:

      mount d: . -
    5. Boot Windows 98

    6. Open Device Manager Start -> Settings -> Control Panel -> System

    7. Locate the existing reference to the card it will be listed as:

      Reference Card: +
    8. Boot Windows 98

    9. Open Device Manager Start -> Settings -> Control Panel -> System

    10. Locate the existing reference to the card it will be listed as:

      Reference Card: Other Devices / PCI Multimedia Device or Sound, Video, Game Controllers / Voodoo2 3Dfx Voodoo -
    11. Double-Click on the card, then click the driver Tab.

    12. Click Update Driver then click the Next Button twice on the Detection Dialog Box. Ensure that Specify a Location is checked and Microsoft Windows Update is not checked. Click Browse to continue.

    13. Select drive D:

    14. If windows asks please select Install one of the other drivers. Press Next.

    15. Windows will copy the drivers. Overwrite all files if windows asks.

    16. Reboot the system when prompted.

    DirectX (windows 9x)

    1. Download DirectX 6, DirectX 7, DirectX 8 or DirectX 9.0c, extract it to some folder.

    2. Extract it somewhere

    3. Upload this folder to js-dos before Windows boot

    4. Mount FS as drive D:

      +
    5. Double-Click on the card, then click the driver Tab.

    6. Click Update Driver then click the Next Button twice on the Detection Dialog Box. Ensure that Specify a Location is checked and Microsoft Windows Update is not checked. Click Browse to continue.

    7. Select drive D:

    8. If windows asks please select Install one of the other drivers. Press Next.

    9. Windows will copy the drivers. Overwrite all files if windows asks.

    10. Reboot the system when prompted.

    DirectX (windows 9x)

    1. Download DirectX 6, DirectX 7, DirectX 8 or DirectX 9.0c, extract it to some folder.

    2. Extract it somewhere

    3. Upload this folder to js-dos before Windows boot

    4. Mount FS as drive D:

      mount d: . -

    When windows started run the D:\Setup.exe.

    Windows Installer 2.0 (windows 9x)

    Download Windows Installer 2.0 and follow same steps as for DirectX 9.0

    Last modified: 18 ноября 2024
\ No newline at end of file +

When windows started run the D:\Setup.exe.

Windows Installer 2.0 (windows 9x)

Download Windows Installer 2.0 and follow same steps as for DirectX 9.0

Last modified: 18 ноября 2024
\ No newline at end of file diff --git a/jsdos-bundle.html b/jsdos-bundle.html index ead117c9..9d8499fd 100644 --- a/jsdos-bundle.html +++ b/jsdos-bundle.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

Bundle creation

Starting from js-dos v7, the API expects a js-dos bundle that already contains all configuration needed to start the DOS program. js-dos bundle is just a ZIP archive that contains the game itself and a js-dos configuration file (same as dosbox.conf file). For example, digger.jsdos contains:

+

js-dos 8.xx Help

Bundle creation

Starting from js-dos v7, the API expects a js-dos bundle that already contains all configuration needed to start the DOS program. js-dos bundle is just a ZIP archive that contains the game itself and a js-dos configuration file (same as dosbox.conf file). For example, digger.jsdos contains:

.jsdos/dosbox.conf - dosbox configuration file (required) .jsdos/jsdos.json - additional configuration (optional) DIGGER.COM - game file -

You can generate a js-dos bundle programmatically. But we recommend you use our bundle generator

Game Studio

Game Studio is a recommended tool for creating js-dos bundles.

js-dos bundles generated with a game studio always support the latest features that js-dos have. It generates configuration files for you.

Bundle generated by game studio is not licensed, you can use them whatever you want.

Open Game Studio v7

How to create bundles for DOS and Windows 95

To create a bundle, you need to perform the following steps:

1. Create an empty bundle and select dosbox configuration

To do this, press on "Create empty bundle" link.

Create empty bundle

Now you need to select one of the available configurations or write your own.

Select configuration

7.xx is the best option if your program is a plain DOS program. It is also compatible both with js-dos v7 and v8.

2. Run emulator and add program files

Press the "Run" button.

The run button

When the emulator is started, open the File System panel using the disk icon. Use upload file, or upload folder button to add your files to bundle File System.

Upload files

3. Export result as js-dos bundle

To export use download button.

Download bundle

When a bundle is ready, the browser will prompt you to save it somewhere on your PC. Now when you have a bundle, go ahead and publish it somewhere.

Sockdrive bundles (Windows)

When you need to install Windows program, then you need to use sockdrive. These drives are located in js-dos cloud, and transfer only required data to browser. The way of creating the bundle is the same as described above. Except one thing: you need to create such a drive first.

After creating a drive, you need to attach it to your configuration. Use "Browse" button for this, or enter drive manually.

Browse button

Now you can start emulator and create bundle.

Now reload the page and load your bundle with load button.

Load bundle

When emulator is started, add files as explained before and mount bundle FS as some drive:

+

You can generate a js-dos bundle programmatically. But we recommend you use our bundle generator

Game Studio

Game Studio is a recommended tool for creating js-dos bundles.

js-dos bundles generated with a game studio always support the latest features that js-dos have. It generates configuration files for you.

Bundle generated by game studio is not licensed, you can use them whatever you want.

Open Game Studio v7

How to create bundles for DOS and Windows 95

To create a bundle, you need to perform the following steps:

1. Create an empty bundle and select dosbox configuration

To do this, press on "Create empty bundle" link.

Create empty bundle

Now you need to select one of the available configurations or write your own.

Select configuration

7.xx is the best option if your program is a plain DOS program. It is also compatible both with js-dos v7 and v8.

2. Run emulator and add program files

Press the "Run" button.

The run button

When the emulator is started, open the File System panel using the disk icon. Use upload file, or upload folder button to add your files to bundle File System.

Upload files

3. Export result as js-dos bundle

To export use download button.

Download bundle

When a bundle is ready, the browser will prompt you to save it somewhere on your PC. Now when you have a bundle, go ahead and publish it somewhere.

Sockdrive bundles (Windows)

When you need to install Windows program, then you need to use sockdrive. These drives are located in js-dos cloud, and transfer only required data to browser. The way of creating the bundle is the same as described above. Except one thing: you need to create such a drive first.

After creating a drive, you need to attach it to your configuration. Use "Browse" button for this, or enter drive manually.

Browse button

Now you can start emulator and create bundle.

Now reload the page and load your bundle with load button.

Load bundle

When emulator is started, add files as explained before and mount bundle FS as some drive:

mount d . -

Boot Windows and copy files to it. They will be immidiately stored in a js-dos cloud. So any next boot will have them no need to reexport a bundle.

Advanced configuration

.jsdos/dosbox.conf

This file is a regular dosbox configuration. Not all features are supported, but we will work on it.

.jsdos/jsdos.json

This file contains additional configuration that does not exist in the dosbox configuration file. For example, it's used to configure virtual controls. If you used game studio to create bundles then it will also contain all information from dosbox.conf. And it looks like:

+

Boot Windows and copy files to it. They will be immidiately stored in a js-dos cloud. So any next boot will have them no need to reexport a bundle.

Advanced configuration

.jsdos/dosbox.conf

This file is a regular dosbox configuration. Not all features are supported, but we will work on it.

.jsdos/jsdos.json

This file contains additional configuration that does not exist in the dosbox configuration file. For example, it's used to configure virtual controls. If you used game studio to create bundles then it will also contain all information from dosbox.conf. And it looks like:

{ "layers": [ { @@ -41,8 +41,8 @@ "controls": [ { "row": 0 -

This file can contain any configuration that you want. You can access it with Command Interface. For example:

+

This file can contain any configuration that you want. You can access it with Command Interface. For example:

const ci = await Dos(/*element*/).run(/*bundle url*/); const config = await ci.config(); console.log(config.layers); -

This snippet will print information about gestures that config has. It's a very powerful feature, it can be used to add new optional features to js-dos.

Last modified: 18 ноября 2024
\ No newline at end of file +

This snippet will print information about gestures that config has. It's a very powerful feature, it can be used to add new optional features to js-dos.

Last modified: 18 ноября 2024
\ No newline at end of file diff --git a/mobile-support-v7.html b/mobile-support-v7.html index 63f561fb..67ab5100 100644 --- a/mobile-support-v7.html +++ b/mobile-support-v7.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

Mobile support (v7)

js-dos v7 is mobile friendly. We build a set of controls that helps map touch gestures to key or mouse events.

The core concept of mobile support is a layer abstraction. Layer is a combination of virtual controls like buttons, joysticks and other that put on top of the game. Each control translates user interaction into some control sequences (keys, mouse) for the game.

You can put on top as many layers as you want. However, only one layer can be active at the same time.

Using game-studio can help to visually create this controls for game.

Take a look to our mobile tutorial:

Positioning

Layer do the layouting of controls that it have. When you create a layer you should choose the layout system. Currently supported: square and honeycomb layout.

grid.jpg

Key Control

Key is a virtual button, that map touches into keyboard press and release events.

key.jpg

You must provide symbol and mapping key code for this control.

Keyboard Control

Keyboard is a virtual button that toggles virtual keyboard when you press it.

keyboard.jpg

You can't customize Keyboard control yet.

Switch Control

Switch is a virtual button that switch between layers when you press it.

You must provide symbol and layer name to switch for this control. Using this control you can easily implements multi-layer virtual controls.

Often one layer is enough for a game, but sometimes the game has a complex UI that requires changing layers between scenes. In that case you can attach multiple layers to the game and then switch between them when needed.

X-Com one such game, take a look how it works (> is a switch control).

Screen Move Control

Screen Move is a virtual button that moves the mouse into one of the sides (up, down, left, right) or into one of the corners. Using this control you can support the scroll of the game screen in games that scroll when the mouse pointer is near the screen edge.

You should provide side to that control. Usually this control used in combination with Nipple Activator.

Nipple Activator Control

Nipple Activator is a joystick that activates neighboring controls when a joystick touches them.

nipple-activator.jpg

This can be used to implement scroll behaviour in games. Watch the video above to see how it works.

You can't customize Nipple Activator control yet.

Pointer Button Control

Pointer Button is a virtual button that changes the behaviour of click/tap. By default, click/tap is interpreted as left mouse button click. With this control you can change it to right button peramnently or temporary (while holding it).

This control has a click property, if it is set, then clicking on the virtual button will set the pointer button to the right mouse button for next game click/tap. In the other case the button will be set to the right mouse button while you are holding the virtual button.

Look the video above to see how it works (look on R virtual button).

Pointer Move Control

Pointer Move is a virtual button that moves mouse pointer into special screen position. Position is passed in range [0 .. 1] (e.g. [0.5, 0,5] is a screen center).

Pointer Reset Control

Pointer Reset is a virtual button that force sycning of browser cursor position and in-game cursor position.

You can't customize Pointer Reset control yet.

Options Control

Control type Options will create Options button that includes

  • toggle keyboard action

  • save action

  • toggle fullscreen action

special-button.jpg

You can't customize Options control yet.

Last modified: 18 ноября 2024
\ No newline at end of file +

js-dos 8.xx Help

Mobile support (v7)

js-dos v7 is mobile friendly. We build a set of controls that helps map touch gestures to key or mouse events.

The core concept of mobile support is a layer abstraction. Layer is a combination of virtual controls like buttons, joysticks and other that put on top of the game. Each control translates user interaction into some control sequences (keys, mouse) for the game.

You can put on top as many layers as you want. However, only one layer can be active at the same time.

Using game-studio can help to visually create this controls for game.

Take a look to our mobile tutorial:

Positioning

Layer do the layouting of controls that it have. When you create a layer you should choose the layout system. Currently supported: square and honeycomb layout.

grid.jpg

Key Control

Key is a virtual button, that map touches into keyboard press and release events.

key.jpg

You must provide symbol and mapping key code for this control.

Keyboard Control

Keyboard is a virtual button that toggles virtual keyboard when you press it.

keyboard.jpg

You can't customize Keyboard control yet.

Switch Control

Switch is a virtual button that switch between layers when you press it.

You must provide symbol and layer name to switch for this control. Using this control you can easily implements multi-layer virtual controls.

Often one layer is enough for a game, but sometimes the game has a complex UI that requires changing layers between scenes. In that case you can attach multiple layers to the game and then switch between them when needed.

X-Com one such game, take a look how it works (> is a switch control).

Screen Move Control

Screen Move is a virtual button that moves the mouse into one of the sides (up, down, left, right) or into one of the corners. Using this control you can support the scroll of the game screen in games that scroll when the mouse pointer is near the screen edge.

You should provide side to that control. Usually this control used in combination with Nipple Activator.

Nipple Activator Control

Nipple Activator is a joystick that activates neighboring controls when a joystick touches them.

nipple-activator.jpg

This can be used to implement scroll behaviour in games. Watch the video above to see how it works.

You can't customize Nipple Activator control yet.

Pointer Button Control

Pointer Button is a virtual button that changes the behaviour of click/tap. By default, click/tap is interpreted as left mouse button click. With this control you can change it to right button peramnently or temporary (while holding it).

This control has a click property, if it is set, then clicking on the virtual button will set the pointer button to the right mouse button for next game click/tap. In the other case the button will be set to the right mouse button while you are holding the virtual button.

Look the video above to see how it works (look on R virtual button).

Pointer Move Control

Pointer Move is a virtual button that moves mouse pointer into special screen position. Position is passed in range [0 .. 1] (e.g. [0.5, 0,5] is a screen center).

Pointer Reset Control

Pointer Reset is a virtual button that force sycning of browser cursor position and in-game cursor position.

You can't customize Pointer Reset control yet.

Options Control

Control type Options will create Options button that includes

  • toggle keyboard action

  • save action

  • toggle fullscreen action

special-button.jpg

You can't customize Options control yet.

Last modified: 18 ноября 2024
\ No newline at end of file diff --git a/mobile-support.html b/mobile-support.html index 21c3ff1b..edb05064 100644 --- a/mobile-support.html +++ b/mobile-support.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

\ No newline at end of file +

js-dos 8.xx Help

\ No newline at end of file diff --git a/mouse-locking.html b/mouse-locking.html index 2fce110d..b1a1c768 100644 --- a/mouse-locking.html +++ b/mouse-locking.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

Mouse locking

Some DOS games do not respect the mouse cursor position, they take into account only relative movement of the mouse cursor. This type of game requires a mouse locking feature.

When the mouse is locked DOS game receive only relative movement of mouse and cursor can't leave game screen. This often used inf FPS games like DOOM to look around.

To activate mouse locking just enable the autolock property in dosbox config. Mouse will be locked automatically when you click on the game screen.

autolock.jpg
Last modified: 18 ноября 2024
\ No newline at end of file +

js-dos 8.xx Help

Mouse locking

Some DOS games do not respect the mouse cursor position, they take into account only relative movement of the mouse cursor. This type of game requires a mouse locking feature.

When the mouse is locked DOS game receive only relative movement of mouse and cursor can't leave game screen. This often used inf FPS games like DOOM to look around.

To activate mouse locking just enable the autolock property in dosbox config. Mouse will be locked automatically when you click on the game screen.

autolock.jpg
Last modified: 18 ноября 2024
\ No newline at end of file diff --git a/multiple-instances.html b/multiple-instances.html index f7e354a8..585e0f3b 100644 --- a/multiple-instances.html +++ b/multiple-instances.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

Multiple Instances

Each call to Dos constructor creates a new js-dos instance that works independently.

In the example below, you can see 4 DOS games on a single page:

<!doctype html> +

js-dos 8.xx Help

Multiple Instances

Each call to Dos constructor creates a new js-dos instance that works independently.

In the example below, you can see 4 DOS games on a single page:

<!doctype html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> diff --git a/need-help.html b/need-help.html index d8852ace..ca3e7038 100644 --- a/need-help.html +++ b/need-help.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

Need help?

There are several ways to communicate and ask help.

  • In case if you have a question or something unclear then fastest way to get answer is a join our discord or telegram.

  • In case if you found a bug please create issue in project bug tracker

Last modified: 18 ноября 2024
\ No newline at end of file +

js-dos 8.xx Help

Need help?

There are several ways to communicate and ask help.

  • In case if you have a question or something unclear then fastest way to get answer is a join our discord or telegram.

  • In case if you found a bug please create issue in project bug tracker

Last modified: 18 ноября 2024
\ No newline at end of file diff --git a/networking.html b/networking.html index fea96f99..a9067991 100644 --- a/networking.html +++ b/networking.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

Networking

Some DOS games offer multiplayer gaming based on ipx, modem, or direct connection. Using a browser isn't possible to directly connect two clients. BUT, using js-dos cloud, you can emulate direct connection.

Here is tutorial video how to use networking with js-dos:

By default, users able to enjoy these games using the Netherlands server, which is provided by js-dos.

Deploy own ipx backend

As said js-dos provide Netherlands server for free, but it works well only for Europe region. To improve player experience you can deploy own instance of ipx backend.

The Server

The server code is licensed under GPL2 and you can find it here. This server works as relay it connects multiple js-dos clients together. You need to deploy it on some public available server.

  1. Download the server binary

  2. Run it as follows:

    +

    js-dos 8.xx Help

    Networking

    Some DOS games offer multiplayer gaming based on ipx, modem, or direct connection. Using a browser isn't possible to directly connect two clients. BUT, using js-dos cloud, you can emulate direct connection.

    Here is tutorial video how to use networking with js-dos:

    By default, users able to enjoy these games using the Netherlands server, which is provided by js-dos.

    Deploy own ipx backend

    As said js-dos provide Netherlands server for free, but it works well only for Europe region. To improve player experience you can deploy own instance of ipx backend.

    The Server

    The server code is licensed under GPL2 and you can find it here. This server works as relay it connects multiple js-dos clients together. You need to deploy it on some public available server.

    1. Download the server binary

    2. Run it as follows:

      ./server -c cert.pem -k privkey.pem -

      Argument

      Description

      ./server

      server binary

      -c cert.pem

      path to SSL certificate

      -k privekey.pem

      path to private key file

    Configuring js-dos player

    When server is started you can use it with js-dos player. For example, if your server is available on host myipx.com, js-dos configuration will be:

    +

    Argument

    Description

    ./server

    server binary

    -c cert.pem

    path to SSL certificate

    -k privekey.pem

    path to private key file

Configuring js-dos player

When server is started you can use it with js-dos player. For example, if your server is available on host myipx.com, js-dos configuration will be:

const params = new URLSearchParams(location.search); // ... Dos(el, { - server: params.get("server"), + ipxBackend: params.get("ipxBackend"), room: params.get("room"), ipx: [{ name: "myipx", @@ -43,4 +43,4 @@ } ], }); -

The first element in ipx array will be used as default ipx server.

Last modified: 18 ноября 2024
\ No newline at end of file +

The first element in ipx array will be used as default ipx server.

Last modified: 18 ноября 2024
\ No newline at end of file diff --git a/node.html b/node.html index 1ae2bd68..acf41739 100644 --- a/node.html +++ b/node.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

Node

In this tutorial we will run Digger game in Node.js and save game screenshot to the image.

Let's start with creating empty project:

+

js-dos 8.xx Help

Node

In this tutorial we will run Digger game in Node.js and save game screenshot to the image.

Let's start with creating empty project:

npm init -

To run DOS in browser we need to install emulators package. For creating screenshot we will use jimp library. So let's install them.

+

To run DOS in browser we need to install emulators package. For creating screenshot we will use jimp library. So let's install them.

npm install --save emulators jimp -

Next we need to download Digger js-dos bundle:

+

Next we need to download Digger js-dos bundle:

curl https://cdn.dos.zone/original/2X/2/24b00b14f118580763440ecaddcc948f8cb94f14.jsdos -o digger.jsdos -

Let's create source file digger.js. We can run it with this command node digger.js

Use require to import all libraries

+

Let's create source file digger.js. We can run it with this command node digger.js

Use require to import all libraries

const fs = require("fs"); const jimp = require("jimp"); @@ -40,7 +40,7 @@ const emulators = global.emulators; emulators.pathPrefix = "./"; -

Now we need to read contents of jsdos bundle and start emulation

+

Now we need to read contents of jsdos bundle and start emulation

const bundle = fs.readFileSync("digger.jsdos"); emulators @@ -48,11 +48,11 @@ .then((ci) => { // ... }); -

When dos emulation starts, we will receive Command Interface, we can use it to subscribe on frame updates and to send key/mouse events.

+

When dos emulation starts, we will receive Command Interface, we can use it to subscribe on frame updates and to send key/mouse events.

ci.events().onFrame((rgb, rgba) => { // use rgb or rgba image data }); -

In the v7 we have frame in RGBA format with transparent alpha, let's fix this and save screenshot:

+

In the v7 we have frame in RGBA format with transparent alpha, let's fix this and save screenshot:

const width = ci.width(); const height = ci.height(); @@ -65,7 +65,7 @@ ci.exit(); }); }); -

If you execute node digger.js it will save the screenshot to ./screenshot.png.

Full code of digger.js:

+

If you execute node digger.js it will save the screenshot to ./screenshot.png.

Full code of digger.js:

const fs = require("fs"); const jimp = require("jimp"); diff --git a/overview.html b/overview.html index 73fb18d0..fefcbfbc 100644 --- a/overview.html +++ b/overview.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

js-dos

The simplest API to run DOS/Win 9x programs in browser or node.

js-dos is a frontend for emulators that provides nice UI and infrastructure to run DOS or Windows programs in browser.

It provides full-featured DOS player that can be easily installed and used to get your DOS program up and running in browser quickly. js-dos provide many advanced features like multiplayer and cloud storage. All available features are enabled for any integration and free.

The key features:

  • Works in worker or render thread

  • Support execution in Node and Browsers

  • Multiple backends: DOSBox, DOSBox-X

  • Mobile support (v8 - WIP, v7 - production)

  • Able to run huge games (like Diablo, etc.)

  • Multiplayer support

  • Cloud storage

  • WebAssembly and pure JS versions

Last modified: 18 ноября 2024
\ No newline at end of file +

js-dos 8.xx Help

js-dos

The simplest API to run DOS/Win 9x programs in browser or node.

js-dos is a frontend for emulators that provides nice UI and infrastructure to run DOS or Windows programs in browser.

It provides full-featured DOS player that can be easily installed and used to get your DOS program up and running in browser quickly. js-dos provide many advanced features like multiplayer and cloud storage. All available features are enabled for any integration and free.

The key features:

  • Works in worker or render thread

  • Support execution in Node and Browsers

  • Multiple backends: DOSBox, DOSBox-X

  • Mobile support (v8 - WIP, v7 - production)

  • Able to run huge games (like Diablo, etc.)

  • Multiplayer support

  • Cloud storage

  • WebAssembly and pure JS versions

Last modified: 18 ноября 2024
\ No newline at end of file diff --git a/player-api.html b/player-api.html index df6efcd8..a5971fa6 100644 --- a/player-api.html +++ b/player-api.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

Player API

js-dos player provides a single entry point a Dos function, it takes two arguments:

  1. element where to create a player window

  2. options object to configure player

+

js-dos 8.xx Help

Player API

js-dos player provides a single entry point a Dos function, it takes two arguments:

  1. element where to create a player window

  2. options object to configure player

Dos(element: HTMLDivElement, options: DosOptions) => DosProps; -

It returns DosProps to a control created player

Options

option

description

type

default

url

url to js-dos bundle

URL

dosboxConf

if you omit url this will be used to configure DOSBox example

str

jsdosConf

additionally to dosboxConf you can provide jsdos configuration (jsdos.json)

Object

{}

initFs

additional files to init FS, read more

Array< { path: string, contents: Uint8Array } >

background

background image of player window

URL

pathPrefix

a way to set different path for emulators deployment

str

theme

the color theme of player

light, dark, cupcake, bumblebee, emerald, corporate, synthwave, retro, cyberpunk, valentine, halloween, garden, forest, aqua, lofi, pastel, fantasy, wireframe, black, luxury, dracula, cmyk, autumn, business, acid, lemonade, night, coffee, winter

light

lang

language

en, ru

auto

backend

default backend

dosbox, dosboxX

dosbox

backendLocked

possibility to change backend from UI

bool

false

backendHardware

reserved

-

workerThread

use Worker

bool

true

mouseCapture

lock the mouse in player window

bool

false

ipx

ipx backend configuration (networking)

Object[]

ipxBackend

ipx backend name (should be one from ipx array)

str

netherlands

room

ipx room

str

fullScreen

auto enter fullscreen mode

bool

false

onEvent

listener of js-dos events

function

autoStart

automatically starts emulation

boolean

false

kiosk

switch kiosk mode, in kiosk mode player ui is hidden

boolean

false

imageRendering

image rendering mode

pixelated, smooth

pixelated

renderBackend

the way to render dos screen

webgl, canvas

webgl

renderAspect

change the aspect of output window

AsIs, 1/1, 5/4, 4/3, 16/10, 16/9, Fit

AsIs

noNetworking

hide networking button

bool

true

noCloud

disable cloud feature

bool

false

key

set the key to access cloud services

string

scaleControls

set scale of controls

number

0.2

mouseSensitivity

set mouse sensitivity

number

1.0

noCursor

show/hide system cursor

bool

false

volume

set sound volume

number [0..1]

1.0

softKeyboardLayout

initial virtual keyboard layout, read more

str[]

qwerty

softKeyboardSymbols

initial virtual keyboard symbols

map[]

en, ru

DosProps

DosProps is a properties that you can use to control player after creation, use it like this:

+

It returns DosProps to a control created player

Options

option

description

type

default

url

url to js-dos bundle

URL

dosboxConf

if you omit url this will be used to configure DOSBox example

str

jsdosConf

additionally to dosboxConf you can provide jsdos configuration (jsdos.json)

Object

{}

initFs

additional files to init FS, read more

Array< { path: string, contents: Uint8Array } >

background

background image of player window

URL

pathPrefix

a way to set different path for emulators deployment

str

theme

the color theme of player

light, dark, cupcake, bumblebee, emerald, corporate, synthwave, retro, cyberpunk, valentine, halloween, garden, forest, aqua, lofi, pastel, fantasy, wireframe, black, luxury, dracula, cmyk, autumn, business, acid, lemonade, night, coffee, winter

light

lang

language

en, ru

auto

backend

default backend

dosbox, dosboxX

dosbox

backendLocked

possibility to change backend from UI

bool

false

backendHardware

reserved

-

workerThread

use Worker

bool

true

mouseCapture

lock the mouse in player window

bool

false

ipx

ipx backend configuration (networking)

Object[]

ipxBackend

ipx backend name (should be one from ipx array)

str

netherlands

room

ipx room

str

fullScreen

auto enter fullscreen mode

bool

false

onEvent

listener of js-dos events

function

autoStart

automatically starts emulation

boolean

false

kiosk

switch kiosk mode, in kiosk mode player ui is hidden

boolean

false

imageRendering

image rendering mode

pixelated, smooth

pixelated

renderBackend

the way to render dos screen

webgl, canvas

webgl

renderAspect

change the aspect of output window

AsIs, 1/1, 5/4, 4/3, 16/10, 16/9, Fit

AsIs

noNetworking

hide networking button

bool

true

noCloud

disable cloud feature

bool

false

key

set the key to access cloud services

string

scaleControls

set scale of controls

number

0.2

mouseSensitivity

set mouse sensitivity

number

1.0

noCursor

show/hide system cursor

bool

false

volume

set sound volume

number [0..1]

1.0

softKeyboardLayout

initial virtual keyboard layout, read more

str[]

qwerty

softKeyboardSymbols

initial virtual keyboard symbols

map[]

en, ru

DosProps

DosProps is a properties that you can use to control player after creation, use it like this:

cost props = Dos(elem, options); props.setFullScreen(true); // switch to fullscreen mode -

property

description

arguments

setTheme

switch player theme

theme name

setLang

change language

en, ru

setBackend

change backend

dosbox, dosboxX

setBackendLocked

change is backend locked or not

bool

setWorkerThread

select execution mode

bool

setMouseCapture

set is mouse captured or not

bool

setIpx

change ipx backends (networking)

Object[]

setIpxBackend

change ipx backend

str

setRoom

change ipx room

str

setFrame

open named sidebar panel

network

setBackground

change background image

URL

setFullScreen

change fullscreen mode

bool

setAutoStart

change auto start

bool

setKiosk

change kisok mode

bool

setImageRendering

change image rendering

pixelated, smooth

setRenderBackend

change render backend (available only before emulation start)

webgl

setRenderAspect

change render aspect

AsIs, 1/1, 5/4, 4/3, 16/10, 16/9, Fit

setNoNetworking

show/hide networking button

bool

setNoCloud

disable/enable cloud feature

bool

setKey

set key to access cloud services

string / null

setScaleControls

set scale of controls

number

setMouseSensitivity

set mouse sensitivity

number

setPaused

pause/resume emulation

bool

setNoCursor

show/hide system cursor

bool

setVolume

set sound volume

number [0..1]

setSoftKeyboardLayout

set virtual keyboard layout

string[]

setSoftKeyboardSymbols

set virtual keyboard symbols

map[]

save

trigger to save changes in FS, return Promise<boolean>

-

stop

kill the emulation (use to stop player)

-

Events

You can listen to js-dos event by providing listener in Dos function:

+

property

description

arguments

setTheme

switch player theme

theme name

setLang

change language

en, ru

setBackend

change backend

dosbox, dosboxX

setBackendLocked

change is backend locked or not

bool

setWorkerThread

select execution mode

bool

setMouseCapture

set is mouse captured or not

bool

setIpx

change ipx backends (networking)

Object[]

setIpxBackend

change ipx backend

str

setRoom

change ipx room

str

setFrame

open named sidebar panel

network

setBackground

change background image

URL

setFullScreen

change fullscreen mode

bool

setAutoStart

change auto start

bool

setKiosk

change kisok mode

bool

setImageRendering

change image rendering

pixelated, smooth

setRenderBackend

change render backend (available only before emulation start)

webgl

setRenderAspect

change render aspect

AsIs, 1/1, 5/4, 4/3, 16/10, 16/9, Fit

setNoNetworking

show/hide networking button

bool

setNoCloud

disable/enable cloud feature

bool

setKey

set key to access cloud services

string / null

setScaleControls

set scale of controls

number

setMouseSensitivity

set mouse sensitivity

number

setPaused

pause/resume emulation

bool

setNoCursor

show/hide system cursor

bool

setVolume

set sound volume

number [0..1]

setSoftKeyboardLayout

set virtual keyboard layout

string[]

setSoftKeyboardSymbols

set virtual keyboard symbols

map[]

save

trigger to save changes in FS, return Promise<boolean>

-

stop

kill the emulation (use to stop player)

-

Events

You can listen to js-dos event by providing listener in Dos function:

Dos(elem, { onEvent: (event , ci?: [[[CommandInterface|command-interface.html]]]) => { console.log("js-dos event", event); } }); -

order

event

description

args

0

emu-ready

when emulators are fully loaded and ready to run the program

1

bnd-play

when play button is clicked

2

ci-ready

when backend is started and CommandInterface is available

CommandInterface

Stop/Restart player

  • To stop player and free all used resources, please call props.stop(), after this player is totally disposed.

  • To restart player dispose current player and start new one.

Typescript

js-dos provide Typescript types declaration. Just put it somewhere in your codebase, and declare Dos function:

+

order

event

description

args

0

emu-ready

when emulators are fully loaded and ready to run the program

1

bnd-play

when play button is clicked

2

ci-ready

when backend is started and CommandInterface is available

CommandInterface

Stop/Restart player

  • To stop player and free all used resources, please call props.stop(), after this player is totally disposed.

  • To restart player dispose current player and start new one.

Typescript

js-dos provide Typescript types declaration. Just put it somewhere in your codebase, and declare Dos function:

import {DosFn} from "types"; declare const Dos: DosFn; diff --git a/pure-js.html b/pure-js.html index 0b8e2257..d9a8430b 100644 --- a/pure-js.html +++ b/pure-js.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

Pure JavaScript

js-dos v7/v8 is better than 6.22 in many cases. But it targets modern browsers. It supports only wasm execution, so it's not possible to run js-dos in pure js mode. In rare cases this can be important and js-dos 6.22 is only one option here.

However, js-dos bundle is plain zip archive, so you can use them also with js-dos 6.22.

+

js-dos 8.xx Help

Pure JavaScript

js-dos v7/v8 is better than 6.22 in many cases. But it targets modern browsers. It supports only wasm execution, so it's not possible to run js-dos in pure js mode. In rare cases this can be important and js-dos 6.22 is only one option here.

However, js-dos bundle is plain zip archive, so you can use them also with js-dos 6.22.

Dos(document.getElementById("jsdos"), { wdosboxUrl: "https://v8.js-dos.com/v6.22/dosbox.js", }).ready((fs, main) => { @@ -60,4 +60,4 @@ }); </script> </body> -</html>

Documentation

Documentation of js-dos 6.22.

Last modified: 18 ноября 2024
\ No newline at end of file +</html>

Documentation

Documentation of js-dos 6.22.

Last modified: 18 ноября 2024
\ No newline at end of file diff --git a/releases.html b/releases.html index 12acc665..411c957f 100644 --- a/releases.html +++ b/releases.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

Releases

CDN (v8)

This recommended way to use js-dos, on CDN there is always latest version of js-dos. Include this into your HTML page:

+

js-dos 8.xx Help

Releases

CDN (v8)

This recommended way to use js-dos, on CDN there is always latest version of js-dos. Include this into your HTML page:

<!-- 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> -

That is! DOS constructor is ready to use.

Github

Latest version always available on github releases page

Npm

If you use npm or yarn, you can obtain the latest version by using npm install or yarn add. All files needed to run emulation are placed in the dist folder of packages.

Last modified: 18 ноября 2024
\ No newline at end of file +

That is! DOS constructor is ready to use.

Github

Latest version always available on github releases page

Npm

If you use npm or yarn, you can obtain the latest version by using npm install or yarn add. All files needed to run emulation are placed in the dist folder of packages.

Last modified: 18 ноября 2024
\ No newline at end of file diff --git a/run-without-bundle.html b/run-without-bundle.html index d7549fc8..f01da021 100644 --- a/run-without-bundle.html +++ b/run-without-bundle.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

Run without bundle

As explained in other topics, the bundle is a preferred way to run DOS program. Bundle can contain much more configuration that DOSBox excepts, for example, mobile controls, resources, etc.

Provide dosbox.conf directly

js-dos can work without a bundle, but at least it needs a DOSBox config file to start. You can create js-dos player by providing config using javascript:

+

js-dos 8.xx Help

Run without bundle

As explained in other topics, the bundle is a preferred way to run DOS program. Bundle can contain much more configuration that DOSBox excepts, for example, mobile controls, resources, etc.

Provide dosbox.conf directly

js-dos can work without a bundle, but at least it needs a DOSBox config file to start. You can create js-dos player by providing config using javascript:

Dos(document.getElementById("app"), { dosboxConf: ` [autoexec] @@ -39,7 +39,7 @@ } }, }); -

Additionally, you can provide jsdos.json configuration, for example, here we start js-dos with one virtual button.

+

Additionally, you can provide jsdos.json configuration, for example, here we start js-dos with one virtual button.

Dos(document.getElementById("app"), { dosboxConf: ` [autoexec] @@ -69,12 +69,12 @@ } }, }); -

Having config allows you to start DOSBox / DOSBox-X, but it is not very useful without a program to run. To init FS before emulation starts, you need to use initFs property. It's a sequence of files, in the following format:

+

Having config allows you to start DOSBox / DOSBox-X, but it is not very useful without a program to run. To init FS before emulation starts, you need to use initFs property. It's a sequence of files, in the following format:

initFs: [ { path: string, contents: Uint8Array }, ... ], -

Where path is a full path to file, contents is a body of file.

Using the following snippet you will create two files:

  • 1.txt with contents "123"

  • 2.txt in directory D with contents "345"

+

Where path is a full path to file, contents is a body of file.

Using the following snippet you will create two files:

  • 1.txt with contents "123"

  • 2.txt in directory D with contents "345"

Dos(document.getElementById("app"), { dosboxConf: ` [autoexec] @@ -91,4 +91,4 @@ } }, }); -

Now when you run it, you can check your files with TYPE command:

Init fs
Last modified: 18 ноября 2024
\ No newline at end of file +

Now when you run it, you can check your files with TYPE command:

Init fs
Last modified: 18 ноября 2024
\ No newline at end of file diff --git a/save-load-game-progress.html b/save-load-game-progress.html index c0715a6c..126fd158 100644 --- a/save-load-game-progress.html +++ b/save-load-game-progress.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

Save/Load

js-dos supports saving and restoring game progress. You can play game from time to time without losing progress. It's working automatically while you don't change bundle url.

This feature works by dumping changes in file system into second bundle and use it to override original file system on next load. You can read more about actual implementation here.

Save/Load feature works automatically whenever player press save icon. However, game itself should support storing progress. Read detailed instructions how to deal with save/load in DOS.

save-button.jpg
Last modified: 18 ноября 2024
\ No newline at end of file +

js-dos 8.xx Help

Save/Load

js-dos supports saving and restoring game progress. You can play game from time to time without losing progress. It's working automatically while you don't change bundle url.

This feature works by dumping changes in file system into second bundle and use it to override original file system on next load. You can read more about actual implementation here.

Save/Load feature works automatically whenever player press save icon. However, game itself should support storing progress. Read detailed instructions how to deal with save/load in DOS.

save-button.jpg
Last modified: 18 ноября 2024
\ No newline at end of file diff --git a/save-load.html b/save-load.html index 4a6a7a42..f110bee3 100644 --- a/save-load.html +++ b/save-load.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

Persist FS

emulators supports saving and restoring changes made in file system. It works by dumping changes of file system into second bundle and use it to override original file system on next load. This feature is backed by CommandInterface persist function.

You can implement your own save/load feature like this:

+

js-dos 8.xx Help

Persist FS

emulators supports saving and restoring changes made in file system. It works by dumping changes of file system into second bundle and use it to override original file system on next load. This feature is backed by CommandInterface persist function.

You can implement your own save/load feature like this:

const bunlde = <Uint8Array>; const ci = await emulators.dosboxWorker(bundle); diff --git a/sockdrive.html b/sockdrive.html index 253c1eb0..e785e962 100644 --- a/sockdrive.html +++ b/sockdrive.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

FAT Drives (sockdrive)

js-dos support running larger programs like Windows 95/98 games, which require access to FAT drives. All js-dos users have access to read-only storage, allowing them to freely run such games.

For subscribed users, there's an additional benefit of writing support. This means they can save their progress and even install new games under existing Windows 95/98 installations. With the writing support, subscribed users can enjoy a more immersive experience by having the ability to save and modify their game data, making their gaming journey even more enjoyable and customizable.

Key features of sockdrive:

  • Disk cloning capability (fork)

  • Free read access

  • Unlimited number of disks and their copies

  • Seamless integration with js-dos

Last modified: 18 ноября 2024
\ No newline at end of file +

js-dos 8.xx Help

FAT Drives (sockdrive)

js-dos support running larger programs like Windows 95/98 games, which require access to FAT drives. All js-dos users have access to read-only storage, allowing them to freely run such games.

For subscribed users, there's an additional benefit of writing support. This means they can save their progress and even install new games under existing Windows 95/98 installations. With the writing support, subscribed users can enjoy a more immersive experience by having the ability to save and modify their game data, making their gaming journey even more enjoyable and customizable.

Key features of sockdrive:

  • Disk cloning capability (fork)

  • Free read access

  • Unlimited number of disks and their copies

  • Seamless integration with js-dos

Last modified: 18 ноября 2024
\ No newline at end of file diff --git a/subscription.html b/subscription.html index 4f09e4af..561e5763 100644 --- a/subscription.html +++ b/subscription.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

Subscription

js-dos subscription activates advanced cloud features of player. To manage your subscription and player key please open this 8.xx subscription page.

Create an account

Follow the instructions bellow to create a js-dos account.

  1. Open 8.xx subscription page

  2. Switch to SIGN UP tab and fill all inputs

    Registration

  3. Press Create Account button

    Create Account

Login

To log in, use the same steps as for creating an account, but use Login tab instead.

Login Tab

When you are logged, you will see your name and current subscription.

Subscribe

To subscribe, you must be logged in. Use Buy button to subscribe.

Buy Button

Secret key

The js-dos player uses secret key to get access to your subscription; you can get it on the bottom of the page. Use Refresh button to change it.

Refresh key

Then copy the key and paste it into the player:

Enter key

Can I share secret key?

Yep, you can. But take in mind that secret key provides direct access to your disk drives and saves. In the case of concurrent writing, they will quickly become broken.

Cancel your subscription

Press Cancle button in your subscription details.

cancel-subscription

In case of any problem, please reach out to xsolla customer support team. You can do this by sending an email to support@xsolla.com. In your email, kindly include your subscription details and any specific requests or questions you might have. Our support team is dedicated to assisting you and will respond as promptly as possible to help you with the cancellation process.

Delete account

To delete your account, please follow the steps below:

  1. Compose an email to dz.caiiiycuk@gmail.com.

  2. In the subject line, write: " Account Deletion Request. "

  3. In the email body, include the following information:

    • Your account details (username, email address, etc.)

    • A clear request for the deletion of your account

  4. Send the email and await confirmation from our team regarding the account deletion process.

Please note that account deletion is irreversible and will result in the permanent removal of your personal information from our system.

Last modified: 18 ноября 2024
\ No newline at end of file +

js-dos 8.xx Help

Subscription

js-dos subscription activates advanced cloud features of player. To manage your subscription and player key please open this 8.xx subscription page.

Create an account

Follow the instructions bellow to create a js-dos account.

  1. Open 8.xx subscription page

  2. Switch to SIGN UP tab and fill all inputs

    Registration

  3. Press Create Account button

    Create Account

Login

To log in, use the same steps as for creating an account, but use Login tab instead.

Login Tab

When you are logged, you will see your name and current subscription.

Subscribe

To subscribe, you must be logged in. Use Buy button to subscribe.

Buy Button

Secret key

The js-dos player uses secret key to get access to your subscription; you can get it on the bottom of the page. Use Refresh button to change it.

Refresh key

Then copy the key and paste it into the player:

Enter key

Can I share secret key?

Yep, you can. But take in mind that secret key provides direct access to your disk drives and saves. In the case of concurrent writing, they will quickly become broken.

Cancel your subscription

Press Cancle button in your subscription details.

cancel-subscription

In case of any problem, please reach out to xsolla customer support team. You can do this by sending an email to support@xsolla.com. In your email, kindly include your subscription details and any specific requests or questions you might have. Our support team is dedicated to assisting you and will respond as promptly as possible to help you with the cancellation process.

Delete account

To delete your account, please follow the steps below:

  1. Compose an email to dz.caiiiycuk@gmail.com.

  2. In the subject line, write: " Account Deletion Request. "

  3. In the email body, include the following information:

    • Your account details (username, email address, etc.)

    • A clear request for the deletion of your account

  4. Send the email and await confirmation from our team regarding the account deletion process.

Please note that account deletion is irreversible and will result in the permanent removal of your personal information from our system.

Last modified: 18 ноября 2024
\ No newline at end of file diff --git a/support-us.html b/support-us.html index 0ec82154..84d50dec 100644 --- a/support-us.html +++ b/support-us.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

Support the project

If you enjoy using js-dos and dos.zone project, we would greatly appreciate your support through subscribing to our js-dos subscription. By subscribing, you not only enhance your own experience with exclusive benefits but also contribute to the continued development and maintenance of our platform. Your subscription helps us grow and provide even better services to all our valued users.

Alternatively you can do one time donation:

BTC

ETH

BTC
ETH
Last modified: 18 ноября 2024
\ No newline at end of file +

js-dos 8.xx Help

Support the project

If you enjoy using js-dos and dos.zone project, we would greatly appreciate your support through subscribing to our js-dos subscription. By subscribing, you not only enhance your own experience with exclusive benefits but also contribute to the continued development and maintenance of our platform. Your subscription helps us grow and provide even better services to all our valued users.

Alternatively you can do one time donation:

BTC

ETH

BTC
ETH
Last modified: 18 ноября 2024
\ No newline at end of file diff --git a/system-images.html b/system-images.html index 654c7d66..d26f3ae2 100644 --- a/system-images.html +++ b/system-images.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

System images

💽 DOS 7.1 256 MB

This image includes a bootable disk with the DOS 7.1 operating system, perfectly suited for installing various games.

Sockdrive command:

+

js-dos 8.xx Help

System images

💽 DOS 7.1 256 MB

This image includes a bootable disk with the DOS 7.1 operating system, perfectly suited for installing various games.

Sockdrive command:

imgmount 2 sockdrive wss://sockdrive.js-dos.com:8001 system dos7.1-v1 -

💽 Windows 3.11 256 Mb

This image includes a bootable disk with the Windows 3.11 operating system, perfectly suited for installing various games. Resolution is set to 800x600 with 65k colors, sound blaster installed.

Sockdrive command:

+

💽 Windows 3.11 256 Mb

This image includes a bootable disk with the Windows 3.11 operating system, perfectly suited for installing various games. Resolution is set to 800x600 with 65k colors, sound blaster installed.

Sockdrive command:

imgmount 2 sockdrive wss://sockdrive.js-dos.com:8001 system win311-v1 -

💽 Windows 3.11 Russian 256 Mb

Same as above but with Russian language pack.

Sockdrive command:

+

💽 Windows 3.11 Russian 256 Mb

Same as above but with Russian language pack.

Sockdrive command:

imgmount 2 sockdrive wss://sockdrive.js-dos.com:8001 system win311-ru -

💽 Windows 95 256 MB

This image includes a bootable disk with the Windows 95 operating system and offers several key features. These include support for DirectX 3D and 3Dfx, as well as seamless mouse integration for user convenience. Windows 95 is a historic operating system that made a significant contribution to the development of the personal computer world and left an indelible mark on the information technology industry.

+

💽 Windows 95 256 MB

This image includes a bootable disk with the Windows 95 operating system and offers several key features. These include support for DirectX 3D and 3Dfx, as well as seamless mouse integration for user convenience. Windows 95 is a historic operating system that made a significant contribution to the development of the personal computer world and left an indelible mark on the information technology industry.

imgmount 2 sockdrive wss://sockdrive.js-dos.com:8001 system win95-v1 -

💽 Windows 95 2GB (+Daemon Tools)

Same as above, but with Daemon Tools installed.

+

💽 Windows 95 2GB (+Daemon Tools)

Same as above, but with Daemon Tools installed.

imgmount 2 sockdrive wss://sockdrive.js-dos.com:8001 system win95-v2 -

💽 Windows 95 2GB (Russian)

Russian version

+

💽 Windows 95 2GB (Russian)

Russian version

imgmount 2 sockdrive wss://sockdrive.js-dos.com:8001 system win95-ru -

💽 Windows 98 2GB (+Daemon Tools)

This image includes a bootable disk with the Windows 98 operating system and offers several key features. These include support for DirectX 3D and 3Dfx, as well as seamless mouse integration for user convenience. This image is best fit for installing Windows games.

+

💽 Windows 98 2GB (+Daemon Tools)

This image includes a bootable disk with the Windows 98 operating system and offers several key features. These include support for DirectX 3D and 3Dfx, as well as seamless mouse integration for user convenience. This image is best fit for installing Windows games.

imgmount 2 sockdrive wss://sockdrive.js-dos.com:8001 system win98-v1 -

💽 2GB Fat 32

A blank 2GB disk image already formatted in FAT32 is perfectly suited for installing Windows 95 or Windows 98.

+

💽 2GB Fat 32

A blank 2GB disk image already formatted in FAT32 is perfectly suited for installing Windows 95 or Windows 98.

imgmount 2 sockdrive wss://sockdrive.js-dos.com:8001 system fat32-2gb -

💽 256MB Fat 16

A blank 256MB disk image, preformatted in FAT16, is an excellent choice for installing DOS, Windows 3.xx, or Windows 95.

+

💽 256MB Fat 16

A blank 256MB disk image, preformatted in FAT16, is an excellent choice for installing DOS, Windows 3.xx, or Windows 95.

imgmount 2 sockdrive wss://sockdrive.js-dos.com:8001 system fat16-256m
Last modified: 18 ноября 2024
\ No newline at end of file diff --git a/threejs.html b/threejs.html index e461bdcb..38c079a8 100644 --- a/threejs.html +++ b/threejs.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

How-to use

This is set of tutorials how to use Emulators package (lowlevel emulation backends).

Last modified: 18 ноября 2024
\ No newline at end of file +

js-dos 8.xx Help

How-to use

This is set of tutorials how to use Emulators package (lowlevel emulation backends).

Last modified: 18 ноября 2024
\ No newline at end of file diff --git a/v7.html b/v7.html index 0ad03fad..7ff04bc1 100644 --- a/v7.html +++ b/v7.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

js-dos v7

While js-dos v8 is best option to run DOS/Win programs in browser, it still not fully implement all features that v7 has. For example, mobile controls available only v7. This will change in the future, but if you need this right now then v7 is best for you.

Last modified: 18 ноября 2024
\ No newline at end of file +

js-dos 8.xx Help

js-dos v7

While js-dos v8 is best option to run DOS/Win programs in browser, it still not fully implement all features that v7 has. For example, mobile controls available only v7. This will change in the future, but if you need this right now then v7 is best for you.

Last modified: 18 ноября 2024
\ No newline at end of file diff --git a/virtual-keyboard.html b/virtual-keyboard.html index 0879c986..b07f305c 100644 --- a/virtual-keyboard.html +++ b/virtual-keyboard.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

Virtual Keyboard

js-dos v8 provides virtual/soft keyboard for mobile devices. This keyboard is highly customizable. You can control it by changing layout and symbols.

Layout

Property softKeyboardLayout configures layout of keyboard, it's an array of string. Each item in that array is a line of keys, e.g.:

+

js-dos 8.xx Help

Virtual Keyboard

js-dos v8 provides virtual/soft keyboard for mobile devices. This keyboard is highly customizable. You can control it by changing layout and symbols.

Layout

Property softKeyboardLayout configures layout of keyboard, it's an array of string. Each item in that array is a line of keys, e.g.:

softKeyboardLayout: [ "q w e r t", "{up} {down}", "{left} {right}", "{layout}" ], -

Will define the following keyboard:

Soft keyboard 1

You also can group buttons in the keyboard with an array of arrays.

+

Will define the following keyboard:

Soft keyboard 1

You also can group buttons in the keyboard with an array of arrays.

softKeyboardLayout: [ [ [ @@ -47,7 +47,7 @@ ] ], ], -

Will define the following keyboard:

Softkeyboard 2

You can provide multiple layouts and switch between them with special {layout} button:

+

Will define the following keyboard:

Softkeyboard 2

You can provide multiple layouts and switch between them with special {layout} button:

softkeyboardlayout: [ [ [ @@ -60,7 +60,7 @@ ], ], ], -

The result will be the following:

1st layout

2nd layout

Softkeyboard 3
Softkeyboard 4

Symbols

Property softKeyboardSymbols configures how each key will be rendered, it's an array of mapping layout symbols. For example, we can use the same layout for RU and EN keyboards:

+

The result will be the following:

1st layout

2nd layout

Softkeyboard 3
Softkeyboard 4

Symbols

Property softKeyboardSymbols configures how each key will be rendered, it's an array of mapping layout symbols. For example, we can use the same layout for RU and EN keyboards:

softKeyboardSymbols: [ { "{up}": "↑", @@ -76,4 +76,4 @@ "q": "й", "w": "ц", "e": "у", "r": "к", "t": "е", }, ], -

The result will be the following:

EN

RU

Soft keyboard 1
Soft keyboard 2

As you can see, symbols overrides view of keys, you can provide as many symbol maps as you want. They are cycled by pressing special key {symbols}.

Special keys

The following keys have a special meaning when defined in layout:

{layout}

Next layout

{symbols}

Next symbols

{enter}

Enter

{shift}

Left Shift

{bksp}

Backspace

{lock}

Capslock

{tab}

Tab

{space}

Space

{esc}

Escape

{ctrl}

Left Control

{alt}

Left Alt

{up}

Up Arrow

{down}

Down Arrow

{left}

Left Arrow

{right}

Right Arrow

{f1}.. {f12}

F1 .. F12 keys

{kp0}.. {kp9}

Keypad keys

{pgup}

Page Up

{pgdown}

Page Down

{home}

Home

{end}

End

Last modified: 18 ноября 2024
\ No newline at end of file +

The result will be the following:

EN

RU

Soft keyboard 1
Soft keyboard 2

As you can see, symbols overrides view of keys, you can provide as many symbol maps as you want. They are cycled by pressing special key {symbols}.

Special keys

The following keys have a special meaning when defined in layout:

{layout}

Next layout

{symbols}

Next symbols

{enter}

Enter

{shift}

Left Shift

{bksp}

Backspace

{lock}

Capslock

{tab}

Tab

{space}

Space

{esc}

Escape

{ctrl}

Left Control

{alt}

Left Alt

{up}

Up Arrow

{down}

Down Arrow

{left}

Left Arrow

{right}

Right Arrow

{f1}.. {f12}

F1 .. F12 keys

{kp0}.. {kp9}

Keypad keys

{pgup}

Page Up

{pgdown}

Page Down

{home}

Home

{end}

End

Last modified: 18 ноября 2024
\ No newline at end of file diff --git a/working-with-fs.html b/working-with-fs.html index 00d8729e..3cc5e68f 100644 --- a/working-with-fs.html +++ b/working-with-fs.html @@ -1,5 +1,5 @@ - -

js-dos 8.xx Help

Working with File System

When js-dos player successfully starts, the DOSBox command interface is available. You can get it from the event:

+

js-dos 8.xx Help

Working with File System

When js-dos player successfully starts, the DOSBox command interface is available. You can get it from the event:

Dos(/*element*/, { url: /* bundle url */, onEvent: ("ci-ready", ci: CommandInterface) { // now ci s ready }, ); -

With ci you can interact with a DOS file system.

Read file from FS

+

With ci you can interact with a DOS file system.

Read file from FS

fsReadFile(file: string): Promise<Uint8Array>; -

This function will read the file from the given path and return the promise to Uint8Array.

Write file to FS

+

This function will read the file from the given path and return the promise to Uint8Array.

Write file to FS

fsWriteFile(file: string, contents: ReadableStream<Uint8Array> | Uint8Array): Promise<void>; -

This method will write contents into the provided file.

Delete file from FS

+

This method will write contents into the provided file.

Delete file from FS

fsDeleteFile(file: string): Promise<void>; -

Delete file from FS.

Get the whole file tree

You can read the full file system structure by calling:

+

Delete file from FS.

Get the whole file tree

You can read the full file system structure by calling:

fsTree(): Promise<FsNode>; -

The FsNode contains following:

+

The FsNode contains following:

export interface FsNode { name: string; size: number | null; nodes: FsNode[] | null; } -
  • name - is a file name

  • size - size of file in bytes, or null in case of directory

  • nodes - children of directory, or null in case of file

Advanced: using Emscripten FS API

Emscripten API is even more powerful, but also low level. You can access it only in direct mode.

Last modified: 18 ноября 2024
\ No newline at end of file +
  • name - is a file name

  • size - size of file in bytes, or null in case of directory

  • nodes - children of directory, or null in case of file

Advanced: using Emscripten FS API

Emscripten API is even more powerful, but also low level. You can access it only in direct mode.

Last modified: 18 ноября 2024
\ No newline at end of file