added v86 state

This commit is contained in:
Eugene Pankov 2021-02-08 11:14:29 +01:00
parent bbe6ad2cbc
commit f6834d189f
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4
7 changed files with 9 additions and 13 deletions

Binary file not shown.

Binary file not shown.

BIN
data/v86state.bin Normal file

Binary file not shown.

Binary file not shown.

9
dist/terminal.js vendored
View File

@ -132030,10 +132030,13 @@ function start() {
vga_bios: { vga_bios: {
url: '../data/vgabios.bin', url: '../data/vgabios.bin',
}, },
wasm_path: '../data/v86.wasm',
cdrom: { cdrom: {
url: '../data/linux.iso', url: '../data/linux.iso',
}, },
wasm_path: '../data/v86.wasm', initial_state: {
url: '../data/v86state.bin'
},
autostart: true, autostart: true,
disable_keyboard: true, disable_keyboard: true,
}); });
@ -132041,9 +132044,6 @@ function start() {
this.emit('data', '\r\nVM ready, booting\r\n'); this.emit('data', '\r\nVM ready, booting\r\n');
setTimeout(() => { setTimeout(() => {
this.emit('data', '[Yes, this is a real demo]\r\n'); this.emit('data', '[Yes, this is a real demo]\r\n');
this.loadingInterval = setInterval(() => {
this.emit('data', '.');
}, 500);
}, 2000); }, 2000);
}); });
NodePTY.vm.add_listener('download-progress', (e) => { NodePTY.vm.add_listener('download-progress', (e) => {
@ -132051,7 +132051,6 @@ function start() {
}); });
NodePTY.vm.add_listener('download-error', (e) => { NodePTY.vm.add_listener('download-error', (e) => {
this.emit('data', '\r\nDownload error\r\n'); this.emit('data', '\r\nDownload error\r\n');
clearInterval(this.loadingInterval);
}); });
} }
else { else {

File diff suppressed because one or more lines are too long

View File

@ -17,7 +17,6 @@ async function start () {
} }
static vm: any static vm: any
loggedIn = false loggedIn = false
loadingInterval: any
constructor () { constructor () {
if (!NodePTY.vm) { if (!NodePTY.vm) {
@ -28,10 +27,13 @@ async function start () {
vga_bios: { vga_bios: {
url: '../data/vgabios.bin', url: '../data/vgabios.bin',
}, },
wasm_path: '../data/v86.wasm',
cdrom: { cdrom: {
url: '../data/linux.iso', url: '../data/linux.iso',
}, },
wasm_path: '../data/v86.wasm', initial_state: {
url: '../data/v86state.bin'
},
autostart: true, autostart: true,
disable_keyboard: true, disable_keyboard: true,
}) })
@ -39,9 +41,6 @@ async function start () {
this.emit('data', '\r\nVM ready, booting\r\n') this.emit('data', '\r\nVM ready, booting\r\n')
setTimeout(() => { setTimeout(() => {
this.emit('data', '[Yes, this is a real demo]\r\n') this.emit('data', '[Yes, this is a real demo]\r\n')
this.loadingInterval = setInterval(() => {
this.emit('data', '.')
}, 500)
}, 2000) }, 2000)
}) })
NodePTY.vm.add_listener('download-progress', (e) => { NodePTY.vm.add_listener('download-progress', (e) => {
@ -49,7 +48,6 @@ async function start () {
}) })
NodePTY.vm.add_listener('download-error', (e) => { NodePTY.vm.add_listener('download-error', (e) => {
this.emit('data', '\r\nDownload error\r\n') this.emit('data', '\r\nDownload error\r\n')
clearInterval(this.loadingInterval)
}) })
} else { } else {
setTimeout(() => { setTimeout(() => {
@ -59,7 +57,6 @@ async function start () {
NodePTY.vm.add_listener('serial0-output-char', char => { NodePTY.vm.add_listener('serial0-output-char', char => {
this.emit('data', char) this.emit('data', char)
clearInterval(this.loadingInterval)
}) })
} }