Breaking meta element name changes
This commit is contained in:
parent
3ed0fc56c3
commit
757158d76f
11
CHANGES.md
11
CHANGES.md
@ -2,6 +2,17 @@
|
||||
|
||||
## Changes and updates
|
||||
|
||||
### v1.30
|
||||
|
||||
Introduced breaking meta element name changes.
|
||||
|
||||
- `dosee:capname` → `dosee:capture:filename`
|
||||
- `dosee:gamefilepath` → `dosee:zip:path`
|
||||
- `dosee:gusaudio` → `dosee:audio:gus`
|
||||
- `dosee:resolution` → `dosee:width:height`
|
||||
- `dosee:startexe` → `dosee:run:filename`
|
||||
- `dosee:utils` → `dosee:utilities`
|
||||
|
||||
### v1.20
|
||||
|
||||
- Now requires [npm](https://www.npmjs.com/get-npm) or [Docker](https://www.docker.com/products/docker-desktop) for installation as the installation scripts have been removed.
|
||||
|
62
USAGE.md
62
USAGE.md
@ -7,64 +7,64 @@ It is easy to customise DOSee to load other MS-DOS programs by using HTML5 `<met
|
||||
```html
|
||||
<!-- DOSee initialisation options -->
|
||||
<meta
|
||||
name="dosee:gamefilepath"
|
||||
name="dosee:zip:path"
|
||||
content="dos_programs/program_4/agi_demo_pack_1.zip"
|
||||
/>
|
||||
<meta name="dosee:startexe" content="sierra.com" />
|
||||
<meta name="dosee:run:filename" content="sierra.com" />
|
||||
|
||||
<meta name="dosee:capname" content="screenshot.png" />
|
||||
<meta name="dosee:utils" content="false" />
|
||||
<meta name="dosee:gusaudio" content="false" />
|
||||
<meta name="dosee:resolution" content="640, 480" />
|
||||
<meta name="dosee:capture:filename" content="screenshot.png" />
|
||||
<meta name="dosee:utilities" content="false" />
|
||||
<meta name="dosee:audio:gus" content="false" />
|
||||
<meta name="dosee:width:height" content="640, 480" />
|
||||
```
|
||||
|
||||
#### Required
|
||||
|
||||
#### `<meta name="dosee:gamefilepath">`
|
||||
#### `<meta name="dosee:zip:path">`
|
||||
|
||||
DOSee uses ZIP file archives to simulate a hard disk drive. Any ZIP file provided to _dosee:gamefilepath_ will be mounted by the emulator as MS-DOS drive `C:`. The `C:` drive will be accessible to all DOS commands such as `dir C:` and any included DOS programs available to run.
|
||||
DOSee uses ZIP file archives to simulate a hard disk drive. Any ZIP file provided to _dosee:zip:path_ will be mounted by the emulator as MS-DOS drive `C:`. The `C:` drive will be accessible to all DOS commands such as `dir C:` and any included DOS programs available to run.
|
||||
|
||||
The meta _content_ attribute must be a relative path from the web root and needs to point to a ZIP file archive.
|
||||
|
||||
✓ `<meta name="dosee:gamefilepath" content="dos_programs/example/dosgame.zip" />`
|
||||
✓ `<meta name="dosee:zip:path" content="dos_programs/example/dosgame.zip" />`
|
||||
|
||||
✗ `<meta name="dosee:gamefilepath" content="/home/me/DOSee/dos_programs/example/dosgame.zip" />`
|
||||
✗ `<meta name="dosee:zip:path" content="/home/me/DOSee/dos_programs/example/dosgame.zip" />`
|
||||
|
||||
#### `<meta name="dosee:startexe">`
|
||||
#### `<meta name="dosee:run:filename">`
|
||||
|
||||
The filename of the MS-DOS program DOSee should launch. The program file needs to exist in the ZIP archive provided to _dosee:gamefilepath_.
|
||||
The filename of the MS-DOS program DOSee should launch. The program file needs to exist in the ZIP archive provided to _dosee:zip:path_.
|
||||
|
||||
DOS usually uses the following file extensions to identify a program: `.exe` `.com` `.bat`. Other than these there is no standard file naming convention to identify which file should be used to launch a piece of DOS software.
|
||||
|
||||
If the content is left blank or the filename doesn't exist in the archive, DOSee will launch into an DOS `C:` prompt.
|
||||
|
||||
✓ `<meta name="dosee:startexe" content="game.exe" />`
|
||||
✓ `<meta name="dosee:run:filename" content="game.exe" />`
|
||||
|
||||
#### Optional
|
||||
|
||||
#### `<meta name="dosee:capname">`
|
||||
#### `<meta name="dosee:capture:filename">`
|
||||
|
||||
The filename used by the capture tool to save emulator screenshots. The PNG images should include the `.png` file extension.
|
||||
|
||||
✓ `<meta name="dosee:capname" content="game.png" />`
|
||||
✓ `<meta name="dosee:capture:filename" content="game.png" />`
|
||||
|
||||
✗ `<meta name="dosee:capname" content="game" />`
|
||||
✗ `<meta name="dosee:capture:filename" content="game" />`
|
||||
|
||||
#### `<meta name="dosee:utils">`
|
||||
#### `<meta name="dosee:utilities">`
|
||||
|
||||
When set to `true` it tells DOSee to mount a collection of MS-DOS utilities and tools that are accessible from the `U:` drive.
|
||||
|
||||
✓ `<meta name="dosee:utils" content="true" />`
|
||||
✓ `<meta name="dosee:utilities" content="true" />`
|
||||
|
||||
✓ `<meta name="dosee:utils" content="false" />`
|
||||
✓ `<meta name="dosee:utilities" content="false" />`
|
||||
|
||||
#### Placeholders
|
||||
|
||||
#### `<meta name="dosee:gusaudio">`
|
||||
#### `<meta name="dosee:audio:gus">`
|
||||
|
||||
When set to `true` it tells DOSee to mount a collection of Gravis Ultrasound audio drivers and tools that are accessible from the `G:` drive. These drivers are always loaded by DOSee whenever the Gravis Ultrasound audio option is selected so this should always be left to `false`.
|
||||
|
||||
#### `<meta name="dosee:resolution">`
|
||||
#### `<meta name="dosee:width:height">`
|
||||
|
||||
This should adjust the pixel width and height of the EM-DOSBox emulator but it seems to have no noticeable effect.
|
||||
|
||||
@ -75,31 +75,31 @@ There are three additional sample programs included in this repository that you
|
||||
```html
|
||||
<!-- DOSee initialisation options -->
|
||||
<meta
|
||||
name="dosee:gamefilepath"
|
||||
name="dosee:zip:path"
|
||||
content="dos_programs/program_4/agi_demo_pack_1.zip"
|
||||
/>
|
||||
<meta name="dosee:startexe" content="sierra.com" />
|
||||
<meta name="dosee:run:filename" content="sierra.com" />
|
||||
```
|
||||
|
||||
Sample program 1 (fastest, VGA, Gravis Ultrasound)
|
||||
|
||||
```html
|
||||
<meta name="dosee:gamefilepath" content="dos_programs/program_1/df2intro.zip" />
|
||||
<meta name="dosee:startexe" content="DF2.EXE" />
|
||||
<meta name="dosee:zip:path" content="dos_programs/program_1/df2intro.zip" />
|
||||
<meta name="dosee:run:filename" content="DF2.EXE" />
|
||||
```
|
||||
|
||||
Sample program 2 (fastest, VGA, Gravis Ultrasound)
|
||||
|
||||
```html
|
||||
<meta name="dosee:gamefilepath" content="dos_programs/program_2/df2.zip" />
|
||||
<meta name="dosee:startexe" content="df2.exe" />
|
||||
<meta name="dosee:zip:path" content="dos_programs/program_2/df2.zip" />
|
||||
<meta name="dosee:run:filename" content="df2.exe" />
|
||||
```
|
||||
|
||||
Sample program 3 (fastest, VGA, Sound Blaster 16)
|
||||
|
||||
```html
|
||||
<meta name="dosee:gamefilepath" content="dos_programs/program_3/hyb605.zip" />
|
||||
<meta name="dosee:startexe" content="hyb605.exe" />
|
||||
<meta name="dosee:zip:path" content="dos_programs/program_3/hyb605.zip" />
|
||||
<meta name="dosee:run:filename" content="hyb605.exe" />
|
||||
```
|
||||
|
||||
#### Add new software example
|
||||
@ -121,8 +121,8 @@ Update the DOSee [index.html](index.html) to launch the demo and enjoy the confu
|
||||
|
||||
```html
|
||||
<!-- DOSee initialisation options -->
|
||||
<meta name="dosee:gamefilepath" content="dos_programs/program_5/sq3-demo.zip" />
|
||||
<meta name="dosee:startexe" content="SQ3DEMO.BAT" />
|
||||
<meta name="dosee:zip:path" content="dos_programs/program_5/sq3-demo.zip" />
|
||||
<meta name="dosee:run:filename" content="SQ3DEMO.BAT" />
|
||||
```
|
||||
|
||||
![DOSee preview](images/sq3demo.png)
|
||||
|
@ -78,7 +78,7 @@
|
||||
// note: arrow functions do not support `this`
|
||||
const button = this
|
||||
const canvas = document.getElementById(`doseeCanvas`)
|
||||
const filename = DOSee.getMetaContent(`dosee:capname`)
|
||||
const filename = DOSee.getMetaContent(`dosee:capture:filename`)
|
||||
// the default .toBlob() saved image type is image/png
|
||||
// but it can be swapped: https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob
|
||||
canvas.toBlob(blob => {
|
||||
|
@ -15,13 +15,13 @@
|
||||
|
||||
// Load configurations that are obtained from the <meta name="dosee:"> HTML tags
|
||||
const config = new Map()
|
||||
.set(`exe`, DOSee.getMetaContent(`dosee:startexe`))
|
||||
.set(`exe`, DOSee.getMetaContent(`dosee:run:filename`))
|
||||
.set(`filename`, DOSee.getMetaContent(`dosee:filename`))
|
||||
.set(`gus`, DOSee.getMetaContent(`dosee:gusaudio`))
|
||||
.set(`path`, DOSee.getMetaContent(`dosee:gamefilepath`))
|
||||
.set(`res`, DOSee.getMetaContent(`dosee:resolution`))
|
||||
.set(`gus`, DOSee.getMetaContent(`dosee:audio:gus`))
|
||||
.set(`path`, DOSee.getMetaContent(`dosee:zip:path`))
|
||||
.set(`res`, DOSee.getMetaContent(`dosee:width:height`))
|
||||
.set(`start`, false)
|
||||
.set(`utils`, DOSee.getMetaContent(`dosee:utils`))
|
||||
.set(`utils`, DOSee.getMetaContent(`dosee:utilities`))
|
||||
|
||||
// Extract and save the filename from config path
|
||||
{
|
||||
@ -41,13 +41,13 @@
|
||||
const audio = urlParams.get(`dosaudio`)
|
||||
if (audio === `gus`) {
|
||||
config.set(`gus`, `true`)
|
||||
DOSee.setMetaContent(`dosee:gusaudio`, `true`)
|
||||
DOSee.setMetaContent(`dosee:audio:gus`, `true`)
|
||||
}
|
||||
// DOSee Utilities (dosutils=true)
|
||||
const utils = urlParams.get(`dosutils`)
|
||||
if (utils === `true`) {
|
||||
config.set(`utils`, `true`)
|
||||
DOSee.setMetaContent(`dosee:utils`, `true`)
|
||||
DOSee.setMetaContent(`dosee:utilities`, `true`)
|
||||
}
|
||||
}
|
||||
|
||||
|
12
index.html
12
index.html
@ -9,15 +9,15 @@
|
||||
|
||||
<!-- DOSee initialisation options -->
|
||||
<meta
|
||||
name="dosee:gamefilepath"
|
||||
name="dosee:zip:path"
|
||||
content="dos_programs/program_4/agi_demo_pack_1.zip"
|
||||
/>
|
||||
<meta name="dosee:startexe" content="sierra.com" />
|
||||
<meta name="dosee:run:filename" content="sierra.com" />
|
||||
|
||||
<meta name="dosee:capname" content="screenshot.png" />
|
||||
<meta name="dosee:utils" content="false" />
|
||||
<meta name="dosee:gusaudio" content="false" />
|
||||
<meta name="dosee:resolution" content="640, 480" />
|
||||
<meta name="dosee:capture:filename" content="screenshot.png" />
|
||||
<meta name="dosee:utilities" content="false" />
|
||||
<meta name="dosee:audio:gus" content="false" />
|
||||
<meta name="dosee:width:height" content="640, 480" />
|
||||
|
||||
<link rel="preload" href="dosee-functions.js" as="script" />
|
||||
<link rel="preload" href="dosee-loader.js" as="script" />
|
||||
|
4
index.js
4
index.js
@ -44,8 +44,8 @@ function resetTabs(defaultTab) {
|
||||
{
|
||||
// set the <H2> element to show the running program and archive filename
|
||||
const h2 = document.getElementById(`doseeH2`)
|
||||
const archive = `${DOSee.getMetaContent(`dosee:gamefilepath`)}`
|
||||
const exe = `${DOSee.getMetaContent(`dosee:startexe`)}`
|
||||
const archive = `${DOSee.getMetaContent(`dosee:zip:path`)}`
|
||||
const exe = `${DOSee.getMetaContent(`dosee:run:filename`)}`
|
||||
if (exe.length > 0) {
|
||||
h2.innerText = `${exe} ⭠ ${archive}`
|
||||
} else h2.innerText = `${archive}`
|
||||
|
Loading…
x
Reference in New Issue
Block a user