v86 0.5.306 → 0.5.319
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 +461 -409
- package/build/libv86-debug.mjs +461 -409
- package/build/libv86.js +212 -208
- package/build/libv86.mjs +249 -245
- 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
|
@@ -345,9 +345,14 @@ function $dbg_assert$$module$src$log$$($cond$$, $msg$$) {
|
|
|
345
345
|
console.assert($screen_container$$, "options.container must be provided");
|
|
346
346
|
this.FLAG_BLINKING = 1;
|
|
347
347
|
this.FLAG_FONT_PAGE_B = 2;
|
|
348
|
-
|
|
349
|
-
$
|
|
350
|
-
$
|
|
348
|
+
let $graphic_screen$$ = $screen_container$$.getElementsByTagName("canvas")[0];
|
|
349
|
+
$graphic_screen$$ || ($graphic_screen$$ = document.createElement("canvas"), $screen_container$$.appendChild($graphic_screen$$));
|
|
350
|
+
const $graphic_context$$ = $graphic_screen$$.getContext("2d", {alpha:!1});
|
|
351
|
+
let $text_screen$$ = $screen_container$$.getElementsByTagName("div")[0];
|
|
352
|
+
$text_screen$$ || ($text_screen$$ = document.createElement("div"), $screen_container$$.appendChild($text_screen$$));
|
|
353
|
+
const $cursor_element$$ = document.createElement("div");
|
|
354
|
+
var $cursor_row$$, $cursor_col$$, $scale_x$$ = void 0 !== $options$jscomp$36$$.scale ? $options$jscomp$36$$.scale : 1, $scale_y$$ = void 0 !== $options$jscomp$36$$.scale ? $options$jscomp$36$$.scale : 1, $base_scale$$ = 1, $changed_rows$$, $mode$jscomp$15$$, $text_mode_data$$, $text_mode_width$$, $text_mode_height$$, $offscreen_context$$, $offscreen_extra_context$$, $font_context$$, $font_image_data$$, $font_is_visible$$ = new Int8Array(2048), $font_height$$, $font_width$$, $font_width_9px$$, $font_width_dbl$$,
|
|
355
|
+
$font_copy_8th_col$$, $font_page_a$$ = 0, $font_page_b$$ = 0, $blink_visible$$, $tm_last_update$$ = 0, $cursor_start$$, $cursor_end$$, $cursor_enabled$$, $charmap$$ = $get_charmap$$module$src$lib$$($options$jscomp$36$$.encoding), $timer_id$$ = 0, $paused$$ = !1;
|
|
351
356
|
this.init = function() {
|
|
352
357
|
$cursor_element$$.classList.add("cursor");
|
|
353
358
|
$cursor_element$$.style.position = "absolute";
|
|
@@ -4363,13 +4368,13 @@ function $KeyboardAdapter$$module$src$browser$keyboard$$($bus$jscomp$10$$) {
|
|
|
4363
4368
|
};
|
|
4364
4369
|
this.set_size_text(80, 25);
|
|
4365
4370
|
}
|
|
4366
|
-
;function $
|
|
4371
|
+
;function $TextAreaAdapter$$module$src$browser$serial$$($element$jscomp$8$$) {
|
|
4367
4372
|
function $keypress_handler$$($e$jscomp$36$$) {
|
|
4368
|
-
$serial$$.
|
|
4373
|
+
$serial$$.enabled && ($serial$$.send_char($e$jscomp$36$$.which), $e$jscomp$36$$.preventDefault());
|
|
4369
4374
|
}
|
|
4370
4375
|
function $keydown_handler$jscomp$1$$($e$jscomp$37$$) {
|
|
4371
|
-
var $chr$jscomp$
|
|
4372
|
-
8 === $chr$jscomp$
|
|
4376
|
+
var $chr$jscomp$8$$ = $e$jscomp$37$$.which;
|
|
4377
|
+
8 === $chr$jscomp$8$$ ? ($serial$$.send_char(127), $e$jscomp$37$$.preventDefault()) : 9 === $chr$jscomp$8$$ && ($serial$$.send_char(9), $e$jscomp$37$$.preventDefault());
|
|
4373
4378
|
}
|
|
4374
4379
|
function $paste_handler$$($e$jscomp$38$$) {
|
|
4375
4380
|
if ($serial$$.enabled) {
|
|
@@ -4384,15 +4389,11 @@ function $KeyboardAdapter$$module$src$browser$keyboard$$($bus$jscomp$10$$) {
|
|
|
4384
4389
|
}
|
|
4385
4390
|
var $serial$$ = this;
|
|
4386
4391
|
this.enabled = !0;
|
|
4387
|
-
this.bus = $bus$jscomp$12$$;
|
|
4388
4392
|
this.text = "";
|
|
4389
4393
|
this.text_new_line = !1;
|
|
4390
4394
|
this.last_update = 0;
|
|
4391
|
-
this.bus.register("serial0-output-byte", function($byte_chr$jscomp$6$$) {
|
|
4392
|
-
$byte_chr$jscomp$6$$ = String.fromCharCode($byte_chr$jscomp$6$$);
|
|
4393
|
-
this.show_char($byte_chr$jscomp$6$$);
|
|
4394
|
-
}, this);
|
|
4395
4395
|
this.destroy = function() {
|
|
4396
|
+
this.enabled = !1;
|
|
4396
4397
|
$element$jscomp$8$$.removeEventListener("keypress", $keypress_handler$$, !1);
|
|
4397
4398
|
$element$jscomp$8$$.removeEventListener("keydown", $keydown_handler$jscomp$1$$, !1);
|
|
4398
4399
|
$element$jscomp$8$$.removeEventListener("paste", $paste_handler$$, !1);
|
|
@@ -4400,6 +4401,7 @@ function $KeyboardAdapter$$module$src$browser$keyboard$$($bus$jscomp$10$$) {
|
|
|
4400
4401
|
};
|
|
4401
4402
|
this.init = function() {
|
|
4402
4403
|
this.destroy();
|
|
4404
|
+
this.enabled = !0;
|
|
4403
4405
|
$element$jscomp$8$$.style.display = "block";
|
|
4404
4406
|
$element$jscomp$8$$.addEventListener("keypress", $keypress_handler$$, !1);
|
|
4405
4407
|
$element$jscomp$8$$.addEventListener("keydown", $keydown_handler$jscomp$1$$, !1);
|
|
@@ -4407,8 +4409,8 @@ function $KeyboardAdapter$$module$src$browser$keyboard$$($bus$jscomp$10$$) {
|
|
|
4407
4409
|
window.addEventListener("mousedown", $window_click_handler$$, !1);
|
|
4408
4410
|
};
|
|
4409
4411
|
this.init();
|
|
4410
|
-
this.show_char = function($chr$jscomp$
|
|
4411
|
-
"\b" === $chr$jscomp$
|
|
4412
|
+
this.show_char = function($chr$jscomp$6$$) {
|
|
4413
|
+
"\b" === $chr$jscomp$6$$ ? (this.text = this.text.slice(0, -1), this.update()) : "\r" !== $chr$jscomp$6$$ && (this.text += $chr$jscomp$6$$, "\n" === $chr$jscomp$6$$ && (this.text_new_line = !0), this.update());
|
|
4412
4414
|
};
|
|
4413
4415
|
this.update = function() {
|
|
4414
4416
|
var $now$jscomp$8$$ = Date.now(), $delta$jscomp$3$$ = $now$jscomp$8$$ - this.last_update;
|
|
@@ -4424,35 +4426,83 @@ function $KeyboardAdapter$$module$src$browser$keyboard$$($bus$jscomp$10$$) {
|
|
|
4424
4426
|
$element$jscomp$8$$.value = this.text;
|
|
4425
4427
|
this.text_new_line && (this.text_new_line = !1, $element$jscomp$8$$.scrollTop = 1e9);
|
|
4426
4428
|
};
|
|
4427
|
-
this.send_char = function(
|
|
4428
|
-
$serial$$.bus && $serial$$.bus.send("serial0-input", $chr_code$$);
|
|
4429
|
+
this.send_char = function() {
|
|
4429
4430
|
};
|
|
4430
4431
|
}
|
|
4431
|
-
function $
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4432
|
+
function $SerialAdapter$$module$src$browser$serial$$($element$jscomp$9$$, $bus$jscomp$12$$) {
|
|
4433
|
+
var $adapter$jscomp$13$$ = Reflect.construct($TextAreaAdapter$$module$src$browser$serial$$, [$element$jscomp$9$$], $SerialAdapter$$module$src$browser$serial$$);
|
|
4434
|
+
$adapter$jscomp$13$$.send_char = function($chr_code$jscomp$1$$) {
|
|
4435
|
+
$bus$jscomp$12$$.send("serial0-input", $chr_code$jscomp$1$$);
|
|
4436
|
+
};
|
|
4437
|
+
$bus$jscomp$12$$.register("serial0-output-byte", function($byte_chr$jscomp$9$$) {
|
|
4438
|
+
$byte_chr$jscomp$9$$ = String.fromCharCode($byte_chr$jscomp$9$$);
|
|
4439
|
+
$adapter$jscomp$13$$.show_char && $adapter$jscomp$13$$.show_char($byte_chr$jscomp$9$$);
|
|
4440
|
+
}, $adapter$jscomp$13$$);
|
|
4441
|
+
return $adapter$jscomp$13$$;
|
|
4442
|
+
}
|
|
4443
|
+
Reflect.setPrototypeOf($SerialAdapter$$module$src$browser$serial$$.prototype, $TextAreaAdapter$$module$src$browser$serial$$.prototype);
|
|
4444
|
+
Reflect.setPrototypeOf($SerialAdapter$$module$src$browser$serial$$, $TextAreaAdapter$$module$src$browser$serial$$);
|
|
4445
|
+
function $VirtioConsoleAdapter$$module$src$browser$serial$$($element$jscomp$10$$, $bus$jscomp$13$$) {
|
|
4446
|
+
var $adapter$jscomp$14$$ = Reflect.construct($TextAreaAdapter$$module$src$browser$serial$$, [$element$jscomp$10$$], $VirtioConsoleAdapter$$module$src$browser$serial$$);
|
|
4447
|
+
$adapter$jscomp$14$$.send_char = function($chr_code$jscomp$2$$) {
|
|
4448
|
+
$bus$jscomp$13$$.send("virtio-console0-input-bytes", new Uint8Array([$chr_code$jscomp$2$$]));
|
|
4449
|
+
};
|
|
4450
|
+
const $decoder$$ = new TextDecoder;
|
|
4451
|
+
$bus$jscomp$13$$.register("virtio-console0-output-bytes", function($bytes$jscomp$4$$) {
|
|
4452
|
+
for (const $chr$jscomp$10$$ of $decoder$$.decode($bytes$jscomp$4$$)) {
|
|
4453
|
+
$adapter$jscomp$14$$.show_char && $adapter$jscomp$14$$.show_char($chr$jscomp$10$$);
|
|
4454
|
+
}
|
|
4455
|
+
}, $adapter$jscomp$14$$);
|
|
4456
|
+
return $adapter$jscomp$14$$;
|
|
4457
|
+
}
|
|
4458
|
+
Reflect.setPrototypeOf($VirtioConsoleAdapter$$module$src$browser$serial$$.prototype, $TextAreaAdapter$$module$src$browser$serial$$.prototype);
|
|
4459
|
+
Reflect.setPrototypeOf($VirtioConsoleAdapter$$module$src$browser$serial$$, $TextAreaAdapter$$module$src$browser$serial$$);
|
|
4460
|
+
function $XtermJSAdapter$$module$src$browser$serial$$($element$jscomp$11$$, $xterm_lib$$) {
|
|
4461
|
+
this.element = $element$jscomp$11$$;
|
|
4462
|
+
var $term$$ = this.term = new $xterm_lib$$({logLevel:"off", convertEol:"true", });
|
|
4463
|
+
this.destroy = function() {
|
|
4464
|
+
this.on_data_disposable && this.on_data_disposable.dispose();
|
|
4465
|
+
$term$$.dispose();
|
|
4466
|
+
};
|
|
4467
|
+
}
|
|
4468
|
+
$XtermJSAdapter$$module$src$browser$serial$$.prototype.show = function() {
|
|
4469
|
+
this.term && this.term.open(this.element);
|
|
4470
|
+
};
|
|
4471
|
+
function $SerialAdapterXtermJS$$module$src$browser$serial$$($element$jscomp$12$$, $bus$jscomp$15$$, $xterm_lib$jscomp$1$$) {
|
|
4472
|
+
if ($xterm_lib$jscomp$1$$) {
|
|
4473
|
+
var $adapter$jscomp$15$$ = Reflect.construct($XtermJSAdapter$$module$src$browser$serial$$, [$element$jscomp$12$$, $xterm_lib$jscomp$1$$], $SerialAdapterXtermJS$$module$src$browser$serial$$);
|
|
4474
|
+
$bus$jscomp$15$$.register("serial0-output-byte", function($utf8_byte$$) {
|
|
4475
|
+
$adapter$jscomp$15$$.term.write(Uint8Array.of($utf8_byte$$));
|
|
4476
|
+
}, $adapter$jscomp$15$$);
|
|
4477
|
+
var $utf8_encoder$$ = new TextEncoder;
|
|
4478
|
+
$adapter$jscomp$15$$.on_data_disposable = $adapter$jscomp$15$$.term.onData(function($data_str$$) {
|
|
4479
|
+
for (const $utf8_byte$jscomp$1$$ of $utf8_encoder$$.encode($data_str$$)) {
|
|
4480
|
+
$bus$jscomp$15$$.send("serial0-input", $utf8_byte$jscomp$1$$);
|
|
4439
4481
|
}
|
|
4440
4482
|
});
|
|
4441
|
-
|
|
4442
|
-
$term$$.write(Uint8Array.of($utf8_byte$jscomp$1$$));
|
|
4443
|
-
}, this);
|
|
4444
|
-
this.destroy = function() {
|
|
4445
|
-
$on_data_disposable$$.dispose();
|
|
4446
|
-
$term$$.dispose();
|
|
4447
|
-
};
|
|
4483
|
+
return $adapter$jscomp$15$$;
|
|
4448
4484
|
}
|
|
4449
4485
|
}
|
|
4450
|
-
$SerialAdapterXtermJS$$module$src$browser$serial$$.prototype
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4486
|
+
Reflect.setPrototypeOf($SerialAdapterXtermJS$$module$src$browser$serial$$.prototype, $XtermJSAdapter$$module$src$browser$serial$$.prototype);
|
|
4487
|
+
Reflect.setPrototypeOf($SerialAdapterXtermJS$$module$src$browser$serial$$, $XtermJSAdapter$$module$src$browser$serial$$);
|
|
4488
|
+
function $VirtioConsoleAdapterXtermJS$$module$src$browser$serial$$($element$jscomp$13$$, $bus$jscomp$16$$, $xterm_lib$jscomp$2$$) {
|
|
4489
|
+
if ($xterm_lib$jscomp$2$$) {
|
|
4490
|
+
var $adapter$jscomp$16$$ = Reflect.construct($XtermJSAdapter$$module$src$browser$serial$$, [$element$jscomp$13$$, $xterm_lib$jscomp$2$$], $VirtioConsoleAdapterXtermJS$$module$src$browser$serial$$);
|
|
4491
|
+
$bus$jscomp$16$$.register("virtio-console0-output-bytes", function($utf8_bytes$$) {
|
|
4492
|
+
$adapter$jscomp$16$$.term.write($utf8_bytes$$);
|
|
4493
|
+
}, $adapter$jscomp$16$$);
|
|
4494
|
+
var $utf8_encoder$jscomp$1$$ = new TextEncoder;
|
|
4495
|
+
$adapter$jscomp$16$$.on_data_disposable = $adapter$jscomp$16$$.term.onData(function($data_str$jscomp$1$$) {
|
|
4496
|
+
$bus$jscomp$16$$.send("virtio-console0-input-bytes", $utf8_encoder$jscomp$1$$.encode($data_str$jscomp$1$$));
|
|
4497
|
+
});
|
|
4498
|
+
return $adapter$jscomp$16$$;
|
|
4499
|
+
}
|
|
4500
|
+
}
|
|
4501
|
+
Reflect.setPrototypeOf($VirtioConsoleAdapterXtermJS$$module$src$browser$serial$$.prototype, $XtermJSAdapter$$module$src$browser$serial$$.prototype);
|
|
4502
|
+
Reflect.setPrototypeOf($VirtioConsoleAdapterXtermJS$$module$src$browser$serial$$, $XtermJSAdapter$$module$src$browser$serial$$);
|
|
4503
|
+
function $InBrowserNetworkAdapter$$module$src$browser$inbrowser_network$$($bus$jscomp$17$$, $config$jscomp$4_id$jscomp$6$$) {
|
|
4454
4504
|
$config$jscomp$4_id$jscomp$6$$ = $config$jscomp$4_id$jscomp$6$$.id || 0;
|
|
4455
|
-
this.bus = $bus$jscomp$
|
|
4505
|
+
this.bus = $bus$jscomp$17$$;
|
|
4456
4506
|
this.bus_send_msgid = `net${$config$jscomp$4_id$jscomp$6$$}-send`;
|
|
4457
4507
|
this.bus_recv_msgid = `net${$config$jscomp$4_id$jscomp$6$$}-receive`;
|
|
4458
4508
|
this.channel = new BroadcastChannel(`v86-inbrowser-${$config$jscomp$4_id$jscomp$6$$}`);
|
|
@@ -5453,12 +5503,12 @@ function $V86$$module$src$browser$starter$$($options$jscomp$41$$) {
|
|
|
5453
5503
|
this.cpu_is_running = !1;
|
|
5454
5504
|
this.cpu_exception_hook = function() {
|
|
5455
5505
|
};
|
|
5456
|
-
var $bus$jscomp$
|
|
5457
|
-
this.bus = $bus$jscomp$
|
|
5458
|
-
this.emulator_bus = $bus$jscomp$
|
|
5506
|
+
var $bus$jscomp$18_wasm_shared_funcs$$ = $Bus$$module$src$bus$$.create();
|
|
5507
|
+
this.bus = $bus$jscomp$18_wasm_shared_funcs$$[0];
|
|
5508
|
+
this.emulator_bus = $bus$jscomp$18_wasm_shared_funcs$$[1];
|
|
5459
5509
|
var $cpu$jscomp$12$$, $wasm_memory$$;
|
|
5460
5510
|
const $wasm_table$$ = new WebAssembly.Table({element:"anyfunc", initial:1924});
|
|
5461
|
-
$bus$jscomp$
|
|
5511
|
+
$bus$jscomp$18_wasm_shared_funcs$$ = {cpu_exception_hook:$n$jscomp$11$$ => this.cpu_exception_hook($n$jscomp$11$$), run_hardware_timers:function($a$jscomp$6$$, $t$jscomp$4$$) {
|
|
5462
5512
|
return $cpu$jscomp$12$$.run_hardware_timers($a$jscomp$6$$, $t$jscomp$4$$);
|
|
5463
5513
|
}, cpu_event_halt:() => {
|
|
5464
5514
|
this.emulator_bus.send("cpu-event-halt");
|
|
@@ -5482,20 +5532,18 @@ function $V86$$module$src$browser$starter$$($options$jscomp$41$$) {
|
|
|
5482
5532
|
$cpu$jscomp$12$$.io.port_write32($addr$jscomp$16$$, $value$jscomp$142$$);
|
|
5483
5533
|
}, mmap_read8:function($addr$jscomp$17$$) {
|
|
5484
5534
|
return $cpu$jscomp$12$$.mmap_read8($addr$jscomp$17$$);
|
|
5485
|
-
},
|
|
5486
|
-
return $cpu$jscomp$12$$.
|
|
5487
|
-
},
|
|
5488
|
-
|
|
5489
|
-
},
|
|
5490
|
-
$cpu$jscomp$12$$.
|
|
5491
|
-
},
|
|
5492
|
-
$cpu$jscomp$12$$.
|
|
5493
|
-
},
|
|
5494
|
-
$cpu$jscomp$12$$.
|
|
5495
|
-
},
|
|
5496
|
-
$cpu$jscomp$12$$.
|
|
5497
|
-
}, mmap_write128:function($addr$jscomp$24$$, $value0$jscomp$1$$, $value1$jscomp$8$$, $value2$jscomp$7$$, $value3$jscomp$4$$) {
|
|
5498
|
-
$cpu$jscomp$12$$.mmap_write128($addr$jscomp$24$$, $value0$jscomp$1$$, $value1$jscomp$8$$, $value2$jscomp$7$$, $value3$jscomp$4$$);
|
|
5535
|
+
}, mmap_read32:function($addr$jscomp$18$$) {
|
|
5536
|
+
return $cpu$jscomp$12$$.mmap_read32($addr$jscomp$18$$);
|
|
5537
|
+
}, mmap_write8:function($addr$jscomp$19$$, $value$jscomp$143$$) {
|
|
5538
|
+
$cpu$jscomp$12$$.mmap_write8($addr$jscomp$19$$, $value$jscomp$143$$);
|
|
5539
|
+
}, mmap_write16:function($addr$jscomp$20$$, $value$jscomp$144$$) {
|
|
5540
|
+
$cpu$jscomp$12$$.mmap_write16($addr$jscomp$20$$, $value$jscomp$144$$);
|
|
5541
|
+
}, mmap_write32:function($addr$jscomp$21$$, $value$jscomp$145$$) {
|
|
5542
|
+
$cpu$jscomp$12$$.mmap_write32($addr$jscomp$21$$, $value$jscomp$145$$);
|
|
5543
|
+
}, mmap_write64:function($addr$jscomp$22$$, $value0$$, $value1$jscomp$7$$) {
|
|
5544
|
+
$cpu$jscomp$12$$.mmap_write64($addr$jscomp$22$$, $value0$$, $value1$jscomp$7$$);
|
|
5545
|
+
}, mmap_write128:function($addr$jscomp$23$$, $value0$jscomp$1$$, $value1$jscomp$8$$, $value2$jscomp$7$$, $value3$jscomp$4$$) {
|
|
5546
|
+
$cpu$jscomp$12$$.mmap_write128($addr$jscomp$23$$, $value0$jscomp$1$$, $value1$jscomp$8$$, $value2$jscomp$7$$, $value3$jscomp$4$$);
|
|
5499
5547
|
}, log_from_wasm:function($offset$jscomp$60_str$jscomp$11$$, $len$jscomp$22$$) {
|
|
5500
5548
|
$offset$jscomp$60_str$jscomp$11$$ = $read_sized_string_from_mem$$module$src$lib$$($wasm_memory$$, $offset$jscomp$60_str$jscomp$11$$, $len$jscomp$22$$);
|
|
5501
5549
|
$dbg_log$$module$src$log$$($offset$jscomp$60_str$jscomp$11$$, 2);
|
|
@@ -5511,15 +5559,15 @@ function $V86$$module$src$browser$starter$$($options$jscomp$41$$) {
|
|
|
5511
5559
|
$wasm_fn$$ || ($wasm_fn$$ = $env$$ => new Promise($resolve$jscomp$2$$ => {
|
|
5512
5560
|
let $v86_bin$$ = "v86-debug.wasm", $v86_bin_fallback$$ = "v86-fallback.wasm";
|
|
5513
5561
|
$options$jscomp$41$$.wasm_path ? ($v86_bin$$ = $options$jscomp$41$$.wasm_path, $v86_bin_fallback$$ = $v86_bin$$.replace("v86.wasm", "v86-fallback.wasm")) : "undefined" === typeof window && "string" === typeof __dirname ? ($v86_bin$$ = __dirname + "/" + $v86_bin$$, $v86_bin_fallback$$ = __dirname + "/" + $v86_bin_fallback$$) : ($v86_bin$$ = "build/" + $v86_bin$$, $v86_bin_fallback$$ = "build/" + $v86_bin_fallback$$);
|
|
5514
|
-
$load_file$$module$src$lib$$($v86_bin$$, {done:async $bytes$jscomp$
|
|
5562
|
+
$load_file$$module$src$lib$$($v86_bin$$, {done:async $bytes$jscomp$5$$ => {
|
|
5515
5563
|
try {
|
|
5516
|
-
const {instance:$instance$$} = await WebAssembly.instantiate($bytes$jscomp$
|
|
5517
|
-
this.wasm_source = $bytes$jscomp$
|
|
5564
|
+
const {instance:$instance$$} = await WebAssembly.instantiate($bytes$jscomp$5$$, $env$$);
|
|
5565
|
+
this.wasm_source = $bytes$jscomp$5$$;
|
|
5518
5566
|
$resolve$jscomp$2$$($instance$$.exports);
|
|
5519
5567
|
} catch ($err$jscomp$3$$) {
|
|
5520
|
-
$load_file$$module$src$lib$$($v86_bin_fallback$$, {done:async $bytes$jscomp$
|
|
5521
|
-
const {instance:$instance$jscomp$1$$} = await WebAssembly.instantiate($bytes$jscomp$
|
|
5522
|
-
this.wasm_source = $bytes$jscomp$
|
|
5568
|
+
$load_file$$module$src$lib$$($v86_bin_fallback$$, {done:async $bytes$jscomp$6$$ => {
|
|
5569
|
+
const {instance:$instance$jscomp$1$$} = await WebAssembly.instantiate($bytes$jscomp$6$$, $env$$);
|
|
5570
|
+
this.wasm_source = $bytes$jscomp$6$$;
|
|
5523
5571
|
$resolve$jscomp$2$$($instance$jscomp$1$$.exports);
|
|
5524
5572
|
}, });
|
|
5525
5573
|
}
|
|
@@ -5527,7 +5575,7 @@ function $V86$$module$src$browser$starter$$($options$jscomp$41$$) {
|
|
|
5527
5575
|
this.emulator_bus.send("download-progress", {file_index:0, file_count:1, file_name:$v86_bin$$, lengthComputable:$e$jscomp$40$$.lengthComputable, total:$e$jscomp$40$$.total, loaded:$e$jscomp$40$$.loaded, });
|
|
5528
5576
|
}});
|
|
5529
5577
|
}));
|
|
5530
|
-
$wasm_fn$$({env:$bus$jscomp$
|
|
5578
|
+
$wasm_fn$$({env:$bus$jscomp$18_wasm_shared_funcs$$}).then($emulator_exports$$ => {
|
|
5531
5579
|
$wasm_memory$$ = $emulator_exports$$.memory;
|
|
5532
5580
|
$emulator_exports$$.rust_init();
|
|
5533
5581
|
$emulator_exports$$ = this.v86 = new $v86$$module$src$main$$(this.emulator_bus, {exports:$emulator_exports$$, wasm_table:$wasm_table$$});
|
|
@@ -5541,28 +5589,28 @@ $V86$$module$src$browser$starter$$.prototype.continue_init = async function($emu
|
|
|
5541
5589
|
function $put_on_settings$$($name$jscomp$100$$, $buffer$jscomp$42$$) {
|
|
5542
5590
|
switch($name$jscomp$100$$) {
|
|
5543
5591
|
case "hda":
|
|
5544
|
-
$settings$$.hda =
|
|
5592
|
+
$settings$$.hda = $buffer$jscomp$42$$;
|
|
5545
5593
|
break;
|
|
5546
5594
|
case "hdb":
|
|
5547
|
-
$settings$$.hdb =
|
|
5595
|
+
$settings$$.hdb = $buffer$jscomp$42$$;
|
|
5548
5596
|
break;
|
|
5549
5597
|
case "cdrom":
|
|
5550
|
-
$settings$$.cdrom =
|
|
5598
|
+
$settings$$.cdrom = $buffer$jscomp$42$$;
|
|
5551
5599
|
break;
|
|
5552
5600
|
case "fda":
|
|
5553
|
-
$settings$$.fda =
|
|
5601
|
+
$settings$$.fda = $buffer$jscomp$42$$;
|
|
5554
5602
|
break;
|
|
5555
5603
|
case "fdb":
|
|
5556
|
-
$settings$$.fdb =
|
|
5604
|
+
$settings$$.fdb = $buffer$jscomp$42$$;
|
|
5557
5605
|
break;
|
|
5558
5606
|
case "multiboot":
|
|
5559
|
-
$settings$$.multiboot =
|
|
5607
|
+
$settings$$.multiboot = $buffer$jscomp$42$$.buffer;
|
|
5560
5608
|
break;
|
|
5561
5609
|
case "bzimage":
|
|
5562
|
-
$settings$$.bzimage =
|
|
5610
|
+
$settings$$.bzimage = $buffer$jscomp$42$$.buffer;
|
|
5563
5611
|
break;
|
|
5564
5612
|
case "initrd":
|
|
5565
|
-
$settings$$.initrd =
|
|
5613
|
+
$settings$$.initrd = $buffer$jscomp$42$$.buffer;
|
|
5566
5614
|
break;
|
|
5567
5615
|
case "bios":
|
|
5568
5616
|
$settings$$.bios = $buffer$jscomp$42$$.buffer;
|
|
@@ -5597,6 +5645,7 @@ $V86$$module$src$browser$starter$$.prototype.continue_init = async function($emu
|
|
|
5597
5645
|
$dbg_assert$$module$src$log$$(!$options$jscomp$42$$.bzimage_initrd_from_filesystem || $settings$$.initial_state, "bzimage_initrd_from_filesystem: Requires a filesystem");
|
|
5598
5646
|
}
|
|
5599
5647
|
this.serial_adapter && this.serial_adapter.show && this.serial_adapter.show();
|
|
5648
|
+
this.virtio_console_adapter && this.virtio_console_adapter.show && this.virtio_console_adapter.show();
|
|
5600
5649
|
this.v86.init($settings$$);
|
|
5601
5650
|
$settings$$.initial_state && ($emulator$jscomp$1$$.restore_state($settings$$.initial_state), $settings$$.initial_state = void 0);
|
|
5602
5651
|
$options$jscomp$42$$.autostart && this.v86.run();
|
|
@@ -5610,15 +5659,13 @@ $V86$$module$src$browser$starter$$.prototype.continue_init = async function($emu
|
|
|
5610
5659
|
this.cpu_is_running = !0;
|
|
5611
5660
|
this.screen_adapter.continue();
|
|
5612
5661
|
}, this);
|
|
5613
|
-
var $settings$$ = {};
|
|
5614
|
-
this.disk_images = {fda:void 0, fdb:void 0, hda:void 0, hdb:void 0, cdrom:void 0, };
|
|
5615
|
-
var $add_file_boot_order_fs_url_relay_url_screen_options$$ = $options$jscomp$42$$.boot_order ? $options$jscomp$42$$.boot_order : $options$jscomp$42$$.fda ? 801 : $options$jscomp$42$$.hda ? 786 : 291;
|
|
5662
|
+
var $settings$$ = {}, $add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$ = $options$jscomp$42$$.boot_order ? $options$jscomp$42$$.boot_order : $options$jscomp$42$$.fda ? 801 : $options$jscomp$42$$.hda ? 786 : 291;
|
|
5616
5663
|
$settings$$.acpi = $options$jscomp$42$$.acpi;
|
|
5617
5664
|
$settings$$.disable_jit = $options$jscomp$42$$.disable_jit;
|
|
5618
5665
|
$settings$$.load_devices = !0;
|
|
5619
5666
|
$settings$$.memory_size = $options$jscomp$42$$.memory_size || 67108864;
|
|
5620
5667
|
$settings$$.vga_memory_size = $options$jscomp$42$$.vga_memory_size || 8388608;
|
|
5621
|
-
$settings$$.boot_order = $
|
|
5668
|
+
$settings$$.boot_order = $add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$;
|
|
5622
5669
|
$settings$$.fastboot = $options$jscomp$42$$.fastboot || !1;
|
|
5623
5670
|
$settings$$.fda = void 0;
|
|
5624
5671
|
$settings$$.fdb = void 0;
|
|
@@ -5630,23 +5677,28 @@ $V86$$module$src$browser$starter$$.prototype.continue_init = async function($emu
|
|
|
5630
5677
|
$settings$$.mac_address_translation = $options$jscomp$42$$.mac_address_translation;
|
|
5631
5678
|
$settings$$.cpuid_level = $options$jscomp$42$$.cpuid_level;
|
|
5632
5679
|
$settings$$.virtio_balloon = $options$jscomp$42$$.virtio_balloon;
|
|
5633
|
-
$settings$$.virtio_console =
|
|
5634
|
-
if ($
|
|
5635
|
-
"fetch" === $
|
|
5636
|
-
this.network_adapter = new $WispNetworkAdapter$$module$src$browser$wisp_network$$($
|
|
5680
|
+
$settings$$.virtio_console = !!$options$jscomp$42$$.virtio_console;
|
|
5681
|
+
if ($add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$ = $options$jscomp$42$$.network_relay_url || $options$jscomp$42$$.net_device && $options$jscomp$42$$.net_device.relay_url) {
|
|
5682
|
+
"fetch" === $add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$ ? this.network_adapter = new $FetchNetworkAdapter$$module$src$browser$fetch_network$$(this.bus, $options$jscomp$42$$.net_device) : "inbrowser" === $add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$ ? this.network_adapter = new $InBrowserNetworkAdapter$$module$src$browser$inbrowser_network$$(this.bus, $options$jscomp$42$$.net_device) : $add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$.startsWith("wisp://") ||
|
|
5683
|
+
$add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$.startsWith("wisps://") ? this.network_adapter = new $WispNetworkAdapter$$module$src$browser$wisp_network$$($add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$, this.bus, $options$jscomp$42$$.net_device) : this.network_adapter = new $NetworkAdapter$$module$src$browser$network$$($add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$, this.bus);
|
|
5637
5684
|
}
|
|
5638
5685
|
$settings$$.net_device = $options$jscomp$42$$.net_device || {type:"ne2k"};
|
|
5639
|
-
$
|
|
5640
|
-
$options$jscomp$42$$.screen_container && ($
|
|
5686
|
+
$add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$ = $options$jscomp$42$$.screen || {};
|
|
5687
|
+
$options$jscomp$42$$.screen_container && ($add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$.container = $options$jscomp$42$$.screen_container);
|
|
5641
5688
|
$options$jscomp$42$$.disable_keyboard || (this.keyboard_adapter = new $KeyboardAdapter$$module$src$browser$keyboard$$(this.bus));
|
|
5642
|
-
$options$jscomp$42$$.disable_mouse || (this.mouse_adapter = new $MouseAdapter$$module$src$browser$mouse$$(this.bus, $
|
|
5643
|
-
this.screen_adapter = $
|
|
5689
|
+
$options$jscomp$42$$.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));
|
|
5690
|
+
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()) : new $DummyScreenAdapter$$module$src$browser$dummy_screen$$($add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$);
|
|
5644
5691
|
$settings$$.screen = this.screen_adapter;
|
|
5645
|
-
$settings$$.screen_options = $
|
|
5646
|
-
$
|
|
5692
|
+
$settings$$.screen_options = $add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$;
|
|
5693
|
+
$settings$$.serial_console = $options$jscomp$42$$.serial_console || {type:"none"};
|
|
5694
|
+
$options$jscomp$42$$.serial_container_xtermjs ? ($settings$$.serial_console.type = "xtermjs", $settings$$.serial_console.container = $options$jscomp$42$$.serial_container_xtermjs) : $options$jscomp$42$$.serial_container && ($settings$$.serial_console.type = "textarea", $settings$$.serial_console.container = $options$jscomp$42$$.serial_container);
|
|
5695
|
+
"xtermjs" === $settings$$.serial_console?.type ? this.serial_adapter = new $SerialAdapterXtermJS$$module$src$browser$serial$$($settings$$.serial_console.container, this.bus, $settings$$.serial_console.xterm_lib || window.Terminal) : "textarea" === $settings$$.serial_console?.type && (this.serial_adapter = new $SerialAdapter$$module$src$browser$serial$$($settings$$.serial_console.container, this.bus));
|
|
5696
|
+
$add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$ = $options$jscomp$42$$.virtio_console && "boolean" === typeof $options$jscomp$42$$.virtio_console ? {type:"none"} : $options$jscomp$42$$.virtio_console;
|
|
5697
|
+
"xtermjs" === $add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$?.type ? this.virtio_console_adapter = new $VirtioConsoleAdapterXtermJS$$module$src$browser$serial$$($add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$.container, this.bus, $add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$.xterm_lib || window.Terminal) : "textarea" === $add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$?.type &&
|
|
5698
|
+
(this.virtio_console_adapter = new $VirtioConsoleAdapter$$module$src$browser$serial$$($add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$.container, this.bus));
|
|
5647
5699
|
$options$jscomp$42$$.disable_speaker || (this.speaker_adapter = new $SpeakerAdapter$$module$src$browser$speaker$$(this.bus));
|
|
5648
5700
|
var $files_to_load$$ = [];
|
|
5649
|
-
$
|
|
5701
|
+
$add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$ = ($name$jscomp$101$$, $file$jscomp$4$$) => {
|
|
5650
5702
|
if ($file$jscomp$4$$) {
|
|
5651
5703
|
if ($file$jscomp$4$$.get && $file$jscomp$4$$.set && $file$jscomp$4$$.load) {
|
|
5652
5704
|
$files_to_load$$.push({name:$name$jscomp$101$$, loadable:$file$jscomp$4$$, });
|
|
@@ -5662,17 +5714,17 @@ $V86$$module$src$browser$starter$$.prototype.continue_init = async function($emu
|
|
|
5662
5714
|
}
|
|
5663
5715
|
};
|
|
5664
5716
|
$options$jscomp$42$$.state && console.warn("Warning: Unknown option 'state'. Did you mean 'initial_state'?");
|
|
5665
|
-
$
|
|
5666
|
-
$
|
|
5667
|
-
$
|
|
5668
|
-
$
|
|
5669
|
-
$
|
|
5670
|
-
$
|
|
5671
|
-
$
|
|
5672
|
-
$
|
|
5673
|
-
$
|
|
5674
|
-
$
|
|
5675
|
-
$
|
|
5717
|
+
$add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$("bios", $options$jscomp$42$$.bios);
|
|
5718
|
+
$add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$("vga_bios", $options$jscomp$42$$.vga_bios);
|
|
5719
|
+
$add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$("cdrom", $options$jscomp$42$$.cdrom);
|
|
5720
|
+
$add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$("hda", $options$jscomp$42$$.hda);
|
|
5721
|
+
$add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$("hdb", $options$jscomp$42$$.hdb);
|
|
5722
|
+
$add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$("fda", $options$jscomp$42$$.fda);
|
|
5723
|
+
$add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$("fdb", $options$jscomp$42$$.fdb);
|
|
5724
|
+
$add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$("initial_state", $options$jscomp$42$$.initial_state);
|
|
5725
|
+
$add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$("multiboot", $options$jscomp$42$$.multiboot);
|
|
5726
|
+
$add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$("bzimage", $options$jscomp$42$$.bzimage);
|
|
5727
|
+
$add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$("initrd", $options$jscomp$42$$.initrd);
|
|
5676
5728
|
if ($options$jscomp$42$$.filesystem && $options$jscomp$42$$.filesystem.handle9p) {
|
|
5677
5729
|
$settings$$.handle9p = $options$jscomp$42$$.filesystem.handle9p;
|
|
5678
5730
|
} else {
|
|
@@ -5680,19 +5732,19 @@ $V86$$module$src$browser$starter$$.prototype.continue_init = async function($emu
|
|
|
5680
5732
|
$settings$$.proxy9p = $options$jscomp$42$$.filesystem.proxy_url;
|
|
5681
5733
|
} else {
|
|
5682
5734
|
if ($options$jscomp$42$$.filesystem) {
|
|
5683
|
-
$
|
|
5735
|
+
$add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$ = $options$jscomp$42$$.filesystem.basefs;
|
|
5684
5736
|
var $base_url$$ = $options$jscomp$42$$.filesystem.baseurl;
|
|
5685
5737
|
let $file_storage$jscomp$1$$ = new $MemoryFileStorage$$module$src$browser$filestorage$$;
|
|
5686
5738
|
$base_url$$ && ($file_storage$jscomp$1$$ = new $ServerFileStorageWrapper$$module$src$browser$filestorage$$($file_storage$jscomp$1$$, $base_url$$, this.zstd_decompress.bind(this)));
|
|
5687
5739
|
$settings$$.fs9p = this.fs9p = new $FS$$module$lib$filesystem$$($file_storage$jscomp$1$$);
|
|
5688
|
-
if ($
|
|
5740
|
+
if ($add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$) {
|
|
5689
5741
|
$dbg_assert$$module$src$log$$($base_url$$, "Filesystem: baseurl must be specified");
|
|
5690
|
-
if ("object" === typeof $
|
|
5691
|
-
var $size$jscomp$35$$ = $
|
|
5692
|
-
$
|
|
5742
|
+
if ("object" === typeof $add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$) {
|
|
5743
|
+
var $size$jscomp$35$$ = $add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$.size;
|
|
5744
|
+
$add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$ = $add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$.url;
|
|
5693
5745
|
}
|
|
5694
|
-
$dbg_assert$$module$src$log$$("string" === typeof $
|
|
5695
|
-
$files_to_load$$.push({name:"fs9p_json", url:$
|
|
5746
|
+
$dbg_assert$$module$src$log$$("string" === typeof $add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$);
|
|
5747
|
+
$files_to_load$$.push({name:"fs9p_json", url:$add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$, size:$size$jscomp$35$$, as_json:!0, });
|
|
5696
5748
|
}
|
|
5697
5749
|
}
|
|
5698
5750
|
}
|
|
@@ -5743,7 +5795,7 @@ $V86$$module$src$browser$starter$$.prototype.zstd_decompress_worker = async func
|
|
|
5743
5795
|
$e$jscomp$43_exports$jscomp$1$$.zstd_free_ctx($env$jscomp$1_zstd_context$$);
|
|
5744
5796
|
postMessage({result:$result$jscomp$11$$, id:$id$jscomp$21$$}, [$result$jscomp$11$$]);
|
|
5745
5797
|
} else {
|
|
5746
|
-
$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
|
|
5798
|
+
$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$$)])),
|
|
5747
5799
|
$env$jscomp$1_zstd_context$$.__indirect_function_table = new WebAssembly.Table({element:"anyfunc", initial:1024}), $env$jscomp$1_zstd_context$$.abort = () => {
|
|
5748
5800
|
throw Error("zstd worker aborted");
|
|
5749
5801
|
}, $env$jscomp$1_zstd_context$$.log_from_wasm = $env$jscomp$1_zstd_context$$.console_log_from_wasm = ($off$$, $len$jscomp$25$$) => {
|
|
@@ -5798,6 +5850,7 @@ $V86$$module$src$browser$starter$$.prototype.destroy = async function() {
|
|
|
5798
5850
|
this.screen_adapter && this.screen_adapter.destroy();
|
|
5799
5851
|
this.serial_adapter && this.serial_adapter.destroy();
|
|
5800
5852
|
this.speaker_adapter && this.speaker_adapter.destroy();
|
|
5853
|
+
this.virtio_console_adapter && this.virtio_console_adapter.destroy();
|
|
5801
5854
|
};
|
|
5802
5855
|
$V86$$module$src$browser$starter$$.prototype.restart = function() {
|
|
5803
5856
|
this.v86.restart();
|
|
@@ -6049,11 +6102,16 @@ $V86$$module$src$browser$starter$$.prototype.read_memory = function($offset$jsco
|
|
|
6049
6102
|
$V86$$module$src$browser$starter$$.prototype.write_memory = function($blob$jscomp$13$$, $offset$jscomp$63$$) {
|
|
6050
6103
|
this.v86.cpu.write_blob($blob$jscomp$13$$, $offset$jscomp$63$$);
|
|
6051
6104
|
};
|
|
6052
|
-
$V86$$module$src$browser$starter$$.prototype.set_serial_container_xtermjs = function($element$jscomp$
|
|
6105
|
+
$V86$$module$src$browser$starter$$.prototype.set_serial_container_xtermjs = function($element$jscomp$14$$, $xterm_lib$jscomp$5$$ = window.Terminal) {
|
|
6053
6106
|
this.serial_adapter && this.serial_adapter.destroy && this.serial_adapter.destroy();
|
|
6054
|
-
this.serial_adapter = new $SerialAdapterXtermJS$$module$src$browser$serial$$($element$jscomp$
|
|
6107
|
+
this.serial_adapter = new $SerialAdapterXtermJS$$module$src$browser$serial$$($element$jscomp$14$$, this.bus, $xterm_lib$jscomp$5$$);
|
|
6055
6108
|
this.serial_adapter.show();
|
|
6056
6109
|
};
|
|
6110
|
+
$V86$$module$src$browser$starter$$.prototype.set_virtio_console_container_xtermjs = function($element$jscomp$15$$, $xterm_lib$jscomp$6$$ = window.Terminal) {
|
|
6111
|
+
this.virtio_console_adapter && this.virtio_console_adapter.destroy && this.virtio_console_adapter.destroy();
|
|
6112
|
+
this.virtio_console_adapter = new $VirtioConsoleAdapterXtermJS$$module$src$browser$serial$$($element$jscomp$15$$, this.bus, $xterm_lib$jscomp$6$$);
|
|
6113
|
+
this.virtio_console_adapter.show();
|
|
6114
|
+
};
|
|
6057
6115
|
$V86$$module$src$browser$starter$$.prototype.get_instruction_stats = function() {
|
|
6058
6116
|
var $JSCompiler_inline_result$jscomp$inline_371_cpu$jscomp$inline_363$$ = this.v86.cpu;
|
|
6059
6117
|
var $JSCompiler_inline_result$jscomp$inline_364_text$jscomp$inline_365$$ = "";
|
|
@@ -6094,15 +6152,15 @@ function $FileNotFoundError$$module$src$browser$starter$$($message$jscomp$32$$)
|
|
|
6094
6152
|
}
|
|
6095
6153
|
$FileNotFoundError$$module$src$browser$starter$$.prototype = Error.prototype;
|
|
6096
6154
|
"undefined" !== typeof module && "undefined" !== typeof module.exports ? module.exports.V86 = $V86$$module$src$browser$starter$$ : "undefined" !== typeof window ? window.V86 = $V86$$module$src$browser$starter$$ : "function" === typeof importScripts && (self.V86 = $V86$$module$src$browser$starter$$);
|
|
6097
|
-
function $v86$$module$src$main$$($bus$jscomp$
|
|
6155
|
+
function $v86$$module$src$main$$($bus$jscomp$19$$, $wasm$jscomp$1$$) {
|
|
6098
6156
|
this.stopping = this.running = !1;
|
|
6099
6157
|
this.idle = !0;
|
|
6100
6158
|
this.tick_counter = 0;
|
|
6101
6159
|
this.worker = null;
|
|
6102
|
-
this.cpu = new $CPU$$module$src$cpu$$($bus$jscomp$
|
|
6160
|
+
this.cpu = new $CPU$$module$src$cpu$$($bus$jscomp$19$$, $wasm$jscomp$1$$, () => {
|
|
6103
6161
|
this.idle && this.next_tick(0);
|
|
6104
6162
|
});
|
|
6105
|
-
this.bus = $bus$jscomp$
|
|
6163
|
+
this.bus = $bus$jscomp$19$$;
|
|
6106
6164
|
this.register_yield();
|
|
6107
6165
|
}
|
|
6108
6166
|
$v86$$module$src$main$$.prototype.run = function() {
|
|
@@ -6331,8 +6389,8 @@ $ACPI$$module$src$acpi$$.prototype.set_state = function($state$jscomp$29$$) {
|
|
|
6331
6389
|
this.pm1_enable = $state$jscomp$29$$[2];
|
|
6332
6390
|
this.gpe = $state$jscomp$29$$[3];
|
|
6333
6391
|
};
|
|
6334
|
-
function $UART$$module$src$uart$$($cpu$jscomp$15_io$jscomp$2$$, $port$jscomp$2$$, $bus$jscomp$
|
|
6335
|
-
this.bus = $bus$jscomp$
|
|
6392
|
+
function $UART$$module$src$uart$$($cpu$jscomp$15_io$jscomp$2$$, $port$jscomp$2$$, $bus$jscomp$20$$) {
|
|
6393
|
+
this.bus = $bus$jscomp$20$$;
|
|
6336
6394
|
this.cpu = $cpu$jscomp$15_io$jscomp$2$$;
|
|
6337
6395
|
this.ints = 4;
|
|
6338
6396
|
this.line_control = this.baud_rate = 0;
|
|
@@ -6604,47 +6662,47 @@ $PCI$$module$src$pci$$.prototype.set_state = function($state$jscomp$33$$) {
|
|
|
6604
6662
|
this.pci_status.set($state$jscomp$33$$[259]);
|
|
6605
6663
|
};
|
|
6606
6664
|
$PCI$$module$src$pci$$.prototype.pci_query = function() {
|
|
6607
|
-
var $bdf$$ = this.pci_addr[2] << 8 | this.pci_addr[1], $addr$jscomp$
|
|
6665
|
+
var $bdf$$ = this.pci_addr[2] << 8 | this.pci_addr[1], $addr$jscomp$24$$ = this.pci_addr[0] & 252, $dev_device$jscomp$5$$ = $bdf$$ >> 3 & 31;
|
|
6608
6666
|
var $dbg_line$$ = "query enabled=" + (this.pci_addr[3] >> 7) + (" bdf=" + $h$$module$src$lib$$($bdf$$, 4));
|
|
6609
6667
|
$dbg_line$$ += " dev=" + $h$$module$src$lib$$($dev_device$jscomp$5$$, 2);
|
|
6610
|
-
$dbg_line$$ += " addr=" + $h$$module$src$lib$$($addr$jscomp$
|
|
6668
|
+
$dbg_line$$ += " addr=" + $h$$module$src$lib$$($addr$jscomp$24$$, 2);
|
|
6611
6669
|
$dev_device$jscomp$5$$ = this.device_spaces[$bdf$$];
|
|
6612
|
-
void 0 !== $dev_device$jscomp$5$$ ? (this.pci_status32[0] = -2147483648, this.pci_response32[0] = $addr$jscomp$
|
|
6670
|
+
void 0 !== $dev_device$jscomp$5$$ ? (this.pci_status32[0] = -2147483648, this.pci_response32[0] = $addr$jscomp$24$$ < $dev_device$jscomp$5$$.byteLength ? $dev_device$jscomp$5$$[$addr$jscomp$24$$ >> 2] : 0, $dbg_line$$ += " " + $h$$module$src$lib$$(this.pci_addr32[0] >>> 0, 8) + " -> " + $h$$module$src$lib$$(this.pci_response32[0] >>> 0, 8), $addr$jscomp$24$$ >= $dev_device$jscomp$5$$.byteLength && ($dbg_line$$ += " (undef)"), $dbg_line$$ += " (" + this.devices[$bdf$$].name + ")", $dbg_log$$module$src$log$$($dbg_line$$,
|
|
6613
6671
|
2048)) : (this.pci_response32[0] = -1, this.pci_status32[0] = 0);
|
|
6614
6672
|
};
|
|
6615
|
-
$PCI$$module$src$pci$$.prototype.pci_write8 = function($addr$jscomp$
|
|
6616
|
-
var $bdf$jscomp$1$$ = $addr$jscomp$
|
|
6617
|
-
$addr$jscomp$
|
|
6673
|
+
$PCI$$module$src$pci$$.prototype.pci_write8 = function($addr$jscomp$25_address$jscomp$19$$, $written$$) {
|
|
6674
|
+
var $bdf$jscomp$1$$ = $addr$jscomp$25_address$jscomp$19$$ >> 8 & 65535;
|
|
6675
|
+
$addr$jscomp$25_address$jscomp$19$$ &= 255;
|
|
6618
6676
|
var $space$jscomp$1$$ = new Uint8Array(this.device_spaces[$bdf$jscomp$1$$].buffer), $device$jscomp$6$$ = this.devices[$bdf$jscomp$1$$];
|
|
6619
|
-
$space$jscomp$1$$ && ($dbg_assert$$module$src$log$$(!(16 <= $addr$jscomp$
|
|
6620
|
-
4) + " value=" + $h$$module$src$lib$$($written$$, 2), 2048), $space$jscomp$1$$[$addr$jscomp$
|
|
6677
|
+
$space$jscomp$1$$ && ($dbg_assert$$module$src$log$$(!(16 <= $addr$jscomp$25_address$jscomp$19$$ && 44 > $addr$jscomp$25_address$jscomp$19$$ || 48 <= $addr$jscomp$25_address$jscomp$19$$ && 52 > $addr$jscomp$25_address$jscomp$19$$), "PCI: Expected 32-bit write, got 8-bit (addr: " + $h$$module$src$lib$$($addr$jscomp$25_address$jscomp$19$$) + ")"), $dbg_log$$module$src$log$$("PCI write8 dev=" + $h$$module$src$lib$$($bdf$jscomp$1$$ >> 3, 2) + " (" + $device$jscomp$6$$.name + ") addr=" + $h$$module$src$lib$$($addr$jscomp$25_address$jscomp$19$$,
|
|
6678
|
+
4) + " value=" + $h$$module$src$lib$$($written$$, 2), 2048), $space$jscomp$1$$[$addr$jscomp$25_address$jscomp$19$$] = $written$$);
|
|
6621
6679
|
};
|
|
6622
|
-
$PCI$$module$src$pci$$.prototype.pci_write16 = function($addr$jscomp$
|
|
6623
|
-
$dbg_assert$$module$src$log$$(0 === ($addr$jscomp$
|
|
6624
|
-
var $bdf$jscomp$2$$ = $addr$jscomp$
|
|
6625
|
-
$addr$jscomp$
|
|
6680
|
+
$PCI$$module$src$pci$$.prototype.pci_write16 = function($addr$jscomp$26_address$jscomp$20$$, $written$jscomp$1$$) {
|
|
6681
|
+
$dbg_assert$$module$src$log$$(0 === ($addr$jscomp$26_address$jscomp$20$$ & 1));
|
|
6682
|
+
var $bdf$jscomp$2$$ = $addr$jscomp$26_address$jscomp$20$$ >> 8 & 65535;
|
|
6683
|
+
$addr$jscomp$26_address$jscomp$20$$ &= 255;
|
|
6626
6684
|
var $space$jscomp$2$$ = new Uint16Array(this.device_spaces[$bdf$jscomp$2$$].buffer), $device$jscomp$7$$ = this.devices[$bdf$jscomp$2$$];
|
|
6627
|
-
$space$jscomp$2$$ && (16 <= $addr$jscomp$
|
|
6628
|
-
$dbg_log$$module$src$log$$("PCI writ16 dev=" + $h$$module$src$lib$$($bdf$jscomp$2$$ >> 3, 2) + " (" + $device$jscomp$7$$.name + ") addr=" + $h$$module$src$lib$$($addr$jscomp$
|
|
6685
|
+
$space$jscomp$2$$ && (16 <= $addr$jscomp$26_address$jscomp$20$$ && 44 > $addr$jscomp$26_address$jscomp$20$$ ? $dbg_log$$module$src$log$$("Warning: PCI: Expected 32-bit write, got 16-bit (addr: " + $h$$module$src$lib$$($addr$jscomp$26_address$jscomp$20$$) + ")") : ($dbg_assert$$module$src$log$$(!(48 <= $addr$jscomp$26_address$jscomp$20$$ && 52 > $addr$jscomp$26_address$jscomp$20$$), "PCI: Expected 32-bit write, got 16-bit (addr: " + $h$$module$src$lib$$($addr$jscomp$26_address$jscomp$20$$) + ")"),
|
|
6686
|
+
$dbg_log$$module$src$log$$("PCI writ16 dev=" + $h$$module$src$lib$$($bdf$jscomp$2$$ >> 3, 2) + " (" + $device$jscomp$7$$.name + ") addr=" + $h$$module$src$lib$$($addr$jscomp$26_address$jscomp$20$$, 4) + " value=" + $h$$module$src$lib$$($written$jscomp$1$$, 4), 2048), $space$jscomp$2$$[$addr$jscomp$26_address$jscomp$20$$ >>> 1] = $written$jscomp$1$$));
|
|
6629
6687
|
};
|
|
6630
|
-
$PCI$$module$src$pci$$.prototype.pci_write32 = function($addr$jscomp$
|
|
6631
|
-
$dbg_assert$$module$src$log$$(0 === ($addr$jscomp$
|
|
6632
|
-
var $bdf$jscomp$3_space_addr$$ = $addr$jscomp$
|
|
6633
|
-
$addr$jscomp$
|
|
6688
|
+
$PCI$$module$src$pci$$.prototype.pci_write32 = function($addr$jscomp$27_address$jscomp$21$$, $written$jscomp$2$$) {
|
|
6689
|
+
$dbg_assert$$module$src$log$$(0 === ($addr$jscomp$27_address$jscomp$21$$ & 3));
|
|
6690
|
+
var $bdf$jscomp$3_space_addr$$ = $addr$jscomp$27_address$jscomp$21$$ >> 8 & 65535;
|
|
6691
|
+
$addr$jscomp$27_address$jscomp$21$$ &= 255;
|
|
6634
6692
|
var $space$jscomp$3$$ = this.device_spaces[$bdf$jscomp$3_space_addr$$], $device$jscomp$8_from$jscomp$1_type$jscomp$153$$ = this.devices[$bdf$jscomp$3_space_addr$$];
|
|
6635
6693
|
if ($space$jscomp$3$$) {
|
|
6636
|
-
if (16 <= $addr$jscomp$
|
|
6637
|
-
var $bar_nr$jscomp$1_original_bar_to$jscomp$1$$ = $addr$jscomp$
|
|
6638
|
-
$dbg_log$$module$src$log$$("BAR" + $bar_nr$jscomp$1_original_bar_to$jscomp$1$$ + " exists=" + ($bar$jscomp$1$$ ? "y" : "n") + " changed from " + $h$$module$src$lib$$($space$jscomp$3$$[$addr$jscomp$
|
|
6639
|
-
$bar$jscomp$1$$ ? ($dbg_assert$$module$src$log$$(!($bar$jscomp$1$$.size & $bar$jscomp$1$$.size - 1), "bar size should be power of 2"), $bdf$jscomp$3_space_addr$$ = $addr$jscomp$
|
|
6694
|
+
if (16 <= $addr$jscomp$27_address$jscomp$21$$ && 40 > $addr$jscomp$27_address$jscomp$21$$) {
|
|
6695
|
+
var $bar_nr$jscomp$1_original_bar_to$jscomp$1$$ = $addr$jscomp$27_address$jscomp$21$$ - 16 >> 2, $bar$jscomp$1$$ = $device$jscomp$8_from$jscomp$1_type$jscomp$153$$.pci_bars[$bar_nr$jscomp$1_original_bar_to$jscomp$1$$];
|
|
6696
|
+
$dbg_log$$module$src$log$$("BAR" + $bar_nr$jscomp$1_original_bar_to$jscomp$1$$ + " exists=" + ($bar$jscomp$1$$ ? "y" : "n") + " changed from " + $h$$module$src$lib$$($space$jscomp$3$$[$addr$jscomp$27_address$jscomp$21$$ >> 2]) + " to " + $h$$module$src$lib$$($written$jscomp$2$$ >>> 0) + " dev=" + $h$$module$src$lib$$($bdf$jscomp$3_space_addr$$ >> 3, 2) + " (" + $device$jscomp$8_from$jscomp$1_type$jscomp$153$$.name + ") ", 2048);
|
|
6697
|
+
$bar$jscomp$1$$ ? ($dbg_assert$$module$src$log$$(!($bar$jscomp$1$$.size & $bar$jscomp$1$$.size - 1), "bar size should be power of 2"), $bdf$jscomp$3_space_addr$$ = $addr$jscomp$27_address$jscomp$21$$ >> 2, $device$jscomp$8_from$jscomp$1_type$jscomp$153$$ = $space$jscomp$3$$[$bdf$jscomp$3_space_addr$$] & 1, -1 === ($written$jscomp$2$$ | 3 | $bar$jscomp$1$$.size - 1) ? ($written$jscomp$2$$ = ~($bar$jscomp$1$$.size - 1) | $device$jscomp$8_from$jscomp$1_type$jscomp$153$$, 0 === $device$jscomp$8_from$jscomp$1_type$jscomp$153$$ &&
|
|
6640
6698
|
($space$jscomp$3$$[$bdf$jscomp$3_space_addr$$] = $written$jscomp$2$$)) : 0 === $device$jscomp$8_from$jscomp$1_type$jscomp$153$$ && ($bar_nr$jscomp$1_original_bar_to$jscomp$1$$ = $bar$jscomp$1$$.original_bar, ($written$jscomp$2$$ & -16) !== ($bar_nr$jscomp$1_original_bar_to$jscomp$1$$ & -16) && $dbg_log$$module$src$log$$("Warning: Changing memory bar not supported, ignored", 2048), $space$jscomp$3$$[$bdf$jscomp$3_space_addr$$] = $bar_nr$jscomp$1_original_bar_to$jscomp$1$$), 1 === $device$jscomp$8_from$jscomp$1_type$jscomp$153$$ &&
|
|
6641
6699
|
($dbg_assert$$module$src$log$$(1 === $device$jscomp$8_from$jscomp$1_type$jscomp$153$$), $device$jscomp$8_from$jscomp$1_type$jscomp$153$$ = $space$jscomp$3$$[$bdf$jscomp$3_space_addr$$] & 65534, $bar_nr$jscomp$1_original_bar_to$jscomp$1$$ = $written$jscomp$2$$ & 65534, $dbg_log$$module$src$log$$("io bar changed from " + $h$$module$src$lib$$($device$jscomp$8_from$jscomp$1_type$jscomp$153$$ >>> 0, 8) + " to " + $h$$module$src$lib$$($bar_nr$jscomp$1_original_bar_to$jscomp$1$$ >>> 0, 8) + " size=" +
|
|
6642
|
-
$bar$jscomp$1$$.size, 2048), this.set_io_bars($bar$jscomp$1$$, $device$jscomp$8_from$jscomp$1_type$jscomp$153$$, $bar_nr$jscomp$1_original_bar_to$jscomp$1$$), $space$jscomp$3$$[$bdf$jscomp$3_space_addr$$] = $written$jscomp$2$$ | 1)) : $space$jscomp$3$$[$addr$jscomp$
|
|
6643
|
-
$dbg_log$$module$src$log$$("BAR effective value: " + $h$$module$src$lib$$($space$jscomp$3$$[$addr$jscomp$
|
|
6700
|
+
$bar$jscomp$1$$.size, 2048), this.set_io_bars($bar$jscomp$1$$, $device$jscomp$8_from$jscomp$1_type$jscomp$153$$, $bar_nr$jscomp$1_original_bar_to$jscomp$1$$), $space$jscomp$3$$[$bdf$jscomp$3_space_addr$$] = $written$jscomp$2$$ | 1)) : $space$jscomp$3$$[$addr$jscomp$27_address$jscomp$21$$ >> 2] = 0;
|
|
6701
|
+
$dbg_log$$module$src$log$$("BAR effective value: " + $h$$module$src$lib$$($space$jscomp$3$$[$addr$jscomp$27_address$jscomp$21$$ >> 2] >>> 0), 2048);
|
|
6644
6702
|
} else {
|
|
6645
|
-
48 === $addr$jscomp$
|
|
6646
|
-
0 : $device$jscomp$8_from$jscomp$1_type$jscomp$153$$.pci_rom_address | 0 : 0) : 4 === $addr$jscomp$
|
|
6647
|
-
3, 2) + " (" + $device$jscomp$8_from$jscomp$1_type$jscomp$153$$.name + ") addr=" + $h$$module$src$lib$$($addr$jscomp$
|
|
6703
|
+
48 === $addr$jscomp$27_address$jscomp$21$$ ? ($dbg_log$$module$src$log$$("PCI write rom address dev=" + $h$$module$src$lib$$($bdf$jscomp$3_space_addr$$ >> 3, 2) + " (" + $device$jscomp$8_from$jscomp$1_type$jscomp$153$$.name + ") value=" + $h$$module$src$lib$$($written$jscomp$2$$ >>> 0, 8), 2048), $space$jscomp$3$$[$addr$jscomp$27_address$jscomp$21$$ >> 2] = $device$jscomp$8_from$jscomp$1_type$jscomp$153$$.pci_rom_size ? -1 === ($written$jscomp$2$$ | 2047) ? -$device$jscomp$8_from$jscomp$1_type$jscomp$153$$.pci_rom_size |
|
|
6704
|
+
0 : $device$jscomp$8_from$jscomp$1_type$jscomp$153$$.pci_rom_address | 0 : 0) : 4 === $addr$jscomp$27_address$jscomp$21$$ ? $dbg_log$$module$src$log$$("PCI write dev=" + $h$$module$src$lib$$($bdf$jscomp$3_space_addr$$ >> 3, 2) + " (" + $device$jscomp$8_from$jscomp$1_type$jscomp$153$$.name + ") addr=" + $h$$module$src$lib$$($addr$jscomp$27_address$jscomp$21$$, 4) + " value=" + $h$$module$src$lib$$($written$jscomp$2$$ >>> 0, 8), 2048) : ($dbg_log$$module$src$log$$("PCI write dev=" + $h$$module$src$lib$$($bdf$jscomp$3_space_addr$$ >>
|
|
6705
|
+
3, 2) + " (" + $device$jscomp$8_from$jscomp$1_type$jscomp$153$$.name + ") addr=" + $h$$module$src$lib$$($addr$jscomp$27_address$jscomp$21$$, 4) + " value=" + $h$$module$src$lib$$($written$jscomp$2$$ >>> 0, 8), 2048), $space$jscomp$3$$[$addr$jscomp$27_address$jscomp$21$$ >>> 2] = $written$jscomp$2$$);
|
|
6648
6706
|
}
|
|
6649
6707
|
}
|
|
6650
6708
|
};
|
|
@@ -6742,13 +6800,13 @@ function $translate_mac_address$$module$src$ne2k$$($arp_packet_ipv4_packet_packe
|
|
|
6742
6800
|
function $format_mac$$module$src$ne2k$$($mac$jscomp$2$$) {
|
|
6743
6801
|
return [$mac$jscomp$2$$[0].toString(16).padStart(2, "0"), $mac$jscomp$2$$[1].toString(16).padStart(2, "0"), $mac$jscomp$2$$[2].toString(16).padStart(2, "0"), $mac$jscomp$2$$[3].toString(16).padStart(2, "0"), $mac$jscomp$2$$[4].toString(16).padStart(2, "0"), $mac$jscomp$2$$[5].toString(16).padStart(2, "0"), ].join(":");
|
|
6744
6802
|
}
|
|
6745
|
-
function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$
|
|
6803
|
+
function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$21_i$jscomp$78_io$jscomp$3$$, $preserve_mac_from_state_image$$, $mac_address_translation$$, $id$jscomp$23$$) {
|
|
6746
6804
|
this.cpu = $cpu$jscomp$17$$;
|
|
6747
6805
|
this.pci = $cpu$jscomp$17$$.devices.pci;
|
|
6748
6806
|
this.id = $id$jscomp$23$$ || 0;
|
|
6749
6807
|
this.preserve_mac_from_state_image = $preserve_mac_from_state_image$$;
|
|
6750
6808
|
this.mac_address_translation = $mac_address_translation$$;
|
|
6751
|
-
this.bus = $bus$jscomp$
|
|
6809
|
+
this.bus = $bus$jscomp$21_i$jscomp$78_io$jscomp$3$$;
|
|
6752
6810
|
this.bus.register("net" + this.id + "-receive", function($data$jscomp$170$$) {
|
|
6753
6811
|
this.receive($data$jscomp$170$$);
|
|
6754
6812
|
}, this);
|
|
@@ -6767,8 +6825,8 @@ function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$19_i$jscomp$78_i
|
|
|
6767
6825
|
this.bus.send("net" + this.id + "-mac", $format_mac$$module$src$ne2k$$(this.mac));
|
|
6768
6826
|
this.mar = Uint8Array.of(255, 255, 255, 255, 255, 255, 255, 255);
|
|
6769
6827
|
this.mac_address_in_state = null;
|
|
6770
|
-
for ($bus$jscomp$
|
|
6771
|
-
this.memory[$bus$jscomp$
|
|
6828
|
+
for ($bus$jscomp$21_i$jscomp$78_io$jscomp$3$$ = 0; 6 > $bus$jscomp$21_i$jscomp$78_io$jscomp$3$$; $bus$jscomp$21_i$jscomp$78_io$jscomp$3$$++) {
|
|
6829
|
+
this.memory[$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$ << 1] = this.memory[$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$ << 1 | 1] = this.mac[$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$];
|
|
6772
6830
|
}
|
|
6773
6831
|
this.memory[28] = this.memory[29] = 87;
|
|
6774
6832
|
this.memory[30] = this.memory[31] = 87;
|
|
@@ -6777,22 +6835,22 @@ function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$19_i$jscomp$78_i
|
|
|
6777
6835
|
this.pstart = 64;
|
|
6778
6836
|
this.pstop = 128;
|
|
6779
6837
|
this.boundary = this.curpg = 76;
|
|
6780
|
-
$bus$jscomp$
|
|
6781
|
-
$bus$jscomp$
|
|
6838
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$ = $cpu$jscomp$17$$.io;
|
|
6839
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 0, this, function() {
|
|
6782
6840
|
$dbg_log$$module$src$log$$("Read cmd", 1048576);
|
|
6783
6841
|
return this.cr;
|
|
6784
6842
|
}, function() {
|
|
6785
6843
|
$dbg_log$$module$src$log$$("Read16 cmd", 1048576);
|
|
6786
6844
|
return this.cr;
|
|
6787
6845
|
});
|
|
6788
|
-
$bus$jscomp$
|
|
6846
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_write(this.port | 0, this, function($data$jscomp$171_data_byte$jscomp$9_start$jscomp$29$$) {
|
|
6789
6847
|
this.cr = $data$jscomp$171_data_byte$jscomp$9_start$jscomp$29$$;
|
|
6790
6848
|
$dbg_log$$module$src$log$$("Write command: " + $h$$module$src$lib$$($data$jscomp$171_data_byte$jscomp$9_start$jscomp$29$$, 2) + " newpg=" + (this.cr >> 6) + " txcr=" + $h$$module$src$lib$$(this.txcr, 2), 1048576);
|
|
6791
6849
|
this.cr & 1 || ($data$jscomp$171_data_byte$jscomp$9_start$jscomp$29$$ & 24 && 0 === this.rcnt && this.do_interrupt(64), $data$jscomp$171_data_byte$jscomp$9_start$jscomp$29$$ & 4 && ($data$jscomp$171_data_byte$jscomp$9_start$jscomp$29$$ = this.tpsr << 8, $data$jscomp$171_data_byte$jscomp$9_start$jscomp$29$$ = this.memory.subarray($data$jscomp$171_data_byte$jscomp$9_start$jscomp$29$$, $data$jscomp$171_data_byte$jscomp$9_start$jscomp$29$$ + this.tcnt), this.mac_address_in_state && ($data$jscomp$171_data_byte$jscomp$9_start$jscomp$29$$ =
|
|
6792
6850
|
new Uint8Array($data$jscomp$171_data_byte$jscomp$9_start$jscomp$29$$), $translate_mac_address$$module$src$ne2k$$($data$jscomp$171_data_byte$jscomp$9_start$jscomp$29$$, this.mac_address_in_state, this.mac)), this.bus.send("net" + this.id + "-send", $data$jscomp$171_data_byte$jscomp$9_start$jscomp$29$$), this.bus.send("eth-transmit-end", [$data$jscomp$171_data_byte$jscomp$9_start$jscomp$29$$.length]), this.cr &= -5, this.do_interrupt(2), $dbg_log$$module$src$log$$("Command: Transfer. length=" +
|
|
6793
6851
|
$h$$module$src$lib$$($data$jscomp$171_data_byte$jscomp$9_start$jscomp$29$$.byteLength), 1048576)));
|
|
6794
6852
|
});
|
|
6795
|
-
$bus$jscomp$
|
|
6853
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 13, this, function() {
|
|
6796
6854
|
var $pg$$ = this.get_page();
|
|
6797
6855
|
if (1 === $pg$$) {
|
|
6798
6856
|
return $dbg_log$$module$src$log$$("Read mar5", 1048576), this.mar[5];
|
|
@@ -6800,7 +6858,7 @@ function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$19_i$jscomp$78_i
|
|
|
6800
6858
|
$dbg_log$$module$src$log$$("Read counter0 pg=" + $pg$$, 1048576);
|
|
6801
6859
|
return 0;
|
|
6802
6860
|
});
|
|
6803
|
-
$bus$jscomp$
|
|
6861
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 14, this, function() {
|
|
6804
6862
|
var $pg$jscomp$1$$ = this.get_page();
|
|
6805
6863
|
if (1 === $pg$jscomp$1$$) {
|
|
6806
6864
|
return $dbg_log$$module$src$log$$("Read mar6", 1048576), this.mar[6];
|
|
@@ -6811,7 +6869,7 @@ function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$19_i$jscomp$78_i
|
|
|
6811
6869
|
$dbg_log$$module$src$log$$("Read16 counter1 pg=" + this.get_page(), 1048576);
|
|
6812
6870
|
return 0;
|
|
6813
6871
|
});
|
|
6814
|
-
$bus$jscomp$
|
|
6872
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 15, this, function() {
|
|
6815
6873
|
var $pg$jscomp$2$$ = this.get_page();
|
|
6816
6874
|
if (1 === $pg$jscomp$2$$) {
|
|
6817
6875
|
return $dbg_log$$module$src$log$$("Read mar7", 1048576), this.mar[7];
|
|
@@ -6819,17 +6877,17 @@ function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$19_i$jscomp$78_i
|
|
|
6819
6877
|
$dbg_log$$module$src$log$$("Read counter2 pg=" + $pg$jscomp$2$$, 1048576);
|
|
6820
6878
|
return 0;
|
|
6821
6879
|
});
|
|
6822
|
-
$bus$jscomp$
|
|
6880
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 31, this, function() {
|
|
6823
6881
|
this.get_page();
|
|
6824
6882
|
$dbg_log$$module$src$log$$("Read reset", 1048576);
|
|
6825
6883
|
this.do_interrupt(128);
|
|
6826
6884
|
return 0;
|
|
6827
6885
|
});
|
|
6828
|
-
$bus$jscomp$
|
|
6886
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_write(this.port | 31, this, function($data_byte$jscomp$10$$) {
|
|
6829
6887
|
this.get_page();
|
|
6830
6888
|
$dbg_log$$module$src$log$$("Write reset: " + $h$$module$src$lib$$($data_byte$jscomp$10$$, 2), 1048576);
|
|
6831
6889
|
});
|
|
6832
|
-
$bus$jscomp$
|
|
6890
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 1, this, function() {
|
|
6833
6891
|
var $pg$jscomp$5$$ = this.get_page();
|
|
6834
6892
|
if (0 === $pg$jscomp$5$$) {
|
|
6835
6893
|
return this.pstart;
|
|
@@ -6844,12 +6902,12 @@ function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$19_i$jscomp$78_i
|
|
|
6844
6902
|
$dbg_assert$$module$src$log$$(!1);
|
|
6845
6903
|
return 0;
|
|
6846
6904
|
});
|
|
6847
|
-
$bus$jscomp$
|
|
6905
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_write(this.port | 1, this, function($data_byte$jscomp$11$$) {
|
|
6848
6906
|
var $pg$jscomp$6$$ = this.get_page();
|
|
6849
6907
|
0 === $pg$jscomp$6$$ ? ($dbg_log$$module$src$log$$("start page: " + $h$$module$src$lib$$($data_byte$jscomp$11$$, 2), 1048576), this.pstart = $data_byte$jscomp$11$$) : 1 === $pg$jscomp$6$$ ? ($dbg_log$$module$src$log$$("mac[0] = " + $h$$module$src$lib$$($data_byte$jscomp$11$$), 1048576), this.mac[0] = $data_byte$jscomp$11$$) : 3 === $pg$jscomp$6$$ ? $dbg_log$$module$src$log$$("Unimplemented: Write pg3/01 (9346CR): " + $h$$module$src$lib$$($data_byte$jscomp$11$$), 1048576) : ($dbg_log$$module$src$log$$("Write pg" +
|
|
6850
6908
|
$pg$jscomp$6$$ + "/01: " + $h$$module$src$lib$$($data_byte$jscomp$11$$), 1048576), $dbg_assert$$module$src$log$$(!1));
|
|
6851
6909
|
});
|
|
6852
|
-
$bus$jscomp$
|
|
6910
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 2, this, function() {
|
|
6853
6911
|
var $pg$jscomp$7$$ = this.get_page();
|
|
6854
6912
|
if (0 === $pg$jscomp$7$$) {
|
|
6855
6913
|
return this.pstop;
|
|
@@ -6864,12 +6922,12 @@ function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$19_i$jscomp$78_i
|
|
|
6864
6922
|
$dbg_assert$$module$src$log$$(!1);
|
|
6865
6923
|
return 0;
|
|
6866
6924
|
});
|
|
6867
|
-
$bus$jscomp$
|
|
6925
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_write(this.port | 2, this, function($data_byte$jscomp$12$$) {
|
|
6868
6926
|
var $pg$jscomp$8$$ = this.get_page();
|
|
6869
6927
|
0 === $pg$jscomp$8$$ ? ($dbg_log$$module$src$log$$("stop page: " + $h$$module$src$lib$$($data_byte$jscomp$12$$, 2), 1048576), $data_byte$jscomp$12$$ > this.memory.length >> 8 && ($data_byte$jscomp$12$$ = this.memory.length >> 8, $dbg_log$$module$src$log$$("XXX: Adjusting stop page to " + $h$$module$src$lib$$($data_byte$jscomp$12$$), 1048576)), this.pstop = $data_byte$jscomp$12$$) : 1 === $pg$jscomp$8$$ ? ($dbg_log$$module$src$log$$("mac[1] = " + $h$$module$src$lib$$($data_byte$jscomp$12$$), 1048576),
|
|
6870
6928
|
this.mac[1] = $data_byte$jscomp$12$$) : ($dbg_log$$module$src$log$$("Write pg" + $pg$jscomp$8$$ + "/02: " + $h$$module$src$lib$$($data_byte$jscomp$12$$), 1048576), $dbg_assert$$module$src$log$$(!1));
|
|
6871
6929
|
});
|
|
6872
|
-
$bus$jscomp$
|
|
6930
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 7, this, function() {
|
|
6873
6931
|
var $pg$jscomp$9$$ = this.get_page();
|
|
6874
6932
|
if (0 === $pg$jscomp$9$$) {
|
|
6875
6933
|
return $dbg_log$$module$src$log$$("Read isr: " + $h$$module$src$lib$$(this.isr, 2), 1048576), this.isr;
|
|
@@ -6880,19 +6938,19 @@ function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$19_i$jscomp$78_i
|
|
|
6880
6938
|
$dbg_assert$$module$src$log$$(!1);
|
|
6881
6939
|
return 0;
|
|
6882
6940
|
});
|
|
6883
|
-
$bus$jscomp$
|
|
6941
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_write(this.port | 7, this, function($data_byte$jscomp$13$$) {
|
|
6884
6942
|
var $pg$jscomp$10$$ = this.get_page();
|
|
6885
6943
|
0 === $pg$jscomp$10$$ ? ($dbg_log$$module$src$log$$("Write isr: " + $h$$module$src$lib$$($data_byte$jscomp$13$$, 2), 1048576), this.isr &= ~$data_byte$jscomp$13$$, this.update_irq()) : 1 === $pg$jscomp$10$$ ? ($dbg_log$$module$src$log$$("Write curpg: " + $h$$module$src$lib$$($data_byte$jscomp$13$$, 2), 1048576), this.curpg = $data_byte$jscomp$13$$) : $dbg_assert$$module$src$log$$(!1);
|
|
6886
6944
|
});
|
|
6887
|
-
$bus$jscomp$
|
|
6945
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_write(this.port | 13, this, function($data_byte$jscomp$14$$) {
|
|
6888
6946
|
var $pg$jscomp$11$$ = this.get_page();
|
|
6889
6947
|
0 === $pg$jscomp$11$$ ? (this.txcr = $data_byte$jscomp$14$$, $dbg_log$$module$src$log$$("Write tx config: " + $h$$module$src$lib$$($data_byte$jscomp$14$$, 2), 1048576)) : $dbg_log$$module$src$log$$("Unimplemented: Write pg" + $pg$jscomp$11$$ + "/0d " + $h$$module$src$lib$$($data_byte$jscomp$14$$, 2), 1048576);
|
|
6890
6948
|
});
|
|
6891
|
-
$bus$jscomp$
|
|
6949
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_write(this.port | 14, this, function($data_byte$jscomp$15$$) {
|
|
6892
6950
|
var $pg$jscomp$12$$ = this.get_page();
|
|
6893
6951
|
0 === $pg$jscomp$12$$ ? ($dbg_log$$module$src$log$$("Write data configuration: " + $h$$module$src$lib$$($data_byte$jscomp$15$$, 2), 1048576), this.dcfg = $data_byte$jscomp$15$$) : $dbg_log$$module$src$log$$("Unimplemented: Write pg" + $pg$jscomp$12$$ + "/0e " + $h$$module$src$lib$$($data_byte$jscomp$15$$, 2), 1048576);
|
|
6894
6952
|
});
|
|
6895
|
-
$bus$jscomp$
|
|
6953
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 10, this, function() {
|
|
6896
6954
|
var $pg$jscomp$13$$ = this.get_page();
|
|
6897
6955
|
if (0 === $pg$jscomp$13$$) {
|
|
6898
6956
|
return $dbg_log$$module$src$log$$("Read pg0/0a", 1048576), 80;
|
|
@@ -6903,11 +6961,11 @@ function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$19_i$jscomp$78_i
|
|
|
6903
6961
|
$dbg_assert$$module$src$log$$(!1, "TODO");
|
|
6904
6962
|
return 0;
|
|
6905
6963
|
});
|
|
6906
|
-
$bus$jscomp$
|
|
6964
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_write(this.port | 10, this, function($data_byte$jscomp$16$$) {
|
|
6907
6965
|
var $pg$jscomp$14$$ = this.get_page();
|
|
6908
6966
|
0 === $pg$jscomp$14$$ ? ($dbg_log$$module$src$log$$("Write remote byte count low: " + $h$$module$src$lib$$($data_byte$jscomp$16$$, 2), 1048576), this.rcnt = this.rcnt & 65280 | $data_byte$jscomp$16$$ & 255) : $dbg_log$$module$src$log$$("Unimplemented: Write pg" + $pg$jscomp$14$$ + "/0a " + $h$$module$src$lib$$($data_byte$jscomp$16$$, 2), 1048576);
|
|
6909
6967
|
});
|
|
6910
|
-
$bus$jscomp$
|
|
6968
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 11, this, function() {
|
|
6911
6969
|
var $pg$jscomp$15$$ = this.get_page();
|
|
6912
6970
|
if (0 === $pg$jscomp$15$$) {
|
|
6913
6971
|
return $dbg_log$$module$src$log$$("Read pg0/0b", 1048576), 67;
|
|
@@ -6918,11 +6976,11 @@ function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$19_i$jscomp$78_i
|
|
|
6918
6976
|
$dbg_assert$$module$src$log$$(!1, "TODO");
|
|
6919
6977
|
return 0;
|
|
6920
6978
|
});
|
|
6921
|
-
$bus$jscomp$
|
|
6979
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_write(this.port | 11, this, function($data_byte$jscomp$17$$) {
|
|
6922
6980
|
var $pg$jscomp$16$$ = this.get_page();
|
|
6923
6981
|
0 === $pg$jscomp$16$$ ? ($dbg_log$$module$src$log$$("Write remote byte count high: " + $h$$module$src$lib$$($data_byte$jscomp$17$$, 2), 1048576), this.rcnt = this.rcnt & 255 | $data_byte$jscomp$17$$ << 8 & 65280) : $dbg_log$$module$src$log$$("Unimplemented: Write pg" + $pg$jscomp$16$$ + "/0b " + $h$$module$src$lib$$($data_byte$jscomp$17$$, 2), 1048576);
|
|
6924
6982
|
});
|
|
6925
|
-
$bus$jscomp$
|
|
6983
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 8, this, function() {
|
|
6926
6984
|
var $pg$jscomp$17$$ = this.get_page();
|
|
6927
6985
|
if (0 === $pg$jscomp$17$$) {
|
|
6928
6986
|
return $dbg_log$$module$src$log$$("Read remote start address low", 1048576), this.rsar & 255;
|
|
@@ -6934,11 +6992,11 @@ function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$19_i$jscomp$78_i
|
|
|
6934
6992
|
$dbg_assert$$module$src$log$$(!1);
|
|
6935
6993
|
return 0;
|
|
6936
6994
|
});
|
|
6937
|
-
$bus$jscomp$
|
|
6995
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_write(this.port | 8, this, function($data_byte$jscomp$18$$) {
|
|
6938
6996
|
var $pg$jscomp$18$$ = this.get_page();
|
|
6939
6997
|
0 === $pg$jscomp$18$$ ? ($dbg_log$$module$src$log$$("Write remote start address low: " + $h$$module$src$lib$$($data_byte$jscomp$18$$, 2), 1048576), this.rsar = this.rsar & 65280 | $data_byte$jscomp$18$$ & 255) : $dbg_log$$module$src$log$$("Unimplemented: Write pg" + $pg$jscomp$18$$ + "/08 " + $h$$module$src$lib$$($data_byte$jscomp$18$$, 2), 1048576);
|
|
6940
6998
|
});
|
|
6941
|
-
$bus$jscomp$
|
|
6999
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 9, this, function() {
|
|
6942
7000
|
var $pg$jscomp$19$$ = this.get_page();
|
|
6943
7001
|
if (0 === $pg$jscomp$19$$) {
|
|
6944
7002
|
return $dbg_log$$module$src$log$$("Read remote start address high", 1048576), this.rsar >> 8 & 255;
|
|
@@ -6950,15 +7008,15 @@ function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$19_i$jscomp$78_i
|
|
|
6950
7008
|
$dbg_assert$$module$src$log$$(!1);
|
|
6951
7009
|
return 0;
|
|
6952
7010
|
});
|
|
6953
|
-
$bus$jscomp$
|
|
7011
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_write(this.port | 9, this, function($data_byte$jscomp$19$$) {
|
|
6954
7012
|
var $pg$jscomp$20$$ = this.get_page();
|
|
6955
7013
|
0 === $pg$jscomp$20$$ ? ($dbg_log$$module$src$log$$("Write remote start address low: " + $h$$module$src$lib$$($data_byte$jscomp$19$$, 2), 1048576), this.rsar = this.rsar & 255 | $data_byte$jscomp$19$$ << 8 & 65280) : $dbg_log$$module$src$log$$("Unimplemented: Write pg" + $pg$jscomp$20$$ + "/09 " + $h$$module$src$lib$$($data_byte$jscomp$19$$, 2), 1048576);
|
|
6956
7014
|
});
|
|
6957
|
-
$bus$jscomp$
|
|
7015
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_write(this.port | 15, this, function($data_byte$jscomp$20$$) {
|
|
6958
7016
|
var $pg$jscomp$21$$ = this.get_page();
|
|
6959
7017
|
0 === $pg$jscomp$21$$ ? ($dbg_log$$module$src$log$$("Write interrupt mask register: " + $h$$module$src$lib$$($data_byte$jscomp$20$$, 2) + " isr=" + $h$$module$src$lib$$(this.isr, 2), 1048576), this.imr = $data_byte$jscomp$20$$, this.update_irq()) : $dbg_log$$module$src$log$$("Unimplemented: Write pg" + $pg$jscomp$21$$ + "/0f " + $h$$module$src$lib$$($data_byte$jscomp$20$$, 2), 1048576);
|
|
6960
7018
|
});
|
|
6961
|
-
$bus$jscomp$
|
|
7019
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 3, this, function() {
|
|
6962
7020
|
var $pg$jscomp$22$$ = this.get_page();
|
|
6963
7021
|
if (0 === $pg$jscomp$22$$) {
|
|
6964
7022
|
return $dbg_log$$module$src$log$$("Read boundary: " + $h$$module$src$lib$$(this.boundary, 2), 1048576), this.boundary;
|
|
@@ -6969,11 +7027,11 @@ function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$19_i$jscomp$78_i
|
|
|
6969
7027
|
3 === $pg$jscomp$22$$ ? $dbg_log$$module$src$log$$("Unimplemented: Read pg3/03 (CONFIG0)", 1048576) : ($dbg_log$$module$src$log$$("Read pg" + $pg$jscomp$22$$ + "/03", 1048576), $dbg_assert$$module$src$log$$(!1));
|
|
6970
7028
|
return 0;
|
|
6971
7029
|
});
|
|
6972
|
-
$bus$jscomp$
|
|
7030
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_write(this.port | 3, this, function($data_byte$jscomp$21$$) {
|
|
6973
7031
|
var $pg$jscomp$23$$ = this.get_page();
|
|
6974
7032
|
0 === $pg$jscomp$23$$ ? ($dbg_log$$module$src$log$$("Write boundary: " + $h$$module$src$lib$$($data_byte$jscomp$21$$, 2), 1048576), this.boundary = $data_byte$jscomp$21$$) : 1 === $pg$jscomp$23$$ ? ($dbg_log$$module$src$log$$("mac[2] = " + $h$$module$src$lib$$($data_byte$jscomp$21$$), 1048576), this.mac[2] = $data_byte$jscomp$21$$) : ($dbg_log$$module$src$log$$("Write pg" + $pg$jscomp$23$$ + "/03: " + $h$$module$src$lib$$($data_byte$jscomp$21$$), 1048576), $dbg_assert$$module$src$log$$(!1));
|
|
6975
7033
|
});
|
|
6976
|
-
$bus$jscomp$
|
|
7034
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 4, this, function() {
|
|
6977
7035
|
var $pg$jscomp$24$$ = this.get_page();
|
|
6978
7036
|
if (0 === $pg$jscomp$24$$) {
|
|
6979
7037
|
return this.tsr;
|
|
@@ -6985,11 +7043,11 @@ function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$19_i$jscomp$78_i
|
|
|
6985
7043
|
$dbg_assert$$module$src$log$$(!1);
|
|
6986
7044
|
return 0;
|
|
6987
7045
|
});
|
|
6988
|
-
$bus$jscomp$
|
|
7046
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_write(this.port | 4, this, function($data_byte$jscomp$22$$) {
|
|
6989
7047
|
var $pg$jscomp$25$$ = this.get_page();
|
|
6990
7048
|
0 === $pg$jscomp$25$$ ? ($dbg_log$$module$src$log$$("Write tpsr: " + $h$$module$src$lib$$($data_byte$jscomp$22$$, 2), 1048576), this.tpsr = $data_byte$jscomp$22$$) : 1 === $pg$jscomp$25$$ ? ($dbg_log$$module$src$log$$("mac[3] = " + $h$$module$src$lib$$($data_byte$jscomp$22$$), 1048576), this.mac[3] = $data_byte$jscomp$22$$) : ($dbg_log$$module$src$log$$("Write pg" + $pg$jscomp$25$$ + "/04: " + $h$$module$src$lib$$($data_byte$jscomp$22$$), 1048576), $dbg_assert$$module$src$log$$(!1));
|
|
6991
7049
|
});
|
|
6992
|
-
$bus$jscomp$
|
|
7050
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 5, this, function() {
|
|
6993
7051
|
var $pg$jscomp$26$$ = this.get_page();
|
|
6994
7052
|
if (0 === $pg$jscomp$26$$) {
|
|
6995
7053
|
return $dbg_log$$module$src$log$$("Unimplemented: Read pg0/05 (NCR: Number of Collisions Register)", 1048576), 0;
|
|
@@ -7000,12 +7058,12 @@ function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$19_i$jscomp$78_i
|
|
|
7000
7058
|
3 === $pg$jscomp$26$$ ? $dbg_log$$module$src$log$$("Unimplemented: Read pg3/05 (CONFIG2)", 1048576) : ($dbg_log$$module$src$log$$("Read pg" + $pg$jscomp$26$$ + "/05", 1048576), $dbg_assert$$module$src$log$$(!1));
|
|
7001
7059
|
return 0;
|
|
7002
7060
|
});
|
|
7003
|
-
$bus$jscomp$
|
|
7061
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_write(this.port | 5, this, function($data_byte$jscomp$23$$) {
|
|
7004
7062
|
var $pg$jscomp$27$$ = this.get_page();
|
|
7005
7063
|
0 === $pg$jscomp$27$$ ? ($dbg_log$$module$src$log$$("Write tcnt low: " + $h$$module$src$lib$$($data_byte$jscomp$23$$, 2), 1048576), this.tcnt = this.tcnt & -256 | $data_byte$jscomp$23$$) : 1 === $pg$jscomp$27$$ ? ($dbg_log$$module$src$log$$("mac[4] = " + $h$$module$src$lib$$($data_byte$jscomp$23$$), 1048576), this.mac[4] = $data_byte$jscomp$23$$) : 3 === $pg$jscomp$27$$ ? $dbg_log$$module$src$log$$("Unimplemented: Write pg3/05 (CONFIG2): " + $h$$module$src$lib$$($data_byte$jscomp$23$$), 1048576) :
|
|
7006
7064
|
($dbg_log$$module$src$log$$("Write pg" + $pg$jscomp$27$$ + "/05: " + $h$$module$src$lib$$($data_byte$jscomp$23$$), 1048576), $dbg_assert$$module$src$log$$(!1));
|
|
7007
7065
|
});
|
|
7008
|
-
$bus$jscomp$
|
|
7066
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 6, this, function() {
|
|
7009
7067
|
var $pg$jscomp$28$$ = this.get_page();
|
|
7010
7068
|
if (0 === $pg$jscomp$28$$) {
|
|
7011
7069
|
return $dbg_assert$$module$src$log$$(!1, "TODO"), 0;
|
|
@@ -7016,12 +7074,12 @@ function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$19_i$jscomp$78_i
|
|
|
7016
7074
|
3 === $pg$jscomp$28$$ ? $dbg_log$$module$src$log$$("Unimplemented: Read pg3/06 (CONFIG3)", 1048576) : ($dbg_log$$module$src$log$$("Read pg" + $pg$jscomp$28$$ + "/06", 1048576), $dbg_assert$$module$src$log$$(!1));
|
|
7017
7075
|
return 0;
|
|
7018
7076
|
});
|
|
7019
|
-
$bus$jscomp$
|
|
7077
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_write(this.port | 6, this, function($data_byte$jscomp$24$$) {
|
|
7020
7078
|
var $pg$jscomp$29$$ = this.get_page();
|
|
7021
7079
|
0 === $pg$jscomp$29$$ ? ($dbg_log$$module$src$log$$("Write tcnt high: " + $h$$module$src$lib$$($data_byte$jscomp$24$$, 2), 1048576), this.tcnt = this.tcnt & 255 | $data_byte$jscomp$24$$ << 8) : 1 === $pg$jscomp$29$$ ? ($dbg_log$$module$src$log$$("mac[5] = " + $h$$module$src$lib$$($data_byte$jscomp$24$$), 1048576), this.mac[5] = $data_byte$jscomp$24$$) : 3 === $pg$jscomp$29$$ ? $dbg_log$$module$src$log$$("Unimplemented: Write pg3/06 (CONFIG3): " + $h$$module$src$lib$$($data_byte$jscomp$24$$),
|
|
7022
7080
|
1048576) : ($dbg_log$$module$src$log$$("Write pg" + $pg$jscomp$29$$ + "/06: " + $h$$module$src$lib$$($data_byte$jscomp$24$$), 1048576), $dbg_assert$$module$src$log$$(!1));
|
|
7023
7081
|
});
|
|
7024
|
-
$bus$jscomp$
|
|
7082
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 12, this, function() {
|
|
7025
7083
|
var $pg$jscomp$30$$ = this.get_page();
|
|
7026
7084
|
if (0 === $pg$jscomp$30$$) {
|
|
7027
7085
|
return 9;
|
|
@@ -7033,12 +7091,12 @@ function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$19_i$jscomp$78_i
|
|
|
7033
7091
|
$dbg_assert$$module$src$log$$(!1);
|
|
7034
7092
|
return 0;
|
|
7035
7093
|
});
|
|
7036
|
-
$bus$jscomp$
|
|
7094
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_write(this.port | 12, this, function($data_byte$jscomp$25$$) {
|
|
7037
7095
|
var $pg$jscomp$31$$ = this.get_page();
|
|
7038
7096
|
0 === $pg$jscomp$31$$ ? ($dbg_log$$module$src$log$$("RX configuration reg write: " + $h$$module$src$lib$$($data_byte$jscomp$25$$, 2), 1048576), this.rxcr = $data_byte$jscomp$25$$) : $dbg_log$$module$src$log$$("Unimplemented: Write pg" + $pg$jscomp$31$$ + "/0c: " + $h$$module$src$lib$$($data_byte$jscomp$25$$), 1048576);
|
|
7039
7097
|
});
|
|
7040
|
-
$bus$jscomp$
|
|
7041
|
-
$bus$jscomp$
|
|
7098
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 16, this, this.data_port_read8, this.data_port_read16, this.data_port_read32);
|
|
7099
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_write(this.port | 16, this, this.data_port_write16, this.data_port_write16, this.data_port_write32);
|
|
7042
7100
|
$cpu$jscomp$17$$.devices.pci.register_device(this);
|
|
7043
7101
|
}
|
|
7044
7102
|
$Ne2k$$module$src$ne2k$$.prototype.get_state = function() {
|
|
@@ -7140,16 +7198,16 @@ $Ne2k$$module$src$ne2k$$.prototype.receive = function($data$jscomp$175$$) {
|
|
|
7140
7198
|
$Ne2k$$module$src$ne2k$$.prototype.get_page = function() {
|
|
7141
7199
|
return this.cr >> 6 & 3;
|
|
7142
7200
|
};
|
|
7143
|
-
function $VirtioConsole$$module$src$virtio_console$$($cpu$jscomp$18$$, $bus$jscomp$
|
|
7144
|
-
this.bus = $bus$jscomp$
|
|
7201
|
+
function $VirtioConsole$$module$src$virtio_console$$($cpu$jscomp$18$$, $bus$jscomp$22_queues$$) {
|
|
7202
|
+
this.bus = $bus$jscomp$22_queues$$;
|
|
7145
7203
|
this.rows = 25;
|
|
7146
7204
|
this.cols = 80;
|
|
7147
7205
|
this.ports = 4;
|
|
7148
|
-
$bus$jscomp$
|
|
7206
|
+
$bus$jscomp$22_queues$$ = [{size_supported:16, notify_offset:0, }, {size_supported:16, notify_offset:1, }, {size_supported:16, notify_offset:2, }, {size_supported:16, notify_offset:3, }, ];
|
|
7149
7207
|
for (let $i$jscomp$79$$ = 1; $i$jscomp$79$$ < this.ports; ++$i$jscomp$79$$) {
|
|
7150
|
-
$bus$jscomp$
|
|
7208
|
+
$bus$jscomp$22_queues$$.push({size_supported:16, notify_offset:0}), $bus$jscomp$22_queues$$.push({size_supported:8, notify_offset:1});
|
|
7151
7209
|
}
|
|
7152
|
-
this.virtio = new $VirtIO$$module$src$virtio$$($cpu$jscomp$18$$, {name:"virtio-console", pci_id:96, device_id:4163, subsystem_device_id:3, common:{initial_port:47104, queues:$bus$jscomp$
|
|
7210
|
+
this.virtio = new $VirtIO$$module$src$virtio$$($cpu$jscomp$18$$, {name:"virtio-console", pci_id:96, device_id:4163, subsystem_device_id:3, common:{initial_port:47104, queues:$bus$jscomp$22_queues$$, features:[0, 1, 32, ], on_driver_ok:() => {
|
|
7153
7211
|
}, }, notification:{initial_port:47360, single_handler:!1, handlers:[() => {
|
|
7154
7212
|
}, $queue_id$jscomp$1$$ => {
|
|
7155
7213
|
const $queue$$ = this.virtio.queues[$queue_id$jscomp$1$$], $port$jscomp$4$$ = 3 < $queue_id$jscomp$1$$ ? $queue_id$jscomp$1$$ - 3 >> 1 : 0;
|
|
@@ -7262,9 +7320,9 @@ $VirtioConsole$$module$src$virtio_console$$.prototype.Ack = function($queue_id$j
|
|
|
7262
7320
|
this.virtio.queues[$queue_id$jscomp$6$$].push_reply($bufchain$jscomp$7$$);
|
|
7263
7321
|
this.virtio.queues[$queue_id$jscomp$6$$].flush_replies();
|
|
7264
7322
|
};
|
|
7265
|
-
function $PS2$$module$src$ps2$$($cpu$jscomp$19$$, $bus$jscomp$
|
|
7323
|
+
function $PS2$$module$src$ps2$$($cpu$jscomp$19$$, $bus$jscomp$23$$) {
|
|
7266
7324
|
this.cpu = $cpu$jscomp$19$$;
|
|
7267
|
-
this.bus = $bus$jscomp$
|
|
7325
|
+
this.bus = $bus$jscomp$23$$;
|
|
7268
7326
|
this.reset();
|
|
7269
7327
|
this.bus.register("keyboard-code", function($code$jscomp$7$$) {
|
|
7270
7328
|
this.kbd_send_code($code$jscomp$7$$);
|
|
@@ -8152,7 +8210,7 @@ $FloppyDrive$$module$src$floppy$$.prototype.eject_disk = function() {
|
|
|
8152
8210
|
this.buffer = null;
|
|
8153
8211
|
};
|
|
8154
8212
|
$FloppyDrive$$module$src$floppy$$.prototype.get_buffer = function() {
|
|
8155
|
-
return this.buffer ? this.buffer.buffer : null;
|
|
8213
|
+
return this.buffer ? new Uint8Array(this.buffer.buffer) : null;
|
|
8156
8214
|
};
|
|
8157
8215
|
$FloppyDrive$$module$src$floppy$$.prototype.chs2lba = function($track$jscomp$6$$, $head$jscomp$1$$, $sect$jscomp$1$$) {
|
|
8158
8216
|
return ($track$jscomp$6$$ * this.max_head + $head$jscomp$1$$) * this.max_sect + $sect$jscomp$1$$ - 1;
|
|
@@ -8221,22 +8279,22 @@ const $ATA_CMD_NAME$$module$src$ide$$ = {[8]:"DEVICE RESET", [144]:"EXECUTE DEVI
|
|
|
8221
8279
|
[36]:"READ SECTORS EXT", [64]:"READ VERIFY SECTORS", [245]:"SECURITY FREEZE LOCK", [239]:"SET FEATURES", [249]:"SET MAX", [198]:"SET MULTIPLE MODE", [224]:"STANDBY IMMEDIATE", [202]:"WRITE DMA", [53]:"WRITE DMA EXT", [57]:"WRITE MULTIPLE", [197]:"WRITE MULTIPLE EXT", [48]:"WRITE SECTORS", [52]:"WRITE SECTORS EXT", [16]:"<UNKNOWN 10h>", [240]:"<VENDOR-SPECIFIC F0h>", }, $ATAPI_CMD$$module$src$ide$$ = {[70]:{name:"GET CONFIGURATION", flags:0}, [74]:{name:"GET EVENT STATUS NOTIFICATION", flags:0}, [18]:{name:"INQUIRY",
|
|
8222
8280
|
flags:0}, [189]:{name:"MECHANISM STATUS", flags:0}, [26]:{name:"MODE SENSE (6)", flags:0}, [90]:{name:"MODE SENSE (10)", flags:0}, [69]:{name:"PAUSE", flags:1}, [30]:{name:"PREVENT ALLOW MEDIUM REMOVAL", flags:0}, [40]:{name:"READ (10)", flags:1}, [168]:{name:"READ (12)", flags:1}, [37]:{name:"READ CAPACITY", flags:1}, [190]:{name:"READ CD", flags:1}, [81]:{name:"READ DISK INFORMATION", flags:1}, [66]:{name:"READ SUBCHANNEL", flags:1}, [67]:{name:"READ TOC PMA ATIP", flags:1}, [82]:{name:"READ TRACK INFORMATION",
|
|
8223
8281
|
flags:1}, [3]:{name:"REQUEST SENSE", flags:0}, [27]:{name:"START STOP UNIT", flags:0}, [0]:{name:"TEST UNIT READY", flags:1}, };
|
|
8224
|
-
function $IDEController$$module$src$ide$$($cpu$jscomp$21$$, $bus$jscomp$
|
|
8282
|
+
function $IDEController$$module$src$ide$$($cpu$jscomp$21$$, $bus$jscomp$24_has_primary$$, $command_base0_ide_config$$) {
|
|
8225
8283
|
this.cpu = $cpu$jscomp$21$$;
|
|
8226
|
-
this.bus = $bus$jscomp$
|
|
8284
|
+
this.bus = $bus$jscomp$24_has_primary$$;
|
|
8227
8285
|
this.secondary = this.primary = void 0;
|
|
8228
|
-
$bus$jscomp$
|
|
8286
|
+
$bus$jscomp$24_has_primary$$ = $command_base0_ide_config$$ && $command_base0_ide_config$$[0][0];
|
|
8229
8287
|
const $has_secondary$$ = $command_base0_ide_config$$ && $command_base0_ide_config$$[1][0];
|
|
8230
|
-
if ($bus$jscomp$
|
|
8231
|
-
$bus$jscomp$
|
|
8288
|
+
if ($bus$jscomp$24_has_primary$$ || $has_secondary$$) {
|
|
8289
|
+
$bus$jscomp$24_has_primary$$ && (this.primary = new $IDEChannel$$module$src$ide$$(this, 0, $command_base0_ide_config$$[0], 496, 1014, 14));
|
|
8232
8290
|
$has_secondary$$ && (this.secondary = new $IDEChannel$$module$src$ide$$(this, 1, $command_base0_ide_config$$[1], 368, 886, 15));
|
|
8233
|
-
$command_base0_ide_config$$ = $bus$jscomp$
|
|
8234
|
-
const $control_base0$$ = $bus$jscomp$
|
|
8291
|
+
$command_base0_ide_config$$ = $bus$jscomp$24_has_primary$$ ? this.primary.command_base : 0;
|
|
8292
|
+
const $control_base0$$ = $bus$jscomp$24_has_primary$$ ? this.primary.control_base : 0, $command_base1$$ = $has_secondary$$ ? this.secondary.command_base : 0, $control_base1$$ = $has_secondary$$ ? this.secondary.control_base : 0;
|
|
8235
8293
|
this.name = "ide";
|
|
8236
8294
|
this.pci_id = 240;
|
|
8237
8295
|
this.pci_space = [134, 128, 16, 112, 5, 0, 160, 2, 0, 128, 1, 1, 0, 0, 0, 0, $command_base0_ide_config$$ & 255 | 1, $command_base0_ide_config$$ >> 8, 0, 0, $control_base0$$ & 255 | 1, $control_base0$$ >> 8, 0, 0, $command_base1$$ & 255 | 1, $command_base1$$ >> 8, 0, 0, $control_base1$$ & 255 | 1, $control_base1$$ >> 8, 0, 0, 1, 180, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 16, 212, 130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
8238
8296
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ];
|
|
8239
|
-
this.pci_bars = [$bus$jscomp$
|
|
8297
|
+
this.pci_bars = [$bus$jscomp$24_has_primary$$ ? {size:8} : void 0, $bus$jscomp$24_has_primary$$ ? {size:1} : void 0, $has_secondary$$ ? {size:8} : void 0, $has_secondary$$ ? {size:1} : void 0, {size:16}];
|
|
8240
8298
|
$cpu$jscomp$21$$.devices.pci.register_device(this);
|
|
8241
8299
|
}
|
|
8242
8300
|
Object.seal(this);
|
|
@@ -8855,9 +8913,9 @@ $IDEInterface$$module$src$ide$$.prototype.do_atapi_dma = function() {
|
|
|
8855
8913
|
} else {
|
|
8856
8914
|
var $prdt_start$$ = this.channel.prdt_addr, $offset$jscomp$71$$ = 0, $data$jscomp$199$$ = this.data;
|
|
8857
8915
|
do {
|
|
8858
|
-
var $addr$jscomp$
|
|
8916
|
+
var $addr$jscomp$28$$ = this.cpu.read32s($prdt_start$$), $count$jscomp$60$$ = this.cpu.read16($prdt_start$$ + 4), $end$jscomp$20$$ = this.cpu.read8($prdt_start$$ + 7) & 128;
|
|
8859
8917
|
$count$jscomp$60$$ || ($count$jscomp$60$$ = 65536);
|
|
8860
|
-
this.cpu.write_blob($data$jscomp$199$$.subarray($offset$jscomp$71$$, Math.min($offset$jscomp$71$$ + $count$jscomp$60$$, this.data_length)), $addr$jscomp$
|
|
8918
|
+
this.cpu.write_blob($data$jscomp$199$$.subarray($offset$jscomp$71$$, Math.min($offset$jscomp$71$$ + $count$jscomp$60$$, this.data_length)), $addr$jscomp$28$$);
|
|
8861
8919
|
$offset$jscomp$71$$ += $count$jscomp$60$$;
|
|
8862
8920
|
$prdt_start$$ += 8;
|
|
8863
8921
|
if ($offset$jscomp$71$$ >= this.data_length && !$end$jscomp$20$$) {
|
|
@@ -9146,19 +9204,19 @@ $IDEInterface$$module$src$ide$$.prototype.set_state = function($state$jscomp$49$
|
|
|
9146
9204
|
this.drive_connected = this.is_atapi || this.buffer;
|
|
9147
9205
|
this.medium_changed = !1;
|
|
9148
9206
|
};
|
|
9149
|
-
function $VirtioNet$$module$src$virtio_net$$($cpu$jscomp$23$$, $bus$jscomp$
|
|
9150
|
-
this.bus = $bus$jscomp$
|
|
9207
|
+
function $VirtioNet$$module$src$virtio_net$$($cpu$jscomp$23$$, $bus$jscomp$25_queues$jscomp$1$$, $i$jscomp$85_preserve_mac_from_state_image$jscomp$1$$, $mtu$jscomp$1$$ = 1500) {
|
|
9208
|
+
this.bus = $bus$jscomp$25_queues$jscomp$1$$;
|
|
9151
9209
|
this.id = $cpu$jscomp$23$$.devices.net ? 1 : 0;
|
|
9152
9210
|
this.status = this.pairs = 1;
|
|
9153
9211
|
this.preserve_mac_from_state_image = $i$jscomp$85_preserve_mac_from_state_image$jscomp$1$$;
|
|
9154
9212
|
this.mac = new Uint8Array([0, 34, 21, 255 * Math.random() | 0, 255 * Math.random() | 0, 255 * Math.random() | 0, ]);
|
|
9155
9213
|
this.bus.send("net" + this.id + "-mac", $format_mac$$module$src$ne2k$$(this.mac));
|
|
9156
|
-
$bus$jscomp$
|
|
9214
|
+
$bus$jscomp$25_queues$jscomp$1$$ = [];
|
|
9157
9215
|
for ($i$jscomp$85_preserve_mac_from_state_image$jscomp$1$$ = 0; $i$jscomp$85_preserve_mac_from_state_image$jscomp$1$$ < this.pairs; ++$i$jscomp$85_preserve_mac_from_state_image$jscomp$1$$) {
|
|
9158
|
-
$bus$jscomp$
|
|
9216
|
+
$bus$jscomp$25_queues$jscomp$1$$.push({size_supported:1024, notify_offset:0}), $bus$jscomp$25_queues$jscomp$1$$.push({size_supported:1024, notify_offset:1});
|
|
9159
9217
|
}
|
|
9160
|
-
$bus$jscomp$
|
|
9161
|
-
this.virtio = new $VirtIO$$module$src$virtio$$($cpu$jscomp$23$$, {name:"virtio-net", pci_id:80, device_id:4161, subsystem_device_id:1, common:{initial_port:51200, queues:$bus$jscomp$
|
|
9218
|
+
$bus$jscomp$25_queues$jscomp$1$$.push({size_supported:16, notify_offset:2, });
|
|
9219
|
+
this.virtio = new $VirtIO$$module$src$virtio$$($cpu$jscomp$23$$, {name:"virtio-net", pci_id:80, device_id:4161, subsystem_device_id:1, common:{initial_port:51200, queues:$bus$jscomp$25_queues$jscomp$1$$, features:[5, 16, 22, 3, 17, 23, 32, ], on_driver_ok:() => {
|
|
9162
9220
|
}, }, notification:{initial_port:51456, single_handler:!1, handlers:[() => {
|
|
9163
9221
|
}, $queue_id$jscomp$8$$ => {
|
|
9164
9222
|
const $queue$jscomp$4$$ = this.virtio.queues[$queue_id$jscomp$8$$];
|
|
@@ -9238,9 +9296,9 @@ $VirtioNet$$module$src$virtio_net$$.prototype.Ack = function($queue_id$jscomp$11
|
|
|
9238
9296
|
this.virtio.queues[$queue_id$jscomp$11$$].flush_replies();
|
|
9239
9297
|
};
|
|
9240
9298
|
const $VGA_HOST_MEMORY_SPACE_START$$module$src$vga$$ = Uint32Array.from([655360, 655360, 720896, 753664, ]), $VGA_HOST_MEMORY_SPACE_SIZE$$module$src$vga$$ = Uint32Array.from([131072, 65536, 32768, 32768, ]);
|
|
9241
|
-
function $VGAScreen$$module$src$vga$$($cpu$jscomp$24$$, $bus$jscomp$
|
|
9299
|
+
function $VGAScreen$$module$src$vga$$($cpu$jscomp$24$$, $bus$jscomp$26_io$jscomp$4$$, $screen$jscomp$3_vga_offset$$, $vga_memory_size$$) {
|
|
9242
9300
|
this.cpu = $cpu$jscomp$24$$;
|
|
9243
|
-
this.bus = $bus$jscomp$
|
|
9301
|
+
this.bus = $bus$jscomp$26_io$jscomp$4$$;
|
|
9244
9302
|
this.screen = $screen$jscomp$3_vga_offset$$;
|
|
9245
9303
|
this.vga_memory_size = $vga_memory_size$$;
|
|
9246
9304
|
this.cursor_address = 0;
|
|
@@ -9284,45 +9342,45 @@ function $VGAScreen$$module$src$vga$$($cpu$jscomp$24$$, $bus$jscomp$24_io$jscomp
|
|
|
9284
9342
|
this.max_scan_line = this.color_dont_care = this.color_compare = this.miscellaneous_graphics_register = this.planar_setreset_enable = this.planar_setreset = 0;
|
|
9285
9343
|
this.port_3DA_value = this.miscellaneous_output_register = 255;
|
|
9286
9344
|
this.font_page_ab_enabled = !1;
|
|
9287
|
-
$bus$jscomp$
|
|
9288
|
-
$bus$jscomp$
|
|
9289
|
-
$bus$jscomp$
|
|
9290
|
-
$bus$jscomp$
|
|
9291
|
-
$bus$jscomp$
|
|
9292
|
-
$bus$jscomp$
|
|
9293
|
-
$bus$jscomp$
|
|
9294
|
-
$bus$jscomp$
|
|
9295
|
-
$bus$jscomp$
|
|
9296
|
-
$bus$jscomp$
|
|
9297
|
-
$bus$jscomp$
|
|
9298
|
-
$bus$jscomp$
|
|
9299
|
-
$bus$jscomp$
|
|
9300
|
-
$bus$jscomp$
|
|
9301
|
-
$bus$jscomp$
|
|
9302
|
-
$bus$jscomp$
|
|
9303
|
-
$bus$jscomp$
|
|
9304
|
-
$bus$jscomp$
|
|
9305
|
-
$bus$jscomp$
|
|
9306
|
-
$bus$jscomp$
|
|
9307
|
-
$bus$jscomp$
|
|
9308
|
-
$bus$jscomp$
|
|
9309
|
-
$bus$jscomp$
|
|
9310
|
-
$bus$jscomp$
|
|
9311
|
-
$bus$jscomp$
|
|
9312
|
-
$bus$jscomp$
|
|
9313
|
-
$bus$jscomp$
|
|
9314
|
-
$bus$jscomp$
|
|
9315
|
-
$bus$jscomp$
|
|
9345
|
+
$bus$jscomp$26_io$jscomp$4$$ = $cpu$jscomp$24$$.io;
|
|
9346
|
+
$bus$jscomp$26_io$jscomp$4$$.register_write(960, this, this.port3C0_write);
|
|
9347
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(960, this, this.port3C0_read, this.port3C0_read16);
|
|
9348
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(961, this, this.port3C1_read);
|
|
9349
|
+
$bus$jscomp$26_io$jscomp$4$$.register_write(962, this, this.port3C2_write);
|
|
9350
|
+
$bus$jscomp$26_io$jscomp$4$$.register_write_consecutive(964, this, this.port3C4_write, this.port3C5_write);
|
|
9351
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(964, this, this.port3C4_read);
|
|
9352
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(965, this, this.port3C5_read);
|
|
9353
|
+
$bus$jscomp$26_io$jscomp$4$$.register_write_consecutive(974, this, this.port3CE_write, this.port3CF_write);
|
|
9354
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(974, this, this.port3CE_read);
|
|
9355
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(975, this, this.port3CF_read);
|
|
9356
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(966, this, this.port3C6_read);
|
|
9357
|
+
$bus$jscomp$26_io$jscomp$4$$.register_write(966, this, this.port3C6_write);
|
|
9358
|
+
$bus$jscomp$26_io$jscomp$4$$.register_write(967, this, this.port3C7_write);
|
|
9359
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(967, this, this.port3C7_read);
|
|
9360
|
+
$bus$jscomp$26_io$jscomp$4$$.register_write(968, this, this.port3C8_write);
|
|
9361
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(968, this, this.port3C8_read);
|
|
9362
|
+
$bus$jscomp$26_io$jscomp$4$$.register_write(969, this, this.port3C9_write);
|
|
9363
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(969, this, this.port3C9_read);
|
|
9364
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(972, this, this.port3CC_read);
|
|
9365
|
+
$bus$jscomp$26_io$jscomp$4$$.register_write(980, this, this.port3D4_write, this.port3D4_write16);
|
|
9366
|
+
$bus$jscomp$26_io$jscomp$4$$.register_write(981, this, this.port3D5_write, this.port3D5_write16);
|
|
9367
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(980, this, this.port3D4_read);
|
|
9368
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(981, this, this.port3D5_read, this.port3D5_read16);
|
|
9369
|
+
$bus$jscomp$26_io$jscomp$4$$.register_write(948, this, this.port3D4_write, this.port3D4_write16);
|
|
9370
|
+
$bus$jscomp$26_io$jscomp$4$$.register_write(949, this, this.port3D5_write, this.port3D5_write16);
|
|
9371
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(948, this, this.port3D4_read);
|
|
9372
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(949, this, this.port3D5_read, this.port3D5_read16);
|
|
9373
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(970, this, function() {
|
|
9316
9374
|
$dbg_log$$module$src$log$$("3CA read", 256);
|
|
9317
9375
|
return 0;
|
|
9318
9376
|
});
|
|
9319
|
-
$bus$jscomp$
|
|
9320
|
-
$bus$jscomp$
|
|
9377
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(986, this, this.port3DA_read);
|
|
9378
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(954, this, this.port3DA_read);
|
|
9321
9379
|
this.dispi_index = -1;
|
|
9322
9380
|
this.dispi_enable_value = 0;
|
|
9323
|
-
$bus$jscomp$
|
|
9324
|
-
$bus$jscomp$
|
|
9325
|
-
$bus$jscomp$
|
|
9381
|
+
$bus$jscomp$26_io$jscomp$4$$.register_write(462, this, void 0, this.port1CE_write);
|
|
9382
|
+
$bus$jscomp$26_io$jscomp$4$$.register_write(463, this, void 0, this.port1CF_write);
|
|
9383
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(463, this, void 0, this.port1CF_read);
|
|
9326
9384
|
$screen$jscomp$3_vga_offset$$ = $cpu$jscomp$24$$.svga_allocate_memory(this.vga_memory_size) >>> 0;
|
|
9327
9385
|
this.svga_memory = $view$$module$src$lib$$(Uint8Array, $cpu$jscomp$24$$.wasm_memory, $screen$jscomp$3_vga_offset$$, this.vga_memory_size);
|
|
9328
9386
|
this.diff_addr_min = this.vga_memory_size;
|
|
@@ -9336,7 +9394,7 @@ function $VGAScreen$$module$src$vga$$($cpu$jscomp$24$$, $bus$jscomp$24_io$jscomp
|
|
|
9336
9394
|
this.plane2 = new Uint8Array(this.vga_memory.buffer, 131072, 65536);
|
|
9337
9395
|
this.plane3 = new Uint8Array(this.vga_memory.buffer, 196608, 65536);
|
|
9338
9396
|
this.pixel_buffer = new Uint8Array(524288);
|
|
9339
|
-
$bus$jscomp$
|
|
9397
|
+
$bus$jscomp$26_io$jscomp$4$$.mmap_register(655360, 131072, $addr$jscomp$29$$ => this.vga_memory_read($addr$jscomp$29$$), ($addr$jscomp$30$$, $value$jscomp$168$$) => this.vga_memory_write($addr$jscomp$30$$, $value$jscomp$168$$), );
|
|
9340
9398
|
$cpu$jscomp$24$$.devices.pci.register_device(this);
|
|
9341
9399
|
}
|
|
9342
9400
|
$VGAScreen$$module$src$vga$$.prototype.get_state = function() {
|
|
@@ -9476,38 +9534,38 @@ $VGAScreen$$module$src$vga$$.prototype.set_state = function($state$jscomp$53$$)
|
|
|
9476
9534
|
this.graphical_mode ? (this.screen_height = this.screen_width = 0, 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.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());
|
|
9477
9535
|
this.complete_redraw();
|
|
9478
9536
|
};
|
|
9479
|
-
$VGAScreen$$module$src$vga$$.prototype.vga_memory_read = function($addr$jscomp$
|
|
9537
|
+
$VGAScreen$$module$src$vga$$.prototype.vga_memory_read = function($addr$jscomp$31$$) {
|
|
9480
9538
|
if (this.svga_enabled) {
|
|
9481
|
-
return this.cpu.read8(($addr$jscomp$
|
|
9539
|
+
return this.cpu.read8(($addr$jscomp$31$$ - 655360 | this.svga_bank_offset) + 3758096384 | 0);
|
|
9482
9540
|
}
|
|
9483
9541
|
var $memory_space_select_plane_reading$$ = this.miscellaneous_graphics_register >> 2 & 3;
|
|
9484
|
-
$addr$jscomp$
|
|
9485
|
-
if (0 > $addr$jscomp$
|
|
9486
|
-
return $dbg_log$$module$src$log$$("vga read outside memory space: addr:" + $h$$module$src$lib$$($addr$jscomp$
|
|
9487
|
-
}
|
|
9488
|
-
this.latch_dword = this.plane0[$addr$jscomp$
|
|
9489
|
-
this.latch_dword |= this.plane1[$addr$jscomp$
|
|
9490
|
-
this.latch_dword |= this.plane2[$addr$jscomp$
|
|
9491
|
-
this.latch_dword |= this.plane3[$addr$jscomp$
|
|
9542
|
+
$addr$jscomp$31$$ -= $VGA_HOST_MEMORY_SPACE_START$$module$src$vga$$[$memory_space_select_plane_reading$$];
|
|
9543
|
+
if (0 > $addr$jscomp$31$$ || $addr$jscomp$31$$ >= $VGA_HOST_MEMORY_SPACE_SIZE$$module$src$vga$$[$memory_space_select_plane_reading$$]) {
|
|
9544
|
+
return $dbg_log$$module$src$log$$("vga read outside memory space: addr:" + $h$$module$src$lib$$($addr$jscomp$31$$ >>> 0), 256), 0;
|
|
9545
|
+
}
|
|
9546
|
+
this.latch_dword = this.plane0[$addr$jscomp$31$$];
|
|
9547
|
+
this.latch_dword |= this.plane1[$addr$jscomp$31$$] << 8;
|
|
9548
|
+
this.latch_dword |= this.plane2[$addr$jscomp$31$$] << 16;
|
|
9549
|
+
this.latch_dword |= this.plane3[$addr$jscomp$31$$] << 24;
|
|
9492
9550
|
if (this.planar_mode & 8) {
|
|
9493
|
-
return $memory_space_select_plane_reading$$ = 255, this.color_dont_care & 1 && ($memory_space_select_plane_reading$$ &= this.plane0[$addr$jscomp$
|
|
9494
|
-
($memory_space_select_plane_reading$$ &= this.plane3[$addr$jscomp$
|
|
9551
|
+
return $memory_space_select_plane_reading$$ = 255, this.color_dont_care & 1 && ($memory_space_select_plane_reading$$ &= this.plane0[$addr$jscomp$31$$] ^ ~(this.color_compare & 1 ? 255 : 0)), this.color_dont_care & 2 && ($memory_space_select_plane_reading$$ &= this.plane1[$addr$jscomp$31$$] ^ ~(this.color_compare & 2 ? 255 : 0)), this.color_dont_care & 4 && ($memory_space_select_plane_reading$$ &= this.plane2[$addr$jscomp$31$$] ^ ~(this.color_compare & 4 ? 255 : 0)), this.color_dont_care & 8 &&
|
|
9552
|
+
($memory_space_select_plane_reading$$ &= this.plane3[$addr$jscomp$31$$] ^ ~(this.color_compare & 8 ? 255 : 0)), $memory_space_select_plane_reading$$;
|
|
9495
9553
|
}
|
|
9496
9554
|
$memory_space_select_plane_reading$$ = this.plane_read;
|
|
9497
|
-
this.graphical_mode ? this.sequencer_memory_mode & 8 ? ($memory_space_select_plane_reading$$ = $addr$jscomp$
|
|
9498
|
-
return this.vga_memory[$memory_space_select_plane_reading$$ << 16 | $addr$jscomp$
|
|
9555
|
+
this.graphical_mode ? this.sequencer_memory_mode & 8 ? ($memory_space_select_plane_reading$$ = $addr$jscomp$31$$ & 3, $addr$jscomp$31$$ &= -4) : this.planar_mode & 16 && ($memory_space_select_plane_reading$$ = $addr$jscomp$31$$ & 1, $addr$jscomp$31$$ &= -2) : $memory_space_select_plane_reading$$ &= 3;
|
|
9556
|
+
return this.vga_memory[$memory_space_select_plane_reading$$ << 16 | $addr$jscomp$31$$];
|
|
9499
9557
|
};
|
|
9500
|
-
$VGAScreen$$module$src$vga$$.prototype.vga_memory_write = function($addr$jscomp$
|
|
9558
|
+
$VGAScreen$$module$src$vga$$.prototype.vga_memory_write = function($addr$jscomp$32$$, $value$jscomp$169$$) {
|
|
9501
9559
|
if (this.svga_enabled) {
|
|
9502
|
-
this.cpu.write8(($addr$jscomp$
|
|
9560
|
+
this.cpu.write8(($addr$jscomp$32$$ - 655360 | this.svga_bank_offset) + 3758096384 | 0, $value$jscomp$169$$);
|
|
9503
9561
|
} else {
|
|
9504
9562
|
var $memory_space_select$jscomp$1$$ = this.miscellaneous_graphics_register >> 2 & 3;
|
|
9505
|
-
$addr$jscomp$
|
|
9506
|
-
0 > $addr$jscomp$
|
|
9507
|
-
this.plane_write_bm & 4 && (this.plane2[$addr$jscomp$
|
|
9563
|
+
$addr$jscomp$32$$ -= $VGA_HOST_MEMORY_SPACE_START$$module$src$vga$$[$memory_space_select$jscomp$1$$];
|
|
9564
|
+
0 > $addr$jscomp$32$$ || $addr$jscomp$32$$ >= $VGA_HOST_MEMORY_SPACE_SIZE$$module$src$vga$$[$memory_space_select$jscomp$1$$] ? $dbg_log$$module$src$log$$("vga write outside memory space: addr:" + $h$$module$src$lib$$($addr$jscomp$32$$ >>> 0) + ", value:" + $h$$module$src$lib$$($value$jscomp$169$$), 256) : this.graphical_mode ? this.vga_memory_write_graphical($addr$jscomp$32$$, $value$jscomp$169$$) : this.plane_write_bm & 3 ? this.vga_memory_write_text_mode($addr$jscomp$32$$, $value$jscomp$169$$) :
|
|
9565
|
+
this.plane_write_bm & 4 && (this.plane2[$addr$jscomp$32$$] = $value$jscomp$169$$);
|
|
9508
9566
|
}
|
|
9509
9567
|
};
|
|
9510
|
-
$VGAScreen$$module$src$vga$$.prototype.vga_memory_write_graphical = function($addr$jscomp$
|
|
9568
|
+
$VGAScreen$$module$src$vga$$.prototype.vga_memory_write_graphical = function($addr$jscomp$33_pixel_addr$$, $plane_select_value$jscomp$170$$) {
|
|
9511
9569
|
var $write_mode$$ = this.planar_mode & 3, $bitmask$$ = this.apply_feed(this.planar_bitmap), $setreset_dword$$ = this.apply_expand(this.planar_setreset), $setreset_enable_dword$$ = this.apply_expand(this.planar_setreset_enable);
|
|
9512
9570
|
switch($write_mode$$) {
|
|
9513
9571
|
case 0:
|
|
@@ -9531,20 +9589,20 @@ $VGAScreen$$module$src$vga$$.prototype.vga_memory_write_graphical = function($ad
|
|
|
9531
9589
|
$plane_select_value$jscomp$170$$ = 15;
|
|
9532
9590
|
switch(this.sequencer_memory_mode & 12) {
|
|
9533
9591
|
case 0:
|
|
9534
|
-
$plane_select_value$jscomp$170$$ = 5 << ($addr$jscomp$
|
|
9535
|
-
$addr$jscomp$
|
|
9592
|
+
$plane_select_value$jscomp$170$$ = 5 << ($addr$jscomp$33_pixel_addr$$ & 1);
|
|
9593
|
+
$addr$jscomp$33_pixel_addr$$ &= -2;
|
|
9536
9594
|
break;
|
|
9537
9595
|
case 8:
|
|
9538
9596
|
case 12:
|
|
9539
|
-
$plane_select_value$jscomp$170$$ = 1 << ($addr$jscomp$
|
|
9597
|
+
$plane_select_value$jscomp$170$$ = 1 << ($addr$jscomp$33_pixel_addr$$ & 3), $addr$jscomp$33_pixel_addr$$ &= -4;
|
|
9540
9598
|
}
|
|
9541
9599
|
$plane_select_value$jscomp$170$$ &= this.plane_write_bm;
|
|
9542
|
-
$plane_select_value$jscomp$170$$ & 1 && (this.plane0[$addr$jscomp$
|
|
9543
|
-
$plane_select_value$jscomp$170$$ & 2 && (this.plane1[$addr$jscomp$
|
|
9544
|
-
$plane_select_value$jscomp$170$$ & 4 && (this.plane2[$addr$jscomp$
|
|
9545
|
-
$plane_select_value$jscomp$170$$ & 8 && (this.plane3[$addr$jscomp$
|
|
9546
|
-
$addr$jscomp$
|
|
9547
|
-
this.partial_replot($addr$jscomp$
|
|
9600
|
+
$plane_select_value$jscomp$170$$ & 1 && (this.plane0[$addr$jscomp$33_pixel_addr$$] = $plane_dword$$ >> 0 & 255);
|
|
9601
|
+
$plane_select_value$jscomp$170$$ & 2 && (this.plane1[$addr$jscomp$33_pixel_addr$$] = $plane_dword$$ >> 8 & 255);
|
|
9602
|
+
$plane_select_value$jscomp$170$$ & 4 && (this.plane2[$addr$jscomp$33_pixel_addr$$] = $plane_dword$$ >> 16 & 255);
|
|
9603
|
+
$plane_select_value$jscomp$170$$ & 8 && (this.plane3[$addr$jscomp$33_pixel_addr$$] = $plane_dword$$ >> 24 & 255);
|
|
9604
|
+
$addr$jscomp$33_pixel_addr$$ = this.vga_addr_to_pixel($addr$jscomp$33_pixel_addr$$);
|
|
9605
|
+
this.partial_replot($addr$jscomp$33_pixel_addr$$, $addr$jscomp$33_pixel_addr$$ + 7);
|
|
9548
9606
|
};
|
|
9549
9607
|
$VGAScreen$$module$src$vga$$.prototype.apply_feed = function($data_byte$jscomp$27$$) {
|
|
9550
9608
|
return $data_byte$jscomp$27$$ | $data_byte$jscomp$27$$ << 8 | $data_byte$jscomp$27$$ << 16 | $data_byte$jscomp$27$$ << 24;
|
|
@@ -9575,38 +9633,38 @@ $VGAScreen$$module$src$vga$$.prototype.apply_bitmask = function($data_dword$jsco
|
|
|
9575
9633
|
};
|
|
9576
9634
|
$VGAScreen$$module$src$vga$$.prototype.text_mode_redraw = function() {
|
|
9577
9635
|
const $split_screen_row$$ = this.scan_line_to_screen_row(this.line_compare), $row_offset$$ = Math.max(0, 2 * (2 * this.offset_register - this.max_cols)), $blink_enabled$$ = this.attribute_mode & 8, $fg_color_mask$$ = this.font_page_ab_enabled ? 7 : 15, $bg_color_mask$$ = $blink_enabled$$ ? 7 : 15, $FLAG_BLINKING$jscomp$1$$ = this.screen.FLAG_BLINKING, $FLAG_FONT_PAGE_B$jscomp$1$$ = this.screen.FLAG_FONT_PAGE_B;
|
|
9578
|
-
let $addr$jscomp$
|
|
9636
|
+
let $addr$jscomp$34$$ = this.start_address << 1;
|
|
9579
9637
|
for (let $row$jscomp$7$$ = 0; $row$jscomp$7$$ < this.max_rows; $row$jscomp$7$$++) {
|
|
9580
|
-
$row$jscomp$7$$ === $split_screen_row$$ && ($addr$jscomp$
|
|
9638
|
+
$row$jscomp$7$$ === $split_screen_row$$ && ($addr$jscomp$34$$ = 0);
|
|
9581
9639
|
for (let $col$jscomp$4$$ = 0; $col$jscomp$4$$ < this.max_cols; $col$jscomp$4$$++) {
|
|
9582
|
-
const $chr$jscomp$
|
|
9583
|
-
this.bus.send("screen-put-char", [$row$jscomp$7$$, $col$jscomp$4$$, $chr$jscomp$
|
|
9584
|
-
this.screen.put_char($row$jscomp$7$$, $col$jscomp$4$$, $chr$jscomp$
|
|
9585
|
-
$addr$jscomp$
|
|
9640
|
+
const $chr$jscomp$12$$ = this.vga_memory[$addr$jscomp$34$$], $color$jscomp$2$$ = this.vga_memory[$addr$jscomp$34$$ | 1], $flags$jscomp$13$$ = ($blink_enabled$$ && $color$jscomp$2$$ & 128 ? $FLAG_BLINKING$jscomp$1$$ : 0) | (!this.font_page_ab_enabled || $color$jscomp$2$$ & 8 ? 0 : $FLAG_FONT_PAGE_B$jscomp$1$$);
|
|
9641
|
+
this.bus.send("screen-put-char", [$row$jscomp$7$$, $col$jscomp$4$$, $chr$jscomp$12$$]);
|
|
9642
|
+
this.screen.put_char($row$jscomp$7$$, $col$jscomp$4$$, $chr$jscomp$12$$, $flags$jscomp$13$$, this.vga256_palette[this.dac_mask & this.dac_map[$color$jscomp$2$$ >> 4 & $bg_color_mask$$]], this.vga256_palette[this.dac_mask & this.dac_map[$color$jscomp$2$$ & $fg_color_mask$$]]);
|
|
9643
|
+
$addr$jscomp$34$$ += 2;
|
|
9586
9644
|
}
|
|
9587
|
-
$addr$jscomp$
|
|
9645
|
+
$addr$jscomp$34$$ += $row_offset$$;
|
|
9588
9646
|
}
|
|
9589
9647
|
};
|
|
9590
|
-
$VGAScreen$$module$src$vga$$.prototype.vga_memory_write_text_mode = function($addr$jscomp$
|
|
9591
|
-
this.vga_memory[$addr$jscomp$
|
|
9648
|
+
$VGAScreen$$module$src$vga$$.prototype.vga_memory_write_text_mode = function($addr$jscomp$35_flags$jscomp$14$$, $chr$jscomp$13_value$jscomp$171$$) {
|
|
9649
|
+
this.vga_memory[$addr$jscomp$35_flags$jscomp$14$$] = $chr$jscomp$13_value$jscomp$171$$;
|
|
9592
9650
|
var $col$jscomp$5_max_cols$$ = Math.max(this.max_cols, 2 * this.offset_register);
|
|
9593
9651
|
let $row$jscomp$8$$;
|
|
9594
|
-
if ($addr$jscomp$
|
|
9595
|
-
var $color$jscomp$3_memory_start_memory_start$jscomp$1$$ = ($addr$jscomp$
|
|
9652
|
+
if ($addr$jscomp$35_flags$jscomp$14$$ >> 1 >= this.start_address) {
|
|
9653
|
+
var $color$jscomp$3_memory_start_memory_start$jscomp$1$$ = ($addr$jscomp$35_flags$jscomp$14$$ >> 1) - this.start_address;
|
|
9596
9654
|
$row$jscomp$8$$ = $color$jscomp$3_memory_start_memory_start$jscomp$1$$ / $col$jscomp$5_max_cols$$ | 0;
|
|
9597
9655
|
$col$jscomp$5_max_cols$$ = $color$jscomp$3_memory_start_memory_start$jscomp$1$$ % $col$jscomp$5_max_cols$$;
|
|
9598
9656
|
} else {
|
|
9599
|
-
$color$jscomp$3_memory_start_memory_start$jscomp$1$$ = $addr$jscomp$
|
|
9657
|
+
$color$jscomp$3_memory_start_memory_start$jscomp$1$$ = $addr$jscomp$35_flags$jscomp$14$$ >> 1, $row$jscomp$8$$ = ($color$jscomp$3_memory_start_memory_start$jscomp$1$$ / $col$jscomp$5_max_cols$$ | 0) + this.scan_line_to_screen_row(this.line_compare), $col$jscomp$5_max_cols$$ = $color$jscomp$3_memory_start_memory_start$jscomp$1$$ % $col$jscomp$5_max_cols$$;
|
|
9600
9658
|
}
|
|
9601
9659
|
$dbg_assert$$module$src$log$$(0 <= $row$jscomp$8$$ && 0 <= $col$jscomp$5_max_cols$$);
|
|
9602
9660
|
if (!($col$jscomp$5_max_cols$$ >= this.max_cols || $row$jscomp$8$$ >= this.max_rows)) {
|
|
9603
|
-
$addr$jscomp$
|
|
9661
|
+
$addr$jscomp$35_flags$jscomp$14$$ & 1 ? ($color$jscomp$3_memory_start_memory_start$jscomp$1$$ = $chr$jscomp$13_value$jscomp$171$$, $chr$jscomp$13_value$jscomp$171$$ = this.vga_memory[$addr$jscomp$35_flags$jscomp$14$$ & -2]) : $color$jscomp$3_memory_start_memory_start$jscomp$1$$ = this.vga_memory[$addr$jscomp$35_flags$jscomp$14$$ | 1];
|
|
9604
9662
|
var $bg_color_mask$jscomp$1_blink_enabled$jscomp$1$$ = this.attribute_mode & 8;
|
|
9605
|
-
$addr$jscomp$
|
|
9663
|
+
$addr$jscomp$35_flags$jscomp$14$$ = ($bg_color_mask$jscomp$1_blink_enabled$jscomp$1$$ && $color$jscomp$3_memory_start_memory_start$jscomp$1$$ & 128 ? this.screen.FLAG_BLINKING : 0) | (!this.font_page_ab_enabled || $color$jscomp$3_memory_start_memory_start$jscomp$1$$ & 8 ? 0 : this.screen.FLAG_FONT_PAGE_B);
|
|
9606
9664
|
var $fg_color_mask$jscomp$1$$ = this.font_page_ab_enabled ? 7 : 15;
|
|
9607
9665
|
$bg_color_mask$jscomp$1_blink_enabled$jscomp$1$$ = $bg_color_mask$jscomp$1_blink_enabled$jscomp$1$$ ? 7 : 15;
|
|
9608
|
-
this.bus.send("screen-put-char", [$row$jscomp$8$$, $col$jscomp$5_max_cols$$, $chr$jscomp$
|
|
9609
|
-
this.screen.put_char($row$jscomp$8$$, $col$jscomp$5_max_cols$$, $chr$jscomp$
|
|
9666
|
+
this.bus.send("screen-put-char", [$row$jscomp$8$$, $col$jscomp$5_max_cols$$, $chr$jscomp$13_value$jscomp$171$$]);
|
|
9667
|
+
this.screen.put_char($row$jscomp$8$$, $col$jscomp$5_max_cols$$, $chr$jscomp$13_value$jscomp$171$$, $addr$jscomp$35_flags$jscomp$14$$, this.vga256_palette[this.dac_mask & this.dac_map[$color$jscomp$3_memory_start_memory_start$jscomp$1$$ >> 4 & $bg_color_mask$jscomp$1_blink_enabled$jscomp$1$$]], this.vga256_palette[this.dac_mask & this.dac_map[$color$jscomp$3_memory_start_memory_start$jscomp$1$$ & $fg_color_mask$jscomp$1$$]]);
|
|
9610
9668
|
}
|
|
9611
9669
|
};
|
|
9612
9670
|
$VGAScreen$$module$src$vga$$.prototype.update_cursor = function() {
|
|
@@ -9652,27 +9710,27 @@ $VGAScreen$$module$src$vga$$.prototype.vga_addr_shift_count = function() {
|
|
|
9652
9710
|
$shift_count$$ -= this.attribute_mode & 64;
|
|
9653
9711
|
return $shift_count$$ >>> 6;
|
|
9654
9712
|
};
|
|
9655
|
-
$VGAScreen$$module$src$vga$$.prototype.vga_addr_to_pixel = function($addr$jscomp$
|
|
9713
|
+
$VGAScreen$$module$src$vga$$.prototype.vga_addr_to_pixel = function($addr$jscomp$36$$) {
|
|
9656
9714
|
var $shift_count$jscomp$1$$ = this.vga_addr_shift_count();
|
|
9657
9715
|
if (~this.crtc_mode & 3) {
|
|
9658
|
-
var $col$jscomp$7_pixel_addr$jscomp$1$$ = $addr$jscomp$
|
|
9716
|
+
var $col$jscomp$7_pixel_addr$jscomp$1$$ = $addr$jscomp$36$$ - this.start_address;
|
|
9659
9717
|
$col$jscomp$7_pixel_addr$jscomp$1$$ &= this.crtc_mode << 13 | -24577;
|
|
9660
9718
|
$col$jscomp$7_pixel_addr$jscomp$1$$ <<= $shift_count$jscomp$1$$;
|
|
9661
9719
|
var $row$jscomp$10$$ = $col$jscomp$7_pixel_addr$jscomp$1$$ / this.virtual_width | 0;
|
|
9662
9720
|
$col$jscomp$7_pixel_addr$jscomp$1$$ %= this.virtual_width;
|
|
9663
9721
|
switch(this.crtc_mode & 3) {
|
|
9664
9722
|
case 2:
|
|
9665
|
-
$row$jscomp$10$$ = $row$jscomp$10$$ << 1 | $addr$jscomp$
|
|
9723
|
+
$row$jscomp$10$$ = $row$jscomp$10$$ << 1 | $addr$jscomp$36$$ >> 13 & 1;
|
|
9666
9724
|
break;
|
|
9667
9725
|
case 1:
|
|
9668
|
-
$row$jscomp$10$$ = $row$jscomp$10$$ << 1 | $addr$jscomp$
|
|
9726
|
+
$row$jscomp$10$$ = $row$jscomp$10$$ << 1 | $addr$jscomp$36$$ >> 14 & 1;
|
|
9669
9727
|
break;
|
|
9670
9728
|
case 0:
|
|
9671
|
-
$row$jscomp$10$$ = $row$jscomp$10$$ << 2 | $addr$jscomp$
|
|
9729
|
+
$row$jscomp$10$$ = $row$jscomp$10$$ << 2 | $addr$jscomp$36$$ >> 13 & 3;
|
|
9672
9730
|
}
|
|
9673
9731
|
return $row$jscomp$10$$ * this.virtual_width + $col$jscomp$7_pixel_addr$jscomp$1$$ + (this.start_address << $shift_count$jscomp$1$$);
|
|
9674
9732
|
}
|
|
9675
|
-
return $addr$jscomp$
|
|
9733
|
+
return $addr$jscomp$36$$ << $shift_count$jscomp$1$$;
|
|
9676
9734
|
};
|
|
9677
9735
|
$VGAScreen$$module$src$vga$$.prototype.scan_line_to_screen_row = function($scan_line$$) {
|
|
9678
9736
|
this.max_scan_line & 128 && ($scan_line$$ >>>= 1);
|
|
@@ -10250,27 +10308,27 @@ $VGAScreen$$module$src$vga$$.prototype.svga_register_read = function($n$jscomp$1
|
|
|
10250
10308
|
};
|
|
10251
10309
|
$VGAScreen$$module$src$vga$$.prototype.vga_replot = function() {
|
|
10252
10310
|
for (var $pixel_addr$jscomp$2_start$jscomp$40$$ = this.diff_plot_min & -16, $end$jscomp$24$$ = Math.min(this.diff_plot_max | 15, 524287), $addr_shift$$ = this.vga_addr_shift_count(), $addr_substitution$$ = ~this.crtc_mode & 3, $shift_mode$$ = this.planar_mode & 96, $pel_width$$ = this.attribute_mode & 64; $pixel_addr$jscomp$2_start$jscomp$40$$ <= $end$jscomp$24$$;) {
|
|
10253
|
-
var $addr$jscomp$
|
|
10311
|
+
var $addr$jscomp$37_shift_loads$$ = $pixel_addr$jscomp$2_start$jscomp$40$$ >>> $addr_shift$$;
|
|
10254
10312
|
if ($addr_substitution$$) {
|
|
10255
10313
|
var $byte0_j$jscomp$10_row$jscomp$11$$ = $pixel_addr$jscomp$2_start$jscomp$40$$ / this.virtual_width | 0, $byte1_col$jscomp$8$$ = $pixel_addr$jscomp$2_start$jscomp$40$$ - this.virtual_width * $byte0_j$jscomp$10_row$jscomp$11$$;
|
|
10256
10314
|
switch($addr_substitution$$) {
|
|
10257
10315
|
case 1:
|
|
10258
|
-
$addr$jscomp$
|
|
10316
|
+
$addr$jscomp$37_shift_loads$$ = ($byte0_j$jscomp$10_row$jscomp$11$$ & 1) << 13;
|
|
10259
10317
|
$byte0_j$jscomp$10_row$jscomp$11$$ >>>= 1;
|
|
10260
10318
|
break;
|
|
10261
10319
|
case 2:
|
|
10262
|
-
$addr$jscomp$
|
|
10320
|
+
$addr$jscomp$37_shift_loads$$ = ($byte0_j$jscomp$10_row$jscomp$11$$ & 1) << 14;
|
|
10263
10321
|
$byte0_j$jscomp$10_row$jscomp$11$$ >>>= 1;
|
|
10264
10322
|
break;
|
|
10265
10323
|
case 3:
|
|
10266
|
-
$addr$jscomp$
|
|
10324
|
+
$addr$jscomp$37_shift_loads$$ = ($byte0_j$jscomp$10_row$jscomp$11$$ & 3) << 13, $byte0_j$jscomp$10_row$jscomp$11$$ >>>= 2;
|
|
10267
10325
|
}
|
|
10268
|
-
$addr$jscomp$
|
|
10326
|
+
$addr$jscomp$37_shift_loads$$ |= ($byte0_j$jscomp$10_row$jscomp$11$$ * this.virtual_width + $byte1_col$jscomp$8$$ >>> $addr_shift$$) + this.start_address;
|
|
10269
10327
|
}
|
|
10270
|
-
$byte0_j$jscomp$10_row$jscomp$11$$ = this.plane0[$addr$jscomp$
|
|
10271
|
-
$byte1_col$jscomp$8$$ = this.plane1[$addr$jscomp$
|
|
10272
|
-
var $byte2$$ = this.plane2[$addr$jscomp$
|
|
10273
|
-
$addr$jscomp$
|
|
10328
|
+
$byte0_j$jscomp$10_row$jscomp$11$$ = this.plane0[$addr$jscomp$37_shift_loads$$];
|
|
10329
|
+
$byte1_col$jscomp$8$$ = this.plane1[$addr$jscomp$37_shift_loads$$];
|
|
10330
|
+
var $byte2$$ = this.plane2[$addr$jscomp$37_shift_loads$$], $byte3$$ = this.plane3[$addr$jscomp$37_shift_loads$$];
|
|
10331
|
+
$addr$jscomp$37_shift_loads$$ = new Uint8Array(8);
|
|
10274
10332
|
switch($shift_mode$$) {
|
|
10275
10333
|
case 0:
|
|
10276
10334
|
$byte0_j$jscomp$10_row$jscomp$11$$ <<= 0;
|
|
@@ -10278,31 +10336,31 @@ $VGAScreen$$module$src$vga$$.prototype.vga_replot = function() {
|
|
|
10278
10336
|
$byte2$$ <<= 2;
|
|
10279
10337
|
$byte3$$ <<= 3;
|
|
10280
10338
|
for (var $i$jscomp$86$$ = 7; 0 <= $i$jscomp$86$$; $i$jscomp$86$$--) {
|
|
10281
|
-
$addr$jscomp$
|
|
10339
|
+
$addr$jscomp$37_shift_loads$$[7 - $i$jscomp$86$$] = $byte0_j$jscomp$10_row$jscomp$11$$ >> $i$jscomp$86$$ & 1 | $byte1_col$jscomp$8$$ >> $i$jscomp$86$$ & 2 | $byte2$$ >> $i$jscomp$86$$ & 4 | $byte3$$ >> $i$jscomp$86$$ & 8;
|
|
10282
10340
|
}
|
|
10283
10341
|
break;
|
|
10284
10342
|
case 32:
|
|
10285
|
-
$addr$jscomp$
|
|
10286
|
-
$addr$jscomp$
|
|
10287
|
-
$addr$jscomp$
|
|
10288
|
-
$addr$jscomp$
|
|
10289
|
-
$addr$jscomp$
|
|
10290
|
-
$addr$jscomp$
|
|
10291
|
-
$addr$jscomp$
|
|
10292
|
-
$addr$jscomp$
|
|
10343
|
+
$addr$jscomp$37_shift_loads$$[0] = $byte0_j$jscomp$10_row$jscomp$11$$ >> 6 & 3 | $byte2$$ >> 4 & 12;
|
|
10344
|
+
$addr$jscomp$37_shift_loads$$[1] = $byte0_j$jscomp$10_row$jscomp$11$$ >> 4 & 3 | $byte2$$ >> 2 & 12;
|
|
10345
|
+
$addr$jscomp$37_shift_loads$$[2] = $byte0_j$jscomp$10_row$jscomp$11$$ >> 2 & 3 | $byte2$$ >> 0 & 12;
|
|
10346
|
+
$addr$jscomp$37_shift_loads$$[3] = $byte0_j$jscomp$10_row$jscomp$11$$ >> 0 & 3 | $byte2$$ << 2 & 12;
|
|
10347
|
+
$addr$jscomp$37_shift_loads$$[4] = $byte1_col$jscomp$8$$ >> 6 & 3 | $byte3$$ >> 4 & 12;
|
|
10348
|
+
$addr$jscomp$37_shift_loads$$[5] = $byte1_col$jscomp$8$$ >> 4 & 3 | $byte3$$ >> 2 & 12;
|
|
10349
|
+
$addr$jscomp$37_shift_loads$$[6] = $byte1_col$jscomp$8$$ >> 2 & 3 | $byte3$$ >> 0 & 12;
|
|
10350
|
+
$addr$jscomp$37_shift_loads$$[7] = $byte1_col$jscomp$8$$ >> 0 & 3 | $byte3$$ << 2 & 12;
|
|
10293
10351
|
break;
|
|
10294
10352
|
case 64:
|
|
10295
10353
|
case 96:
|
|
10296
|
-
$addr$jscomp$
|
|
10354
|
+
$addr$jscomp$37_shift_loads$$[0] = $byte0_j$jscomp$10_row$jscomp$11$$ >> 4 & 15, $addr$jscomp$37_shift_loads$$[1] = $byte0_j$jscomp$10_row$jscomp$11$$ >> 0 & 15, $addr$jscomp$37_shift_loads$$[2] = $byte1_col$jscomp$8$$ >> 4 & 15, $addr$jscomp$37_shift_loads$$[3] = $byte1_col$jscomp$8$$ >> 0 & 15, $addr$jscomp$37_shift_loads$$[4] = $byte2$$ >> 4 & 15, $addr$jscomp$37_shift_loads$$[5] = $byte2$$ >> 0 & 15, $addr$jscomp$37_shift_loads$$[6] = $byte3$$ >> 4 & 15, $addr$jscomp$37_shift_loads$$[7] =
|
|
10297
10355
|
$byte3$$ >> 0 & 15;
|
|
10298
10356
|
}
|
|
10299
10357
|
if ($pel_width$$) {
|
|
10300
10358
|
for ($byte0_j$jscomp$10_row$jscomp$11$$ = $i$jscomp$86$$ = 0; 4 > $i$jscomp$86$$; $i$jscomp$86$$++, $pixel_addr$jscomp$2_start$jscomp$40$$++, $byte0_j$jscomp$10_row$jscomp$11$$ += 2) {
|
|
10301
|
-
this.pixel_buffer[$pixel_addr$jscomp$2_start$jscomp$40$$] = $addr$jscomp$
|
|
10359
|
+
this.pixel_buffer[$pixel_addr$jscomp$2_start$jscomp$40$$] = $addr$jscomp$37_shift_loads$$[$byte0_j$jscomp$10_row$jscomp$11$$] << 4 | $addr$jscomp$37_shift_loads$$[$byte0_j$jscomp$10_row$jscomp$11$$ + 1];
|
|
10302
10360
|
}
|
|
10303
10361
|
} else {
|
|
10304
10362
|
for ($i$jscomp$86$$ = 0; 8 > $i$jscomp$86$$; $i$jscomp$86$$++, $pixel_addr$jscomp$2_start$jscomp$40$$++) {
|
|
10305
|
-
this.pixel_buffer[$pixel_addr$jscomp$2_start$jscomp$40$$] = $addr$jscomp$
|
|
10363
|
+
this.pixel_buffer[$pixel_addr$jscomp$2_start$jscomp$40$$] = $addr$jscomp$37_shift_loads$$[$i$jscomp$86$$];
|
|
10306
10364
|
}
|
|
10307
10365
|
}
|
|
10308
10366
|
}
|
|
@@ -10365,8 +10423,8 @@ $VGAScreen$$module$src$vga$$.prototype.set_font_page = function() {
|
|
|
10365
10423
|
this.complete_redraw();
|
|
10366
10424
|
};
|
|
10367
10425
|
const $STAT_NAMES$$module$src$virtio_balloon$$ = "SWAP_IN SWAP_OUT MAJFLT MINFLT MEMFREE MEMTOT AVAIL CACHES HTLB_PGALLOC HTLB_PGFAIL".split(" ");
|
|
10368
|
-
function $VirtioBalloon$$module$src$virtio_balloon$$($cpu$jscomp$25$$, $bus$jscomp$
|
|
10369
|
-
this.bus = $bus$jscomp$
|
|
10426
|
+
function $VirtioBalloon$$module$src$virtio_balloon$$($cpu$jscomp$25$$, $bus$jscomp$27$$) {
|
|
10427
|
+
this.bus = $bus$jscomp$27$$;
|
|
10370
10428
|
this.zeroed = this.fp_cmd = this.actual = this.num_pages = 0;
|
|
10371
10429
|
this.virtio = new $VirtIO$$module$src$virtio$$($cpu$jscomp$25$$, {name:"virtio-balloon", pci_id:88, device_id:4165, subsystem_device_id:5, common:{initial_port:55296, queues:[{size_supported:32, notify_offset:0}, {size_supported:32, notify_offset:0}, {size_supported:2, notify_offset:1}, {size_supported:64, notify_offset:2}, ], features:[1, 3, 32, ], on_driver_ok:() => {
|
|
10372
10430
|
$dbg_log$$module$src$log$$("Balloon setup", 2048);
|
|
@@ -10544,7 +10602,7 @@ function $load_kernel$$module$src$kernel$$($data8$jscomp$inline_162_mem8$$, $bzi
|
|
|
10544
10602
|
}
|
|
10545
10603
|
}
|
|
10546
10604
|
}
|
|
10547
|
-
;function $CPU$$module$src$cpu$$($bus$jscomp$
|
|
10605
|
+
;function $CPU$$module$src$cpu$$($bus$jscomp$28$$, $memory$jscomp$1_wm$$, $stop_idling$$) {
|
|
10548
10606
|
this.stop_idling = $stop_idling$$;
|
|
10549
10607
|
this.wm = $memory$jscomp$1_wm$$;
|
|
10550
10608
|
this.wasm_patch();
|
|
@@ -10623,53 +10681,47 @@ function $load_kernel$$module$src$kernel$$($data8$jscomp$inline_162_mem8$$, $bzi
|
|
|
10623
10681
|
this.fw_pointer = 0;
|
|
10624
10682
|
this.option_roms = [];
|
|
10625
10683
|
this.io = void 0;
|
|
10626
|
-
this.bus = $bus$jscomp$
|
|
10684
|
+
this.bus = $bus$jscomp$28$$;
|
|
10627
10685
|
this.set_tsc(0, 0);
|
|
10628
10686
|
this.seen_code = {};
|
|
10629
10687
|
this.seen_code_uncompiled = {};
|
|
10630
10688
|
}
|
|
10631
|
-
$CPU$$module$src$cpu$$.prototype.mmap_read8 = function($addr$jscomp$
|
|
10632
|
-
$addr$jscomp$
|
|
10633
|
-
$dbg_assert$$module$src$log$$(0 <= $addr$jscomp$
|
|
10634
|
-
return $addr$jscomp$
|
|
10689
|
+
$CPU$$module$src$cpu$$.prototype.mmap_read8 = function($addr$jscomp$38_value$jscomp$183$$) {
|
|
10690
|
+
$addr$jscomp$38_value$jscomp$183$$ = this.memory_map_read8[$addr$jscomp$38_value$jscomp$183$$ >>> 17]($addr$jscomp$38_value$jscomp$183$$);
|
|
10691
|
+
$dbg_assert$$module$src$log$$(0 <= $addr$jscomp$38_value$jscomp$183$$ && 255 >= $addr$jscomp$38_value$jscomp$183$$);
|
|
10692
|
+
return $addr$jscomp$38_value$jscomp$183$$;
|
|
10635
10693
|
};
|
|
10636
|
-
$CPU$$module$src$cpu$$.prototype.mmap_write8 = function($addr$jscomp$
|
|
10694
|
+
$CPU$$module$src$cpu$$.prototype.mmap_write8 = function($addr$jscomp$39$$, $value$jscomp$184$$) {
|
|
10637
10695
|
$dbg_assert$$module$src$log$$(0 <= $value$jscomp$184$$ && 255 >= $value$jscomp$184$$);
|
|
10638
|
-
this.memory_map_write8[$addr$jscomp$
|
|
10639
|
-
};
|
|
10640
|
-
$CPU$$module$src$cpu$$.prototype.mmap_read16 = function($addr$jscomp$41_value$jscomp$185$$) {
|
|
10641
|
-
var $fn$jscomp$17$$ = this.memory_map_read8[$addr$jscomp$41_value$jscomp$185$$ >>> 17];
|
|
10642
|
-
$addr$jscomp$41_value$jscomp$185$$ = $fn$jscomp$17$$($addr$jscomp$41_value$jscomp$185$$) | $fn$jscomp$17$$($addr$jscomp$41_value$jscomp$185$$ + 1 | 0) << 8;
|
|
10643
|
-
$dbg_assert$$module$src$log$$(0 <= $addr$jscomp$41_value$jscomp$185$$ && 65535 >= $addr$jscomp$41_value$jscomp$185$$);
|
|
10644
|
-
return $addr$jscomp$41_value$jscomp$185$$;
|
|
10696
|
+
this.memory_map_write8[$addr$jscomp$39$$ >>> 17]($addr$jscomp$39$$, $value$jscomp$184$$);
|
|
10645
10697
|
};
|
|
10646
|
-
$CPU$$module$src$cpu$$.prototype.mmap_write16 = function($addr$jscomp$
|
|
10647
|
-
var $fn$jscomp$
|
|
10648
|
-
$dbg_assert$$module$src$log$$(0 <= $value$jscomp$
|
|
10649
|
-
$fn$jscomp$
|
|
10650
|
-
$fn$jscomp$
|
|
10698
|
+
$CPU$$module$src$cpu$$.prototype.mmap_write16 = function($addr$jscomp$40$$, $value$jscomp$185$$) {
|
|
10699
|
+
var $fn$jscomp$17$$ = this.memory_map_write8[$addr$jscomp$40$$ >>> 17];
|
|
10700
|
+
$dbg_assert$$module$src$log$$(0 <= $value$jscomp$185$$ && 65535 >= $value$jscomp$185$$);
|
|
10701
|
+
$fn$jscomp$17$$($addr$jscomp$40$$, $value$jscomp$185$$ & 255);
|
|
10702
|
+
$fn$jscomp$17$$($addr$jscomp$40$$ + 1 | 0, $value$jscomp$185$$ >> 8);
|
|
10651
10703
|
};
|
|
10652
|
-
$CPU$$module$src$cpu$$.prototype.mmap_read32 = function($addr$jscomp$
|
|
10653
|
-
return this.memory_map_read32[$addr$jscomp$
|
|
10704
|
+
$CPU$$module$src$cpu$$.prototype.mmap_read32 = function($addr$jscomp$41$$) {
|
|
10705
|
+
return this.memory_map_read32[$addr$jscomp$41$$ >>> 17]($addr$jscomp$41$$);
|
|
10654
10706
|
};
|
|
10655
|
-
$CPU$$module$src$cpu$$.prototype.mmap_write32 = function($addr$jscomp$
|
|
10656
|
-
this.memory_map_write32[$addr$jscomp$
|
|
10707
|
+
$CPU$$module$src$cpu$$.prototype.mmap_write32 = function($addr$jscomp$42$$, $value$jscomp$186$$) {
|
|
10708
|
+
this.memory_map_write32[$addr$jscomp$42$$ >>> 17]($addr$jscomp$42$$, $value$jscomp$186$$);
|
|
10657
10709
|
};
|
|
10658
|
-
$CPU$$module$src$cpu$$.prototype.mmap_write64 = function($addr$jscomp$
|
|
10659
|
-
var $aligned_addr$jscomp$5_write_func32$jscomp$1$$ = $addr$jscomp$
|
|
10660
|
-
$dbg_assert$$module$src$log$$($aligned_addr$jscomp$5_write_func32$jscomp$1$$ === $addr$jscomp$
|
|
10710
|
+
$CPU$$module$src$cpu$$.prototype.mmap_write64 = function($addr$jscomp$43$$, $value0$jscomp$2$$, $value1$jscomp$9$$) {
|
|
10711
|
+
var $aligned_addr$jscomp$5_write_func32$jscomp$1$$ = $addr$jscomp$43$$ >>> 17;
|
|
10712
|
+
$dbg_assert$$module$src$log$$($aligned_addr$jscomp$5_write_func32$jscomp$1$$ === $addr$jscomp$43$$ + 7 >>> 17);
|
|
10661
10713
|
$aligned_addr$jscomp$5_write_func32$jscomp$1$$ = this.memory_map_write32[$aligned_addr$jscomp$5_write_func32$jscomp$1$$];
|
|
10662
|
-
$aligned_addr$jscomp$5_write_func32$jscomp$1$$($addr$jscomp$
|
|
10663
|
-
$aligned_addr$jscomp$5_write_func32$jscomp$1$$($addr$jscomp$
|
|
10714
|
+
$aligned_addr$jscomp$5_write_func32$jscomp$1$$($addr$jscomp$43$$, $value0$jscomp$2$$);
|
|
10715
|
+
$aligned_addr$jscomp$5_write_func32$jscomp$1$$($addr$jscomp$43$$ + 4, $value1$jscomp$9$$);
|
|
10664
10716
|
};
|
|
10665
|
-
$CPU$$module$src$cpu$$.prototype.mmap_write128 = function($addr$jscomp$
|
|
10666
|
-
var $aligned_addr$jscomp$6_write_func32$jscomp$2$$ = $addr$jscomp$
|
|
10667
|
-
$dbg_assert$$module$src$log$$($aligned_addr$jscomp$6_write_func32$jscomp$2$$ === $addr$jscomp$
|
|
10717
|
+
$CPU$$module$src$cpu$$.prototype.mmap_write128 = function($addr$jscomp$44$$, $value0$jscomp$3$$, $value1$jscomp$10$$, $value2$jscomp$8$$, $value3$jscomp$5$$) {
|
|
10718
|
+
var $aligned_addr$jscomp$6_write_func32$jscomp$2$$ = $addr$jscomp$44$$ >>> 17;
|
|
10719
|
+
$dbg_assert$$module$src$log$$($aligned_addr$jscomp$6_write_func32$jscomp$2$$ === $addr$jscomp$44$$ + 12 >>> 17);
|
|
10668
10720
|
$aligned_addr$jscomp$6_write_func32$jscomp$2$$ = this.memory_map_write32[$aligned_addr$jscomp$6_write_func32$jscomp$2$$];
|
|
10669
|
-
$aligned_addr$jscomp$6_write_func32$jscomp$2$$($addr$jscomp$
|
|
10670
|
-
$aligned_addr$jscomp$6_write_func32$jscomp$2$$($addr$jscomp$
|
|
10671
|
-
$aligned_addr$jscomp$6_write_func32$jscomp$2$$($addr$jscomp$
|
|
10672
|
-
$aligned_addr$jscomp$6_write_func32$jscomp$2$$($addr$jscomp$
|
|
10721
|
+
$aligned_addr$jscomp$6_write_func32$jscomp$2$$($addr$jscomp$44$$, $value0$jscomp$3$$);
|
|
10722
|
+
$aligned_addr$jscomp$6_write_func32$jscomp$2$$($addr$jscomp$44$$ + 4, $value1$jscomp$10$$);
|
|
10723
|
+
$aligned_addr$jscomp$6_write_func32$jscomp$2$$($addr$jscomp$44$$ + 8, $value2$jscomp$8$$);
|
|
10724
|
+
$aligned_addr$jscomp$6_write_func32$jscomp$2$$($addr$jscomp$44$$ + 12, $value3$jscomp$5$$);
|
|
10673
10725
|
};
|
|
10674
10726
|
$CPU$$module$src$cpu$$.prototype.write_blob = function($blob$jscomp$16$$, $offset$jscomp$77$$) {
|
|
10675
10727
|
$dbg_assert$$module$src$log$$($blob$jscomp$16$$ && 0 <= $blob$jscomp$16$$.length);
|
|
@@ -10746,8 +10798,8 @@ $CPU$$module$src$cpu$$.prototype.wasm_patch = function() {
|
|
|
10746
10798
|
this.zstd_read = $get_import$$("zstd_read");
|
|
10747
10799
|
this.zstd_read_free = $get_import$$("zstd_read_free");
|
|
10748
10800
|
};
|
|
10749
|
-
$CPU$$module$src$cpu$$.prototype.jit_force_generate = function($addr$jscomp$
|
|
10750
|
-
this.jit_force_generate_unsafe ? this.jit_force_generate_unsafe($addr$jscomp$
|
|
10801
|
+
$CPU$$module$src$cpu$$.prototype.jit_force_generate = function($addr$jscomp$45$$) {
|
|
10802
|
+
this.jit_force_generate_unsafe ? this.jit_force_generate_unsafe($addr$jscomp$45$$) : $dbg_assert$$module$src$log$$(!1, "Not supported in this wasm build: jit_force_generate_unsafe");
|
|
10751
10803
|
};
|
|
10752
10804
|
$CPU$$module$src$cpu$$.prototype.jit_clear_func = function($index$jscomp$87$$) {
|
|
10753
10805
|
$dbg_assert$$module$src$log$$(0 <= $index$jscomp$87$$ && 900 > $index$jscomp$87$$);
|
|
@@ -11105,7 +11157,7 @@ $CPU$$module$src$cpu$$.prototype.init = function($option_rom$jscomp$1_settings$j
|
|
|
11105
11157
|
$dbg_assert$$module$src$log$$(!1, "config port: Read past value");
|
|
11106
11158
|
return 0;
|
|
11107
11159
|
});
|
|
11108
|
-
$ide_config$jscomp$2_io$jscomp$5$$.register_write(1296, this, void 0, function($buffer32_value$jscomp$
|
|
11160
|
+
$ide_config$jscomp$2_io$jscomp$5$$.register_write(1296, this, void 0, function($buffer32_value$jscomp$187$$) {
|
|
11109
11161
|
function $i32$$($x$jscomp$120$$) {
|
|
11110
11162
|
return new Uint8Array(Int32Array.of($x$jscomp$120$$).buffer);
|
|
11111
11163
|
}
|
|
@@ -11115,35 +11167,35 @@ $CPU$$module$src$cpu$$.prototype.init = function($option_rom$jscomp$1_settings$j
|
|
|
11115
11167
|
function $to_be32$$($x$jscomp$122$$) {
|
|
11116
11168
|
return $x$jscomp$122$$ << 24 | $x$jscomp$122$$ << 8 & 16711680 | $x$jscomp$122$$ >> 8 & 65280 | $x$jscomp$122$$ >>> 24;
|
|
11117
11169
|
}
|
|
11118
|
-
$dbg_log$$module$src$log$$("bios config port, index=" + $h$$module$src$lib$$($buffer32_value$jscomp$
|
|
11170
|
+
$dbg_log$$module$src$log$$("bios config port, index=" + $h$$module$src$lib$$($buffer32_value$jscomp$187$$));
|
|
11119
11171
|
this.fw_pointer = 0;
|
|
11120
|
-
if (0 === $buffer32_value$jscomp$
|
|
11172
|
+
if (0 === $buffer32_value$jscomp$187$$) {
|
|
11121
11173
|
this.fw_value = $i32$$(1431127377);
|
|
11122
11174
|
} else {
|
|
11123
|
-
if (1 === $buffer32_value$jscomp$
|
|
11175
|
+
if (1 === $buffer32_value$jscomp$187$$) {
|
|
11124
11176
|
this.fw_value = $i32$$(0);
|
|
11125
11177
|
} else {
|
|
11126
|
-
if (3 === $buffer32_value$jscomp$
|
|
11178
|
+
if (3 === $buffer32_value$jscomp$187$$) {
|
|
11127
11179
|
this.fw_value = $i32$$(this.memory_size[0]);
|
|
11128
11180
|
} else {
|
|
11129
|
-
if (5 === $buffer32_value$jscomp$
|
|
11181
|
+
if (5 === $buffer32_value$jscomp$187$$) {
|
|
11130
11182
|
this.fw_value = $i32$$(1);
|
|
11131
11183
|
} else {
|
|
11132
|
-
if (15 === $buffer32_value$jscomp$
|
|
11184
|
+
if (15 === $buffer32_value$jscomp$187$$) {
|
|
11133
11185
|
this.fw_value = $i32$$(1);
|
|
11134
11186
|
} else {
|
|
11135
|
-
if (13 === $buffer32_value$jscomp$
|
|
11187
|
+
if (13 === $buffer32_value$jscomp$187$$) {
|
|
11136
11188
|
this.fw_value = new Uint8Array(16);
|
|
11137
11189
|
} else {
|
|
11138
|
-
if (25 === $buffer32_value$jscomp$
|
|
11139
|
-
$buffer32_value$jscomp$
|
|
11140
|
-
const $buffer8$$ = new Uint8Array($buffer32_value$jscomp$
|
|
11141
|
-
$buffer32_value$jscomp$
|
|
11190
|
+
if (25 === $buffer32_value$jscomp$187$$) {
|
|
11191
|
+
$buffer32_value$jscomp$187$$ = new Int32Array(4 + 64 * this.option_roms.length);
|
|
11192
|
+
const $buffer8$$ = new Uint8Array($buffer32_value$jscomp$187$$.buffer);
|
|
11193
|
+
$buffer32_value$jscomp$187$$[0] = $to_be32$$(this.option_roms.length);
|
|
11142
11194
|
for (let $i$jscomp$95$$ = 0; $i$jscomp$95$$ < this.option_roms.length; $i$jscomp$95$$++) {
|
|
11143
11195
|
const {name:$name$jscomp$108$$, data:$data$jscomp$219$$} = this.option_roms[$i$jscomp$95$$], $file_struct_ptr$$ = 4 + 64 * $i$jscomp$95$$;
|
|
11144
11196
|
$dbg_assert$$module$src$log$$(65536 > 49152 + $i$jscomp$95$$);
|
|
11145
|
-
$buffer32_value$jscomp$
|
|
11146
|
-
$buffer32_value$jscomp$
|
|
11197
|
+
$buffer32_value$jscomp$187$$[$file_struct_ptr$$ + 0 >> 2] = $to_be32$$($data$jscomp$219$$.length);
|
|
11198
|
+
$buffer32_value$jscomp$187$$[$file_struct_ptr$$ + 4 >> 2] = $to_be16$$(49152 + $i$jscomp$95$$);
|
|
11147
11199
|
$dbg_assert$$module$src$log$$(56 > $name$jscomp$108$$.length);
|
|
11148
11200
|
for (let $j$jscomp$11$$ = 0; $j$jscomp$11$$ < $name$jscomp$108$$.length; $j$jscomp$11$$++) {
|
|
11149
11201
|
$buffer8$$[$file_struct_ptr$$ + 8 + $j$jscomp$11$$] = $name$jscomp$108$$.charCodeAt($j$jscomp$11$$);
|
|
@@ -11151,7 +11203,7 @@ $CPU$$module$src$cpu$$.prototype.init = function($option_rom$jscomp$1_settings$j
|
|
|
11151
11203
|
}
|
|
11152
11204
|
this.fw_value = $buffer8$$;
|
|
11153
11205
|
} else {
|
|
11154
|
-
32768 <= $buffer32_value$jscomp$
|
|
11206
|
+
32768 <= $buffer32_value$jscomp$187$$ && 49152 > $buffer32_value$jscomp$187$$ ? this.fw_value = $i32$$(0) : 49152 <= $buffer32_value$jscomp$187$$ && $buffer32_value$jscomp$187$$ - 49152 < this.option_roms.length ? this.fw_value = this.option_roms[$buffer32_value$jscomp$187$$ - 49152].data : ($dbg_log$$module$src$log$$("Warning: Unimplemented fw index: " + $h$$module$src$lib$$($buffer32_value$jscomp$187$$)), this.fw_value = $i32$$(0));
|
|
11155
11207
|
}
|
|
11156
11208
|
}
|
|
11157
11209
|
}
|
|
@@ -11219,10 +11271,10 @@ $CPU$$module$src$cpu$$.prototype.load_multiboot_option_rom = function($buffer$js
|
|
|
11219
11271
|
$cpu$jscomp$26$$.write32(31792, $i$jscomp$98_multiboot_data$$);
|
|
11220
11272
|
$blob$jscomp$17_file_start_header_addr_start$jscomp$42_top_of_load$$ = 0;
|
|
11221
11273
|
var $view$jscomp$inline_408_was_memory$$ = !1;
|
|
11222
|
-
for (let $addr$jscomp$
|
|
11223
|
-
$view$jscomp$inline_408_was_memory$$ && void 0 !== $cpu$jscomp$26$$.memory_map_read8[$addr$jscomp$
|
|
11224
|
-
$cpu$jscomp$26$$.write32($i$jscomp$98_multiboot_data$$ + 16, 0), $cpu$jscomp$26$$.write32($i$jscomp$98_multiboot_data$$ + 20, 1), $i$jscomp$98_multiboot_data$$ += 24, $cmdline_utf8_entrypoint_load_addr_multiboot_mmap_count_program_headers$jscomp$inline_411$$ += 24, $view$jscomp$inline_408_was_memory$$ = !1) : $view$jscomp$inline_408_was_memory$$ || void 0 !== $cpu$jscomp$26$$.memory_map_read8[$addr$jscomp$
|
|
11225
|
-
$addr$jscomp$
|
|
11274
|
+
for (let $addr$jscomp$46$$ = 0; 4294967296 > $addr$jscomp$46$$; $addr$jscomp$46$$ += 131072) {
|
|
11275
|
+
$view$jscomp$inline_408_was_memory$$ && void 0 !== $cpu$jscomp$26$$.memory_map_read8[$addr$jscomp$46$$ >>> 17] ? ($cpu$jscomp$26$$.write32($i$jscomp$98_multiboot_data$$, 20), $cpu$jscomp$26$$.write32($i$jscomp$98_multiboot_data$$ + 4, $blob$jscomp$17_file_start_header_addr_start$jscomp$42_top_of_load$$), $cpu$jscomp$26$$.write32($i$jscomp$98_multiboot_data$$ + 8, 0), $cpu$jscomp$26$$.write32($i$jscomp$98_multiboot_data$$ + 12, $addr$jscomp$46$$ - $blob$jscomp$17_file_start_header_addr_start$jscomp$42_top_of_load$$),
|
|
11276
|
+
$cpu$jscomp$26$$.write32($i$jscomp$98_multiboot_data$$ + 16, 0), $cpu$jscomp$26$$.write32($i$jscomp$98_multiboot_data$$ + 20, 1), $i$jscomp$98_multiboot_data$$ += 24, $cmdline_utf8_entrypoint_load_addr_multiboot_mmap_count_program_headers$jscomp$inline_411$$ += 24, $view$jscomp$inline_408_was_memory$$ = !1) : $view$jscomp$inline_408_was_memory$$ || void 0 !== $cpu$jscomp$26$$.memory_map_read8[$addr$jscomp$46$$ >>> 17] || ($blob$jscomp$17_file_start_header_addr_start$jscomp$42_top_of_load$$ =
|
|
11277
|
+
$addr$jscomp$46$$, $view$jscomp$inline_408_was_memory$$ = !0);
|
|
11226
11278
|
}
|
|
11227
11279
|
$dbg_assert$$module$src$log$$(!$view$jscomp$inline_408_was_memory$$, "top of 4GB shouldn't have memory");
|
|
11228
11280
|
$cpu$jscomp$26$$.write32(31788, $cmdline_utf8_entrypoint_load_addr_multiboot_mmap_count_program_headers$jscomp$inline_411$$);
|
|
@@ -11318,17 +11370,17 @@ $CPU$$module$src$cpu$$.prototype.load_multiboot_option_rom = function($buffer$js
|
|
|
11318
11370
|
$cpu$jscomp$26$$.dump_regs_short();
|
|
11319
11371
|
return 732803074;
|
|
11320
11372
|
});
|
|
11321
|
-
this.io.register_write_consecutive(244, this, function($value$jscomp$
|
|
11322
|
-
console.log("Test exited with code " + $h$$module$src$lib$$($value$jscomp$
|
|
11373
|
+
this.io.register_write_consecutive(244, this, function($value$jscomp$188$$) {
|
|
11374
|
+
console.log("Test exited with code " + $h$$module$src$lib$$($value$jscomp$188$$, 2));
|
|
11323
11375
|
throw "HALT";
|
|
11324
11376
|
}, function() {
|
|
11325
11377
|
}, function() {
|
|
11326
11378
|
}, function() {
|
|
11327
11379
|
});
|
|
11328
11380
|
for (let $i$jscomp$99$$ = 0; 15 >= $i$jscomp$99$$; $i$jscomp$99$$++) {
|
|
11329
|
-
function $handle_write$$($value$jscomp$
|
|
11330
|
-
$dbg_log$$module$src$log$$("kvm-unit-test: Set irq " + $h$$module$src$lib$$($i$jscomp$99$$) + " to " + $h$$module$src$lib$$($value$jscomp$
|
|
11331
|
-
$value$jscomp$
|
|
11381
|
+
function $handle_write$$($value$jscomp$189$$) {
|
|
11382
|
+
$dbg_log$$module$src$log$$("kvm-unit-test: Set irq " + $h$$module$src$lib$$($i$jscomp$99$$) + " to " + $h$$module$src$lib$$($value$jscomp$189$$, 2));
|
|
11383
|
+
$value$jscomp$189$$ ? this.device_raise_irq($i$jscomp$99$$) : this.device_lower_irq($i$jscomp$99$$);
|
|
11332
11384
|
}
|
|
11333
11385
|
this.io.register_write(8192 + $i$jscomp$99$$, this, $handle_write$$, $handle_write$$, $handle_write$$);
|
|
11334
11386
|
}
|
|
@@ -11382,19 +11434,19 @@ $CPU$$module$src$cpu$$.prototype.load_bios = function() {
|
|
|
11382
11434
|
$dbg_assert$$module$src$log$$($vga_bios$$ instanceof ArrayBuffer);
|
|
11383
11435
|
var $vga_bios8$$ = new Uint8Array($vga_bios$$);
|
|
11384
11436
|
this.write_blob($vga_bios8$$, 786432);
|
|
11385
|
-
this.io.mmap_register(4272947200, 1048576, function($addr$jscomp$
|
|
11386
|
-
$addr$jscomp$
|
|
11387
|
-
return $addr$jscomp$
|
|
11437
|
+
this.io.mmap_register(4272947200, 1048576, function($addr$jscomp$47$$) {
|
|
11438
|
+
$addr$jscomp$47$$ = $addr$jscomp$47$$ - 4272947200 | 0;
|
|
11439
|
+
return $addr$jscomp$47$$ < $vga_bios8$$.length ? $vga_bios8$$[$addr$jscomp$47$$] : 0;
|
|
11388
11440
|
}, function() {
|
|
11389
11441
|
$dbg_assert$$module$src$log$$(!1, "Unexpected write to VGA rom");
|
|
11390
11442
|
});
|
|
11391
11443
|
} else {
|
|
11392
11444
|
$dbg_log$$module$src$log$$("Warning: No VGA BIOS");
|
|
11393
11445
|
}
|
|
11394
|
-
this.io.mmap_register(4293918720, 1048576, function($addr$jscomp$
|
|
11395
|
-
return this.mem8[$addr$jscomp$
|
|
11396
|
-
}.bind(this), function($addr$jscomp$
|
|
11397
|
-
this.mem8[$addr$jscomp$
|
|
11446
|
+
this.io.mmap_register(4293918720, 1048576, function($addr$jscomp$49$$) {
|
|
11447
|
+
return this.mem8[$addr$jscomp$49$$ & 1048575];
|
|
11448
|
+
}.bind(this), function($addr$jscomp$50$$, $value$jscomp$191$$) {
|
|
11449
|
+
this.mem8[$addr$jscomp$50$$ & 1048575] = $value$jscomp$191$$;
|
|
11398
11450
|
}.bind(this));
|
|
11399
11451
|
} else {
|
|
11400
11452
|
$dbg_log$$module$src$log$$("Warning: No BIOS");
|
|
@@ -11474,9 +11526,9 @@ $CPU$$module$src$cpu$$.prototype.dump_regs_short = function() {
|
|
|
11474
11526
|
$dbg_log$$module$src$log$$($lines$jscomp$1$$[1], 2);
|
|
11475
11527
|
};
|
|
11476
11528
|
$CPU$$module$src$cpu$$.prototype.dump_gdt_ldt = function() {
|
|
11477
|
-
function $dump_table$$($addr$jscomp$
|
|
11478
|
-
for (var $i$jscomp$108$$ = 0; $i$jscomp$108$$ < $size$jscomp$41$$; $i$jscomp$108$$ += 8, $addr$jscomp$
|
|
11479
|
-
var $base$jscomp$4$$ = this.read16($addr$jscomp$
|
|
11529
|
+
function $dump_table$$($addr$jscomp$51$$, $size$jscomp$41$$) {
|
|
11530
|
+
for (var $i$jscomp$108$$ = 0; $i$jscomp$108$$ < $size$jscomp$41$$; $i$jscomp$108$$ += 8, $addr$jscomp$51$$ += 8) {
|
|
11531
|
+
var $base$jscomp$4$$ = this.read16($addr$jscomp$51$$ + 2) | this.read8($addr$jscomp$51$$ + 4) << 16 | this.read8($addr$jscomp$51$$ + 7) << 24, $limit$$ = this.read16($addr$jscomp$51$$) | (this.read8($addr$jscomp$51$$ + 6) & 15) << 16, $access$jscomp$1$$ = this.read8($addr$jscomp$51$$ + 5), $flags$jscomp$18$$ = this.read8($addr$jscomp$51$$ + 6) >> 4, $flags_str$$ = "", $dpl$$ = $access$jscomp$1$$ >> 5 & 3;
|
|
11480
11532
|
$flags_str$$ = $access$jscomp$1$$ & 128 ? $flags_str$$ + " P " : $flags_str$$ + "NP ";
|
|
11481
11533
|
$access$jscomp$1$$ & 16 ? ($flags_str$$ = $flags$jscomp$18$$ & 4 ? $flags_str$$ + "32b " : $flags_str$$ + "16b ", $access$jscomp$1$$ & 8 ? ($flags_str$$ += "X ", $access$jscomp$1$$ & 4 && ($flags_str$$ += "C ")) : $flags_str$$ += "R ", $flags_str$$ += "RW ") : $flags_str$$ += "sys: " + $h$$module$src$lib$$($access$jscomp$1$$ & 15);
|
|
11482
11534
|
$flags$jscomp$18$$ & 8 && ($limit$$ = $limit$$ << 12 | 4095);
|
|
@@ -11490,12 +11542,12 @@ $CPU$$module$src$cpu$$.prototype.dump_gdt_ldt = function() {
|
|
|
11490
11542
|
};
|
|
11491
11543
|
$CPU$$module$src$cpu$$.prototype.dump_idt = function() {
|
|
11492
11544
|
for (var $i$jscomp$109$$ = 0; $i$jscomp$109$$ < this.idtr_size[0]; $i$jscomp$109$$ += 8) {
|
|
11493
|
-
var $addr$jscomp$
|
|
11494
|
-
$addr$jscomp$
|
|
11495
|
-
var $dpl$jscomp$1$$ = $addr$jscomp$
|
|
11496
|
-
var $line$jscomp$6$$ = 5 === ($addr$jscomp$
|
|
11497
|
-
$line$jscomp$6$$ = $addr$jscomp$
|
|
11498
|
-
$dbg_log$$module$src$log$$($h$$module$src$lib$$($i$jscomp$109$$ >> 3, 4) + " " + $h$$module$src$lib$$($base$jscomp$5$$ >>> 0, 8) + ", " + $h$$module$src$lib$$($selector$jscomp$1$$, 4) + "; " + $line$jscomp$6$$ + "; dpl = " + $dpl$jscomp$1$$ + ", t = " + $addr$jscomp$
|
|
11545
|
+
var $addr$jscomp$52_type$jscomp$156$$ = this.translate_address_system_read(this.idtr_offset[0] + $i$jscomp$109$$), $base$jscomp$5$$ = this.read16($addr$jscomp$52_type$jscomp$156$$) | this.read16($addr$jscomp$52_type$jscomp$156$$ + 6) << 16, $selector$jscomp$1$$ = this.read16($addr$jscomp$52_type$jscomp$156$$ + 2);
|
|
11546
|
+
$addr$jscomp$52_type$jscomp$156$$ = this.read8($addr$jscomp$52_type$jscomp$156$$ + 5);
|
|
11547
|
+
var $dpl$jscomp$1$$ = $addr$jscomp$52_type$jscomp$156$$ >> 5 & 3;
|
|
11548
|
+
var $line$jscomp$6$$ = 5 === ($addr$jscomp$52_type$jscomp$156$$ & 31) ? "task gate " : 14 === ($addr$jscomp$52_type$jscomp$156$$ & 31) ? "intr gate " : 15 === ($addr$jscomp$52_type$jscomp$156$$ & 31) ? "trap gate " : "invalid ";
|
|
11549
|
+
$line$jscomp$6$$ = $addr$jscomp$52_type$jscomp$156$$ & 128 ? $line$jscomp$6$$ + " P" : $line$jscomp$6$$ + "NP";
|
|
11550
|
+
$dbg_log$$module$src$log$$($h$$module$src$lib$$($i$jscomp$109$$ >> 3, 4) + " " + $h$$module$src$lib$$($base$jscomp$5$$ >>> 0, 8) + ", " + $h$$module$src$lib$$($selector$jscomp$1$$, 4) + "; " + $line$jscomp$6$$ + "; dpl = " + $dpl$jscomp$1$$ + ", t = " + $addr$jscomp$52_type$jscomp$156$$.toString(2));
|
|
11499
11551
|
}
|
|
11500
11552
|
};
|
|
11501
11553
|
$CPU$$module$src$cpu$$.prototype.dump_page_structures = function() {
|
|
@@ -11539,16 +11591,16 @@ $CPU$$module$src$cpu$$.prototype.get_memory_dump = function($start$jscomp$49$$,
|
|
|
11539
11591
|
void 0 === $start$jscomp$49$$ ? ($start$jscomp$49$$ = 0, $count$jscomp$70$$ = this.memory_size[0]) : void 0 === $count$jscomp$70$$ && ($count$jscomp$70$$ = $start$jscomp$49$$, $start$jscomp$49$$ = 0);
|
|
11540
11592
|
return this.mem8.slice($start$jscomp$49$$, $start$jscomp$49$$ + $count$jscomp$70$$).buffer;
|
|
11541
11593
|
};
|
|
11542
|
-
$CPU$$module$src$cpu$$.prototype.memory_hex_dump = function($addr$jscomp$
|
|
11594
|
+
$CPU$$module$src$cpu$$.prototype.memory_hex_dump = function($addr$jscomp$55$$, $length$jscomp$34$$) {
|
|
11543
11595
|
$length$jscomp$34$$ = $length$jscomp$34$$ || 64;
|
|
11544
11596
|
for (var $line$jscomp$7$$, $byt$$, $i$jscomp$112$$ = 0; $i$jscomp$112$$ < $length$jscomp$34$$ >> 4; $i$jscomp$112$$++) {
|
|
11545
|
-
$line$jscomp$7$$ = $h$$module$src$lib$$($addr$jscomp$
|
|
11597
|
+
$line$jscomp$7$$ = $h$$module$src$lib$$($addr$jscomp$55$$ + ($i$jscomp$112$$ << 4), 5) + " ";
|
|
11546
11598
|
for (var $j$jscomp$13$$ = 0; 16 > $j$jscomp$13$$; $j$jscomp$13$$++) {
|
|
11547
|
-
$byt$$ = this.read8($addr$jscomp$
|
|
11599
|
+
$byt$$ = this.read8($addr$jscomp$55$$ + ($i$jscomp$112$$ << 4) + $j$jscomp$13$$), $line$jscomp$7$$ += $h$$module$src$lib$$($byt$$, 2) + " ";
|
|
11548
11600
|
}
|
|
11549
11601
|
$line$jscomp$7$$ += " ";
|
|
11550
11602
|
for ($j$jscomp$13$$ = 0; 16 > $j$jscomp$13$$; $j$jscomp$13$$++) {
|
|
11551
|
-
$byt$$ = this.read8($addr$jscomp$
|
|
11603
|
+
$byt$$ = this.read8($addr$jscomp$55$$ + ($i$jscomp$112$$ << 4) + $j$jscomp$13$$), $line$jscomp$7$$ += 33 > $byt$$ || 126 < $byt$$ ? "." : String.fromCharCode($byt$$);
|
|
11552
11604
|
}
|
|
11553
11605
|
$dbg_log$$module$src$log$$($line$jscomp$7$$);
|
|
11554
11606
|
}
|
|
@@ -11729,7 +11781,7 @@ $VirtIO$$module$src$virtio$$.prototype.init_capabilities = function($cap_len$jsc
|
|
|
11729
11781
|
$cap_next$$ = $bar_offset_cap_ptr_port$jscomp$10$$ + $cap_len$jscomp$1_capabilities$jscomp$1_write$$;
|
|
11730
11782
|
$dbg_assert$$module$src$log$$(256 >= $cap_next$$, "VirtIO device<" + this.name + "> can't fit all capabilities into 256byte configspace");
|
|
11731
11783
|
$dbg_assert$$module$src$log$$(0 <= $cap$jscomp$2$$.bar && 6 > $cap$jscomp$2$$.bar, "VirtIO device<" + this.name + "> capability invalid bar number");
|
|
11732
|
-
var $bar_size_shim_read8_on_16$$ = $cap$jscomp$2$$.struct.reduce(($bytes$jscomp$
|
|
11784
|
+
var $bar_size_shim_read8_on_16$$ = $cap$jscomp$2$$.struct.reduce(($bytes$jscomp$7$$, $field$$) => $bytes$jscomp$7$$ + $field$$.bytes, 0);
|
|
11733
11785
|
$bar_size_shim_read8_on_16$$ += $cap$jscomp$2$$.offset;
|
|
11734
11786
|
$bar_size_shim_read8_on_16$$ = 16 > $bar_size_shim_read8_on_16$$ ? 16 : 1 << $int_log2$$module$src$lib$$($bar_size_shim_read8_on_16$$ - 1) + 1;
|
|
11735
11787
|
$dbg_assert$$module$src$log$$(0 === ($cap$jscomp$2$$.port & $bar_size_shim_read8_on_16$$ - 1), "VirtIO device<" + this.name + "> capability port should be aligned to pci bar size");
|
|
@@ -11774,16 +11826,16 @@ $VirtIO$$module$src$virtio$$.prototype.init_capabilities = function($cap_len$jsc
|
|
|
11774
11826
|
if ($cap$jscomp$2$$.use_mmio) {
|
|
11775
11827
|
$dbg_assert$$module$src$log$$(!1, "VirtIO device <" + this.name + "> mmio capability not implemented.");
|
|
11776
11828
|
} else {
|
|
11777
|
-
$bar_size_shim_read8_on_16$$ = function($addr$jscomp$
|
|
11829
|
+
$bar_size_shim_read8_on_16$$ = function($addr$jscomp$56$$) {
|
|
11778
11830
|
$dbg_log$$module$src$log$$("Warning: 8-bit read from 16-bit virtio port", 2097152);
|
|
11779
|
-
return $read$$($addr$jscomp$
|
|
11831
|
+
return $read$$($addr$jscomp$56$$ & -2) >> (($addr$jscomp$56$$ & 1) << 3) & 255;
|
|
11780
11832
|
};
|
|
11781
|
-
const $shim_read8_on_32$$ = function($addr$jscomp$
|
|
11833
|
+
const $shim_read8_on_32$$ = function($addr$jscomp$57$$) {
|
|
11782
11834
|
$dbg_log$$module$src$log$$("Warning: 8-bit read from 32-bit virtio port", 2097152);
|
|
11783
|
-
return $read$$($addr$jscomp$
|
|
11784
|
-
}, $shim_read32_on_16$$ = function($addr$jscomp$
|
|
11835
|
+
return $read$$($addr$jscomp$57$$ & -4) >> (($addr$jscomp$57$$ & 3) << 3) & 255;
|
|
11836
|
+
}, $shim_read32_on_16$$ = function($addr$jscomp$58$$) {
|
|
11785
11837
|
$dbg_log$$module$src$log$$("Warning: 32-bit read from 16-bit virtio port", 2097152);
|
|
11786
|
-
return $read$$($addr$jscomp$
|
|
11838
|
+
return $read$$($addr$jscomp$58$$);
|
|
11787
11839
|
};
|
|
11788
11840
|
switch($field$jscomp$1$$.bytes) {
|
|
11789
11841
|
case 4:
|
|
@@ -12016,21 +12068,21 @@ $VirtQueue$$module$src$virtio$$.prototype.avail_get_used_event = function() {
|
|
|
12016
12068
|
$VirtQueue$$module$src$virtio$$.prototype.used_get_flags = function() {
|
|
12017
12069
|
return this.cpu.read16(this.used_addr);
|
|
12018
12070
|
};
|
|
12019
|
-
$VirtQueue$$module$src$virtio$$.prototype.used_set_flags = function($value$jscomp$
|
|
12020
|
-
this.cpu.write16(this.used_addr, $value$jscomp$
|
|
12071
|
+
$VirtQueue$$module$src$virtio$$.prototype.used_set_flags = function($value$jscomp$192$$) {
|
|
12072
|
+
this.cpu.write16(this.used_addr, $value$jscomp$192$$);
|
|
12021
12073
|
};
|
|
12022
12074
|
$VirtQueue$$module$src$virtio$$.prototype.used_get_idx = function() {
|
|
12023
12075
|
return this.cpu.read16(this.used_addr + 2);
|
|
12024
12076
|
};
|
|
12025
|
-
$VirtQueue$$module$src$virtio$$.prototype.used_set_idx = function($value$jscomp$
|
|
12026
|
-
this.cpu.write16(this.used_addr + 2, $value$jscomp$
|
|
12077
|
+
$VirtQueue$$module$src$virtio$$.prototype.used_set_idx = function($value$jscomp$193$$) {
|
|
12078
|
+
this.cpu.write16(this.used_addr + 2, $value$jscomp$193$$);
|
|
12027
12079
|
};
|
|
12028
12080
|
$VirtQueue$$module$src$virtio$$.prototype.used_set_entry = function($i$jscomp$119$$, $desc_idx$jscomp$1$$, $length_written$$) {
|
|
12029
12081
|
this.cpu.write32(this.used_addr + 4 + 8 * $i$jscomp$119$$, $desc_idx$jscomp$1$$);
|
|
12030
12082
|
this.cpu.write32(this.used_addr + 8 + 8 * $i$jscomp$119$$, $length_written$$);
|
|
12031
12083
|
};
|
|
12032
|
-
$VirtQueue$$module$src$virtio$$.prototype.used_set_avail_event = function($value$jscomp$
|
|
12033
|
-
this.cpu.write16(this.used_addr + 4 + 8 * this.size, $value$jscomp$
|
|
12084
|
+
$VirtQueue$$module$src$virtio$$.prototype.used_set_avail_event = function($value$jscomp$194$$) {
|
|
12085
|
+
this.cpu.write16(this.used_addr + 4 + 8 * this.size, $value$jscomp$194$$);
|
|
12034
12086
|
};
|
|
12035
12087
|
function $VirtQueueBufferChain$$module$src$virtio$$($virtqueue$$, $desc_idx$jscomp$2_head_idx$$) {
|
|
12036
12088
|
this.cpu = $virtqueue$$.cpu;
|
|
@@ -12126,9 +12178,9 @@ function $init_virtio$$module$lib$9p$$($cpu$jscomp$29$$, $configspace_taglen$$,
|
|
|
12126
12178
|
}, }))), }, });
|
|
12127
12179
|
return $virtio$jscomp$1$$;
|
|
12128
12180
|
}
|
|
12129
|
-
function $Virtio9p$$module$lib$9p$$($filesystem$jscomp$2$$, $cpu$jscomp$30$$, $bus$jscomp$
|
|
12181
|
+
function $Virtio9p$$module$lib$9p$$($filesystem$jscomp$2$$, $cpu$jscomp$30$$, $bus$jscomp$29$$) {
|
|
12130
12182
|
this.fs = $filesystem$jscomp$2$$;
|
|
12131
|
-
this.bus = $bus$jscomp$
|
|
12183
|
+
this.bus = $bus$jscomp$29$$;
|
|
12132
12184
|
this.configspace_tagname = [104, 111, 115, 116, 57, 112];
|
|
12133
12185
|
this.configspace_taglen = this.configspace_tagname.length;
|
|
12134
12186
|
this.virtio = $init_virtio$$module$lib$9p$$($cpu$jscomp$30$$, this.configspace_taglen, this.configspace_tagname, this.ReceiveRequest.bind(this));
|