diff --git a/README.md b/README.md index ae4638e..37bfb46 100644 --- a/README.md +++ b/README.md @@ -199,21 +199,21 @@ The following options are available for the WebEmulator. With the exception of m * `longpwron` * `widescreen` * `capture` +* `midlineeffects` #### The Address Line `manifest` tells the emulator what should be loaded as a startup program. If the file is a .bas or .prg, the emulator will load it and try to execute it. If the file is a .zip, the WebEmulator will get access to all the files inside that zip-file. When using a zip-file you may add a manifest file to provide additional information - See section below for more information on `manifest.json` On the Commander X16 forums, a link to the webemulator could look something like this: -https://cx16forum.org/webemu/x16emu.html?manifest=/forum/download/file.php?id=1218&ram=2048&cpu=c816&mhz=10&keymap=da&widescreen&capture&longpwron +https://cx16forum.org/webemu/x16emu.html?manifest=/forum/download/file.php?id=1218&ram=2048&cpu=c816&mhz=10&keymap=da&widescreen&capture This will load the forum file with id 1218 into the emulator. Give the emulator 2MB of RAM Set the CPU type to 65C816 Set the CPU speed at 10 MHz Set the keyboard layout to Danish Show the emulator in widescreen mode -Capture the mouse and keyboard input -Start the emulator in RAM diagnostics mode -The last 3 options do not have any values, it is enough to have them on the address line to enable the feature. +Capture the mouse and keyboard input +The options `longpwron`, `widescreen`, `capture` & `midlineeffects` do not have any values, it is enough to have them on the address line to enable the feature. #### The manifest.json File If an application requires more than a single file to function, for example graphics or audio assets, it is necessary to package the needed files in a zip file. If there are more than one start file (BAS or PRG) the `manifest.json` file can be used to specify the default start file with `start_prg` or `start_bas` otherwise the WebEmulator will start the .prg or .bas it finds in the zip file. @@ -233,6 +233,7 @@ Here is an example of the optional `manifest.json` file "widescreen": true, "capture": true, "longpwron": false, + "midlineeffects": false, "start_prg": "MYPROG.PRG", "resources": [ "MYPROG.PRG", diff --git a/webassembly/main.js b/webassembly/main.js index 7db8d45..aeb3dbe 100644 --- a/webassembly/main.js +++ b/webassembly/main.js @@ -77,6 +77,7 @@ var lang_val = url.searchParams.get("keymap"); var diag = url.searchParams.get("longpwron"); var wide = url.searchParams.get("widescreen"); var capture = url.searchParams.get("capture"); +var midline = url.searchParams.get("midlineeffects"); var emuArguments = ['-keymap', lang, '-rtc']; @@ -103,6 +104,9 @@ if (wide != null) { if (capture != null) { emuArguments.push('-capture'); } +if (midline != null) { + emuArguments.push('-midline-effects'); +} if (manifest_link) { openFs(); @@ -356,6 +360,10 @@ function extractManifestFromBuffer(zip) { console.log('Found capture variable'); emuArguments.push('-capture'); } + if (manifestObject.midlineeffects) { + console.log('Found midlineeffects variable'); + emuArguments.push('-midline-effects'); + } const promises = []; if (manifestObject.resources) {