commit | 9fa0fcd9b29e468bfba766807bbafb54cf111d00 | [log] [download] |
---|---|---|
author | Ernest Wong <ewon521@gmail.com> | Sat Dec 16 22:04:11 2017 +1300 |
committer | Fabian <copy@copy.sh> | Sat Dec 16 22:51:40 2017 -0600 |
tree | 08c6c3a0dd42d6c3fb60d91e941993aa8d22b715 | |
parent | 531f5ba84fa2a28148d28c79fa738302003f3a6d [diff] |
Reduce audio processor overhead when paused First attempt: when pausing, clear the output buffers once using .fill(0) during the onaudioprocess event, and set a flag so that it doesn't have to continuously .fill(0) the buffers when paused. Problem with first attempt: It appears that performing .fill(0) once does not guarantee clearing all the buffer that is given to the onaudioprocess event, probably because the output buffers given are a subarray of a larger buffer. In this second attempt, we simply disconnect the processor node from the destination node, and reconnect them when unpaused.
Using v86 for your own purposes is as easy as:
var emulator = new V86Starter({ screen_container: document.getElementById("screen_container"), bios: { url: "../../bios/seabios.bin", }, vga_bios: { url: "../../bios/vgabios.bin", }, cdrom: { url: "../../images/linux.iso", }, autostart: true, });
See API.
v86 emulates an x86-compatible CPU and hardware. Here's a list of emulated hardware:
The disk images are not included in this repository. You can download them directly from the website using:
wget -P images/ https://copy.sh/v86/images/{linux.iso,linux3.iso,kolibri.img,windows101.img,os8.dsk,freedos722.img,openbsd.img}
.
A testsuite is available in tests/full/
. Run it using node tests/full/run.js
.
make build/v86_all.js
.index.html
locally, make sure to serve it from a local webserver. You can use make run
to serve the files using Python's SimpleHTTPServer.wget -P images/ https://copy.sh/v86/images/{linux.iso,linux3.iso,kolibri.img,windows101.img,os8.dsk,freedos722.img,openbsd.img}
.Short summary:
# grab the main repo git clone https://github.com/copy/v86.git && cd v86 # grab the disk images wget -P images/ https://copy.sh/v86/images/{linux.iso,linux3.iso,kolibri.img,windows101.img,os8.dsk,freedos722.img,openbsd.img} # grab closure compiler wget -P closure-compiler https://dl.google.com/closure-compiler/compiler-latest.zip unzip -d closure-compiler closure-compiler/compiler-latest.zip *.jar # build the library make build/libv86.js # run the tests ./tests/full/run.js
Here's an overview of the operating systems supported in v86:
udev
and X
fail, but you get a terminal.You can get some infos on the disk images here: https://github.com/copy/images.
Simplified BSD License, see LICENSE, unless otherwise noted.
Shoot me an email to copy@copy.sh
. Please don't tell about bugs via mail, create a bug report on GitHub instead.
Fabian Hemmer (http://copy.sh/, copy@copy.sh
)