Skip to content

Commit

Permalink
publish: 6.22.34
Browse files Browse the repository at this point in the history
  • Loading branch information
caiiiycuk committed Oct 20, 2019
1 parent d90b538 commit 7b366b9
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 9 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[js-dos 6.22](https://js-dos.com)
===========

[![Build Status](https://travis-ci.org/caiiiycuk/js-dos.svg?branch=6.22)](https://travis-ci.org/caiiiycuk/js-dos)
[![Build Status](https://travis-ci.org/caiiiycuk/js-dos.svg?branch=6.22)](https://travis-ci.org/caiiiycuk/js-dos) [![By Me A Coffee](/bmc.png)](https://www.buymeacoffee.com/caiiiycuk)

6.22 is a javascript library that allows you to run DOS programs in browser. js-dos provides nice and easy to use javascript api over dosbox. Try our <a href="https://dosify.me">demo app</a>.

Expand Down Expand Up @@ -195,7 +195,8 @@ By default js-dos uses builtin dosbox [config](https://js-dos.com/6.22/docs/api/
You have option to change frequently used parameters through [DosOptions](https://js-dos.com/6.22/docs/api/generate.html?page=js-dos-options). For example, you can change `cycles` (amount of instructions DOSBox tries to emulate each millisecond):

```javascript
Dos(canvas, { cycles: 1000, }) // also can be "auto", "max"
Dos(canvas, { cycles: 1000, }) // also can be "auto", "max"
// look to DosOptions for other paramters
.ready((fs, main) => ...)
.catch((message) => console.error(message));
```
Expand Down Expand Up @@ -262,9 +263,13 @@ So, for giving example resolution will be 640x320, but canvas size will be 1280x

### Mouse locking

By default dosbox mouse will follow browser cursor. However you can change this behaviour by providing `autolock=true` in
dosbox.conf. Then mouse starts follow browser cursor after first click (lock), and you can unlock mouse by pressing `CTRL+F10`.
By default dosbox mouse will follow browser cursor without locking. It means that js-dos will not take exclusive control over mouse pointer. However you can change this behaviour by providing `autolock=true` in
`dosbox.conf` or through [DosOptions](https://js-dos.com/6.22/docs/api/generate.html?page=js-dos-options). Then js-dos will take exclusive control and lock mouse inside js-dos container (you can't leave it). This will happen after first click, and you can unlock mouse by pressing `CTRL+F10` or `ESC`.
```javascript
Dos(canvas, { autolock: true }).ready((fs, main) => {
main([...]);
});
// OR
Dos(canvas).ready((fs, main) => {
fs.createFile("dosbox.conf", `
[sdl]
Expand Down
4 changes: 2 additions & 2 deletions dist/docs/api/js-dos-ts/js-dos-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ gulpfile.js --> generateBuildInfo
```
export const Build = {
version: "6.22.33 (008ca316c070f0c1d6f35a178dfda2da)",
jsVersion: "51fa69e2fa69b8f9846f0b10a237037f0751188a",
version: "6.22.34 (9a6dff6b54449dbce1df06a85eec9f9a)",
jsVersion: "d90b538345fdd487cf9052d6ffab41a68c648e95",
jsSize: 197995,
wasmVersion: "6d74a1bed329522e5371acaec19b753f",
wasmSize: 1808925,
Expand Down
13 changes: 13 additions & 0 deletions dist/docs/api/js-dos-ts/js-dos-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,19 @@ export class DosBoxConfig {

cycles: Amount of instructions DOSBox tries to emulate each millisecond.
Setting this value too high results in sound dropouts and lags.

Cycles can be set in 3 ways:

'auto' tries to guess what a game needs.
It usually works, but can fail for certain games.

'fixed #number' will set a fixed amount of cycles. This is what you usually need if 'auto' fails.
(Example: fixed 4000).

'max' will allocate as much cycles as your computer is able to handle.





```
Expand All @@ -48,6 +53,14 @@ export class DosBoxConfig {

autolock: Mouse will automatically lock, if you click on the screen. (Press CTRL-F10 to unlock)

By default dosbox mouse will follow browser cursor without locking.
It means that js-dos will not take exclusive control over mouse pointer.
However you can change this behaviour by providing `autolock=true` in
`dosbox.conf` or throug h [DosOptions](https://js-dos.com/6.22/docs/api/generate.html?page=js-dos-options).
Then js-dos will take exclusive control and lock mouse inside js-dos container (you can't leave it).
This will happen after first click, and you can unlock mouse by pressing `CTRL+F10` or `ESC`.





Expand Down
4 changes: 2 additions & 2 deletions js-dos-ts/js-dos-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// gulpfile.js --> generateBuildInfo

export const Build = {
version: "6.22.33 (008ca316c070f0c1d6f35a178dfda2da)",
jsVersion: "51fa69e2fa69b8f9846f0b10a237037f0751188a",
version: "6.22.34 (9a6dff6b54449dbce1df06a85eec9f9a)",
jsVersion: "d90b538345fdd487cf9052d6ffab41a68c648e95",
jsSize: 197995,
wasmVersion: "6d74a1bed329522e5371acaec19b753f",
wasmSize: 1808925,
Expand Down
13 changes: 13 additions & 0 deletions js-dos-ts/js-dos-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,27 @@ export class DosBoxConfig {
public cycles?: number | string;
// cycles: Amount of instructions DOSBox tries to emulate each millisecond.
// Setting this value too high results in sound dropouts and lags.
//
// Cycles can be set in 3 ways:
//
// 'auto' tries to guess what a game needs.
// It usually works, but can fail for certain games.
//
// 'fixed #number' will set a fixed amount of cycles. This is what you usually need if 'auto' fails.
// (Example: fixed 4000).
//
// 'max' will allocate as much cycles as your computer is able to handle.
//
public autolock?: boolean;
// autolock: Mouse will automatically lock, if you click on the screen. (Press CTRL-F10 to unlock)
//
// By default dosbox mouse will follow browser cursor without locking.
// It means that js-dos will not take exclusive control over mouse pointer.
// However you can change this behaviour by providing `autolock=true` in
// `dosbox.conf` or throug h [DosOptions](https://js-dos.com/6.22/docs/api/generate.html?page=js-dos-options).
// Then js-dos will take exclusive control and lock mouse inside js-dos container (you can't leave it).
// This will happen after first click, and you can unlock mouse by pressing `CTRL+F10` or `ESC`.
//
}

// tslint:disable-next-line:max-classes-per-file
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "js-dos",
"version": "6.22.33",
"version": "6.22.34",
"description": "Easiest API to run dos programs in browser",
"main": "dist/js-dos.js",
"types": "dist/typescript/js-dos.ts",
Expand Down

0 comments on commit 7b366b9

Please sign in to comment.