Adapt path
This commit is contained in:
parent
0b2628e22a
commit
3fdfd79500
|
@ -1,7 +1,7 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<title>Archlinux</title>
|
<title>Archlinux</title>
|
||||||
|
|
||||||
<script src="../../build/libv86.js"></script>
|
<script src="../build/libv86.js"></script>
|
||||||
<script>
|
<script>
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
@ -12,10 +12,10 @@ window.onload = function()
|
||||||
vga_memory_size: 8 * 1024 * 1024,
|
vga_memory_size: 8 * 1024 * 1024,
|
||||||
screen_container: document.getElementById("screen_container"),
|
screen_container: document.getElementById("screen_container"),
|
||||||
bios: {
|
bios: {
|
||||||
url: "../../bios/seabios.bin",
|
url: "../bios/seabios.bin",
|
||||||
},
|
},
|
||||||
vga_bios: {
|
vga_bios: {
|
||||||
url: "../../bios/vgabios.bin",
|
url: "../bios/vgabios.bin",
|
||||||
},
|
},
|
||||||
hda: {
|
hda: {
|
||||||
url: "http://localhost/v86-images/arch3.img",
|
url: "http://localhost/v86-images/arch3.img",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<title>Asynchronous loading of disk images</title>
|
<title>Asynchronous loading of disk images</title>
|
||||||
|
|
||||||
<script src="../../build/libv86.js"></script>
|
<script src="../build/libv86.js"></script>
|
||||||
<script>
|
<script>
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
@ -18,10 +18,10 @@ window.onload = function()
|
||||||
vga_memory_size: 2 * 1024 * 1024,
|
vga_memory_size: 2 * 1024 * 1024,
|
||||||
screen_container: document.getElementById("screen_container"),
|
screen_container: document.getElementById("screen_container"),
|
||||||
bios: {
|
bios: {
|
||||||
url: "../../bios/seabios.bin",
|
url: "../bios/seabios.bin",
|
||||||
},
|
},
|
||||||
vga_bios: {
|
vga_bios: {
|
||||||
url: "../../bios/vgabios.bin",
|
url: "../bios/vgabios.bin",
|
||||||
},
|
},
|
||||||
cdrom: {
|
cdrom: {
|
||||||
url: "https://dl.dropboxusercontent.com/u/61029208/dsl-4.11.rc2.iso",
|
url: "https://dl.dropboxusercontent.com/u/61029208/dsl-4.11.rc2.iso",
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<title>Basic Emulator</title><!-- not BASIC! -->
|
<title>Basic Emulator</title><!-- not BASIC! -->
|
||||||
|
|
||||||
<script src="../../build/libv86.js"></script>
|
<script src="../build/libv86.js"></script>
|
||||||
<script>
|
<script>
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
window.onload = function()
|
window.onload = function()
|
||||||
{
|
{
|
||||||
var emulator = new V86Starter({
|
var emulator = window.emulator = new V86Starter({
|
||||||
memory_size: 32 * 1024 * 1024,
|
memory_size: 32 * 1024 * 1024,
|
||||||
vga_memory_size: 2 * 1024 * 1024,
|
vga_memory_size: 2 * 1024 * 1024,
|
||||||
screen_container: document.getElementById("screen_container"),
|
screen_container: document.getElementById("screen_container"),
|
||||||
bios: {
|
bios: {
|
||||||
url: "../../bios/seabios.bin",
|
url: "../bios/seabios.bin",
|
||||||
},
|
},
|
||||||
vga_bios: {
|
vga_bios: {
|
||||||
url: "../../bios/vgabios.bin",
|
url: "../bios/vgabios.bin",
|
||||||
},
|
},
|
||||||
cdrom: {
|
cdrom: {
|
||||||
url: "../../images/linux.iso",
|
url: "../images/linux.iso",
|
||||||
},
|
},
|
||||||
autostart: true,
|
autostart: true,
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<title>Basic Emulator</title><!-- not BASIC! -->
|
<title>Basic Emulator</title><!-- not BASIC! -->
|
||||||
|
|
||||||
<script src="../../build/libv86.js"></script>
|
<script src="../build/libv86.js"></script>
|
||||||
<script>
|
<script>
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
@ -19,10 +19,10 @@ window.onload = function()
|
||||||
vga_memory_size: 8 * 1024 * 1024,
|
vga_memory_size: 8 * 1024 * 1024,
|
||||||
screen_container: document.getElementById("screen_container"),
|
screen_container: document.getElementById("screen_container"),
|
||||||
bios: {
|
bios: {
|
||||||
url: "../../bios/seabios.bin",
|
url: "../bios/seabios.bin",
|
||||||
},
|
},
|
||||||
vga_bios: {
|
vga_bios: {
|
||||||
url: "../../bios/vgabios.bin",
|
url: "../bios/vgabios.bin",
|
||||||
},
|
},
|
||||||
hda: {
|
hda: {
|
||||||
url: "http://localhost/v86-images/arch3.img",
|
url: "http://localhost/v86-images/arch3.img",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<title>Interpreter 2</title>
|
<title>Interpreter 2</title>
|
||||||
|
|
||||||
<script src="../../build/libv86.js"></script>
|
<script src="../build/libv86.js"></script>
|
||||||
<script>
|
<script>
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
@ -30,10 +30,10 @@ window.onload = function()
|
||||||
vga_memory_size: 8 * 1024 * 1024,
|
vga_memory_size: 8 * 1024 * 1024,
|
||||||
screen_container: document.getElementById("screen_container"),
|
screen_container: document.getElementById("screen_container"),
|
||||||
bios: {
|
bios: {
|
||||||
url: "../../bios/seabios.bin",
|
url: "../bios/seabios.bin",
|
||||||
},
|
},
|
||||||
vga_bios: {
|
vga_bios: {
|
||||||
url: "../../bios/vgabios.bin",
|
url: "../bios/vgabios.bin",
|
||||||
},
|
},
|
||||||
hda: {
|
hda: {
|
||||||
url: urlbase + "arch3.img",
|
url: urlbase + "arch3.img",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<title>Lua interpreter</title>
|
<title>Lua interpreter</title>
|
||||||
|
|
||||||
<script src="../../build/libv86.js"></script>
|
<script src="../build/libv86.js"></script>
|
||||||
<script>
|
<script>
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
@ -15,13 +15,13 @@ window.onload = function()
|
||||||
//screen_container: document.getElementById("screen_container"),
|
//screen_container: document.getElementById("screen_container"),
|
||||||
|
|
||||||
bios: {
|
bios: {
|
||||||
url: "../../bios/seabios.bin",
|
url: "../bios/seabios.bin",
|
||||||
},
|
},
|
||||||
vga_bios: {
|
vga_bios: {
|
||||||
url: "../../bios/vgabios.bin",
|
url: "../bios/vgabios.bin",
|
||||||
},
|
},
|
||||||
cdrom: {
|
cdrom: {
|
||||||
url: "../../images/linux.iso",
|
url: "../images/linux.iso",
|
||||||
},
|
},
|
||||||
autostart: true,
|
autostart: true,
|
||||||
disable_keyboard: true,
|
disable_keyboard: true,
|
||||||
|
@ -52,9 +52,9 @@ window.onload = function()
|
||||||
emulator.add_listener("serial0-output-line", function(line)
|
emulator.add_listener("serial0-output-line", function(line)
|
||||||
{
|
{
|
||||||
// filter noise
|
// filter noise
|
||||||
if(!line.startsWith("/root% lua -e") &&
|
if(!line.startsWith("/root% lua -e") &&
|
||||||
!line.startsWith("> ") &&
|
!line.startsWith("> ") &&
|
||||||
line.indexOf("Welcome to Buildroot") === -1 &&
|
line.indexOf("Welcome to Buildroot") === -1 &&
|
||||||
line.indexOf("login:") === -1 &&
|
line.indexOf("login:") === -1 &&
|
||||||
line.trim() !== "")
|
line.trim() !== "")
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var fs = require("fs");
|
var fs = require("fs");
|
||||||
var V86Starter = require("../../build/libv86.js").V86Starter;
|
var V86Starter = require("../build/libv86.js").V86Starter;
|
||||||
|
|
||||||
function readfile(path)
|
function readfile(path)
|
||||||
{
|
{
|
||||||
|
@ -11,8 +11,8 @@ function readfile(path)
|
||||||
|
|
||||||
console.log("Use F2 to save the state and F3 to restore.");
|
console.log("Use F2 to save the state and F3 to restore.");
|
||||||
|
|
||||||
var bios = readfile(__dirname + "/../../bios/seabios.bin");
|
var bios = readfile(__dirname + "/../bios/seabios.bin");
|
||||||
var linux = readfile(__dirname + "/../../images/linux.iso");
|
var linux = readfile(__dirname + "/../images/linux.iso");
|
||||||
|
|
||||||
process.stdin.setRawMode(true);
|
process.stdin.setRawMode(true);
|
||||||
process.stdin.resume();
|
process.stdin.resume();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<title>Save and restore</title>
|
<title>Save and restore</title>
|
||||||
|
|
||||||
<script src="../../build/libv86.js"></script>
|
<script src="../build/libv86.js"></script>
|
||||||
<script>
|
<script>
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
@ -12,13 +12,13 @@ window.onload = function()
|
||||||
vga_memory_size: 2 * 1024 * 1024,
|
vga_memory_size: 2 * 1024 * 1024,
|
||||||
screen_container: document.getElementById("screen_container"),
|
screen_container: document.getElementById("screen_container"),
|
||||||
bios: {
|
bios: {
|
||||||
url: "../../bios/seabios.bin",
|
url: "../bios/seabios.bin",
|
||||||
},
|
},
|
||||||
vga_bios: {
|
vga_bios: {
|
||||||
url: "../../bios/vgabios.bin",
|
url: "../bios/vgabios.bin",
|
||||||
},
|
},
|
||||||
cdrom: {
|
cdrom: {
|
||||||
url: "../../images/linux.iso",
|
url: "../images/linux.iso",
|
||||||
},
|
},
|
||||||
autostart: true,
|
autostart: true,
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<title>Serial example</title>
|
<title>Serial example</title>
|
||||||
|
|
||||||
<script src="../../build/libv86.js"></script>
|
<script src="../build/libv86.js"></script>
|
||||||
<script>
|
<script>
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
@ -12,13 +12,13 @@ window.onload = function()
|
||||||
//screen_container: document.getElementById("screen_container"),
|
//screen_container: document.getElementById("screen_container"),
|
||||||
|
|
||||||
bios: {
|
bios: {
|
||||||
url: "../../bios/seabios.bin",
|
url: "../bios/seabios.bin",
|
||||||
},
|
},
|
||||||
vga_bios: {
|
vga_bios: {
|
||||||
url: "../../bios/vgabios.bin",
|
url: "../bios/vgabios.bin",
|
||||||
},
|
},
|
||||||
cdrom: {
|
cdrom: {
|
||||||
url: "../../images/linux.iso",
|
url: "../images/linux.iso",
|
||||||
},
|
},
|
||||||
autostart: true,
|
autostart: true,
|
||||||
disable_keyboard: true,
|
disable_keyboard: true,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<title>Two emulators</title>
|
<title>Two emulators</title>
|
||||||
|
|
||||||
<script src="../../build/libv86.js"></script>
|
<script src="../build/libv86.js"></script>
|
||||||
<script>
|
<script>
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
@ -13,13 +13,13 @@ window.onload = function()
|
||||||
var emulator1 = new V86Starter({
|
var emulator1 = new V86Starter({
|
||||||
screen_container: container1,
|
screen_container: container1,
|
||||||
bios: {
|
bios: {
|
||||||
url: "../../bios/seabios.bin",
|
url: "../bios/seabios.bin",
|
||||||
},
|
},
|
||||||
vga_bios: {
|
vga_bios: {
|
||||||
url: "../../bios/vgabios.bin",
|
url: "../bios/vgabios.bin",
|
||||||
},
|
},
|
||||||
cdrom: {
|
cdrom: {
|
||||||
url: "../../images/linux.iso",
|
url: "../images/linux.iso",
|
||||||
},
|
},
|
||||||
autostart: true,
|
autostart: true,
|
||||||
});
|
});
|
||||||
|
@ -27,13 +27,13 @@ window.onload = function()
|
||||||
var emulator2 = new V86Starter({
|
var emulator2 = new V86Starter({
|
||||||
screen_container: container2,
|
screen_container: container2,
|
||||||
bios: {
|
bios: {
|
||||||
url: "../../bios/seabios.bin",
|
url: "../bios/seabios.bin",
|
||||||
},
|
},
|
||||||
vga_bios: {
|
vga_bios: {
|
||||||
url: "../../bios/vgabios.bin",
|
url: "../bios/vgabios.bin",
|
||||||
},
|
},
|
||||||
cdrom: {
|
cdrom: {
|
||||||
url: "../../images/linux.iso",
|
url: "../images/linux.iso",
|
||||||
},
|
},
|
||||||
autostart: true,
|
autostart: true,
|
||||||
});
|
});
|
||||||
|
|
|
@ -13,6 +13,12 @@ window.onload = function()
|
||||||
{
|
{
|
||||||
terminal.textContent += e.data;
|
terminal.textContent += e.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
terminal.onkeypress = function(e)
|
||||||
|
{
|
||||||
|
e.preventDefault();
|
||||||
|
worker.postMessage(String.fromCharCode(e.which));
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
var start = Date.now();
|
var start = Date.now();
|
||||||
|
@ -24,5 +30,5 @@ setInterval(function()
|
||||||
|
|
||||||
<span id=time></span>s
|
<span id=time></span>s
|
||||||
<hr>
|
<hr>
|
||||||
<textarea readonly rows=25 cols=80 id=terminal></textarea>
|
<textarea rows=25 cols=80 id=terminal></textarea>
|
||||||
|
|
||||||
|
|
|
@ -1,18 +1,16 @@
|
||||||
importScripts("../../build/libv86.js");
|
importScripts("../build/libv86.js");
|
||||||
|
|
||||||
var worker = this;
|
|
||||||
|
|
||||||
var emulator = new V86Starter({
|
var emulator = new V86Starter({
|
||||||
memory_size: 32 * 1024 * 1024,
|
memory_size: 32 * 1024 * 1024,
|
||||||
vga_memory_size: 2 * 1024 * 1024,
|
vga_memory_size: 2 * 1024 * 1024,
|
||||||
bios: {
|
bios: {
|
||||||
url: "../../bios/seabios.bin",
|
url: "../bios/seabios.bin",
|
||||||
},
|
},
|
||||||
vga_bios: {
|
vga_bios: {
|
||||||
url: "../../bios/vgabios.bin",
|
url: "../bios/vgabios.bin",
|
||||||
},
|
},
|
||||||
cdrom: {
|
cdrom: {
|
||||||
url: "../../images/linux.iso",
|
url: "../images/linux.iso",
|
||||||
},
|
},
|
||||||
autostart: true,
|
autostart: true,
|
||||||
});
|
});
|
||||||
|
@ -20,6 +18,11 @@ var emulator = new V86Starter({
|
||||||
|
|
||||||
emulator.add_listener("serial0-output-char", function(chr)
|
emulator.add_listener("serial0-output-char", function(chr)
|
||||||
{
|
{
|
||||||
worker.postMessage(chr);
|
this.postMessage(chr);
|
||||||
});
|
}.bind(this));
|
||||||
|
|
||||||
|
this.onmessage = function(e)
|
||||||
|
{
|
||||||
|
emulator.serial0_send(e.data);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue