v86 0.5.306 → 0.5.307
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 +253 -196
- package/build/libv86-debug.mjs +253 -196
- package/build/libv86.js +200 -196
- package/build/libv86.mjs +195 -191
- package/package.json +1 -1
package/build/libv86-debug.js
CHANGED
|
@@ -4363,13 +4363,13 @@ function $KeyboardAdapter$$module$src$browser$keyboard$$($bus$jscomp$10$$) {
|
|
|
4363
4363
|
};
|
|
4364
4364
|
this.set_size_text(80, 25);
|
|
4365
4365
|
}
|
|
4366
|
-
;function $
|
|
4366
|
+
;function $TextAreaAdapter$$module$src$browser$serial$$($element$jscomp$8$$) {
|
|
4367
4367
|
function $keypress_handler$$($e$jscomp$36$$) {
|
|
4368
|
-
$serial$$.
|
|
4368
|
+
$serial$$.enabled && ($serial$$.send_char($e$jscomp$36$$.which), $e$jscomp$36$$.preventDefault());
|
|
4369
4369
|
}
|
|
4370
4370
|
function $keydown_handler$jscomp$1$$($e$jscomp$37$$) {
|
|
4371
|
-
var $chr$jscomp$
|
|
4372
|
-
8 === $chr$jscomp$
|
|
4371
|
+
var $chr$jscomp$8$$ = $e$jscomp$37$$.which;
|
|
4372
|
+
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
4373
|
}
|
|
4374
4374
|
function $paste_handler$$($e$jscomp$38$$) {
|
|
4375
4375
|
if ($serial$$.enabled) {
|
|
@@ -4384,15 +4384,11 @@ function $KeyboardAdapter$$module$src$browser$keyboard$$($bus$jscomp$10$$) {
|
|
|
4384
4384
|
}
|
|
4385
4385
|
var $serial$$ = this;
|
|
4386
4386
|
this.enabled = !0;
|
|
4387
|
-
this.bus = $bus$jscomp$12$$;
|
|
4388
4387
|
this.text = "";
|
|
4389
4388
|
this.text_new_line = !1;
|
|
4390
4389
|
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
4390
|
this.destroy = function() {
|
|
4391
|
+
this.enabled = !1;
|
|
4396
4392
|
$element$jscomp$8$$.removeEventListener("keypress", $keypress_handler$$, !1);
|
|
4397
4393
|
$element$jscomp$8$$.removeEventListener("keydown", $keydown_handler$jscomp$1$$, !1);
|
|
4398
4394
|
$element$jscomp$8$$.removeEventListener("paste", $paste_handler$$, !1);
|
|
@@ -4400,6 +4396,7 @@ function $KeyboardAdapter$$module$src$browser$keyboard$$($bus$jscomp$10$$) {
|
|
|
4400
4396
|
};
|
|
4401
4397
|
this.init = function() {
|
|
4402
4398
|
this.destroy();
|
|
4399
|
+
this.enabled = !0;
|
|
4403
4400
|
$element$jscomp$8$$.style.display = "block";
|
|
4404
4401
|
$element$jscomp$8$$.addEventListener("keypress", $keypress_handler$$, !1);
|
|
4405
4402
|
$element$jscomp$8$$.addEventListener("keydown", $keydown_handler$jscomp$1$$, !1);
|
|
@@ -4407,8 +4404,8 @@ function $KeyboardAdapter$$module$src$browser$keyboard$$($bus$jscomp$10$$) {
|
|
|
4407
4404
|
window.addEventListener("mousedown", $window_click_handler$$, !1);
|
|
4408
4405
|
};
|
|
4409
4406
|
this.init();
|
|
4410
|
-
this.show_char = function($chr$jscomp$
|
|
4411
|
-
"\b" === $chr$jscomp$
|
|
4407
|
+
this.show_char = function($chr$jscomp$6$$) {
|
|
4408
|
+
"\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
4409
|
};
|
|
4413
4410
|
this.update = function() {
|
|
4414
4411
|
var $now$jscomp$8$$ = Date.now(), $delta$jscomp$3$$ = $now$jscomp$8$$ - this.last_update;
|
|
@@ -4424,35 +4421,83 @@ function $KeyboardAdapter$$module$src$browser$keyboard$$($bus$jscomp$10$$) {
|
|
|
4424
4421
|
$element$jscomp$8$$.value = this.text;
|
|
4425
4422
|
this.text_new_line && (this.text_new_line = !1, $element$jscomp$8$$.scrollTop = 1e9);
|
|
4426
4423
|
};
|
|
4427
|
-
this.send_char = function(
|
|
4428
|
-
$serial$$.bus && $serial$$.bus.send("serial0-input", $chr_code$$);
|
|
4424
|
+
this.send_char = function() {
|
|
4429
4425
|
};
|
|
4430
4426
|
}
|
|
4431
|
-
function $
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4427
|
+
function $SerialAdapter$$module$src$browser$serial$$($element$jscomp$9$$, $bus$jscomp$12$$) {
|
|
4428
|
+
var $adapter$jscomp$13$$ = Reflect.construct($TextAreaAdapter$$module$src$browser$serial$$, [$element$jscomp$9$$], $SerialAdapter$$module$src$browser$serial$$);
|
|
4429
|
+
$adapter$jscomp$13$$.send_char = function($chr_code$jscomp$1$$) {
|
|
4430
|
+
$bus$jscomp$12$$.send("serial0-input", $chr_code$jscomp$1$$);
|
|
4431
|
+
};
|
|
4432
|
+
$bus$jscomp$12$$.register("serial0-output-byte", function($byte_chr$jscomp$9$$) {
|
|
4433
|
+
$byte_chr$jscomp$9$$ = String.fromCharCode($byte_chr$jscomp$9$$);
|
|
4434
|
+
$adapter$jscomp$13$$.show_char && $adapter$jscomp$13$$.show_char($byte_chr$jscomp$9$$);
|
|
4435
|
+
}, $adapter$jscomp$13$$);
|
|
4436
|
+
return $adapter$jscomp$13$$;
|
|
4437
|
+
}
|
|
4438
|
+
Reflect.setPrototypeOf($SerialAdapter$$module$src$browser$serial$$.prototype, $TextAreaAdapter$$module$src$browser$serial$$.prototype);
|
|
4439
|
+
Reflect.setPrototypeOf($SerialAdapter$$module$src$browser$serial$$, $TextAreaAdapter$$module$src$browser$serial$$);
|
|
4440
|
+
function $VirtioConsoleAdapter$$module$src$browser$serial$$($element$jscomp$10$$, $bus$jscomp$13$$) {
|
|
4441
|
+
var $adapter$jscomp$14$$ = Reflect.construct($TextAreaAdapter$$module$src$browser$serial$$, [$element$jscomp$10$$], $VirtioConsoleAdapter$$module$src$browser$serial$$);
|
|
4442
|
+
$adapter$jscomp$14$$.send_char = function($chr_code$jscomp$2$$) {
|
|
4443
|
+
$bus$jscomp$13$$.send("virtio-console0-input-bytes", new Uint8Array([$chr_code$jscomp$2$$]));
|
|
4444
|
+
};
|
|
4445
|
+
const $decoder$$ = new TextDecoder;
|
|
4446
|
+
$bus$jscomp$13$$.register("virtio-console0-output-bytes", function($bytes$jscomp$4$$) {
|
|
4447
|
+
for (const $chr$jscomp$10$$ of $decoder$$.decode($bytes$jscomp$4$$)) {
|
|
4448
|
+
$adapter$jscomp$14$$.show_char && $adapter$jscomp$14$$.show_char($chr$jscomp$10$$);
|
|
4449
|
+
}
|
|
4450
|
+
}, $adapter$jscomp$14$$);
|
|
4451
|
+
return $adapter$jscomp$14$$;
|
|
4452
|
+
}
|
|
4453
|
+
Reflect.setPrototypeOf($VirtioConsoleAdapter$$module$src$browser$serial$$.prototype, $TextAreaAdapter$$module$src$browser$serial$$.prototype);
|
|
4454
|
+
Reflect.setPrototypeOf($VirtioConsoleAdapter$$module$src$browser$serial$$, $TextAreaAdapter$$module$src$browser$serial$$);
|
|
4455
|
+
function $XtermJSAdapter$$module$src$browser$serial$$($element$jscomp$11$$, $xterm_lib$$) {
|
|
4456
|
+
this.element = $element$jscomp$11$$;
|
|
4457
|
+
var $term$$ = this.term = new $xterm_lib$$({logLevel:"off", convertEol:"true", });
|
|
4458
|
+
this.destroy = function() {
|
|
4459
|
+
this.on_data_disposable && this.on_data_disposable.dispose();
|
|
4460
|
+
$term$$.dispose();
|
|
4461
|
+
};
|
|
4462
|
+
}
|
|
4463
|
+
$XtermJSAdapter$$module$src$browser$serial$$.prototype.show = function() {
|
|
4464
|
+
this.term && this.term.open(this.element);
|
|
4465
|
+
};
|
|
4466
|
+
function $SerialAdapterXtermJS$$module$src$browser$serial$$($element$jscomp$12$$, $bus$jscomp$15$$, $xterm_lib$jscomp$1$$) {
|
|
4467
|
+
if ($xterm_lib$jscomp$1$$) {
|
|
4468
|
+
var $adapter$jscomp$15$$ = Reflect.construct($XtermJSAdapter$$module$src$browser$serial$$, [$element$jscomp$12$$, $xterm_lib$jscomp$1$$], $SerialAdapterXtermJS$$module$src$browser$serial$$);
|
|
4469
|
+
$bus$jscomp$15$$.register("serial0-output-byte", function($utf8_byte$$) {
|
|
4470
|
+
$adapter$jscomp$15$$.term.write(Uint8Array.of($utf8_byte$$));
|
|
4471
|
+
}, $adapter$jscomp$15$$);
|
|
4472
|
+
var $utf8_encoder$$ = new TextEncoder;
|
|
4473
|
+
$adapter$jscomp$15$$.on_data_disposable = $adapter$jscomp$15$$.term.onData(function($data_str$$) {
|
|
4474
|
+
for (const $utf8_byte$jscomp$1$$ of $utf8_encoder$$.encode($data_str$$)) {
|
|
4475
|
+
$bus$jscomp$15$$.send("serial0-input", $utf8_byte$jscomp$1$$);
|
|
4439
4476
|
}
|
|
4440
4477
|
});
|
|
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
|
-
};
|
|
4478
|
+
return $adapter$jscomp$15$$;
|
|
4448
4479
|
}
|
|
4449
4480
|
}
|
|
4450
|
-
$SerialAdapterXtermJS$$module$src$browser$serial$$.prototype
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4481
|
+
Reflect.setPrototypeOf($SerialAdapterXtermJS$$module$src$browser$serial$$.prototype, $XtermJSAdapter$$module$src$browser$serial$$.prototype);
|
|
4482
|
+
Reflect.setPrototypeOf($SerialAdapterXtermJS$$module$src$browser$serial$$, $XtermJSAdapter$$module$src$browser$serial$$);
|
|
4483
|
+
function $VirtioConsoleAdapterXtermJS$$module$src$browser$serial$$($element$jscomp$13$$, $bus$jscomp$16$$, $xterm_lib$jscomp$2$$) {
|
|
4484
|
+
if ($xterm_lib$jscomp$2$$) {
|
|
4485
|
+
var $adapter$jscomp$16$$ = Reflect.construct($XtermJSAdapter$$module$src$browser$serial$$, [$element$jscomp$13$$, $xterm_lib$jscomp$2$$], $VirtioConsoleAdapterXtermJS$$module$src$browser$serial$$);
|
|
4486
|
+
$bus$jscomp$16$$.register("virtio-console0-output-bytes", function($utf8_bytes$$) {
|
|
4487
|
+
$adapter$jscomp$16$$.term.write($utf8_bytes$$);
|
|
4488
|
+
}, $adapter$jscomp$16$$);
|
|
4489
|
+
var $utf8_encoder$jscomp$1$$ = new TextEncoder;
|
|
4490
|
+
$adapter$jscomp$16$$.on_data_disposable = $adapter$jscomp$16$$.term.onData(function($data_str$jscomp$1$$) {
|
|
4491
|
+
$bus$jscomp$16$$.send("virtio-console0-input-bytes", $utf8_encoder$jscomp$1$$.encode($data_str$jscomp$1$$));
|
|
4492
|
+
});
|
|
4493
|
+
return $adapter$jscomp$16$$;
|
|
4494
|
+
}
|
|
4495
|
+
}
|
|
4496
|
+
Reflect.setPrototypeOf($VirtioConsoleAdapterXtermJS$$module$src$browser$serial$$.prototype, $XtermJSAdapter$$module$src$browser$serial$$.prototype);
|
|
4497
|
+
Reflect.setPrototypeOf($VirtioConsoleAdapterXtermJS$$module$src$browser$serial$$, $XtermJSAdapter$$module$src$browser$serial$$);
|
|
4498
|
+
function $InBrowserNetworkAdapter$$module$src$browser$inbrowser_network$$($bus$jscomp$17$$, $config$jscomp$4_id$jscomp$6$$) {
|
|
4454
4499
|
$config$jscomp$4_id$jscomp$6$$ = $config$jscomp$4_id$jscomp$6$$.id || 0;
|
|
4455
|
-
this.bus = $bus$jscomp$
|
|
4500
|
+
this.bus = $bus$jscomp$17$$;
|
|
4456
4501
|
this.bus_send_msgid = `net${$config$jscomp$4_id$jscomp$6$$}-send`;
|
|
4457
4502
|
this.bus_recv_msgid = `net${$config$jscomp$4_id$jscomp$6$$}-receive`;
|
|
4458
4503
|
this.channel = new BroadcastChannel(`v86-inbrowser-${$config$jscomp$4_id$jscomp$6$$}`);
|
|
@@ -5453,12 +5498,12 @@ function $V86$$module$src$browser$starter$$($options$jscomp$41$$) {
|
|
|
5453
5498
|
this.cpu_is_running = !1;
|
|
5454
5499
|
this.cpu_exception_hook = function() {
|
|
5455
5500
|
};
|
|
5456
|
-
var $bus$jscomp$
|
|
5457
|
-
this.bus = $bus$jscomp$
|
|
5458
|
-
this.emulator_bus = $bus$jscomp$
|
|
5501
|
+
var $bus$jscomp$18_wasm_shared_funcs$$ = $Bus$$module$src$bus$$.create();
|
|
5502
|
+
this.bus = $bus$jscomp$18_wasm_shared_funcs$$[0];
|
|
5503
|
+
this.emulator_bus = $bus$jscomp$18_wasm_shared_funcs$$[1];
|
|
5459
5504
|
var $cpu$jscomp$12$$, $wasm_memory$$;
|
|
5460
5505
|
const $wasm_table$$ = new WebAssembly.Table({element:"anyfunc", initial:1924});
|
|
5461
|
-
$bus$jscomp$
|
|
5506
|
+
$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
5507
|
return $cpu$jscomp$12$$.run_hardware_timers($a$jscomp$6$$, $t$jscomp$4$$);
|
|
5463
5508
|
}, cpu_event_halt:() => {
|
|
5464
5509
|
this.emulator_bus.send("cpu-event-halt");
|
|
@@ -5511,15 +5556,15 @@ function $V86$$module$src$browser$starter$$($options$jscomp$41$$) {
|
|
|
5511
5556
|
$wasm_fn$$ || ($wasm_fn$$ = $env$$ => new Promise($resolve$jscomp$2$$ => {
|
|
5512
5557
|
let $v86_bin$$ = "v86-debug.wasm", $v86_bin_fallback$$ = "v86-fallback.wasm";
|
|
5513
5558
|
$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$
|
|
5559
|
+
$load_file$$module$src$lib$$($v86_bin$$, {done:async $bytes$jscomp$5$$ => {
|
|
5515
5560
|
try {
|
|
5516
|
-
const {instance:$instance$$} = await WebAssembly.instantiate($bytes$jscomp$
|
|
5517
|
-
this.wasm_source = $bytes$jscomp$
|
|
5561
|
+
const {instance:$instance$$} = await WebAssembly.instantiate($bytes$jscomp$5$$, $env$$);
|
|
5562
|
+
this.wasm_source = $bytes$jscomp$5$$;
|
|
5518
5563
|
$resolve$jscomp$2$$($instance$$.exports);
|
|
5519
5564
|
} 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$
|
|
5565
|
+
$load_file$$module$src$lib$$($v86_bin_fallback$$, {done:async $bytes$jscomp$6$$ => {
|
|
5566
|
+
const {instance:$instance$jscomp$1$$} = await WebAssembly.instantiate($bytes$jscomp$6$$, $env$$);
|
|
5567
|
+
this.wasm_source = $bytes$jscomp$6$$;
|
|
5523
5568
|
$resolve$jscomp$2$$($instance$jscomp$1$$.exports);
|
|
5524
5569
|
}, });
|
|
5525
5570
|
}
|
|
@@ -5527,7 +5572,7 @@ function $V86$$module$src$browser$starter$$($options$jscomp$41$$) {
|
|
|
5527
5572
|
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
5573
|
}});
|
|
5529
5574
|
}));
|
|
5530
|
-
$wasm_fn$$({env:$bus$jscomp$
|
|
5575
|
+
$wasm_fn$$({env:$bus$jscomp$18_wasm_shared_funcs$$}).then($emulator_exports$$ => {
|
|
5531
5576
|
$wasm_memory$$ = $emulator_exports$$.memory;
|
|
5532
5577
|
$emulator_exports$$.rust_init();
|
|
5533
5578
|
$emulator_exports$$ = this.v86 = new $v86$$module$src$main$$(this.emulator_bus, {exports:$emulator_exports$$, wasm_table:$wasm_table$$});
|
|
@@ -5597,6 +5642,7 @@ $V86$$module$src$browser$starter$$.prototype.continue_init = async function($emu
|
|
|
5597
5642
|
$dbg_assert$$module$src$log$$(!$options$jscomp$42$$.bzimage_initrd_from_filesystem || $settings$$.initial_state, "bzimage_initrd_from_filesystem: Requires a filesystem");
|
|
5598
5643
|
}
|
|
5599
5644
|
this.serial_adapter && this.serial_adapter.show && this.serial_adapter.show();
|
|
5645
|
+
this.virtio_console_adapter && this.virtio_console_adapter.show && this.virtio_console_adapter.show();
|
|
5600
5646
|
this.v86.init($settings$$);
|
|
5601
5647
|
$settings$$.initial_state && ($emulator$jscomp$1$$.restore_state($settings$$.initial_state), $settings$$.initial_state = void 0);
|
|
5602
5648
|
$options$jscomp$42$$.autostart && this.v86.run();
|
|
@@ -5612,13 +5658,13 @@ $V86$$module$src$browser$starter$$.prototype.continue_init = async function($emu
|
|
|
5612
5658
|
}, this);
|
|
5613
5659
|
var $settings$$ = {};
|
|
5614
5660
|
this.disk_images = {fda:void 0, fdb:void 0, hda:void 0, hdb:void 0, cdrom:void 0, };
|
|
5615
|
-
var $
|
|
5661
|
+
var $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
5662
|
$settings$$.acpi = $options$jscomp$42$$.acpi;
|
|
5617
5663
|
$settings$$.disable_jit = $options$jscomp$42$$.disable_jit;
|
|
5618
5664
|
$settings$$.load_devices = !0;
|
|
5619
5665
|
$settings$$.memory_size = $options$jscomp$42$$.memory_size || 67108864;
|
|
5620
5666
|
$settings$$.vga_memory_size = $options$jscomp$42$$.vga_memory_size || 8388608;
|
|
5621
|
-
$settings$$.boot_order = $
|
|
5667
|
+
$settings$$.boot_order = $add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$;
|
|
5622
5668
|
$settings$$.fastboot = $options$jscomp$42$$.fastboot || !1;
|
|
5623
5669
|
$settings$$.fda = void 0;
|
|
5624
5670
|
$settings$$.fdb = void 0;
|
|
@@ -5630,23 +5676,28 @@ $V86$$module$src$browser$starter$$.prototype.continue_init = async function($emu
|
|
|
5630
5676
|
$settings$$.mac_address_translation = $options$jscomp$42$$.mac_address_translation;
|
|
5631
5677
|
$settings$$.cpuid_level = $options$jscomp$42$$.cpuid_level;
|
|
5632
5678
|
$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$$($
|
|
5679
|
+
$settings$$.virtio_console = !!$options$jscomp$42$$.virtio_console;
|
|
5680
|
+
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) {
|
|
5681
|
+
"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://") ||
|
|
5682
|
+
$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
5683
|
}
|
|
5638
5684
|
$settings$$.net_device = $options$jscomp$42$$.net_device || {type:"ne2k"};
|
|
5639
|
-
$
|
|
5640
|
-
$options$jscomp$42$$.screen_container && ($
|
|
5685
|
+
$add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$ = $options$jscomp$42$$.screen || {};
|
|
5686
|
+
$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
5687
|
$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 = $
|
|
5688
|
+
$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));
|
|
5689
|
+
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
5690
|
$settings$$.screen = this.screen_adapter;
|
|
5645
|
-
$settings$$.screen_options = $
|
|
5646
|
-
$
|
|
5691
|
+
$settings$$.screen_options = $add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$;
|
|
5692
|
+
$settings$$.serial_console = $options$jscomp$42$$.serial_console || {type:"none"};
|
|
5693
|
+
$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);
|
|
5694
|
+
"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));
|
|
5695
|
+
$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;
|
|
5696
|
+
"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 &&
|
|
5697
|
+
(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
5698
|
$options$jscomp$42$$.disable_speaker || (this.speaker_adapter = new $SpeakerAdapter$$module$src$browser$speaker$$(this.bus));
|
|
5648
5699
|
var $files_to_load$$ = [];
|
|
5649
|
-
$
|
|
5700
|
+
$add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$ = ($name$jscomp$101$$, $file$jscomp$4$$) => {
|
|
5650
5701
|
if ($file$jscomp$4$$) {
|
|
5651
5702
|
if ($file$jscomp$4$$.get && $file$jscomp$4$$.set && $file$jscomp$4$$.load) {
|
|
5652
5703
|
$files_to_load$$.push({name:$name$jscomp$101$$, loadable:$file$jscomp$4$$, });
|
|
@@ -5662,17 +5713,17 @@ $V86$$module$src$browser$starter$$.prototype.continue_init = async function($emu
|
|
|
5662
5713
|
}
|
|
5663
5714
|
};
|
|
5664
5715
|
$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
|
-
$
|
|
5716
|
+
$add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$("bios", $options$jscomp$42$$.bios);
|
|
5717
|
+
$add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$("vga_bios", $options$jscomp$42$$.vga_bios);
|
|
5718
|
+
$add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$("cdrom", $options$jscomp$42$$.cdrom);
|
|
5719
|
+
$add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$("hda", $options$jscomp$42$$.hda);
|
|
5720
|
+
$add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$("hdb", $options$jscomp$42$$.hdb);
|
|
5721
|
+
$add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$("fda", $options$jscomp$42$$.fda);
|
|
5722
|
+
$add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$("fdb", $options$jscomp$42$$.fdb);
|
|
5723
|
+
$add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$("initial_state", $options$jscomp$42$$.initial_state);
|
|
5724
|
+
$add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$("multiboot", $options$jscomp$42$$.multiboot);
|
|
5725
|
+
$add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$("bzimage", $options$jscomp$42$$.bzimage);
|
|
5726
|
+
$add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$("initrd", $options$jscomp$42$$.initrd);
|
|
5676
5727
|
if ($options$jscomp$42$$.filesystem && $options$jscomp$42$$.filesystem.handle9p) {
|
|
5677
5728
|
$settings$$.handle9p = $options$jscomp$42$$.filesystem.handle9p;
|
|
5678
5729
|
} else {
|
|
@@ -5680,19 +5731,19 @@ $V86$$module$src$browser$starter$$.prototype.continue_init = async function($emu
|
|
|
5680
5731
|
$settings$$.proxy9p = $options$jscomp$42$$.filesystem.proxy_url;
|
|
5681
5732
|
} else {
|
|
5682
5733
|
if ($options$jscomp$42$$.filesystem) {
|
|
5683
|
-
$
|
|
5734
|
+
$add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$ = $options$jscomp$42$$.filesystem.basefs;
|
|
5684
5735
|
var $base_url$$ = $options$jscomp$42$$.filesystem.baseurl;
|
|
5685
5736
|
let $file_storage$jscomp$1$$ = new $MemoryFileStorage$$module$src$browser$filestorage$$;
|
|
5686
5737
|
$base_url$$ && ($file_storage$jscomp$1$$ = new $ServerFileStorageWrapper$$module$src$browser$filestorage$$($file_storage$jscomp$1$$, $base_url$$, this.zstd_decompress.bind(this)));
|
|
5687
5738
|
$settings$$.fs9p = this.fs9p = new $FS$$module$lib$filesystem$$($file_storage$jscomp$1$$);
|
|
5688
|
-
if ($
|
|
5739
|
+
if ($add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$) {
|
|
5689
5740
|
$dbg_assert$$module$src$log$$($base_url$$, "Filesystem: baseurl must be specified");
|
|
5690
|
-
if ("object" === typeof $
|
|
5691
|
-
var $size$jscomp$35$$ = $
|
|
5692
|
-
$
|
|
5741
|
+
if ("object" === typeof $add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$) {
|
|
5742
|
+
var $size$jscomp$35$$ = $add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$.size;
|
|
5743
|
+
$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
5744
|
}
|
|
5694
|
-
$dbg_assert$$module$src$log$$("string" === typeof $
|
|
5695
|
-
$files_to_load$$.push({name:"fs9p_json", url:$
|
|
5745
|
+
$dbg_assert$$module$src$log$$("string" === typeof $add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$);
|
|
5746
|
+
$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
5747
|
}
|
|
5697
5748
|
}
|
|
5698
5749
|
}
|
|
@@ -5798,6 +5849,7 @@ $V86$$module$src$browser$starter$$.prototype.destroy = async function() {
|
|
|
5798
5849
|
this.screen_adapter && this.screen_adapter.destroy();
|
|
5799
5850
|
this.serial_adapter && this.serial_adapter.destroy();
|
|
5800
5851
|
this.speaker_adapter && this.speaker_adapter.destroy();
|
|
5852
|
+
this.virtio_console_adapter && this.virtio_console_adapter.destroy();
|
|
5801
5853
|
};
|
|
5802
5854
|
$V86$$module$src$browser$starter$$.prototype.restart = function() {
|
|
5803
5855
|
this.v86.restart();
|
|
@@ -6049,11 +6101,16 @@ $V86$$module$src$browser$starter$$.prototype.read_memory = function($offset$jsco
|
|
|
6049
6101
|
$V86$$module$src$browser$starter$$.prototype.write_memory = function($blob$jscomp$13$$, $offset$jscomp$63$$) {
|
|
6050
6102
|
this.v86.cpu.write_blob($blob$jscomp$13$$, $offset$jscomp$63$$);
|
|
6051
6103
|
};
|
|
6052
|
-
$V86$$module$src$browser$starter$$.prototype.set_serial_container_xtermjs = function($element$jscomp$
|
|
6104
|
+
$V86$$module$src$browser$starter$$.prototype.set_serial_container_xtermjs = function($element$jscomp$14$$, $xterm_lib$jscomp$5$$ = window.Terminal) {
|
|
6053
6105
|
this.serial_adapter && this.serial_adapter.destroy && this.serial_adapter.destroy();
|
|
6054
|
-
this.serial_adapter = new $SerialAdapterXtermJS$$module$src$browser$serial$$($element$jscomp$
|
|
6106
|
+
this.serial_adapter = new $SerialAdapterXtermJS$$module$src$browser$serial$$($element$jscomp$14$$, this.bus, $xterm_lib$jscomp$5$$);
|
|
6055
6107
|
this.serial_adapter.show();
|
|
6056
6108
|
};
|
|
6109
|
+
$V86$$module$src$browser$starter$$.prototype.set_virtio_console_container_xtermjs = function($element$jscomp$15$$, $xterm_lib$jscomp$6$$ = window.Terminal) {
|
|
6110
|
+
this.virtio_console_adapter && this.virtio_console_adapter.destroy && this.virtio_console_adapter.destroy();
|
|
6111
|
+
this.virtio_console_adapter = new $VirtioConsoleAdapterXtermJS$$module$src$browser$serial$$($element$jscomp$15$$, this.bus, $xterm_lib$jscomp$6$$);
|
|
6112
|
+
this.virtio_console_adapter.show();
|
|
6113
|
+
};
|
|
6057
6114
|
$V86$$module$src$browser$starter$$.prototype.get_instruction_stats = function() {
|
|
6058
6115
|
var $JSCompiler_inline_result$jscomp$inline_371_cpu$jscomp$inline_363$$ = this.v86.cpu;
|
|
6059
6116
|
var $JSCompiler_inline_result$jscomp$inline_364_text$jscomp$inline_365$$ = "";
|
|
@@ -6094,15 +6151,15 @@ function $FileNotFoundError$$module$src$browser$starter$$($message$jscomp$32$$)
|
|
|
6094
6151
|
}
|
|
6095
6152
|
$FileNotFoundError$$module$src$browser$starter$$.prototype = Error.prototype;
|
|
6096
6153
|
"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$
|
|
6154
|
+
function $v86$$module$src$main$$($bus$jscomp$19$$, $wasm$jscomp$1$$) {
|
|
6098
6155
|
this.stopping = this.running = !1;
|
|
6099
6156
|
this.idle = !0;
|
|
6100
6157
|
this.tick_counter = 0;
|
|
6101
6158
|
this.worker = null;
|
|
6102
|
-
this.cpu = new $CPU$$module$src$cpu$$($bus$jscomp$
|
|
6159
|
+
this.cpu = new $CPU$$module$src$cpu$$($bus$jscomp$19$$, $wasm$jscomp$1$$, () => {
|
|
6103
6160
|
this.idle && this.next_tick(0);
|
|
6104
6161
|
});
|
|
6105
|
-
this.bus = $bus$jscomp$
|
|
6162
|
+
this.bus = $bus$jscomp$19$$;
|
|
6106
6163
|
this.register_yield();
|
|
6107
6164
|
}
|
|
6108
6165
|
$v86$$module$src$main$$.prototype.run = function() {
|
|
@@ -6331,8 +6388,8 @@ $ACPI$$module$src$acpi$$.prototype.set_state = function($state$jscomp$29$$) {
|
|
|
6331
6388
|
this.pm1_enable = $state$jscomp$29$$[2];
|
|
6332
6389
|
this.gpe = $state$jscomp$29$$[3];
|
|
6333
6390
|
};
|
|
6334
|
-
function $UART$$module$src$uart$$($cpu$jscomp$15_io$jscomp$2$$, $port$jscomp$2$$, $bus$jscomp$
|
|
6335
|
-
this.bus = $bus$jscomp$
|
|
6391
|
+
function $UART$$module$src$uart$$($cpu$jscomp$15_io$jscomp$2$$, $port$jscomp$2$$, $bus$jscomp$20$$) {
|
|
6392
|
+
this.bus = $bus$jscomp$20$$;
|
|
6336
6393
|
this.cpu = $cpu$jscomp$15_io$jscomp$2$$;
|
|
6337
6394
|
this.ints = 4;
|
|
6338
6395
|
this.line_control = this.baud_rate = 0;
|
|
@@ -6742,13 +6799,13 @@ function $translate_mac_address$$module$src$ne2k$$($arp_packet_ipv4_packet_packe
|
|
|
6742
6799
|
function $format_mac$$module$src$ne2k$$($mac$jscomp$2$$) {
|
|
6743
6800
|
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
6801
|
}
|
|
6745
|
-
function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$
|
|
6802
|
+
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
6803
|
this.cpu = $cpu$jscomp$17$$;
|
|
6747
6804
|
this.pci = $cpu$jscomp$17$$.devices.pci;
|
|
6748
6805
|
this.id = $id$jscomp$23$$ || 0;
|
|
6749
6806
|
this.preserve_mac_from_state_image = $preserve_mac_from_state_image$$;
|
|
6750
6807
|
this.mac_address_translation = $mac_address_translation$$;
|
|
6751
|
-
this.bus = $bus$jscomp$
|
|
6808
|
+
this.bus = $bus$jscomp$21_i$jscomp$78_io$jscomp$3$$;
|
|
6752
6809
|
this.bus.register("net" + this.id + "-receive", function($data$jscomp$170$$) {
|
|
6753
6810
|
this.receive($data$jscomp$170$$);
|
|
6754
6811
|
}, this);
|
|
@@ -6767,8 +6824,8 @@ function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$19_i$jscomp$78_i
|
|
|
6767
6824
|
this.bus.send("net" + this.id + "-mac", $format_mac$$module$src$ne2k$$(this.mac));
|
|
6768
6825
|
this.mar = Uint8Array.of(255, 255, 255, 255, 255, 255, 255, 255);
|
|
6769
6826
|
this.mac_address_in_state = null;
|
|
6770
|
-
for ($bus$jscomp$
|
|
6771
|
-
this.memory[$bus$jscomp$
|
|
6827
|
+
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$$++) {
|
|
6828
|
+
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
6829
|
}
|
|
6773
6830
|
this.memory[28] = this.memory[29] = 87;
|
|
6774
6831
|
this.memory[30] = this.memory[31] = 87;
|
|
@@ -6777,22 +6834,22 @@ function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$19_i$jscomp$78_i
|
|
|
6777
6834
|
this.pstart = 64;
|
|
6778
6835
|
this.pstop = 128;
|
|
6779
6836
|
this.boundary = this.curpg = 76;
|
|
6780
|
-
$bus$jscomp$
|
|
6781
|
-
$bus$jscomp$
|
|
6837
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$ = $cpu$jscomp$17$$.io;
|
|
6838
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 0, this, function() {
|
|
6782
6839
|
$dbg_log$$module$src$log$$("Read cmd", 1048576);
|
|
6783
6840
|
return this.cr;
|
|
6784
6841
|
}, function() {
|
|
6785
6842
|
$dbg_log$$module$src$log$$("Read16 cmd", 1048576);
|
|
6786
6843
|
return this.cr;
|
|
6787
6844
|
});
|
|
6788
|
-
$bus$jscomp$
|
|
6845
|
+
$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
6846
|
this.cr = $data$jscomp$171_data_byte$jscomp$9_start$jscomp$29$$;
|
|
6790
6847
|
$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
6848
|
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
6849
|
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
6850
|
$h$$module$src$lib$$($data$jscomp$171_data_byte$jscomp$9_start$jscomp$29$$.byteLength), 1048576)));
|
|
6794
6851
|
});
|
|
6795
|
-
$bus$jscomp$
|
|
6852
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 13, this, function() {
|
|
6796
6853
|
var $pg$$ = this.get_page();
|
|
6797
6854
|
if (1 === $pg$$) {
|
|
6798
6855
|
return $dbg_log$$module$src$log$$("Read mar5", 1048576), this.mar[5];
|
|
@@ -6800,7 +6857,7 @@ function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$19_i$jscomp$78_i
|
|
|
6800
6857
|
$dbg_log$$module$src$log$$("Read counter0 pg=" + $pg$$, 1048576);
|
|
6801
6858
|
return 0;
|
|
6802
6859
|
});
|
|
6803
|
-
$bus$jscomp$
|
|
6860
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 14, this, function() {
|
|
6804
6861
|
var $pg$jscomp$1$$ = this.get_page();
|
|
6805
6862
|
if (1 === $pg$jscomp$1$$) {
|
|
6806
6863
|
return $dbg_log$$module$src$log$$("Read mar6", 1048576), this.mar[6];
|
|
@@ -6811,7 +6868,7 @@ function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$19_i$jscomp$78_i
|
|
|
6811
6868
|
$dbg_log$$module$src$log$$("Read16 counter1 pg=" + this.get_page(), 1048576);
|
|
6812
6869
|
return 0;
|
|
6813
6870
|
});
|
|
6814
|
-
$bus$jscomp$
|
|
6871
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 15, this, function() {
|
|
6815
6872
|
var $pg$jscomp$2$$ = this.get_page();
|
|
6816
6873
|
if (1 === $pg$jscomp$2$$) {
|
|
6817
6874
|
return $dbg_log$$module$src$log$$("Read mar7", 1048576), this.mar[7];
|
|
@@ -6819,17 +6876,17 @@ function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$19_i$jscomp$78_i
|
|
|
6819
6876
|
$dbg_log$$module$src$log$$("Read counter2 pg=" + $pg$jscomp$2$$, 1048576);
|
|
6820
6877
|
return 0;
|
|
6821
6878
|
});
|
|
6822
|
-
$bus$jscomp$
|
|
6879
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 31, this, function() {
|
|
6823
6880
|
this.get_page();
|
|
6824
6881
|
$dbg_log$$module$src$log$$("Read reset", 1048576);
|
|
6825
6882
|
this.do_interrupt(128);
|
|
6826
6883
|
return 0;
|
|
6827
6884
|
});
|
|
6828
|
-
$bus$jscomp$
|
|
6885
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_write(this.port | 31, this, function($data_byte$jscomp$10$$) {
|
|
6829
6886
|
this.get_page();
|
|
6830
6887
|
$dbg_log$$module$src$log$$("Write reset: " + $h$$module$src$lib$$($data_byte$jscomp$10$$, 2), 1048576);
|
|
6831
6888
|
});
|
|
6832
|
-
$bus$jscomp$
|
|
6889
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 1, this, function() {
|
|
6833
6890
|
var $pg$jscomp$5$$ = this.get_page();
|
|
6834
6891
|
if (0 === $pg$jscomp$5$$) {
|
|
6835
6892
|
return this.pstart;
|
|
@@ -6844,12 +6901,12 @@ function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$19_i$jscomp$78_i
|
|
|
6844
6901
|
$dbg_assert$$module$src$log$$(!1);
|
|
6845
6902
|
return 0;
|
|
6846
6903
|
});
|
|
6847
|
-
$bus$jscomp$
|
|
6904
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_write(this.port | 1, this, function($data_byte$jscomp$11$$) {
|
|
6848
6905
|
var $pg$jscomp$6$$ = this.get_page();
|
|
6849
6906
|
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
6907
|
$pg$jscomp$6$$ + "/01: " + $h$$module$src$lib$$($data_byte$jscomp$11$$), 1048576), $dbg_assert$$module$src$log$$(!1));
|
|
6851
6908
|
});
|
|
6852
|
-
$bus$jscomp$
|
|
6909
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 2, this, function() {
|
|
6853
6910
|
var $pg$jscomp$7$$ = this.get_page();
|
|
6854
6911
|
if (0 === $pg$jscomp$7$$) {
|
|
6855
6912
|
return this.pstop;
|
|
@@ -6864,12 +6921,12 @@ function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$19_i$jscomp$78_i
|
|
|
6864
6921
|
$dbg_assert$$module$src$log$$(!1);
|
|
6865
6922
|
return 0;
|
|
6866
6923
|
});
|
|
6867
|
-
$bus$jscomp$
|
|
6924
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_write(this.port | 2, this, function($data_byte$jscomp$12$$) {
|
|
6868
6925
|
var $pg$jscomp$8$$ = this.get_page();
|
|
6869
6926
|
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
6927
|
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
6928
|
});
|
|
6872
|
-
$bus$jscomp$
|
|
6929
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 7, this, function() {
|
|
6873
6930
|
var $pg$jscomp$9$$ = this.get_page();
|
|
6874
6931
|
if (0 === $pg$jscomp$9$$) {
|
|
6875
6932
|
return $dbg_log$$module$src$log$$("Read isr: " + $h$$module$src$lib$$(this.isr, 2), 1048576), this.isr;
|
|
@@ -6880,19 +6937,19 @@ function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$19_i$jscomp$78_i
|
|
|
6880
6937
|
$dbg_assert$$module$src$log$$(!1);
|
|
6881
6938
|
return 0;
|
|
6882
6939
|
});
|
|
6883
|
-
$bus$jscomp$
|
|
6940
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_write(this.port | 7, this, function($data_byte$jscomp$13$$) {
|
|
6884
6941
|
var $pg$jscomp$10$$ = this.get_page();
|
|
6885
6942
|
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
6943
|
});
|
|
6887
|
-
$bus$jscomp$
|
|
6944
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_write(this.port | 13, this, function($data_byte$jscomp$14$$) {
|
|
6888
6945
|
var $pg$jscomp$11$$ = this.get_page();
|
|
6889
6946
|
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
6947
|
});
|
|
6891
|
-
$bus$jscomp$
|
|
6948
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_write(this.port | 14, this, function($data_byte$jscomp$15$$) {
|
|
6892
6949
|
var $pg$jscomp$12$$ = this.get_page();
|
|
6893
6950
|
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
6951
|
});
|
|
6895
|
-
$bus$jscomp$
|
|
6952
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 10, this, function() {
|
|
6896
6953
|
var $pg$jscomp$13$$ = this.get_page();
|
|
6897
6954
|
if (0 === $pg$jscomp$13$$) {
|
|
6898
6955
|
return $dbg_log$$module$src$log$$("Read pg0/0a", 1048576), 80;
|
|
@@ -6903,11 +6960,11 @@ function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$19_i$jscomp$78_i
|
|
|
6903
6960
|
$dbg_assert$$module$src$log$$(!1, "TODO");
|
|
6904
6961
|
return 0;
|
|
6905
6962
|
});
|
|
6906
|
-
$bus$jscomp$
|
|
6963
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_write(this.port | 10, this, function($data_byte$jscomp$16$$) {
|
|
6907
6964
|
var $pg$jscomp$14$$ = this.get_page();
|
|
6908
6965
|
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
6966
|
});
|
|
6910
|
-
$bus$jscomp$
|
|
6967
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 11, this, function() {
|
|
6911
6968
|
var $pg$jscomp$15$$ = this.get_page();
|
|
6912
6969
|
if (0 === $pg$jscomp$15$$) {
|
|
6913
6970
|
return $dbg_log$$module$src$log$$("Read pg0/0b", 1048576), 67;
|
|
@@ -6918,11 +6975,11 @@ function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$19_i$jscomp$78_i
|
|
|
6918
6975
|
$dbg_assert$$module$src$log$$(!1, "TODO");
|
|
6919
6976
|
return 0;
|
|
6920
6977
|
});
|
|
6921
|
-
$bus$jscomp$
|
|
6978
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_write(this.port | 11, this, function($data_byte$jscomp$17$$) {
|
|
6922
6979
|
var $pg$jscomp$16$$ = this.get_page();
|
|
6923
6980
|
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
6981
|
});
|
|
6925
|
-
$bus$jscomp$
|
|
6982
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 8, this, function() {
|
|
6926
6983
|
var $pg$jscomp$17$$ = this.get_page();
|
|
6927
6984
|
if (0 === $pg$jscomp$17$$) {
|
|
6928
6985
|
return $dbg_log$$module$src$log$$("Read remote start address low", 1048576), this.rsar & 255;
|
|
@@ -6934,11 +6991,11 @@ function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$19_i$jscomp$78_i
|
|
|
6934
6991
|
$dbg_assert$$module$src$log$$(!1);
|
|
6935
6992
|
return 0;
|
|
6936
6993
|
});
|
|
6937
|
-
$bus$jscomp$
|
|
6994
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_write(this.port | 8, this, function($data_byte$jscomp$18$$) {
|
|
6938
6995
|
var $pg$jscomp$18$$ = this.get_page();
|
|
6939
6996
|
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
6997
|
});
|
|
6941
|
-
$bus$jscomp$
|
|
6998
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 9, this, function() {
|
|
6942
6999
|
var $pg$jscomp$19$$ = this.get_page();
|
|
6943
7000
|
if (0 === $pg$jscomp$19$$) {
|
|
6944
7001
|
return $dbg_log$$module$src$log$$("Read remote start address high", 1048576), this.rsar >> 8 & 255;
|
|
@@ -6950,15 +7007,15 @@ function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$19_i$jscomp$78_i
|
|
|
6950
7007
|
$dbg_assert$$module$src$log$$(!1);
|
|
6951
7008
|
return 0;
|
|
6952
7009
|
});
|
|
6953
|
-
$bus$jscomp$
|
|
7010
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_write(this.port | 9, this, function($data_byte$jscomp$19$$) {
|
|
6954
7011
|
var $pg$jscomp$20$$ = this.get_page();
|
|
6955
7012
|
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
7013
|
});
|
|
6957
|
-
$bus$jscomp$
|
|
7014
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_write(this.port | 15, this, function($data_byte$jscomp$20$$) {
|
|
6958
7015
|
var $pg$jscomp$21$$ = this.get_page();
|
|
6959
7016
|
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
7017
|
});
|
|
6961
|
-
$bus$jscomp$
|
|
7018
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 3, this, function() {
|
|
6962
7019
|
var $pg$jscomp$22$$ = this.get_page();
|
|
6963
7020
|
if (0 === $pg$jscomp$22$$) {
|
|
6964
7021
|
return $dbg_log$$module$src$log$$("Read boundary: " + $h$$module$src$lib$$(this.boundary, 2), 1048576), this.boundary;
|
|
@@ -6969,11 +7026,11 @@ function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$19_i$jscomp$78_i
|
|
|
6969
7026
|
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
7027
|
return 0;
|
|
6971
7028
|
});
|
|
6972
|
-
$bus$jscomp$
|
|
7029
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_write(this.port | 3, this, function($data_byte$jscomp$21$$) {
|
|
6973
7030
|
var $pg$jscomp$23$$ = this.get_page();
|
|
6974
7031
|
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
7032
|
});
|
|
6976
|
-
$bus$jscomp$
|
|
7033
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 4, this, function() {
|
|
6977
7034
|
var $pg$jscomp$24$$ = this.get_page();
|
|
6978
7035
|
if (0 === $pg$jscomp$24$$) {
|
|
6979
7036
|
return this.tsr;
|
|
@@ -6985,11 +7042,11 @@ function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$19_i$jscomp$78_i
|
|
|
6985
7042
|
$dbg_assert$$module$src$log$$(!1);
|
|
6986
7043
|
return 0;
|
|
6987
7044
|
});
|
|
6988
|
-
$bus$jscomp$
|
|
7045
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_write(this.port | 4, this, function($data_byte$jscomp$22$$) {
|
|
6989
7046
|
var $pg$jscomp$25$$ = this.get_page();
|
|
6990
7047
|
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
7048
|
});
|
|
6992
|
-
$bus$jscomp$
|
|
7049
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 5, this, function() {
|
|
6993
7050
|
var $pg$jscomp$26$$ = this.get_page();
|
|
6994
7051
|
if (0 === $pg$jscomp$26$$) {
|
|
6995
7052
|
return $dbg_log$$module$src$log$$("Unimplemented: Read pg0/05 (NCR: Number of Collisions Register)", 1048576), 0;
|
|
@@ -7000,12 +7057,12 @@ function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$19_i$jscomp$78_i
|
|
|
7000
7057
|
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
7058
|
return 0;
|
|
7002
7059
|
});
|
|
7003
|
-
$bus$jscomp$
|
|
7060
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_write(this.port | 5, this, function($data_byte$jscomp$23$$) {
|
|
7004
7061
|
var $pg$jscomp$27$$ = this.get_page();
|
|
7005
7062
|
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
7063
|
($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
7064
|
});
|
|
7008
|
-
$bus$jscomp$
|
|
7065
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 6, this, function() {
|
|
7009
7066
|
var $pg$jscomp$28$$ = this.get_page();
|
|
7010
7067
|
if (0 === $pg$jscomp$28$$) {
|
|
7011
7068
|
return $dbg_assert$$module$src$log$$(!1, "TODO"), 0;
|
|
@@ -7016,12 +7073,12 @@ function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$19_i$jscomp$78_i
|
|
|
7016
7073
|
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
7074
|
return 0;
|
|
7018
7075
|
});
|
|
7019
|
-
$bus$jscomp$
|
|
7076
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_write(this.port | 6, this, function($data_byte$jscomp$24$$) {
|
|
7020
7077
|
var $pg$jscomp$29$$ = this.get_page();
|
|
7021
7078
|
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
7079
|
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
7080
|
});
|
|
7024
|
-
$bus$jscomp$
|
|
7081
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_read(this.port | 12, this, function() {
|
|
7025
7082
|
var $pg$jscomp$30$$ = this.get_page();
|
|
7026
7083
|
if (0 === $pg$jscomp$30$$) {
|
|
7027
7084
|
return 9;
|
|
@@ -7033,12 +7090,12 @@ function $Ne2k$$module$src$ne2k$$($cpu$jscomp$17$$, $bus$jscomp$19_i$jscomp$78_i
|
|
|
7033
7090
|
$dbg_assert$$module$src$log$$(!1);
|
|
7034
7091
|
return 0;
|
|
7035
7092
|
});
|
|
7036
|
-
$bus$jscomp$
|
|
7093
|
+
$bus$jscomp$21_i$jscomp$78_io$jscomp$3$$.register_write(this.port | 12, this, function($data_byte$jscomp$25$$) {
|
|
7037
7094
|
var $pg$jscomp$31$$ = this.get_page();
|
|
7038
7095
|
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
7096
|
});
|
|
7040
|
-
$bus$jscomp$
|
|
7041
|
-
$bus$jscomp$
|
|
7097
|
+
$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);
|
|
7098
|
+
$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
7099
|
$cpu$jscomp$17$$.devices.pci.register_device(this);
|
|
7043
7100
|
}
|
|
7044
7101
|
$Ne2k$$module$src$ne2k$$.prototype.get_state = function() {
|
|
@@ -7140,16 +7197,16 @@ $Ne2k$$module$src$ne2k$$.prototype.receive = function($data$jscomp$175$$) {
|
|
|
7140
7197
|
$Ne2k$$module$src$ne2k$$.prototype.get_page = function() {
|
|
7141
7198
|
return this.cr >> 6 & 3;
|
|
7142
7199
|
};
|
|
7143
|
-
function $VirtioConsole$$module$src$virtio_console$$($cpu$jscomp$18$$, $bus$jscomp$
|
|
7144
|
-
this.bus = $bus$jscomp$
|
|
7200
|
+
function $VirtioConsole$$module$src$virtio_console$$($cpu$jscomp$18$$, $bus$jscomp$22_queues$$) {
|
|
7201
|
+
this.bus = $bus$jscomp$22_queues$$;
|
|
7145
7202
|
this.rows = 25;
|
|
7146
7203
|
this.cols = 80;
|
|
7147
7204
|
this.ports = 4;
|
|
7148
|
-
$bus$jscomp$
|
|
7205
|
+
$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
7206
|
for (let $i$jscomp$79$$ = 1; $i$jscomp$79$$ < this.ports; ++$i$jscomp$79$$) {
|
|
7150
|
-
$bus$jscomp$
|
|
7207
|
+
$bus$jscomp$22_queues$$.push({size_supported:16, notify_offset:0}), $bus$jscomp$22_queues$$.push({size_supported:8, notify_offset:1});
|
|
7151
7208
|
}
|
|
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$
|
|
7209
|
+
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
7210
|
}, }, notification:{initial_port:47360, single_handler:!1, handlers:[() => {
|
|
7154
7211
|
}, $queue_id$jscomp$1$$ => {
|
|
7155
7212
|
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 +7319,9 @@ $VirtioConsole$$module$src$virtio_console$$.prototype.Ack = function($queue_id$j
|
|
|
7262
7319
|
this.virtio.queues[$queue_id$jscomp$6$$].push_reply($bufchain$jscomp$7$$);
|
|
7263
7320
|
this.virtio.queues[$queue_id$jscomp$6$$].flush_replies();
|
|
7264
7321
|
};
|
|
7265
|
-
function $PS2$$module$src$ps2$$($cpu$jscomp$19$$, $bus$jscomp$
|
|
7322
|
+
function $PS2$$module$src$ps2$$($cpu$jscomp$19$$, $bus$jscomp$23$$) {
|
|
7266
7323
|
this.cpu = $cpu$jscomp$19$$;
|
|
7267
|
-
this.bus = $bus$jscomp$
|
|
7324
|
+
this.bus = $bus$jscomp$23$$;
|
|
7268
7325
|
this.reset();
|
|
7269
7326
|
this.bus.register("keyboard-code", function($code$jscomp$7$$) {
|
|
7270
7327
|
this.kbd_send_code($code$jscomp$7$$);
|
|
@@ -8221,22 +8278,22 @@ const $ATA_CMD_NAME$$module$src$ide$$ = {[8]:"DEVICE RESET", [144]:"EXECUTE DEVI
|
|
|
8221
8278
|
[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
8279
|
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
8280
|
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$
|
|
8281
|
+
function $IDEController$$module$src$ide$$($cpu$jscomp$21$$, $bus$jscomp$24_has_primary$$, $command_base0_ide_config$$) {
|
|
8225
8282
|
this.cpu = $cpu$jscomp$21$$;
|
|
8226
|
-
this.bus = $bus$jscomp$
|
|
8283
|
+
this.bus = $bus$jscomp$24_has_primary$$;
|
|
8227
8284
|
this.secondary = this.primary = void 0;
|
|
8228
|
-
$bus$jscomp$
|
|
8285
|
+
$bus$jscomp$24_has_primary$$ = $command_base0_ide_config$$ && $command_base0_ide_config$$[0][0];
|
|
8229
8286
|
const $has_secondary$$ = $command_base0_ide_config$$ && $command_base0_ide_config$$[1][0];
|
|
8230
|
-
if ($bus$jscomp$
|
|
8231
|
-
$bus$jscomp$
|
|
8287
|
+
if ($bus$jscomp$24_has_primary$$ || $has_secondary$$) {
|
|
8288
|
+
$bus$jscomp$24_has_primary$$ && (this.primary = new $IDEChannel$$module$src$ide$$(this, 0, $command_base0_ide_config$$[0], 496, 1014, 14));
|
|
8232
8289
|
$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$
|
|
8290
|
+
$command_base0_ide_config$$ = $bus$jscomp$24_has_primary$$ ? this.primary.command_base : 0;
|
|
8291
|
+
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
8292
|
this.name = "ide";
|
|
8236
8293
|
this.pci_id = 240;
|
|
8237
8294
|
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
8295
|
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$
|
|
8296
|
+
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
8297
|
$cpu$jscomp$21$$.devices.pci.register_device(this);
|
|
8241
8298
|
}
|
|
8242
8299
|
Object.seal(this);
|
|
@@ -9146,19 +9203,19 @@ $IDEInterface$$module$src$ide$$.prototype.set_state = function($state$jscomp$49$
|
|
|
9146
9203
|
this.drive_connected = this.is_atapi || this.buffer;
|
|
9147
9204
|
this.medium_changed = !1;
|
|
9148
9205
|
};
|
|
9149
|
-
function $VirtioNet$$module$src$virtio_net$$($cpu$jscomp$23$$, $bus$jscomp$
|
|
9150
|
-
this.bus = $bus$jscomp$
|
|
9206
|
+
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) {
|
|
9207
|
+
this.bus = $bus$jscomp$25_queues$jscomp$1$$;
|
|
9151
9208
|
this.id = $cpu$jscomp$23$$.devices.net ? 1 : 0;
|
|
9152
9209
|
this.status = this.pairs = 1;
|
|
9153
9210
|
this.preserve_mac_from_state_image = $i$jscomp$85_preserve_mac_from_state_image$jscomp$1$$;
|
|
9154
9211
|
this.mac = new Uint8Array([0, 34, 21, 255 * Math.random() | 0, 255 * Math.random() | 0, 255 * Math.random() | 0, ]);
|
|
9155
9212
|
this.bus.send("net" + this.id + "-mac", $format_mac$$module$src$ne2k$$(this.mac));
|
|
9156
|
-
$bus$jscomp$
|
|
9213
|
+
$bus$jscomp$25_queues$jscomp$1$$ = [];
|
|
9157
9214
|
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$
|
|
9215
|
+
$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
9216
|
}
|
|
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$
|
|
9217
|
+
$bus$jscomp$25_queues$jscomp$1$$.push({size_supported:16, notify_offset:2, });
|
|
9218
|
+
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
9219
|
}, }, notification:{initial_port:51456, single_handler:!1, handlers:[() => {
|
|
9163
9220
|
}, $queue_id$jscomp$8$$ => {
|
|
9164
9221
|
const $queue$jscomp$4$$ = this.virtio.queues[$queue_id$jscomp$8$$];
|
|
@@ -9238,9 +9295,9 @@ $VirtioNet$$module$src$virtio_net$$.prototype.Ack = function($queue_id$jscomp$11
|
|
|
9238
9295
|
this.virtio.queues[$queue_id$jscomp$11$$].flush_replies();
|
|
9239
9296
|
};
|
|
9240
9297
|
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$
|
|
9298
|
+
function $VGAScreen$$module$src$vga$$($cpu$jscomp$24$$, $bus$jscomp$26_io$jscomp$4$$, $screen$jscomp$3_vga_offset$$, $vga_memory_size$$) {
|
|
9242
9299
|
this.cpu = $cpu$jscomp$24$$;
|
|
9243
|
-
this.bus = $bus$jscomp$
|
|
9300
|
+
this.bus = $bus$jscomp$26_io$jscomp$4$$;
|
|
9244
9301
|
this.screen = $screen$jscomp$3_vga_offset$$;
|
|
9245
9302
|
this.vga_memory_size = $vga_memory_size$$;
|
|
9246
9303
|
this.cursor_address = 0;
|
|
@@ -9284,45 +9341,45 @@ function $VGAScreen$$module$src$vga$$($cpu$jscomp$24$$, $bus$jscomp$24_io$jscomp
|
|
|
9284
9341
|
this.max_scan_line = this.color_dont_care = this.color_compare = this.miscellaneous_graphics_register = this.planar_setreset_enable = this.planar_setreset = 0;
|
|
9285
9342
|
this.port_3DA_value = this.miscellaneous_output_register = 255;
|
|
9286
9343
|
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$
|
|
9344
|
+
$bus$jscomp$26_io$jscomp$4$$ = $cpu$jscomp$24$$.io;
|
|
9345
|
+
$bus$jscomp$26_io$jscomp$4$$.register_write(960, this, this.port3C0_write);
|
|
9346
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(960, this, this.port3C0_read, this.port3C0_read16);
|
|
9347
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(961, this, this.port3C1_read);
|
|
9348
|
+
$bus$jscomp$26_io$jscomp$4$$.register_write(962, this, this.port3C2_write);
|
|
9349
|
+
$bus$jscomp$26_io$jscomp$4$$.register_write_consecutive(964, this, this.port3C4_write, this.port3C5_write);
|
|
9350
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(964, this, this.port3C4_read);
|
|
9351
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(965, this, this.port3C5_read);
|
|
9352
|
+
$bus$jscomp$26_io$jscomp$4$$.register_write_consecutive(974, this, this.port3CE_write, this.port3CF_write);
|
|
9353
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(974, this, this.port3CE_read);
|
|
9354
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(975, this, this.port3CF_read);
|
|
9355
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(966, this, this.port3C6_read);
|
|
9356
|
+
$bus$jscomp$26_io$jscomp$4$$.register_write(966, this, this.port3C6_write);
|
|
9357
|
+
$bus$jscomp$26_io$jscomp$4$$.register_write(967, this, this.port3C7_write);
|
|
9358
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(967, this, this.port3C7_read);
|
|
9359
|
+
$bus$jscomp$26_io$jscomp$4$$.register_write(968, this, this.port3C8_write);
|
|
9360
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(968, this, this.port3C8_read);
|
|
9361
|
+
$bus$jscomp$26_io$jscomp$4$$.register_write(969, this, this.port3C9_write);
|
|
9362
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(969, this, this.port3C9_read);
|
|
9363
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(972, this, this.port3CC_read);
|
|
9364
|
+
$bus$jscomp$26_io$jscomp$4$$.register_write(980, this, this.port3D4_write, this.port3D4_write16);
|
|
9365
|
+
$bus$jscomp$26_io$jscomp$4$$.register_write(981, this, this.port3D5_write, this.port3D5_write16);
|
|
9366
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(980, this, this.port3D4_read);
|
|
9367
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(981, this, this.port3D5_read, this.port3D5_read16);
|
|
9368
|
+
$bus$jscomp$26_io$jscomp$4$$.register_write(948, this, this.port3D4_write, this.port3D4_write16);
|
|
9369
|
+
$bus$jscomp$26_io$jscomp$4$$.register_write(949, this, this.port3D5_write, this.port3D5_write16);
|
|
9370
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(948, this, this.port3D4_read);
|
|
9371
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(949, this, this.port3D5_read, this.port3D5_read16);
|
|
9372
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(970, this, function() {
|
|
9316
9373
|
$dbg_log$$module$src$log$$("3CA read", 256);
|
|
9317
9374
|
return 0;
|
|
9318
9375
|
});
|
|
9319
|
-
$bus$jscomp$
|
|
9320
|
-
$bus$jscomp$
|
|
9376
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(986, this, this.port3DA_read);
|
|
9377
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(954, this, this.port3DA_read);
|
|
9321
9378
|
this.dispi_index = -1;
|
|
9322
9379
|
this.dispi_enable_value = 0;
|
|
9323
|
-
$bus$jscomp$
|
|
9324
|
-
$bus$jscomp$
|
|
9325
|
-
$bus$jscomp$
|
|
9380
|
+
$bus$jscomp$26_io$jscomp$4$$.register_write(462, this, void 0, this.port1CE_write);
|
|
9381
|
+
$bus$jscomp$26_io$jscomp$4$$.register_write(463, this, void 0, this.port1CF_write);
|
|
9382
|
+
$bus$jscomp$26_io$jscomp$4$$.register_read(463, this, void 0, this.port1CF_read);
|
|
9326
9383
|
$screen$jscomp$3_vga_offset$$ = $cpu$jscomp$24$$.svga_allocate_memory(this.vga_memory_size) >>> 0;
|
|
9327
9384
|
this.svga_memory = $view$$module$src$lib$$(Uint8Array, $cpu$jscomp$24$$.wasm_memory, $screen$jscomp$3_vga_offset$$, this.vga_memory_size);
|
|
9328
9385
|
this.diff_addr_min = this.vga_memory_size;
|
|
@@ -9336,7 +9393,7 @@ function $VGAScreen$$module$src$vga$$($cpu$jscomp$24$$, $bus$jscomp$24_io$jscomp
|
|
|
9336
9393
|
this.plane2 = new Uint8Array(this.vga_memory.buffer, 131072, 65536);
|
|
9337
9394
|
this.plane3 = new Uint8Array(this.vga_memory.buffer, 196608, 65536);
|
|
9338
9395
|
this.pixel_buffer = new Uint8Array(524288);
|
|
9339
|
-
$bus$jscomp$
|
|
9396
|
+
$bus$jscomp$26_io$jscomp$4$$.mmap_register(655360, 131072, $addr$jscomp$30$$ => this.vga_memory_read($addr$jscomp$30$$), ($addr$jscomp$31$$, $value$jscomp$168$$) => this.vga_memory_write($addr$jscomp$31$$, $value$jscomp$168$$), );
|
|
9340
9397
|
$cpu$jscomp$24$$.devices.pci.register_device(this);
|
|
9341
9398
|
}
|
|
9342
9399
|
$VGAScreen$$module$src$vga$$.prototype.get_state = function() {
|
|
@@ -9579,16 +9636,16 @@ $VGAScreen$$module$src$vga$$.prototype.text_mode_redraw = function() {
|
|
|
9579
9636
|
for (let $row$jscomp$7$$ = 0; $row$jscomp$7$$ < this.max_rows; $row$jscomp$7$$++) {
|
|
9580
9637
|
$row$jscomp$7$$ === $split_screen_row$$ && ($addr$jscomp$35$$ = 0);
|
|
9581
9638
|
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$
|
|
9639
|
+
const $chr$jscomp$12$$ = this.vga_memory[$addr$jscomp$35$$], $color$jscomp$2$$ = this.vga_memory[$addr$jscomp$35$$ | 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$$);
|
|
9640
|
+
this.bus.send("screen-put-char", [$row$jscomp$7$$, $col$jscomp$4$$, $chr$jscomp$12$$]);
|
|
9641
|
+
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$$]]);
|
|
9585
9642
|
$addr$jscomp$35$$ += 2;
|
|
9586
9643
|
}
|
|
9587
9644
|
$addr$jscomp$35$$ += $row_offset$$;
|
|
9588
9645
|
}
|
|
9589
9646
|
};
|
|
9590
|
-
$VGAScreen$$module$src$vga$$.prototype.vga_memory_write_text_mode = function($addr$jscomp$36_flags$jscomp$14$$, $chr$jscomp$
|
|
9591
|
-
this.vga_memory[$addr$jscomp$36_flags$jscomp$14$$] = $chr$jscomp$
|
|
9647
|
+
$VGAScreen$$module$src$vga$$.prototype.vga_memory_write_text_mode = function($addr$jscomp$36_flags$jscomp$14$$, $chr$jscomp$13_value$jscomp$171$$) {
|
|
9648
|
+
this.vga_memory[$addr$jscomp$36_flags$jscomp$14$$] = $chr$jscomp$13_value$jscomp$171$$;
|
|
9592
9649
|
var $col$jscomp$5_max_cols$$ = Math.max(this.max_cols, 2 * this.offset_register);
|
|
9593
9650
|
let $row$jscomp$8$$;
|
|
9594
9651
|
if ($addr$jscomp$36_flags$jscomp$14$$ >> 1 >= this.start_address) {
|
|
@@ -9600,13 +9657,13 @@ $VGAScreen$$module$src$vga$$.prototype.vga_memory_write_text_mode = function($ad
|
|
|
9600
9657
|
}
|
|
9601
9658
|
$dbg_assert$$module$src$log$$(0 <= $row$jscomp$8$$ && 0 <= $col$jscomp$5_max_cols$$);
|
|
9602
9659
|
if (!($col$jscomp$5_max_cols$$ >= this.max_cols || $row$jscomp$8$$ >= this.max_rows)) {
|
|
9603
|
-
$addr$jscomp$36_flags$jscomp$14$$ & 1 ? ($color$jscomp$3_memory_start_memory_start$jscomp$1$$ = $chr$jscomp$
|
|
9660
|
+
$addr$jscomp$36_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$36_flags$jscomp$14$$ & -2]) : $color$jscomp$3_memory_start_memory_start$jscomp$1$$ = this.vga_memory[$addr$jscomp$36_flags$jscomp$14$$ | 1];
|
|
9604
9661
|
var $bg_color_mask$jscomp$1_blink_enabled$jscomp$1$$ = this.attribute_mode & 8;
|
|
9605
9662
|
$addr$jscomp$36_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
9663
|
var $fg_color_mask$jscomp$1$$ = this.font_page_ab_enabled ? 7 : 15;
|
|
9607
9664
|
$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$
|
|
9665
|
+
this.bus.send("screen-put-char", [$row$jscomp$8$$, $col$jscomp$5_max_cols$$, $chr$jscomp$13_value$jscomp$171$$]);
|
|
9666
|
+
this.screen.put_char($row$jscomp$8$$, $col$jscomp$5_max_cols$$, $chr$jscomp$13_value$jscomp$171$$, $addr$jscomp$36_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
9667
|
}
|
|
9611
9668
|
};
|
|
9612
9669
|
$VGAScreen$$module$src$vga$$.prototype.update_cursor = function() {
|
|
@@ -10365,8 +10422,8 @@ $VGAScreen$$module$src$vga$$.prototype.set_font_page = function() {
|
|
|
10365
10422
|
this.complete_redraw();
|
|
10366
10423
|
};
|
|
10367
10424
|
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$
|
|
10425
|
+
function $VirtioBalloon$$module$src$virtio_balloon$$($cpu$jscomp$25$$, $bus$jscomp$27$$) {
|
|
10426
|
+
this.bus = $bus$jscomp$27$$;
|
|
10370
10427
|
this.zeroed = this.fp_cmd = this.actual = this.num_pages = 0;
|
|
10371
10428
|
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
10429
|
$dbg_log$$module$src$log$$("Balloon setup", 2048);
|
|
@@ -10544,7 +10601,7 @@ function $load_kernel$$module$src$kernel$$($data8$jscomp$inline_162_mem8$$, $bzi
|
|
|
10544
10601
|
}
|
|
10545
10602
|
}
|
|
10546
10603
|
}
|
|
10547
|
-
;function $CPU$$module$src$cpu$$($bus$jscomp$
|
|
10604
|
+
;function $CPU$$module$src$cpu$$($bus$jscomp$28$$, $memory$jscomp$1_wm$$, $stop_idling$$) {
|
|
10548
10605
|
this.stop_idling = $stop_idling$$;
|
|
10549
10606
|
this.wm = $memory$jscomp$1_wm$$;
|
|
10550
10607
|
this.wasm_patch();
|
|
@@ -10623,7 +10680,7 @@ function $load_kernel$$module$src$kernel$$($data8$jscomp$inline_162_mem8$$, $bzi
|
|
|
10623
10680
|
this.fw_pointer = 0;
|
|
10624
10681
|
this.option_roms = [];
|
|
10625
10682
|
this.io = void 0;
|
|
10626
|
-
this.bus = $bus$jscomp$
|
|
10683
|
+
this.bus = $bus$jscomp$28$$;
|
|
10627
10684
|
this.set_tsc(0, 0);
|
|
10628
10685
|
this.seen_code = {};
|
|
10629
10686
|
this.seen_code_uncompiled = {};
|
|
@@ -11729,7 +11786,7 @@ $VirtIO$$module$src$virtio$$.prototype.init_capabilities = function($cap_len$jsc
|
|
|
11729
11786
|
$cap_next$$ = $bar_offset_cap_ptr_port$jscomp$10$$ + $cap_len$jscomp$1_capabilities$jscomp$1_write$$;
|
|
11730
11787
|
$dbg_assert$$module$src$log$$(256 >= $cap_next$$, "VirtIO device<" + this.name + "> can't fit all capabilities into 256byte configspace");
|
|
11731
11788
|
$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$
|
|
11789
|
+
var $bar_size_shim_read8_on_16$$ = $cap$jscomp$2$$.struct.reduce(($bytes$jscomp$7$$, $field$$) => $bytes$jscomp$7$$ + $field$$.bytes, 0);
|
|
11733
11790
|
$bar_size_shim_read8_on_16$$ += $cap$jscomp$2$$.offset;
|
|
11734
11791
|
$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
11792
|
$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");
|
|
@@ -12126,9 +12183,9 @@ function $init_virtio$$module$lib$9p$$($cpu$jscomp$29$$, $configspace_taglen$$,
|
|
|
12126
12183
|
}, }))), }, });
|
|
12127
12184
|
return $virtio$jscomp$1$$;
|
|
12128
12185
|
}
|
|
12129
|
-
function $Virtio9p$$module$lib$9p$$($filesystem$jscomp$2$$, $cpu$jscomp$30$$, $bus$jscomp$
|
|
12186
|
+
function $Virtio9p$$module$lib$9p$$($filesystem$jscomp$2$$, $cpu$jscomp$30$$, $bus$jscomp$29$$) {
|
|
12130
12187
|
this.fs = $filesystem$jscomp$2$$;
|
|
12131
|
-
this.bus = $bus$jscomp$
|
|
12188
|
+
this.bus = $bus$jscomp$29$$;
|
|
12132
12189
|
this.configspace_tagname = [104, 111, 115, 116, 57, 112];
|
|
12133
12190
|
this.configspace_taglen = this.configspace_tagname.length;
|
|
12134
12191
|
this.virtio = $init_virtio$$module$lib$9p$$($cpu$jscomp$30$$, this.configspace_taglen, this.configspace_tagname, this.ReceiveRequest.bind(this));
|