v86 0.5.366 → 0.5.372
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/libv86-debug.js +97 -78
- package/build/libv86-debug.mjs +97 -78
- package/build/libv86.js +234 -234
- package/build/libv86.mjs +443 -441
- package/build/v86-debug.wasm +0 -0
- package/build/v86-fallback.wasm +0 -0
- package/build/v86.wasm +0 -0
- package/package.json +1 -1
package/build/libv86-debug.js
CHANGED
|
@@ -496,6 +496,9 @@ function $dbg_assert$$module$src$log$$($cond$$, $msg$$) {
|
|
|
496
496
|
$paused$$ = !1;
|
|
497
497
|
$cursor_element$$.classList.add("blinking-cursor");
|
|
498
498
|
};
|
|
499
|
+
this.clear_text_state = function() {
|
|
500
|
+
$font_page_b$$ = $font_page_a$$ = $text_mode_height$$ = $text_mode_width$$ = $font_height$$ = $font_width$$ = null;
|
|
501
|
+
};
|
|
499
502
|
this.set_mode = function($graphical$$) {
|
|
500
503
|
$mode$jscomp$15$$ = $graphical$$ ? 1 : $options$jscomp$36$$.use_graphical_text ? 2 : 0;
|
|
501
504
|
0 === $mode$jscomp$15$$ ? ($text_screen$$.style.display = "block", $graphic_screen$$.style.display = "none") : ($text_screen$$.style.display = "none", $graphic_screen$$.style.display = "block", 2 === $mode$jscomp$15$$ && $changed_rows$$ && $changed_rows$$.fill(1));
|
|
@@ -524,7 +527,7 @@ function $dbg_assert$$module$src$log$$($cond$$, $msg$$) {
|
|
|
524
527
|
};
|
|
525
528
|
this.set_size_text = function($cols_i$jscomp$6$$, $rows$$) {
|
|
526
529
|
if ($cols_i$jscomp$6$$ !== $text_mode_width$$ || $rows$$ !== $text_mode_height$$) {
|
|
527
|
-
if ($changed_rows$$ = new Int8Array($rows$$), $text_mode_data$$ = new Int32Array($cols_i$jscomp$6$$ * $rows$$ * 4), $text_mode_width$$ = $cols_i$jscomp$6$$, $text_mode_height$$ = $rows$$, 0 === $mode$jscomp$15$$) {
|
|
530
|
+
if ($changed_rows$$ = new Int8Array($rows$$), $changed_rows$$.fill(1), $text_mode_data$$ = new Int32Array($cols_i$jscomp$6$$ * $rows$$ * 4), $text_mode_width$$ = $cols_i$jscomp$6$$, $text_mode_height$$ = $rows$$, 0 === $mode$jscomp$15$$) {
|
|
528
531
|
for (; $text_screen$$.childNodes.length > $rows$$;) {
|
|
529
532
|
$text_screen$$.removeChild($text_screen$$.firstChild);
|
|
530
533
|
}
|
|
@@ -4262,66 +4265,75 @@ function $KeyboardAdapter$$module$src$browser$keyboard$$($bus$jscomp$10$$) {
|
|
|
4262
4265
|
function $pointerlockchange_handler$$() {
|
|
4263
4266
|
$mouse$$.bus.send("mouse-pointer-lock", !!document.pointerLockElement);
|
|
4264
4267
|
}
|
|
4265
|
-
function $
|
|
4268
|
+
function $contextmenu_handler$$($e$jscomp$27$$) {
|
|
4269
|
+
$may_handle$jscomp$1$$($e$jscomp$27$$) && $e$jscomp$27$$.preventDefault();
|
|
4270
|
+
}
|
|
4271
|
+
function $may_handle$jscomp$1$$($child$jscomp$inline_356_e$jscomp$28$$) {
|
|
4266
4272
|
if (!$mouse$$.enabled || !$mouse$$.emu_enabled) {
|
|
4267
4273
|
return !1;
|
|
4268
4274
|
}
|
|
4269
4275
|
var $parent$jscomp$5$$ = $screen_container$jscomp$1$$ || document.body, $JSCompiler_temp$jscomp$280$$;
|
|
4270
4276
|
if (!($JSCompiler_temp$jscomp$280$$ = document.pointerLockElement)) {
|
|
4271
4277
|
a: {
|
|
4272
|
-
for ($child$jscomp$inline_356_e$jscomp$
|
|
4273
|
-
if ($child$jscomp$inline_356_e$jscomp$
|
|
4278
|
+
for ($child$jscomp$inline_356_e$jscomp$28$$ = $child$jscomp$inline_356_e$jscomp$28$$.target; $child$jscomp$inline_356_e$jscomp$28$$.parentNode;) {
|
|
4279
|
+
if ($child$jscomp$inline_356_e$jscomp$28$$ === $parent$jscomp$5$$) {
|
|
4274
4280
|
$JSCompiler_temp$jscomp$280$$ = !0;
|
|
4275
4281
|
break a;
|
|
4276
4282
|
}
|
|
4277
|
-
$child$jscomp$inline_356_e$jscomp$
|
|
4283
|
+
$child$jscomp$inline_356_e$jscomp$28$$ = $child$jscomp$inline_356_e$jscomp$28$$.parentNode;
|
|
4278
4284
|
}
|
|
4279
4285
|
$JSCompiler_temp$jscomp$280$$ = !1;
|
|
4280
4286
|
}
|
|
4281
4287
|
}
|
|
4282
4288
|
return $JSCompiler_temp$jscomp$280$$;
|
|
4283
4289
|
}
|
|
4284
|
-
function $touch_start_handler$$($e$jscomp$
|
|
4285
|
-
$may_handle$jscomp$1$$($e$jscomp$
|
|
4290
|
+
function $touch_start_handler$$($e$jscomp$29_touch_touches$jscomp$2$$) {
|
|
4291
|
+
$may_handle$jscomp$1$$($e$jscomp$29_touch_touches$jscomp$2$$) && ($e$jscomp$29_touch_touches$jscomp$2$$ = $e$jscomp$29_touch_touches$jscomp$2$$.changedTouches) && $e$jscomp$29_touch_touches$jscomp$2$$.length && ($e$jscomp$29_touch_touches$jscomp$2$$ = $e$jscomp$29_touch_touches$jscomp$2$$[$e$jscomp$29_touch_touches$jscomp$2$$.length - 1], $last_x$$ = $e$jscomp$29_touch_touches$jscomp$2$$.clientX, $last_y$$ = $e$jscomp$29_touch_touches$jscomp$2$$.clientY);
|
|
4286
4292
|
}
|
|
4287
4293
|
function $touch_end_handler$$() {
|
|
4288
4294
|
if ($left_down$$ || $middle_down$$ || $right_down$$) {
|
|
4289
4295
|
$mouse$$.bus.send("mouse-click", [!1, !1, !1]), $left_down$$ = $middle_down$$ = $right_down$$ = !1;
|
|
4290
4296
|
}
|
|
4291
4297
|
}
|
|
4292
|
-
function $mousemove_handler$$($e$jscomp$
|
|
4293
|
-
if ($mouse$$.bus && $may_handle$jscomp$1$$($e$jscomp$
|
|
4294
|
-
var $delta_x$$ = 0, $delta_y$$ = 0, $touch$jscomp$1_touches$jscomp$3$$ = $e$jscomp$
|
|
4295
|
-
$touch$jscomp$1_touches$jscomp$3$$ ? $touch$jscomp$1_touches$jscomp$3$$.length && ($touch$jscomp$1_touches$jscomp$3$$ = $touch$jscomp$1_touches$jscomp$3$$[$touch$jscomp$1_touches$jscomp$3$$.length - 1], $delta_x$$ = $touch$jscomp$1_touches$jscomp$3$$.clientX - $last_x$$, $delta_y$$ = $touch$jscomp$1_touches$jscomp$3$$.clientY - $last_y$$, $last_x$$ = $touch$jscomp$1_touches$jscomp$3$$.clientX, $last_y$$ = $touch$jscomp$1_touches$jscomp$3$$.clientY, $e$jscomp$
|
|
4296
|
-
typeof $e$jscomp$
|
|
4297
|
-
$last_x$$ = $e$jscomp$
|
|
4298
|
+
function $mousemove_handler$$($e$jscomp$31$$) {
|
|
4299
|
+
if ($mouse$$.bus && $may_handle$jscomp$1$$($e$jscomp$31$$) && $mouse$$.is_running) {
|
|
4300
|
+
var $delta_x$$ = 0, $delta_y$$ = 0, $touch$jscomp$1_touches$jscomp$3$$ = $e$jscomp$31$$.changedTouches;
|
|
4301
|
+
$touch$jscomp$1_touches$jscomp$3$$ ? $touch$jscomp$1_touches$jscomp$3$$.length && ($touch$jscomp$1_touches$jscomp$3$$ = $touch$jscomp$1_touches$jscomp$3$$[$touch$jscomp$1_touches$jscomp$3$$.length - 1], $delta_x$$ = $touch$jscomp$1_touches$jscomp$3$$.clientX - $last_x$$, $delta_y$$ = $touch$jscomp$1_touches$jscomp$3$$.clientY - $last_y$$, $last_x$$ = $touch$jscomp$1_touches$jscomp$3$$.clientX, $last_y$$ = $touch$jscomp$1_touches$jscomp$3$$.clientY, $e$jscomp$31$$.preventDefault()) : "number" ===
|
|
4302
|
+
typeof $e$jscomp$31$$.movementX ? ($delta_x$$ = $e$jscomp$31$$.movementX, $delta_y$$ = $e$jscomp$31$$.movementY) : "number" === typeof $e$jscomp$31$$.webkitMovementX ? ($delta_x$$ = $e$jscomp$31$$.webkitMovementX, $delta_y$$ = $e$jscomp$31$$.webkitMovementY) : "number" === typeof $e$jscomp$31$$.mozMovementX ? ($delta_x$$ = $e$jscomp$31$$.mozMovementX, $delta_y$$ = $e$jscomp$31$$.mozMovementY) : ($delta_x$$ = $e$jscomp$31$$.clientX - $last_x$$, $delta_y$$ = $e$jscomp$31$$.clientY - $last_y$$,
|
|
4303
|
+
$last_x$$ = $e$jscomp$31$$.clientX, $last_y$$ = $e$jscomp$31$$.clientY);
|
|
4298
4304
|
$mouse$$.bus.send("mouse-delta", [1 * $delta_x$$, -(1 * $delta_y$$)]);
|
|
4299
|
-
$screen_container$jscomp$1$$ && !document.pointerLockElement && $mouse$$.bus.send("mouse-absolute", [$e$jscomp$
|
|
4305
|
+
$screen_container$jscomp$1$$ && !document.pointerLockElement && $mouse$$.bus.send("mouse-absolute", [$e$jscomp$31$$.pageX - $screen_container$jscomp$1$$.offsetLeft, $e$jscomp$31$$.pageY - $screen_container$jscomp$1$$.offsetTop, $screen_container$jscomp$1$$.offsetWidth, $screen_container$jscomp$1$$.offsetHeight]);
|
|
4300
4306
|
}
|
|
4301
4307
|
}
|
|
4302
|
-
function $mousedown_handler$$($e$jscomp$
|
|
4303
|
-
$may_handle$jscomp$1$$($e$jscomp$
|
|
4308
|
+
function $mousedown_handler$$($e$jscomp$32$$) {
|
|
4309
|
+
$may_handle$jscomp$1$$($e$jscomp$32$$) && $click_event$$($e$jscomp$32$$, !0);
|
|
4304
4310
|
}
|
|
4305
|
-
function $mouseup_handler$$($e$jscomp$
|
|
4306
|
-
$may_handle$jscomp$1$$($e$jscomp$
|
|
4311
|
+
function $mouseup_handler$$($e$jscomp$33$$) {
|
|
4312
|
+
$may_handle$jscomp$1$$($e$jscomp$33$$) && $click_event$$($e$jscomp$33$$, !1);
|
|
4307
4313
|
}
|
|
4308
|
-
function $click_event$$($e$jscomp$
|
|
4309
|
-
$mouse$$.bus && (1 === $e$jscomp$
|
|
4314
|
+
function $click_event$$($e$jscomp$34$$, $down$$) {
|
|
4315
|
+
$mouse$$.bus && (1 === $e$jscomp$34$$.which ? $left_down$$ = $down$$ : 2 === $e$jscomp$34$$.which ? $middle_down$$ = $down$$ : 3 === $e$jscomp$34$$.which ? $right_down$$ = $down$$ : $dbg_log$$module$src$log$$("Unknown event.which: " + $e$jscomp$34$$.which), $mouse$$.bus.send("mouse-click", [$left_down$$, $middle_down$$, $right_down$$]), $e$jscomp$34$$.preventDefault());
|
|
4310
4316
|
}
|
|
4311
|
-
function $mousewheel_handler$$($e$jscomp$
|
|
4312
|
-
if ($may_handle$jscomp$1$$($e$jscomp$
|
|
4313
|
-
var $delta_x$jscomp$1$$ = $e$jscomp$
|
|
4317
|
+
function $mousewheel_handler$$($e$jscomp$35$$) {
|
|
4318
|
+
if ($may_handle$jscomp$1$$($e$jscomp$35$$)) {
|
|
4319
|
+
var $delta_x$jscomp$1$$ = $e$jscomp$35$$.wheelDelta || -$e$jscomp$35$$.detail;
|
|
4314
4320
|
0 > $delta_x$jscomp$1$$ ? $delta_x$jscomp$1$$ = -1 : 0 < $delta_x$jscomp$1$$ && ($delta_x$jscomp$1$$ = 1);
|
|
4315
4321
|
$mouse$$.bus.send("mouse-wheel", [$delta_x$jscomp$1$$, 0]);
|
|
4316
|
-
$e$jscomp$
|
|
4322
|
+
$e$jscomp$35$$.preventDefault();
|
|
4317
4323
|
}
|
|
4318
4324
|
}
|
|
4319
4325
|
var $left_down$$ = !1, $right_down$$ = !1, $middle_down$$ = !1, $last_x$$ = 0, $last_y$$ = 0, $mouse$$ = this;
|
|
4320
4326
|
this.enabled = !1;
|
|
4321
4327
|
this.emu_enabled = !0;
|
|
4328
|
+
this.absolute_mouse = !1;
|
|
4322
4329
|
this.bus = $bus$jscomp$11$$;
|
|
4323
4330
|
this.bus.register("mouse-enable", function($enabled$jscomp$3$$) {
|
|
4324
4331
|
this.enabled = $enabled$jscomp$3$$;
|
|
4332
|
+
this.update_cursor();
|
|
4333
|
+
}, this);
|
|
4334
|
+
this.bus.register("vmware-absolute-mouse", function($enabled$jscomp$4$$) {
|
|
4335
|
+
this.absolute_mouse = $enabled$jscomp$4$$;
|
|
4336
|
+
this.update_cursor();
|
|
4325
4337
|
}, this);
|
|
4326
4338
|
this.is_running = !1;
|
|
4327
4339
|
this.bus.register("emulator-stopped", function() {
|
|
@@ -4330,13 +4342,16 @@ function $KeyboardAdapter$$module$src$browser$keyboard$$($bus$jscomp$10$$) {
|
|
|
4330
4342
|
this.bus.register("emulator-started", function() {
|
|
4331
4343
|
this.is_running = !0;
|
|
4332
4344
|
}, this);
|
|
4345
|
+
this.update_cursor = function() {
|
|
4346
|
+
$screen_container$jscomp$1$$ && ($screen_container$jscomp$1$$.style.cursor = this.absolute_mouse && this.enabled && this.emu_enabled ? "none" : "");
|
|
4347
|
+
};
|
|
4333
4348
|
this.destroy = function() {
|
|
4334
4349
|
"undefined" !== typeof window && (window.removeEventListener("touchstart", $touch_start_handler$$, !1), window.removeEventListener("touchend", $touch_end_handler$$, !1), window.removeEventListener("touchmove", $mousemove_handler$$, !1), window.removeEventListener("mousemove", $mousemove_handler$$, !1), window.removeEventListener("mousedown", $mousedown_handler$$, !1), window.removeEventListener("mouseup", $mouseup_handler$$, !1), window.removeEventListener("wheel", $mousewheel_handler$$, {passive:!1}),
|
|
4335
|
-
document.removeEventListener("pointerlockchange", $pointerlockchange_handler$$, !1));
|
|
4350
|
+
window.removeEventListener("contextmenu", $contextmenu_handler$$, !1), document.removeEventListener("pointerlockchange", $pointerlockchange_handler$$, !1));
|
|
4336
4351
|
};
|
|
4337
4352
|
this.init = function() {
|
|
4338
4353
|
"undefined" !== typeof window && (this.destroy(), window.addEventListener("touchstart", $touch_start_handler$$, !1), window.addEventListener("touchend", $touch_end_handler$$, !1), window.addEventListener("touchmove", $mousemove_handler$$, !1), window.addEventListener("mousemove", $mousemove_handler$$, !1), window.addEventListener("mousedown", $mousedown_handler$$, !1), window.addEventListener("mouseup", $mouseup_handler$$, !1), window.addEventListener("wheel", $mousewheel_handler$$, {passive:!1}),
|
|
4339
|
-
document.addEventListener("pointerlockchange", $pointerlockchange_handler$$, !1));
|
|
4354
|
+
window.addEventListener("contextmenu", $contextmenu_handler$$, !1), document.addEventListener("pointerlockchange", $pointerlockchange_handler$$, !1));
|
|
4340
4355
|
};
|
|
4341
4356
|
this.init();
|
|
4342
4357
|
}
|
|
@@ -4353,6 +4368,9 @@ function $KeyboardAdapter$$module$src$browser$keyboard$$($bus$jscomp$10$$) {
|
|
|
4353
4368
|
};
|
|
4354
4369
|
this.continue = function() {
|
|
4355
4370
|
};
|
|
4371
|
+
this.clear_text_state = function() {
|
|
4372
|
+
$text_mode_height$jscomp$1$$ = $text_mode_width$jscomp$1$$ = null;
|
|
4373
|
+
};
|
|
4356
4374
|
this.set_mode = function() {
|
|
4357
4375
|
};
|
|
4358
4376
|
this.set_font_bitmap = function() {
|
|
@@ -4450,23 +4468,23 @@ function $KeyboardAdapter$$module$src$browser$keyboard$$($bus$jscomp$10$$) {
|
|
|
4450
4468
|
this.set_size_text(80, 25);
|
|
4451
4469
|
}
|
|
4452
4470
|
;function $TextAreaAdapter$$module$src$browser$serial$$($element$jscomp$8$$) {
|
|
4453
|
-
function $keypress_handler$$($e$jscomp$
|
|
4454
|
-
$serial$$.enabled && ($serial$$.send_char($e$jscomp$
|
|
4471
|
+
function $keypress_handler$$($e$jscomp$37$$) {
|
|
4472
|
+
$serial$$.enabled && ($serial$$.send_char($e$jscomp$37$$.which), $e$jscomp$37$$.preventDefault());
|
|
4455
4473
|
}
|
|
4456
|
-
function $keydown_handler$jscomp$1$$($e$jscomp$
|
|
4457
|
-
var $chr$jscomp$10$$ = $e$jscomp$
|
|
4458
|
-
8 === $chr$jscomp$10$$ ? ($serial$$.send_char(127), $e$jscomp$
|
|
4474
|
+
function $keydown_handler$jscomp$1$$($e$jscomp$38$$) {
|
|
4475
|
+
var $chr$jscomp$10$$ = $e$jscomp$38$$.which;
|
|
4476
|
+
8 === $chr$jscomp$10$$ ? ($serial$$.send_char(127), $e$jscomp$38$$.preventDefault()) : 9 === $chr$jscomp$10$$ && ($serial$$.send_char(9), $e$jscomp$38$$.preventDefault());
|
|
4459
4477
|
}
|
|
4460
|
-
function $paste_handler$$($e$jscomp$
|
|
4478
|
+
function $paste_handler$$($e$jscomp$39$$) {
|
|
4461
4479
|
if ($serial$$.enabled) {
|
|
4462
|
-
for (var $data$jscomp$143$$ = $e$jscomp$
|
|
4480
|
+
for (var $data$jscomp$143$$ = $e$jscomp$39$$.clipboardData.getData("text/plain"), $i$jscomp$58$$ = 0; $i$jscomp$58$$ < $data$jscomp$143$$.length; $i$jscomp$58$$++) {
|
|
4463
4481
|
$serial$$.send_char($data$jscomp$143$$.charCodeAt($i$jscomp$58$$));
|
|
4464
4482
|
}
|
|
4465
|
-
$e$jscomp$
|
|
4483
|
+
$e$jscomp$39$$.preventDefault();
|
|
4466
4484
|
}
|
|
4467
4485
|
}
|
|
4468
|
-
function $window_click_handler$$($e$jscomp$
|
|
4469
|
-
$e$jscomp$
|
|
4486
|
+
function $window_click_handler$$($e$jscomp$40$$) {
|
|
4487
|
+
$e$jscomp$40$$.target !== $element$jscomp$8$$ && $element$jscomp$8$$.blur();
|
|
4470
4488
|
}
|
|
4471
4489
|
var $serial$$ = this;
|
|
4472
4490
|
this.enabled = !0;
|
|
@@ -4789,7 +4807,7 @@ $Modem$$module$src$browser$modem$$.prototype.cli_exec_dial = function($dial_addr
|
|
|
4789
4807
|
$dbg_log$$module$src$log$$(`connecting "${$offset$jscomp$50_ws_address$jscomp$1$$}"`, 33554432);
|
|
4790
4808
|
try {
|
|
4791
4809
|
this.socket = new WebSocket($offset$jscomp$50_ws_address$jscomp$1$$);
|
|
4792
|
-
} catch ($e$jscomp$
|
|
4810
|
+
} catch ($e$jscomp$41$$) {
|
|
4793
4811
|
$dbg_log$$module$src$log$$(`error: WebSocket constructor failed using address "${$offset$jscomp$50_ws_address$jscomp$1$$}"`, 33554432);
|
|
4794
4812
|
this.cli_write_response_code(4);
|
|
4795
4813
|
return;
|
|
@@ -5975,8 +5993,8 @@ function $V86$$module$src$browser$starter$$($options$jscomp$45$$) {
|
|
|
5975
5993
|
$resolve$jscomp$2$$($instance$jscomp$1$$.exports);
|
|
5976
5994
|
}, });
|
|
5977
5995
|
}
|
|
5978
|
-
}, progress:$e$jscomp$
|
|
5979
|
-
this.emulator_bus.send("download-progress", {file_index:0, file_count:1, file_name:$v86_bin$$, lengthComputable:$e$jscomp$
|
|
5996
|
+
}, progress:$e$jscomp$42$$ => {
|
|
5997
|
+
this.emulator_bus.send("download-progress", {file_index:0, file_count:1, file_name:$v86_bin$$, lengthComputable:$e$jscomp$42$$.lengthComputable, total:$e$jscomp$42$$.total, loaded:$e$jscomp$42$$.loaded, });
|
|
5980
5998
|
}});
|
|
5981
5999
|
}));
|
|
5982
6000
|
$wasm_fn$$({env:$bus$jscomp$19_wasm_shared_funcs$$}).then($emulator_exports$$ => {
|
|
@@ -6105,9 +6123,9 @@ $V86$$module$src$browser$starter$$.prototype.continue_init = async function($emu
|
|
|
6105
6123
|
$options$jscomp$46$$.disable_keyboard || (this.keyboard_adapter = new $KeyboardAdapter$$module$src$browser$keyboard$$(this.bus));
|
|
6106
6124
|
$options$jscomp$46$$.disable_mouse || (this.mouse_adapter = new $MouseAdapter$$module$src$browser$mouse$$(this.bus, $add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$.container));
|
|
6107
6125
|
this.absolute_pointer_enabled = !1;
|
|
6108
|
-
this.bus.register("vmware-absolute-mouse", function($enabled$jscomp$
|
|
6109
|
-
$enabled$jscomp$
|
|
6110
|
-
this.absolute_pointer_enabled = $enabled$jscomp$
|
|
6126
|
+
this.bus.register("vmware-absolute-mouse", function($enabled$jscomp$5$$) {
|
|
6127
|
+
$enabled$jscomp$5$$ && !this.absolute_pointer_enabled && "undefined" !== typeof document && document.pointerLockElement && document.exitPointerLock();
|
|
6128
|
+
this.absolute_pointer_enabled = $enabled$jscomp$5$$;
|
|
6111
6129
|
}, this);
|
|
6112
6130
|
this.screen_adapter = $add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$.container ? new $ScreenAdapter$$module$src$browser$screen$$($add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$, () => this.v86.cpu.devices.vga && this.v86.cpu.devices.vga.screen_fill_buffer()) : $add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$.ansi ? new $ANSIScreenAdapter$$module$src$browser$ansi_screen$$($add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$) :
|
|
6113
6131
|
new $DummyScreenAdapter$$module$src$browser$dummy_screen$$($add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$);
|
|
@@ -6185,8 +6203,8 @@ $V86$$module$src$browser$starter$$.prototype.continue_init = async function($emu
|
|
|
6185
6203
|
$f$jscomp$1$$.url.endsWith(".zst") && "initial_state" !== $f$jscomp$1$$.name && ($dbg_assert$$module$src$log$$($f$jscomp$1$$.size, "A size must be provided for compressed images"), $result$jscomp$9$$ = this.zstd_decompress($f$jscomp$1$$.size, new Uint8Array($result$jscomp$9$$)));
|
|
6186
6204
|
$put_on_settings$$.call(this, $f$jscomp$1$$.name, $f$jscomp$1$$.as_json ? $result$jscomp$9$$ : new $SyncBuffer$$module$src$buffer$$($result$jscomp$9$$));
|
|
6187
6205
|
$cont$$($index$jscomp$83$$ + 1);
|
|
6188
|
-
}.bind(this), progress:function($e$jscomp$
|
|
6189
|
-
200 === $e$jscomp$
|
|
6206
|
+
}.bind(this), progress:function($e$jscomp$44$$) {
|
|
6207
|
+
200 === $e$jscomp$44$$.target.status ? $starter$$.emulator_bus.send("download-progress", {file_index:$index$jscomp$83$$, file_count:$total$jscomp$1$$, file_name:$f$jscomp$1$$.url, lengthComputable:$e$jscomp$44$$.lengthComputable, total:$e$jscomp$44$$.total || $f$jscomp$1$$.size, loaded:$e$jscomp$44$$.loaded, }) : $starter$$.emulator_bus.send("download-error", {file_index:$index$jscomp$83$$, file_count:$total$jscomp$1$$, file_name:$f$jscomp$1$$.url, request:$e$jscomp$44$$.target, });
|
|
6190
6208
|
}, as_json:$f$jscomp$1$$.as_json, });
|
|
6191
6209
|
}
|
|
6192
6210
|
}.bind(this);
|
|
@@ -6208,15 +6226,15 @@ $V86$$module$src$browser$starter$$.prototype.zstd_decompress_worker = async func
|
|
|
6208
6226
|
if (!this.zstd_worker) {
|
|
6209
6227
|
const $url$jscomp$26$$ = URL.createObjectURL(new Blob(["(" + function() {
|
|
6210
6228
|
let $wasm$$;
|
|
6211
|
-
globalThis.onmessage = function($e$jscomp$
|
|
6229
|
+
globalThis.onmessage = function($e$jscomp$45_exports$jscomp$1$$) {
|
|
6212
6230
|
if ($wasm$$) {
|
|
6213
|
-
var {src:$src$jscomp$6$$, decompressed_size:$decompressed_size$jscomp$2$$, id:$id$jscomp$21$$} = $e$jscomp$
|
|
6214
|
-
$e$jscomp$
|
|
6215
|
-
var $env$jscomp$1_zstd_context$$ = $e$jscomp$
|
|
6216
|
-
(new Uint8Array($e$jscomp$
|
|
6217
|
-
var $ptr$jscomp$6$$ = $e$jscomp$
|
|
6218
|
-
$e$jscomp$
|
|
6219
|
-
$e$jscomp$
|
|
6231
|
+
var {src:$src$jscomp$6$$, decompressed_size:$decompressed_size$jscomp$2$$, id:$id$jscomp$21$$} = $e$jscomp$45_exports$jscomp$1$$.data;
|
|
6232
|
+
$e$jscomp$45_exports$jscomp$1$$ = $wasm$$.exports;
|
|
6233
|
+
var $env$jscomp$1_zstd_context$$ = $e$jscomp$45_exports$jscomp$1$$.zstd_create_ctx($src$jscomp$6$$.length);
|
|
6234
|
+
(new Uint8Array($e$jscomp$45_exports$jscomp$1$$.memory.buffer)).set($src$jscomp$6$$, $e$jscomp$45_exports$jscomp$1$$.zstd_get_src_ptr($env$jscomp$1_zstd_context$$));
|
|
6235
|
+
var $ptr$jscomp$6$$ = $e$jscomp$45_exports$jscomp$1$$.zstd_read($env$jscomp$1_zstd_context$$, $decompressed_size$jscomp$2$$), $result$jscomp$11$$ = $e$jscomp$45_exports$jscomp$1$$.memory.buffer.slice($ptr$jscomp$6$$, $ptr$jscomp$6$$ + $decompressed_size$jscomp$2$$);
|
|
6236
|
+
$e$jscomp$45_exports$jscomp$1$$.zstd_read_free($ptr$jscomp$6$$, $decompressed_size$jscomp$2$$);
|
|
6237
|
+
$e$jscomp$45_exports$jscomp$1$$.zstd_free_ctx($env$jscomp$1_zstd_context$$);
|
|
6220
6238
|
postMessage({result:$result$jscomp$11$$, id:$id$jscomp$21$$}, [$result$jscomp$11$$]);
|
|
6221
6239
|
} else {
|
|
6222
6240
|
$env$jscomp$1_zstd_context$$ = Object.fromEntries("cpu_exception_hook run_hardware_timers cpu_event_halt microtick get_rand_int stop_idling io_port_read8 io_port_read16 io_port_read32 io_port_write8 io_port_write16 io_port_write32 mmap_read8 mmap_read32 mmap_write8 mmap_write16 mmap_write32 mmap_write64 mmap_write128 codegen_finalize jit_clear_func jit_clear_all_funcs".split(" ").map($f$jscomp$2$$ => [$f$jscomp$2$$, () => console.error("zstd worker unexpectedly called " + $f$jscomp$2$$)])),
|
|
@@ -6224,7 +6242,7 @@ $V86$$module$src$browser$starter$$.prototype.zstd_decompress_worker = async func
|
|
|
6224
6242
|
throw Error("zstd worker aborted");
|
|
6225
6243
|
}, $env$jscomp$1_zstd_context$$.log_from_wasm = $env$jscomp$1_zstd_context$$.console_log_from_wasm = ($off$$, $len$jscomp$25$$) => {
|
|
6226
6244
|
console.log($read_sized_string_from_mem$$module$src$lib$$($wasm$$.exports.memory.buffer, $off$$, $len$jscomp$25$$));
|
|
6227
|
-
}, $env$jscomp$1_zstd_context$$.dbg_trace_from_wasm = () => console.trace(), $wasm$$ = new WebAssembly.Instance(new WebAssembly.Module($e$jscomp$
|
|
6245
|
+
}, $env$jscomp$1_zstd_context$$.dbg_trace_from_wasm = () => console.trace(), $wasm$$ = new WebAssembly.Instance(new WebAssembly.Module($e$jscomp$45_exports$jscomp$1$$.data), {env:$env$jscomp$1_zstd_context$$});
|
|
6228
6246
|
}
|
|
6229
6247
|
};
|
|
6230
6248
|
}.toString() + ")()"], {type:"text/javascript"}));
|
|
@@ -6233,8 +6251,8 @@ $V86$$module$src$browser$starter$$.prototype.zstd_decompress_worker = async func
|
|
|
6233
6251
|
this.zstd_worker.postMessage(this.wasm_source, [this.wasm_source]);
|
|
6234
6252
|
}
|
|
6235
6253
|
return new Promise($resolve$jscomp$3$$ => {
|
|
6236
|
-
const $id$jscomp$22$$ = this.zstd_worker_request_id++, $done$jscomp$5$$ = async $e$jscomp$
|
|
6237
|
-
$e$jscomp$
|
|
6254
|
+
const $id$jscomp$22$$ = this.zstd_worker_request_id++, $done$jscomp$5$$ = async $e$jscomp$46$$ => {
|
|
6255
|
+
$e$jscomp$46$$.data.id === $id$jscomp$22$$ && (this.zstd_worker.removeEventListener("message", $done$jscomp$5$$), $dbg_assert$$module$src$log$$($decompressed_size$jscomp$1$$ === $e$jscomp$46$$.data.result.byteLength), $resolve$jscomp$3$$($e$jscomp$46$$.data.result));
|
|
6238
6256
|
};
|
|
6239
6257
|
this.zstd_worker.addEventListener("message", $done$jscomp$5$$);
|
|
6240
6258
|
this.zstd_worker.postMessage({src:$src$jscomp$5$$, decompressed_size:$decompressed_size$jscomp$1$$, id:$id$jscomp$22$$}, [$src$jscomp$5$$.buffer]);
|
|
@@ -6391,7 +6409,7 @@ $V86$$module$src$browser$starter$$.prototype.screen_go_fullscreen = function() {
|
|
|
6391
6409
|
$fn$jscomp$16$$ && ($fn$jscomp$16$$.call($elem$jscomp$2_focus_element$$), ($elem$jscomp$2_focus_element$$ = document.getElementsByClassName("phone_keyboard")[0]) && $elem$jscomp$2_focus_element$$.focus());
|
|
6392
6410
|
try {
|
|
6393
6411
|
navigator.keyboard.lock();
|
|
6394
|
-
} catch ($e$jscomp$
|
|
6412
|
+
} catch ($e$jscomp$47$$) {
|
|
6395
6413
|
}
|
|
6396
6414
|
this.lock_mouse();
|
|
6397
6415
|
}
|
|
@@ -6401,16 +6419,16 @@ $V86$$module$src$browser$starter$$.prototype.lock_mouse = async function() {
|
|
|
6401
6419
|
const $elem$jscomp$3$$ = document.body;
|
|
6402
6420
|
try {
|
|
6403
6421
|
await $elem$jscomp$3$$.requestPointerLock({unadjustedMovement:!0, });
|
|
6404
|
-
} catch ($e$jscomp$
|
|
6422
|
+
} catch ($e$jscomp$48$$) {
|
|
6405
6423
|
await $elem$jscomp$3$$.requestPointerLock();
|
|
6406
6424
|
}
|
|
6407
6425
|
};
|
|
6408
|
-
$V86$$module$src$browser$starter$$.prototype.mouse_set_enabled = function($enabled$jscomp$
|
|
6409
|
-
this.mouse_adapter && (this.mouse_adapter.emu_enabled = $enabled$jscomp$
|
|
6426
|
+
$V86$$module$src$browser$starter$$.prototype.mouse_set_enabled = function($enabled$jscomp$6$$) {
|
|
6427
|
+
this.mouse_adapter && (this.mouse_adapter.emu_enabled = $enabled$jscomp$6$$, this.mouse_adapter.update_cursor());
|
|
6410
6428
|
};
|
|
6411
6429
|
$V86$$module$src$browser$starter$$.prototype.mouse_set_status = $V86$$module$src$browser$starter$$.prototype.mouse_set_enabled;
|
|
6412
|
-
$V86$$module$src$browser$starter$$.prototype.keyboard_set_enabled = function($enabled$jscomp$
|
|
6413
|
-
this.keyboard_adapter && (this.keyboard_adapter.emu_enabled = $enabled$jscomp$
|
|
6430
|
+
$V86$$module$src$browser$starter$$.prototype.keyboard_set_enabled = function($enabled$jscomp$7$$) {
|
|
6431
|
+
this.keyboard_adapter && (this.keyboard_adapter.emu_enabled = $enabled$jscomp$7$$);
|
|
6414
6432
|
};
|
|
6415
6433
|
$V86$$module$src$browser$starter$$.prototype.keyboard_set_status = $V86$$module$src$browser$starter$$.prototype.keyboard_set_enabled;
|
|
6416
6434
|
$V86$$module$src$browser$starter$$.prototype.serial0_send = function($data$jscomp$163$$) {
|
|
@@ -6638,16 +6656,16 @@ if ("undefined" !== typeof process) {
|
|
|
6638
6656
|
if ("undefined" !== typeof Worker) {
|
|
6639
6657
|
function $the_worker$jscomp$1$$() {
|
|
6640
6658
|
let $timeout$jscomp$4$$;
|
|
6641
|
-
globalThis.onmessage = function($e$jscomp$
|
|
6642
|
-
const $t$jscomp$9$$ = $e$jscomp$
|
|
6659
|
+
globalThis.onmessage = function($e$jscomp$49$$) {
|
|
6660
|
+
const $t$jscomp$9$$ = $e$jscomp$49$$.data.t;
|
|
6643
6661
|
$timeout$jscomp$4$$ = $timeout$jscomp$4$$ && clearTimeout($timeout$jscomp$4$$);
|
|
6644
|
-
1 > $t$jscomp$9$$ ? postMessage($e$jscomp$
|
|
6662
|
+
1 > $t$jscomp$9$$ ? postMessage($e$jscomp$49$$.data.tick) : $timeout$jscomp$4$$ = setTimeout(() => postMessage($e$jscomp$49$$.data.tick), $t$jscomp$9$$);
|
|
6645
6663
|
};
|
|
6646
6664
|
}
|
|
6647
6665
|
$v86$$module$src$main$$.prototype.register_yield = function() {
|
|
6648
6666
|
const $url$jscomp$27$$ = URL.createObjectURL(new Blob(["(" + $the_worker$jscomp$1$$.toString() + ")()"], {type:"text/javascript"}));
|
|
6649
6667
|
this.worker = new Worker($url$jscomp$27$$);
|
|
6650
|
-
this.worker.onmessage = $e$jscomp$
|
|
6668
|
+
this.worker.onmessage = $e$jscomp$50$$ => this.yield_callback($e$jscomp$50$$.data);
|
|
6651
6669
|
URL.revokeObjectURL($url$jscomp$27$$);
|
|
6652
6670
|
};
|
|
6653
6671
|
$v86$$module$src$main$$.prototype.yield = function($t$jscomp$10$$, $tick$jscomp$6$$) {
|
|
@@ -10063,7 +10081,8 @@ $VGAScreen$$module$src$vga$$.prototype.set_state = function($state$jscomp$54$$)
|
|
|
10063
10081
|
this.character_map_select = void 0 === $state$jscomp$54$$[63] ? 0 : $state$jscomp$54$$[63];
|
|
10064
10082
|
this.font_page_ab_enabled = void 0 === $state$jscomp$54$$[64] ? 0 : $state$jscomp$54$$[64];
|
|
10065
10083
|
this.screen.set_mode(this.graphical_mode);
|
|
10066
|
-
this.
|
|
10084
|
+
this.screen_height = this.screen_width = 0;
|
|
10085
|
+
this.graphical_mode ? this.svga_enabled ? (this.set_size_graphical(this.svga_width, this.svga_height, this.svga_width, this.svga_height, this.svga_bpp), this.update_layers()) : (this.update_vga_size(), this.update_layers(), this.complete_replot()) : (this.screen.clear_text_state(), this.set_font_bitmap(!0), this.set_size_text(this.max_cols, this.max_rows), this.set_font_page(), this.update_cursor_scanline(), this.update_cursor());
|
|
10067
10086
|
this.complete_redraw();
|
|
10068
10087
|
};
|
|
10069
10088
|
$VGAScreen$$module$src$vga$$.prototype.vga_memory_read = function($addr$jscomp$31$$) {
|
|
@@ -12001,10 +12020,10 @@ $CPU$$module$src$cpu$$.prototype.codegen_finalize = function($wasm_table_index$j
|
|
|
12001
12020
|
this.wm.wasm_table.set($wasm_table_index$jscomp$2$$ + 1024, $result$jscomp$26$$.instance.exports.f);
|
|
12002
12021
|
this.codegen_finalize_finished($wasm_table_index$jscomp$2$$, $start$jscomp$45$$, $state_flags$jscomp$1$$);
|
|
12003
12022
|
this.test_hook_did_finalize_wasm && this.test_hook_did_finalize_wasm($code$jscomp$10$$);
|
|
12004
|
-
}).catch($e$jscomp$
|
|
12005
|
-
console.log($e$jscomp$
|
|
12023
|
+
}).catch($e$jscomp$51$$ => {
|
|
12024
|
+
console.log($e$jscomp$51$$);
|
|
12006
12025
|
debugger;
|
|
12007
|
-
throw $e$jscomp$
|
|
12026
|
+
throw $e$jscomp$51$$;
|
|
12008
12027
|
});
|
|
12009
12028
|
};
|
|
12010
12029
|
$CPU$$module$src$cpu$$.prototype.log_uncompiled_code = function() {
|
|
@@ -12169,7 +12188,7 @@ $CPU$$module$src$cpu$$.prototype.debug_dump_code = function($is_32$jscomp$1$$, $
|
|
|
12169
12188
|
this.capstone_decoder[+$is_32$jscomp$1$$].disasm($buffer$jscomp$66$$, $start$jscomp$51$$).forEach(function($instr$$) {
|
|
12170
12189
|
$dbg_log$$module$src$log$$($h$$module$src$lib$$($instr$$.address >>> 0) + ": " + $pads$$module$src$lib$$($instr$$.bytes.map($x$jscomp$125$$ => $h$$module$src$lib$$($x$jscomp$125$$, 2).slice(-2)).join(" "), 20) + " " + $instr$$.mnemonic + " " + $instr$$.op_str);
|
|
12171
12190
|
}), $dbg_log$$module$src$log$$("");
|
|
12172
|
-
} catch ($e$jscomp$
|
|
12191
|
+
} catch ($e$jscomp$52$$) {
|
|
12173
12192
|
$dbg_log$$module$src$log$$("Could not disassemble: " + Array.from($buffer$jscomp$66$$).map($x$jscomp$126$$ => $h$$module$src$lib$$($x$jscomp$126$$, 2)).join(" "));
|
|
12174
12193
|
}
|
|
12175
12194
|
};
|
|
@@ -12185,8 +12204,8 @@ $CPU$$module$src$cpu$$.prototype.dump_wasm = function($buffer$jscomp$67$$) {
|
|
|
12185
12204
|
$module$jscomp$2$$.applyNames();
|
|
12186
12205
|
const $result$jscomp$27$$ = $module$jscomp$2$$.toText({foldExprs:!0, inlineExport:!0});
|
|
12187
12206
|
$dbg_log$$module$src$log$$($result$jscomp$27$$);
|
|
12188
|
-
} catch ($e$jscomp$
|
|
12189
|
-
$dump_file$$module$src$lib$$($buffer$jscomp$67$$, "failed.wasm"), console.log($e$jscomp$
|
|
12207
|
+
} catch ($e$jscomp$53$$) {
|
|
12208
|
+
$dump_file$$module$src$lib$$($buffer$jscomp$67$$, "failed.wasm"), console.log($e$jscomp$53$$.toString());
|
|
12190
12209
|
} finally {
|
|
12191
12210
|
$module$jscomp$2$$ && $module$jscomp$2$$.destroy();
|
|
12192
12211
|
}
|
|
@@ -13267,10 +13286,10 @@ $Virtio9pProxy$$module$lib$9p$$.prototype.set_state = function($state$jscomp$73$
|
|
|
13267
13286
|
$Virtio9pProxy$$module$lib$9p$$.prototype.reset = function() {
|
|
13268
13287
|
this.virtio.reset();
|
|
13269
13288
|
};
|
|
13270
|
-
$Virtio9pProxy$$module$lib$9p$$.prototype.handle_message = function($e$jscomp$
|
|
13271
|
-
$e$jscomp$
|
|
13272
|
-
const $replytag$jscomp$1$$ = $Unmarshall$$module$lib$marshall$$(["w", "b", "h"], $e$jscomp$
|
|
13273
|
-
$bufchain$jscomp$25$$ ? ($bufchain$jscomp$25$$.set_next_blob($e$jscomp$
|
|
13289
|
+
$Virtio9pProxy$$module$lib$9p$$.prototype.handle_message = function($e$jscomp$54_replybuf$jscomp$1$$) {
|
|
13290
|
+
$e$jscomp$54_replybuf$jscomp$1$$ = new Uint8Array($e$jscomp$54_replybuf$jscomp$1$$.data);
|
|
13291
|
+
const $replytag$jscomp$1$$ = $Unmarshall$$module$lib$marshall$$(["w", "b", "h"], $e$jscomp$54_replybuf$jscomp$1$$, {offset:0})[2], $bufchain$jscomp$25$$ = this.tag_bufchain.get($replytag$jscomp$1$$);
|
|
13292
|
+
$bufchain$jscomp$25$$ ? ($bufchain$jscomp$25$$.set_next_blob($e$jscomp$54_replybuf$jscomp$1$$), this.virtqueue.push_reply($bufchain$jscomp$25$$), this.virtqueue.flush_replies(), this.tag_bufchain.delete($replytag$jscomp$1$$)) : console.error("Virtio9pProxy: No bufchain found for tag: " + $replytag$jscomp$1$$);
|
|
13274
13293
|
};
|
|
13275
13294
|
$Virtio9pProxy$$module$lib$9p$$.prototype.handle_close = function() {
|
|
13276
13295
|
this.destroyed || (this.connect(), setTimeout(this.connect.bind(this), this.reconnect_interval));
|
|
@@ -13300,8 +13319,8 @@ $Virtio9pProxy$$module$lib$9p$$.prototype.connect = function() {
|
|
|
13300
13319
|
this.last_connect_attempt = Date.now();
|
|
13301
13320
|
try {
|
|
13302
13321
|
this.socket = new WebSocket(this.url);
|
|
13303
|
-
} catch ($e$jscomp$
|
|
13304
|
-
console.error($e$jscomp$
|
|
13322
|
+
} catch ($e$jscomp$58$$) {
|
|
13323
|
+
console.error($e$jscomp$58$$);
|
|
13305
13324
|
return;
|
|
13306
13325
|
}
|
|
13307
13326
|
this.socket.binaryType = "arraybuffer";
|