diff --git a/advanced-topics.html b/advanced-topics.html index 2285aa27..6bf96cba 100644 --- a/advanced-topics.html +++ b/advanced-topics.html @@ -1,5 +1,5 @@ -Advanced Topics | js-dos

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/browser.html b/browser.html index 1bb624f2..eb6d2b88 100644 --- a/browser.html +++ b/browser.html @@ -1,5 +1,5 @@ -Browser | js-dos

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) => { @@ -41,7 +41,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"> @@ -126,4 +126,4 @@ </script> </body> </html> -
Last modified: 21 июня 2024
\ No newline at end of file +
Last modified: 28 июня 2024
\ No newline at end of file diff --git a/cloud-overview.html b/cloud-overview.html index 79758c10..b33d4a68 100644 --- a/cloud-overview.html +++ b/cloud-overview.html @@ -1,5 +1,5 @@ -js-dos cloud | js-dos

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 subscribe to js-dos subscription.

Last modified: 21 июня 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 subscribe to js-dos subscription.

Last modified: 28 июня 2024
\ No newline at end of file diff --git a/cloud-storage.html b/cloud-storage.html index 1af310a4..3b4f63df 100644 --- a/cloud-storage.html +++ b/cloud-storage.html @@ -1,5 +1,5 @@ -Cloud saves | js-dos

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: 21 июня 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: 28 июня 2024
\ No newline at end of file diff --git a/command-interface.html b/command-interface.html index cbb46aa9..8da93ef4 100644 --- a/command-interface.html +++ b/command-interface.html @@ -1,5 +1,5 @@ -Command Interface (CI) | js-dos

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; @@ -51,7 +51,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 { @@ -64,4 +64,4 @@ onNetworkConnected: (consumer: (networkType: NetworkType, address: string) => void) => void; onNetworkDisconnected: (consumer: (networkType: NetworkType) => void) => void; } -
Last modified: 21 июня 2024
\ No newline at end of file +
Last modified: 28 июня 2024
\ No newline at end of file diff --git a/contributing-emulators.html b/contributing-emulators.html index 935ebe0d..2d736054 100644 --- a/contributing-emulators.html +++ b/contributing-emulators.html @@ -1,5 +1,5 @@ -Contributing | js-dos

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. // @@ -65,13 +65,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; @@ -86,7 +86,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); @@ -103,7 +103,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(); }; // ... @@ -130,7 +130,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); @@ -139,11 +139,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) { @@ -163,18 +163,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: 21 июня 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: 28 июня 2024
\ No newline at end of file diff --git a/create-a-game-bundle.html b/create-a-game-bundle.html index aeada14c..b1abff4f 100644 --- a/create-a-game-bundle.html +++ b/create-a-game-bundle.html @@ -1,5 +1,5 @@ -Create a game bundle | js-dos

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 ecc74990..c0e09e23 100644 --- a/deployment.html +++ b/deployment.html @@ -1,5 +1,5 @@ -Deployment | js-dos

js-dos 8.xx Help

Deployment

Currently, sockdrive 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 images, and run it locally or globally.

COMMING SOON

Last modified: 21 июня 2024
\ No newline at end of file +}

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:

+./backend +

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:

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

+* 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: 28 июня 2024
\ No newline at end of file diff --git a/documentation.html b/documentation.html index c4354fa0..278e4340 100644 --- a/documentation.html +++ b/documentation.html @@ -1,5 +1,5 @@ -Previous versions | js-dos

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 ba3bf052..d1dfad49 100644 --- a/dos-api.html +++ b/dos-api.html @@ -1,5 +1,5 @@ -Getting Started | js-dos

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.

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 provide a CDN with the latest version, just add this html to <head> section of page:

+}

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.

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

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:

+

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 -

Write a script to run DOS

Now, we need to provide some div element and tell js-dos to run bundle using t:

+

Write a script to run DOS

Now, we need to provide some div element and tell js-dos to run bundle using t:

<div id="dos"></div> <script> @@ -29,7 +29,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

  2. options with initial configuration

<!DOCTYPE html> +

That is, Dos constructor takes two arguments:

  1. div element where to put a dos window

  2. options with initial configuration

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

Test in browser

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

startup window
Last modified: 21 июня 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: 28 июня 2024
\ No newline at end of file diff --git a/dosbox-direct.html b/dosbox-direct.html index 4ae0f1ba..46fa939b 100644 --- a/dosbox-direct.html +++ b/dosbox-direct.html @@ -1,5 +1,5 @@ -DOSBox Direct | js-dos

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": ..., @@ -61,9 +61,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: 21 июня 2024
\ No newline at end of file +
Last modified: 28 июня 2024
\ No newline at end of file diff --git a/dosbox-worker.html b/dosbox-worker.html index 06e346a7..420a6f01 100644 --- a/dosbox-worker.html +++ b/dosbox-worker.html @@ -1,5 +1,5 @@ -DOSBox Worker | js-dos

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: 21 июня 2024
\ No newline at end of file +

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

Last modified: 28 июня 2024
\ No newline at end of file diff --git a/dosbox-x.html b/dosbox-x.html index 45be17a9..056a47af 100644 --- a/dosbox-x.html +++ b/dosbox-x.html @@ -1,5 +1,5 @@ -DOSBox-X | js-dos

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: 21 июня 2024
\ No newline at end of file +
Last modified: 28 июня 2024
\ No newline at end of file diff --git a/doszone.html b/doszone.html index 0aa8c99c..a8e10537 100644 --- a/doszone.html +++ b/doszone.html @@ -1,5 +1,5 @@ -dos.zone | js-dos

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: 21 июня 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: 28 июня 2024
\ No newline at end of file diff --git a/emulators.html b/emulators.html index be828e02..4488d31b 100644 --- a/emulators.html +++ b/emulators.html @@ -1,5 +1,5 @@ -emulators | js-dos

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: 21 июня 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: 28 июня 2024
\ No newline at end of file diff --git a/estimating-performance.html b/estimating-performance.html index 6f831edb..234f6308 100644 --- a/estimating-performance.html +++ b/estimating-performance.html @@ -1,5 +1,5 @@ -Performance testing | js-dos

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: 21 июня 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: 28 июня 2024
\ No newline at end of file diff --git a/fork-drive.html b/fork-drive.html index 7a5b210a..5da8d8ee 100644 --- a/fork-drive.html +++ b/fork-drive.html @@ -1,5 +1,5 @@ -Fork (Clone) Drive | js-dos

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: 21 июня 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: 28 июня 2024
\ No newline at end of file diff --git a/getting-started.html b/getting-started.html index d83690fc..bbacc184 100644 --- a/getting-started.html +++ b/getting-started.html @@ -1,5 +1,5 @@ -Getting Started (sockdrive) | js-dos

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"> @@ -103,4 +103,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: 21 июня 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: 28 июня 2024
\ No newline at end of file diff --git a/install-windows.html b/install-windows.html index 8aabdc37..b3e6a530 100644 --- a/install-windows.html +++ b/install-windows.html @@ -1,5 +1,5 @@ -Installing Windows | js-dos

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: 21 июня 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: 28 июня 2024
\ No newline at end of file diff --git a/jsdos-bundle.html b/jsdos-bundle.html index fcda895e..d34b6f22 100644 --- a/jsdos-bundle.html +++ b/jsdos-bundle.html @@ -1,5 +1,5 @@ -Bundle creation | js-dos

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": [ { @@ -28,8 +28,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: 21 июня 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: 28 июня 2024
\ No newline at end of file diff --git a/mobile-support.html b/mobile-support.html index e19ce6a8..27f50c50 100644 --- a/mobile-support.html +++ b/mobile-support.html @@ -1,5 +1,5 @@ -Mobile support | js-dos

js-dos 8.xx Help

Mobile support

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: 21 июня 2024
\ No newline at end of file +}

js-dos 8.xx Help

Mobile support

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: 28 июня 2024
\ No newline at end of file diff --git a/mouse-locking.html b/mouse-locking.html index 2e4fd210..9825cf01 100644 --- a/mouse-locking.html +++ b/mouse-locking.html @@ -1,5 +1,5 @@ -Mouse locking | js-dos

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: 21 июня 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: 28 июня 2024
\ No newline at end of file diff --git a/multiple-instances.html b/multiple-instances.html index d860578b..c2e8323d 100644 --- a/multiple-instances.html +++ b/multiple-instances.html @@ -1,5 +1,5 @@ -Multiple Instances | js-dos

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" /> @@ -65,4 +65,4 @@ }); </script> </body> -</html>
Last modified: 21 июня 2024
\ No newline at end of file +</html>
Last modified: 28 июня 2024
\ No newline at end of file diff --git a/need-help.html b/need-help.html index 18409b2f..db47b4c2 100644 --- a/need-help.html +++ b/need-help.html @@ -1,5 +1,5 @@ -Need help? | js-dos

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: 21 июня 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: 28 июня 2024
\ No newline at end of file diff --git a/networking.html b/networking.html index 1fced166..41d2e4b7 100644 --- a/networking.html +++ b/networking.html @@ -1,5 +1,5 @@ -Networking | js-dos

js-dos 8.xx Help

Networking

Some DOS games offers multiplayer gaming based on ipx, modem, or direct connection. Using 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:

All js-dos users are able to enjoy these games using the Netherlands server, which is provided for free. However, due to the server's free nature, occasional lag may be experienced. To ensure a smoother and more seamless multiplayer experience, subscribed users have the privilege of selecting their preferred server for playing these games.

Last modified: 21 июня 2024
\ No newline at end of file +}

js-dos 8.xx Help

Networking

Some DOS games offers multiplayer gaming based on ipx, modem, or direct connection. Using 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:

All js-dos users are able to enjoy these games using the Netherlands server, which is provided for free. However, due to the server's free nature, occasional lag may be experienced. To ensure a smoother and more seamless multiplayer experience, subscribed users have the privilege of selecting their preferred server for playing these games.

Last modified: 28 июня 2024
\ No newline at end of file diff --git a/node.html b/node.html index e56b5364..990ad062 100644 --- a/node.html +++ b/node.html @@ -1,5 +1,5 @@ -Node | js-dos

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"); @@ -27,7 +27,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 @@ -35,11 +35,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(); @@ -52,7 +52,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"); @@ -89,4 +89,4 @@ }, 3000); }) .catch(console.error); -
Last modified: 21 июня 2024
\ No newline at end of file +
Last modified: 28 июня 2024
\ No newline at end of file diff --git a/overview.html b/overview.html index 066a4ab3..47e6a97d 100644 --- a/overview.html +++ b/overview.html @@ -1,5 +1,5 @@ -js-dos | js-dos

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: 21 июня 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: 28 июня 2024
\ No newline at end of file diff --git a/player-api.html b/player-api.html index 228f2ed0..2638f9e8 100644 --- a/player-api.html +++ b/player-api.html @@ -1,5 +1,5 @@ -Player API | js-dos

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

str

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

dark

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

server

ipx server

netherlands, newyork, singapore

netherlands

room

ipx room

str

fullScreen

auto enter fullscreen mode

bool

false

onEvent

listener of js-dos events

function

loginUrl

url to redirect back on login

string

location.href

autoStart

automatically starts emulation

boolean

false

kiosk

swithc kiosk mode, in kiosk mode player ui is hidden

boolean

false

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

str

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

dark

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

server

ipx server

netherlands, newyork, singapore

netherlands

room

ipx room

str

fullScreen

auto enter fullscreen mode

bool

false

onEvent

listener of js-dos events

function

loginUrl

url to redirect back on login

string

location.href

autoStart

automatically starts emulation

boolean

false

kiosk

swithc kiosk mode, in kiosk mode player ui is hidden

boolean

false

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

setServer

change ipx server

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

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

setServer

change ipx server

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

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

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

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; @@ -82,4 +82,4 @@ export type DosFn = (element: HTMLDivElement, options: Partial<DosOptions>) => DosProps; // declare const Dos: DosFn; -
Last modified: 21 июня 2024
\ No newline at end of file +
Last modified: 28 июня 2024
\ No newline at end of file diff --git a/pure-js.html b/pure-js.html index 35ebf3f2..ef5c94d7 100644 --- a/pure-js.html +++ b/pure-js.html @@ -1,5 +1,5 @@ -Pure JavaScript | js-dos

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) => { @@ -47,4 +47,4 @@ }); </script> </body> -</html>

Documentation

Documentation of js-dos 6.22.

Last modified: 21 июня 2024
\ No newline at end of file +</html>

Documentation

Documentation of js-dos 6.22.

Last modified: 28 июня 2024
\ No newline at end of file diff --git a/releases.html b/releases.html index a4ab0ab5..4daacfc4 100644 --- a/releases.html +++ b/releases.html @@ -1,5 +1,5 @@ -Releases | js-dos

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: 21 июня 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: 28 июня 2024
\ No newline at end of file diff --git a/run-without-bundle.html b/run-without-bundle.html index af98f850..9d042578 100644 --- a/run-without-bundle.html +++ b/run-without-bundle.html @@ -1,5 +1,5 @@ -Run without bundle | js-dos

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: ` [dos] @@ -34,4 +34,4 @@ } }, }); -

When you get command interface (ci in example), then you can use FS API to work with DOS filesystem. For example, you can upload program to run in DOSBox.

Do not forget to mount drive C: after that.

Last modified: 21 июня 2024
\ No newline at end of file +

When you get command interface (ci in example), then you can use FS API to work with DOS filesystem. For example, you can upload program to run in DOSBox.

Do not forget to mount drive C: after that.

Last modified: 28 июня 2024
\ No newline at end of file diff --git a/save-load-game-progress.html b/save-load-game-progress.html index 995ee87f..c7f5fa07 100644 --- a/save-load-game-progress.html +++ b/save-load-game-progress.html @@ -1,5 +1,5 @@ -Save/Load | js-dos

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: 21 июня 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: 28 июня 2024
\ No newline at end of file diff --git a/save-load.html b/save-load.html index e22eee03..c95a4faf 100644 --- a/save-load.html +++ b/save-load.html @@ -1,5 +1,5 @@ -Persist FS | js-dos

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); @@ -24,4 +24,4 @@ // loading const ci = await emulators.dosboxWorker([bundle, changesBundle] -
Last modified: 21 июня 2024
\ No newline at end of file +
Last modified: 28 июня 2024
\ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml index dcfe754a..b36e4de8 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1 +1 @@ -https://js-dos.com//8.xx/advanced-topics.html2024-06-21monthly1.0https://js-dos.com//8.xx/browser.html2024-06-21monthly1.0https://js-dos.com//8.xx/cloud-storage.html2024-06-21monthly1.0https://js-dos.com//8.xx/create-a-game-bundle.html2024-06-21monthly1.0https://js-dos.com//8.xx/dosbox-x.html2024-06-21monthly1.0https://js-dos.com//8.xx/deployment.html2024-06-21monthly1.0https://js-dos.com//8.xx/documentation.html2024-06-21monthly1.0https://js-dos.com//8.xx/getting-started.html2024-06-21monthly1.0https://js-dos.com//8.xx/multiple-instances.html2024-06-21monthly1.0https://js-dos.com//8.xx/node.html2024-06-21monthly1.0https://js-dos.com//8.xx/overview.html2024-06-21monthly1.0https://js-dos.com//8.xx/player-api.html2024-06-21monthly1.0https://js-dos.com//8.xx/pure-js.html2024-06-21monthly1.0https://js-dos.com//8.xx/save-load-game-progress.html2024-06-21monthly1.0https://js-dos.com//8.xx/save-load.html2024-06-21monthly1.0https://js-dos.com//8.xx/subscription.html2024-06-21monthly1.0https://js-dos.com//8.xx/support-us.html2024-06-21monthly1.0https://js-dos.com//8.xx/system-images.html2024-06-21monthly1.0https://js-dos.com//8.xx/cloud-overview.html2024-06-21monthly1.0https://js-dos.com//8.xx/command-interface.html2024-06-21monthly1.0https://js-dos.com//8.xx/contributing-emulators.html2024-06-21monthly1.0https://js-dos.com//8.xx/dos-api.html2024-06-21monthly1.0https://js-dos.com//8.xx/dosbox-direct.html2024-06-21monthly1.0https://js-dos.com//8.xx/dosbox-worker.html2024-06-21monthly1.0https://js-dos.com//8.xx/doszone.html2024-06-21monthly1.0https://js-dos.com//8.xx/emulators.html2024-06-21monthly1.0https://js-dos.com//8.xx/estimating-performance.html2024-06-21monthly1.0https://js-dos.com//8.xx/fork-drive.html2024-06-21monthly1.0https://js-dos.com//8.xx/install-windows.html2024-06-21monthly1.0https://js-dos.com//8.xx/jsdos-bundle.html2024-06-21monthly1.0https://js-dos.com//8.xx/mobile-support.html2024-06-21monthly1.0https://js-dos.com//8.xx/mouse-locking.html2024-06-21monthly1.0https://js-dos.com//8.xx/need-help.html2024-06-21monthly1.0https://js-dos.com//8.xx/networking.html2024-06-21monthly1.0https://js-dos.com//8.xx/releases.html2024-06-21monthly1.0https://js-dos.com//8.xx/run-without-bundle.html2024-06-21monthly1.0https://js-dos.com//8.xx/sockdrive.html2024-06-21monthly1.0https://js-dos.com//8.xx/threejs.html2024-06-21monthly1.0https://js-dos.com//8.xx/v7.html2024-06-21monthly1.0https://js-dos.com//8.xx/working-with-fs.html2024-06-21monthly1.0 \ No newline at end of file +https://js-dos.com//8.xx/advanced-topics.html2024-06-28monthly1.0https://js-dos.com//8.xx/browser.html2024-06-28monthly1.0https://js-dos.com//8.xx/cloud-storage.html2024-06-28monthly1.0https://js-dos.com//8.xx/create-a-game-bundle.html2024-06-28monthly1.0https://js-dos.com//8.xx/dosbox-x.html2024-06-28monthly1.0https://js-dos.com//8.xx/deployment.html2024-06-28monthly1.0https://js-dos.com//8.xx/documentation.html2024-06-28monthly1.0https://js-dos.com//8.xx/getting-started.html2024-06-28monthly1.0https://js-dos.com//8.xx/multiple-instances.html2024-06-28monthly1.0https://js-dos.com//8.xx/node.html2024-06-28monthly1.0https://js-dos.com//8.xx/overview.html2024-06-28monthly1.0https://js-dos.com//8.xx/player-api.html2024-06-28monthly1.0https://js-dos.com//8.xx/pure-js.html2024-06-28monthly1.0https://js-dos.com//8.xx/save-load-game-progress.html2024-06-28monthly1.0https://js-dos.com//8.xx/save-load.html2024-06-28monthly1.0https://js-dos.com//8.xx/subscription.html2024-06-28monthly1.0https://js-dos.com//8.xx/support-us.html2024-06-28monthly1.0https://js-dos.com//8.xx/system-images.html2024-06-28monthly1.0https://js-dos.com//8.xx/cloud-overview.html2024-06-28monthly1.0https://js-dos.com//8.xx/command-interface.html2024-06-28monthly1.0https://js-dos.com//8.xx/contributing-emulators.html2024-06-28monthly1.0https://js-dos.com//8.xx/dos-api.html2024-06-28monthly1.0https://js-dos.com//8.xx/dosbox-direct.html2024-06-28monthly1.0https://js-dos.com//8.xx/dosbox-worker.html2024-06-28monthly1.0https://js-dos.com//8.xx/doszone.html2024-06-28monthly1.0https://js-dos.com//8.xx/emulators.html2024-06-28monthly1.0https://js-dos.com//8.xx/estimating-performance.html2024-06-28monthly1.0https://js-dos.com//8.xx/fork-drive.html2024-06-28monthly1.0https://js-dos.com//8.xx/install-windows.html2024-06-28monthly1.0https://js-dos.com//8.xx/jsdos-bundle.html2024-06-28monthly1.0https://js-dos.com//8.xx/mobile-support.html2024-06-28monthly1.0https://js-dos.com//8.xx/mouse-locking.html2024-06-28monthly1.0https://js-dos.com//8.xx/need-help.html2024-06-28monthly1.0https://js-dos.com//8.xx/networking.html2024-06-28monthly1.0https://js-dos.com//8.xx/releases.html2024-06-28monthly1.0https://js-dos.com//8.xx/run-without-bundle.html2024-06-28monthly1.0https://js-dos.com//8.xx/sockdrive.html2024-06-28monthly1.0https://js-dos.com//8.xx/threejs.html2024-06-28monthly1.0https://js-dos.com//8.xx/v7.html2024-06-28monthly1.0https://js-dos.com//8.xx/working-with-fs.html2024-06-28monthly1.0 \ No newline at end of file diff --git a/sockdrive.html b/sockdrive.html index 94bc8591..4e15ad35 100644 --- a/sockdrive.html +++ b/sockdrive.html @@ -1,5 +1,5 @@ -FAT Drives (sockdrive) | js-dos

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: 21 июня 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: 28 июня 2024
\ No newline at end of file diff --git a/subscription.html b/subscription.html index aea7c7e9..8b7d7085 100644 --- a/subscription.html +++ b/subscription.html @@ -1,5 +1,5 @@ -Subscription | js-dos

js-dos 8.xx Help

Subscription

js-dos subscription activates cloud features of player. To subscribe, you need to have an js-dos account.

Create account

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

+}

js-dos 8.xx Help

Subscription

js-dos subscription activates cloud features of player. To subscribe, you need to have an js-dos account.

Create account

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

@@ -25,4 +25,4 @@ window.history.replaceState(null, "", "/subscription.html#create-account"); } -

  1. Press the Login button or icon in the sidebar.

Login Button
Login
  1. Switch to SIGN UP tab and fill all inputs

    Registration

  2. 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 in pre-start window.

Logged

Subscribe

To subscribe, you must be logged in.

  1. Click on Person icon in sidebar.

  2. Use Buy button to subscribe.

Buy button

Cancel your subscription

To cancel your subscription, 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: 21 июня 2024
\ No newline at end of file +

  1. Press the Login button or icon in the sidebar.

Login Button
Login
  1. Switch to SIGN UP tab and fill all inputs

    Registration

  2. 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 in pre-start window.

Logged

Subscribe

To subscribe, you must be logged in.

  1. Click on Person icon in sidebar.

  2. Use Buy button to subscribe.

Buy button

Cancel your subscription

To cancel your subscription, 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: 28 июня 2024
\ No newline at end of file diff --git a/support-us.html b/support-us.html index f1f3c40d..3cb5d315 100644 --- a/support-us.html +++ b/support-us.html @@ -1,5 +1,5 @@ -Support the project | js-dos

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.

Last modified: 21 июня 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.

Last modified: 28 июня 2024
\ No newline at end of file diff --git a/system-images.html b/system-images.html index 0c8092b9..856ff0ab 100644 --- a/system-images.html +++ b/system-images.html @@ -1,5 +1,5 @@ -System images | js-dos

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 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 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: 21 июня 2024
\ No newline at end of file +
Last modified: 28 июня 2024
\ No newline at end of file diff --git a/threejs.html b/threejs.html index 4285a64a..e1584a24 100644 --- a/threejs.html +++ b/threejs.html @@ -1,5 +1,5 @@ -How-to use | js-dos

js-dos 8.xx Help

How-to use

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

Last modified: 21 июня 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: 28 июня 2024
\ No newline at end of file diff --git a/v7.html b/v7.html index 86b22b45..dabffa99 100644 --- a/v7.html +++ b/v7.html @@ -1,5 +1,5 @@ -js-dos v7 | js-dos

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: 21 июня 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: 28 июня 2024
\ No newline at end of file diff --git a/working-with-fs.html b/working-with-fs.html index f8f99f91..eab0f64d 100644 --- a/working-with-fs.html +++ b/working-with-fs.html @@ -1,5 +1,5 @@ -Working with File System | js-dos

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: 21 июня 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: 28 июня 2024
\ No newline at end of file