v86 0.5.463 → 0.5.469
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 +17 -11
- package/build/libv86-debug.mjs +17 -11
- package/build/libv86.js +21 -21
- package/build/libv86.mjs +221 -220
- 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
|
@@ -456,7 +456,7 @@ function $dbg_assert$$module$src$log$$($cond$$, $msg$$) {
|
|
|
456
456
|
$col_i$jscomp$inline_17_offscreen_extra_canvas$jscomp$inline_20$$ = $offscreen_extra_context$$.canvas;
|
|
457
457
|
const $txt_row_size$jscomp$inline_21$$ = 4 * $text_mode_width$$, $gfx_width$jscomp$inline_22$$ = $text_mode_width$$ * $font_width$$, $row_extra_2_y$jscomp$inline_24$$ = $font_height$$;
|
|
458
458
|
if (0 === $gfx_width$jscomp$inline_22$$) {
|
|
459
|
-
var $JSCompiler_inline_result$jscomp$
|
|
459
|
+
var $JSCompiler_inline_result$jscomp$0_fg_x$jscomp$inline_30$$ = 0;
|
|
460
460
|
} else {
|
|
461
461
|
$n_rows_rendered$jscomp$inline_25_tm_now$$ = 0;
|
|
462
462
|
for (let $row_i$jscomp$inline_26$$ = 0, $row_y$jscomp$inline_27$$ = 0, $txt_i$jscomp$inline_28$$ = 0; $row_i$jscomp$inline_26$$ < $text_mode_height$$; ++$row_i$jscomp$inline_26$$, $row_y$jscomp$inline_27$$ += $font_height$$) {
|
|
@@ -466,19 +466,19 @@ function $dbg_assert$$module$src$log$$($cond$$, $msg$$) {
|
|
|
466
466
|
}
|
|
467
467
|
++$n_rows_rendered$jscomp$inline_25_tm_now$$;
|
|
468
468
|
$offscreen_extra_context$$.clearRect(0, $row_extra_2_y$jscomp$inline_24$$, $gfx_width$jscomp$inline_22$$, $font_height$$);
|
|
469
|
-
let $
|
|
469
|
+
let $fg_rgba$jscomp$inline_29$$ = void 0, $bg_rgba$jscomp$inline_31$$ = void 0, $bg_x$jscomp$inline_32$$;
|
|
470
470
|
for (let $col_x$jscomp$inline_33$$ = 0; $col_x$jscomp$inline_33$$ < $gfx_width$jscomp$inline_22$$; $col_x$jscomp$inline_33$$ += $font_width$$, $txt_i$jscomp$inline_28$$ += 4) {
|
|
471
471
|
const $chr$jscomp$inline_34$$ = $text_mode_data$$[$txt_i$jscomp$inline_28$$ + 0];
|
|
472
472
|
var $chr_flags$jscomp$inline_35_chr_visible$jscomp$inline_39$$ = $text_mode_data$$[$txt_i$jscomp$inline_28$$ + 1];
|
|
473
473
|
const $chr_bg_rgba$jscomp$inline_36$$ = $text_mode_data$$[$txt_i$jscomp$inline_28$$ + 2], $chr_fg_rgba$jscomp$inline_37$$ = $text_mode_data$$[$txt_i$jscomp$inline_28$$ + 3], $chr_font_page$jscomp$inline_38$$ = $chr_flags$jscomp$inline_35_chr_visible$jscomp$inline_39$$ & 2 ? $font_page_b$$ : $font_page_a$$;
|
|
474
474
|
$chr_flags$jscomp$inline_35_chr_visible$jscomp$inline_39$$ = (!($chr_flags$jscomp$inline_35_chr_visible$jscomp$inline_39$$ & 1) || $blink_visible$$) && $font_is_visible$$[($chr_font_page$jscomp$inline_38$$ << 8) + $chr$jscomp$inline_34$$];
|
|
475
475
|
$bg_rgba$jscomp$inline_31$$ !== $chr_bg_rgba$jscomp$inline_36$$ && (void 0 !== $bg_rgba$jscomp$inline_31$$ && ($offscreen_context$$.fillStyle = $number_as_color$$($bg_rgba$jscomp$inline_31$$), $offscreen_context$$.fillRect($bg_x$jscomp$inline_32$$, $row_y$jscomp$inline_27$$, $col_x$jscomp$inline_33$$ - $bg_x$jscomp$inline_32$$, $font_height$$)), $bg_rgba$jscomp$inline_31$$ = $chr_bg_rgba$jscomp$inline_36$$, $bg_x$jscomp$inline_32$$ = $col_x$jscomp$inline_33$$);
|
|
476
|
-
$
|
|
477
|
-
$
|
|
476
|
+
$fg_rgba$jscomp$inline_29$$ !== $chr_fg_rgba$jscomp$inline_37$$ && (void 0 !== $fg_rgba$jscomp$inline_29$$ && ($offscreen_extra_context$$.fillStyle = $number_as_color$$($fg_rgba$jscomp$inline_29$$), $offscreen_extra_context$$.fillRect($JSCompiler_inline_result$jscomp$0_fg_x$jscomp$inline_30$$, 0, $col_x$jscomp$inline_33$$ - $JSCompiler_inline_result$jscomp$0_fg_x$jscomp$inline_30$$, $font_height$$)), $fg_rgba$jscomp$inline_29$$ = $chr_fg_rgba$jscomp$inline_37$$, $JSCompiler_inline_result$jscomp$0_fg_x$jscomp$inline_30$$ =
|
|
477
|
+
$col_x$jscomp$inline_33$$);
|
|
478
478
|
$chr_flags$jscomp$inline_35_chr_visible$jscomp$inline_39$$ && $offscreen_extra_context$$.drawImage($font_canvas$jscomp$inline_19_txt_row_size$jscomp$inline_14$$, $chr$jscomp$inline_34$$ * $font_width$$, $chr_font_page$jscomp$inline_38$$ * $font_height$$, $font_width$$, $font_height$$, $col_x$jscomp$inline_33$$, $row_extra_2_y$jscomp$inline_24$$, $font_width$$, $font_height$$);
|
|
479
479
|
}
|
|
480
|
-
$offscreen_extra_context$$.fillStyle = $number_as_color$$($
|
|
481
|
-
$offscreen_extra_context$$.fillRect($
|
|
480
|
+
$offscreen_extra_context$$.fillStyle = $number_as_color$$($fg_rgba$jscomp$inline_29$$);
|
|
481
|
+
$offscreen_extra_context$$.fillRect($JSCompiler_inline_result$jscomp$0_fg_x$jscomp$inline_30$$, 0, $gfx_width$jscomp$inline_22$$ - $JSCompiler_inline_result$jscomp$0_fg_x$jscomp$inline_30$$, $font_height$$);
|
|
482
482
|
$offscreen_extra_context$$.globalCompositeOperation = "destination-in";
|
|
483
483
|
$offscreen_extra_context$$.drawImage($col_i$jscomp$inline_17_offscreen_extra_canvas$jscomp$inline_20$$, 0, $row_extra_2_y$jscomp$inline_24$$, $gfx_width$jscomp$inline_22$$, $font_height$$, 0, 0, $gfx_width$jscomp$inline_22$$, $font_height$$);
|
|
484
484
|
$offscreen_extra_context$$.globalCompositeOperation = "source-over";
|
|
@@ -487,10 +487,10 @@ function $dbg_assert$$module$src$log$$($cond$$, $msg$$) {
|
|
|
487
487
|
$offscreen_context$$.drawImage($col_i$jscomp$inline_17_offscreen_extra_canvas$jscomp$inline_20$$, 0, 0, $gfx_width$jscomp$inline_22$$, $font_height$$, 0, $row_y$jscomp$inline_27$$, $gfx_width$jscomp$inline_22$$, $font_height$$);
|
|
488
488
|
}
|
|
489
489
|
$n_rows_rendered$jscomp$inline_25_tm_now$$ && ($blink_visible$$ && $cursor_enabled$$ && $changed_rows$$[$cursor_row$$] && ($offscreen_context$$.fillStyle = $number_as_color$$($text_mode_data$$[4 * ($cursor_row$$ * $text_mode_width$$ + $cursor_col$$) + 3]), $offscreen_context$$.fillRect($cursor_col$$ * $font_width$$, $cursor_row$$ * $font_height$$ + $cursor_start$$, $font_width$$, $cursor_end$$ - $cursor_start$$ + 1)), $changed_rows$$.fill(0));
|
|
490
|
-
$JSCompiler_inline_result$jscomp$
|
|
490
|
+
$JSCompiler_inline_result$jscomp$0_fg_x$jscomp$inline_30$$ = $n_rows_rendered$jscomp$inline_25_tm_now$$;
|
|
491
491
|
}
|
|
492
492
|
}
|
|
493
|
-
$JSCompiler_inline_result$jscomp$
|
|
493
|
+
$JSCompiler_inline_result$jscomp$0_fg_x$jscomp$inline_30$$ && $graphic_context$$.drawImage($offscreen_context$$.canvas, 0, 0);
|
|
494
494
|
}
|
|
495
495
|
};
|
|
496
496
|
this.destroy = function() {
|
|
@@ -9014,9 +9014,9 @@ $FloppyDrive$$module$src$floppy$$.prototype.set_state = function($state$jscomp$4
|
|
|
9014
9014
|
$state$jscomp$45$$[10] ? (this.buffer || (this.buffer = new $SyncBuffer$$module$src$buffer$$(new ArrayBuffer(0))), this.buffer.set_state($state$jscomp$45$$[10])) : this.buffer = null;
|
|
9015
9015
|
};
|
|
9016
9016
|
const $ATA_CMD_NAME$$module$src$ide$$ = {[8]:"DEVICE RESET", [144]:"EXECUTE DEVICE DIAGNOSTIC", [231]:"FLUSH CACHE", [234]:"FLUSH CACHE EXT", [218]:"GET MEDIA STATUS", [236]:"IDENTIFY DEVICE", [161]:"IDENTIFY PACKET DEVICE", [225]:"IDLE IMMEDIATE", [145]:"INITIALIZE DEVICE PARAMETERS", [222]:"MEDIA LOCK", [0]:"NOP", [160]:"PACKET", [200]:"READ DMA", [37]:"READ DMA EXT", [41]:"READ MULTIPLE", [196]:"READ MULTIPLE EXT", [248]:"READ NATIVE MAX ADDRESS", [39]:"READ NATIVE MAX ADDRESS EXT", [32]:"READ SECTORS",
|
|
9017
|
-
[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",
|
|
9018
|
-
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}, [35]:{name:"READ FORMAT CAPACITIES", flags:1}, [190]:{name:"READ CD", flags:1}, [81]:{name:"READ DISK INFORMATION", flags:1}, [66]:{name:"READ SUBCHANNEL",
|
|
9019
|
-
flags:1}, [82]:{name:"READ TRACK INFORMATION", flags:1}, [3]:{name:"REQUEST SENSE", flags:0}, [27]:{name:"START STOP UNIT", flags:0}, [0]:{name:"TEST UNIT READY", flags:1}, [164]:{name:"REPORT KEY", flags:0}, [173]:{name:"READ DISC STRUCTURE", flags:1}, };
|
|
9017
|
+
[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", [47]:"READ LOG 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",
|
|
9018
|
+
flags:0}, [18]:{name:"INQUIRY", 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}, [35]:{name:"READ FORMAT CAPACITIES", flags:1}, [190]:{name:"READ CD", flags:1}, [81]:{name:"READ DISK INFORMATION", flags:1}, [66]:{name:"READ SUBCHANNEL",
|
|
9019
|
+
flags:1}, [67]:{name:"READ TOC PMA ATIP", flags:1}, [82]:{name:"READ TRACK INFORMATION", flags:1}, [3]:{name:"REQUEST SENSE", flags:0}, [27]:{name:"START STOP UNIT", flags:0}, [0]:{name:"TEST UNIT READY", flags:1}, [164]:{name:"REPORT KEY", flags:0}, [173]:{name:"READ DISC STRUCTURE", flags:1}, };
|
|
9020
9020
|
function $IDEController$$module$src$ide$$($cpu$jscomp$23$$, $bus$jscomp$27_has_primary$$, $command_base0_ide_config$$) {
|
|
9021
9021
|
this.cpu = $cpu$jscomp$23$$;
|
|
9022
9022
|
this.bus = $bus$jscomp$27_has_primary$$;
|
|
@@ -9408,6 +9408,9 @@ $IDEInterface$$module$src$ide$$.prototype.ata_command = function($cmd$jscomp$1$$
|
|
|
9408
9408
|
this.status_reg = 80;
|
|
9409
9409
|
this.push_irq();
|
|
9410
9410
|
break;
|
|
9411
|
+
case 47:
|
|
9412
|
+
this.ata_abort_command();
|
|
9413
|
+
break;
|
|
9411
9414
|
case 200:
|
|
9412
9415
|
case 37:
|
|
9413
9416
|
$do_dbg_log_result$jscomp$20$$ = !1;
|
|
@@ -11460,6 +11463,7 @@ function $load_kernel$$module$src$kernel$$($data8$jscomp$inline_162_mem8$$, $bzi
|
|
|
11460
11463
|
this.sreg = $view$$module$src$lib$$(Uint16Array, $memory$jscomp$1_wm$$, 668, 8);
|
|
11461
11464
|
this.dreg = $view$$module$src$lib$$(Int32Array, $memory$jscomp$1_wm$$, 684, 8);
|
|
11462
11465
|
this.reg_pdpte = $view$$module$src$lib$$(Int32Array, $memory$jscomp$1_wm$$, 968, 8);
|
|
11466
|
+
this.pat = $view$$module$src$lib$$(Uint32Array, $memory$jscomp$1_wm$$, 1288, 2);
|
|
11463
11467
|
this.svga_dirty_bitmap_min_offset = $view$$module$src$lib$$(Uint32Array, $memory$jscomp$1_wm$$, 716, 1);
|
|
11464
11468
|
this.svga_dirty_bitmap_max_offset = $view$$module$src$lib$$(Uint32Array, $memory$jscomp$1_wm$$, 720, 1);
|
|
11465
11469
|
this.fw_value = [];
|
|
@@ -11673,6 +11677,7 @@ $CPU$$module$src$cpu$$.prototype.get_state = function() {
|
|
|
11673
11677
|
$state$jscomp$58$$[89] = this.devices.vmware;
|
|
11674
11678
|
$state$jscomp$58$$[90] = this.devices.parallel0;
|
|
11675
11679
|
$state$jscomp$58$$[91] = this.devices.parallel1;
|
|
11680
|
+
$state$jscomp$58$$[93] = this.pat;
|
|
11676
11681
|
return $state$jscomp$58$$;
|
|
11677
11682
|
};
|
|
11678
11683
|
$CPU$$module$src$cpu$$.prototype.get_state_pic = function() {
|
|
@@ -11743,6 +11748,7 @@ $CPU$$module$src$cpu$$.prototype.set_state = function($state$jscomp$60$$) {
|
|
|
11743
11748
|
this.sreg.set($state$jscomp$60$$[40]);
|
|
11744
11749
|
this.dreg.set($state$jscomp$60$$[41]);
|
|
11745
11750
|
$state$jscomp$60$$[42] && this.reg_pdpte.set($state$jscomp$60$$[42]);
|
|
11751
|
+
this.pat.set($state$jscomp$60$$[93] || [459782, 459782]);
|
|
11746
11752
|
this.set_tsc($state$jscomp$60$$[43][0], $state$jscomp$60$$[43][1]);
|
|
11747
11753
|
this.devices.virtio_9p && this.devices.virtio_9p.set_state($state$jscomp$60$$[45]);
|
|
11748
11754
|
$state$jscomp$60$$[46] && this.set_state_apic($state$jscomp$60$$[46]);
|
package/build/libv86-debug.mjs
CHANGED
|
@@ -455,7 +455,7 @@ function $ScreenAdapter$$module$src$browser$screen$$($options$jscomp$36$$, $scre
|
|
|
455
455
|
$col_i$jscomp$inline_17_offscreen_extra_canvas$jscomp$inline_20$$ = $offscreen_extra_context$$.canvas;
|
|
456
456
|
const $txt_row_size$jscomp$inline_21$$ = 4 * $text_mode_width$$, $gfx_width$jscomp$inline_22$$ = $text_mode_width$$ * $font_width$$, $row_extra_2_y$jscomp$inline_24$$ = $font_height$$;
|
|
457
457
|
if (0 === $gfx_width$jscomp$inline_22$$) {
|
|
458
|
-
var $JSCompiler_inline_result$jscomp$
|
|
458
|
+
var $JSCompiler_inline_result$jscomp$0_fg_x$jscomp$inline_30$$ = 0;
|
|
459
459
|
} else {
|
|
460
460
|
$n_rows_rendered$jscomp$inline_25_tm_now$$ = 0;
|
|
461
461
|
for (let $row_i$jscomp$inline_26$$ = 0, $row_y$jscomp$inline_27$$ = 0, $txt_i$jscomp$inline_28$$ = 0; $row_i$jscomp$inline_26$$ < $text_mode_height$$; ++$row_i$jscomp$inline_26$$, $row_y$jscomp$inline_27$$ += $font_height$$) {
|
|
@@ -465,19 +465,19 @@ function $ScreenAdapter$$module$src$browser$screen$$($options$jscomp$36$$, $scre
|
|
|
465
465
|
}
|
|
466
466
|
++$n_rows_rendered$jscomp$inline_25_tm_now$$;
|
|
467
467
|
$offscreen_extra_context$$.clearRect(0, $row_extra_2_y$jscomp$inline_24$$, $gfx_width$jscomp$inline_22$$, $font_height$$);
|
|
468
|
-
let $
|
|
468
|
+
let $fg_rgba$jscomp$inline_29$$ = void 0, $bg_rgba$jscomp$inline_31$$ = void 0, $bg_x$jscomp$inline_32$$;
|
|
469
469
|
for (let $col_x$jscomp$inline_33$$ = 0; $col_x$jscomp$inline_33$$ < $gfx_width$jscomp$inline_22$$; $col_x$jscomp$inline_33$$ += $font_width$$, $txt_i$jscomp$inline_28$$ += 4) {
|
|
470
470
|
const $chr$jscomp$inline_34$$ = $text_mode_data$$[$txt_i$jscomp$inline_28$$ + 0];
|
|
471
471
|
var $chr_flags$jscomp$inline_35_chr_visible$jscomp$inline_39$$ = $text_mode_data$$[$txt_i$jscomp$inline_28$$ + 1];
|
|
472
472
|
const $chr_bg_rgba$jscomp$inline_36$$ = $text_mode_data$$[$txt_i$jscomp$inline_28$$ + 2], $chr_fg_rgba$jscomp$inline_37$$ = $text_mode_data$$[$txt_i$jscomp$inline_28$$ + 3], $chr_font_page$jscomp$inline_38$$ = $chr_flags$jscomp$inline_35_chr_visible$jscomp$inline_39$$ & 2 ? $font_page_b$$ : $font_page_a$$;
|
|
473
473
|
$chr_flags$jscomp$inline_35_chr_visible$jscomp$inline_39$$ = (!($chr_flags$jscomp$inline_35_chr_visible$jscomp$inline_39$$ & 1) || $blink_visible$$) && $font_is_visible$$[($chr_font_page$jscomp$inline_38$$ << 8) + $chr$jscomp$inline_34$$];
|
|
474
474
|
$bg_rgba$jscomp$inline_31$$ !== $chr_bg_rgba$jscomp$inline_36$$ && (void 0 !== $bg_rgba$jscomp$inline_31$$ && ($offscreen_context$$.fillStyle = $number_as_color$$($bg_rgba$jscomp$inline_31$$), $offscreen_context$$.fillRect($bg_x$jscomp$inline_32$$, $row_y$jscomp$inline_27$$, $col_x$jscomp$inline_33$$ - $bg_x$jscomp$inline_32$$, $font_height$$)), $bg_rgba$jscomp$inline_31$$ = $chr_bg_rgba$jscomp$inline_36$$, $bg_x$jscomp$inline_32$$ = $col_x$jscomp$inline_33$$);
|
|
475
|
-
$
|
|
476
|
-
$
|
|
475
|
+
$fg_rgba$jscomp$inline_29$$ !== $chr_fg_rgba$jscomp$inline_37$$ && (void 0 !== $fg_rgba$jscomp$inline_29$$ && ($offscreen_extra_context$$.fillStyle = $number_as_color$$($fg_rgba$jscomp$inline_29$$), $offscreen_extra_context$$.fillRect($JSCompiler_inline_result$jscomp$0_fg_x$jscomp$inline_30$$, 0, $col_x$jscomp$inline_33$$ - $JSCompiler_inline_result$jscomp$0_fg_x$jscomp$inline_30$$, $font_height$$)), $fg_rgba$jscomp$inline_29$$ = $chr_fg_rgba$jscomp$inline_37$$, $JSCompiler_inline_result$jscomp$0_fg_x$jscomp$inline_30$$ =
|
|
476
|
+
$col_x$jscomp$inline_33$$);
|
|
477
477
|
$chr_flags$jscomp$inline_35_chr_visible$jscomp$inline_39$$ && $offscreen_extra_context$$.drawImage($font_canvas$jscomp$inline_19_txt_row_size$jscomp$inline_14$$, $chr$jscomp$inline_34$$ * $font_width$$, $chr_font_page$jscomp$inline_38$$ * $font_height$$, $font_width$$, $font_height$$, $col_x$jscomp$inline_33$$, $row_extra_2_y$jscomp$inline_24$$, $font_width$$, $font_height$$);
|
|
478
478
|
}
|
|
479
|
-
$offscreen_extra_context$$.fillStyle = $number_as_color$$($
|
|
480
|
-
$offscreen_extra_context$$.fillRect($
|
|
479
|
+
$offscreen_extra_context$$.fillStyle = $number_as_color$$($fg_rgba$jscomp$inline_29$$);
|
|
480
|
+
$offscreen_extra_context$$.fillRect($JSCompiler_inline_result$jscomp$0_fg_x$jscomp$inline_30$$, 0, $gfx_width$jscomp$inline_22$$ - $JSCompiler_inline_result$jscomp$0_fg_x$jscomp$inline_30$$, $font_height$$);
|
|
481
481
|
$offscreen_extra_context$$.globalCompositeOperation = "destination-in";
|
|
482
482
|
$offscreen_extra_context$$.drawImage($col_i$jscomp$inline_17_offscreen_extra_canvas$jscomp$inline_20$$, 0, $row_extra_2_y$jscomp$inline_24$$, $gfx_width$jscomp$inline_22$$, $font_height$$, 0, 0, $gfx_width$jscomp$inline_22$$, $font_height$$);
|
|
483
483
|
$offscreen_extra_context$$.globalCompositeOperation = "source-over";
|
|
@@ -486,10 +486,10 @@ function $ScreenAdapter$$module$src$browser$screen$$($options$jscomp$36$$, $scre
|
|
|
486
486
|
$offscreen_context$$.drawImage($col_i$jscomp$inline_17_offscreen_extra_canvas$jscomp$inline_20$$, 0, 0, $gfx_width$jscomp$inline_22$$, $font_height$$, 0, $row_y$jscomp$inline_27$$, $gfx_width$jscomp$inline_22$$, $font_height$$);
|
|
487
487
|
}
|
|
488
488
|
$n_rows_rendered$jscomp$inline_25_tm_now$$ && ($blink_visible$$ && $cursor_enabled$$ && $changed_rows$$[$cursor_row$$] && ($offscreen_context$$.fillStyle = $number_as_color$$($text_mode_data$$[4 * ($cursor_row$$ * $text_mode_width$$ + $cursor_col$$) + 3]), $offscreen_context$$.fillRect($cursor_col$$ * $font_width$$, $cursor_row$$ * $font_height$$ + $cursor_start$$, $font_width$$, $cursor_end$$ - $cursor_start$$ + 1)), $changed_rows$$.fill(0));
|
|
489
|
-
$JSCompiler_inline_result$jscomp$
|
|
489
|
+
$JSCompiler_inline_result$jscomp$0_fg_x$jscomp$inline_30$$ = $n_rows_rendered$jscomp$inline_25_tm_now$$;
|
|
490
490
|
}
|
|
491
491
|
}
|
|
492
|
-
$JSCompiler_inline_result$jscomp$
|
|
492
|
+
$JSCompiler_inline_result$jscomp$0_fg_x$jscomp$inline_30$$ && $graphic_context$$.drawImage($offscreen_context$$.canvas, 0, 0);
|
|
493
493
|
}
|
|
494
494
|
};
|
|
495
495
|
this.destroy = function() {
|
|
@@ -9013,9 +9013,9 @@ $FloppyDrive$$module$src$floppy$$.prototype.set_state = function($state$jscomp$4
|
|
|
9013
9013
|
$state$jscomp$45$$[10] ? (this.buffer || (this.buffer = new $SyncBuffer$$module$src$buffer$$(new ArrayBuffer(0))), this.buffer.set_state($state$jscomp$45$$[10])) : this.buffer = null;
|
|
9014
9014
|
};
|
|
9015
9015
|
const $ATA_CMD_NAME$$module$src$ide$$ = {[8]:"DEVICE RESET", [144]:"EXECUTE DEVICE DIAGNOSTIC", [231]:"FLUSH CACHE", [234]:"FLUSH CACHE EXT", [218]:"GET MEDIA STATUS", [236]:"IDENTIFY DEVICE", [161]:"IDENTIFY PACKET DEVICE", [225]:"IDLE IMMEDIATE", [145]:"INITIALIZE DEVICE PARAMETERS", [222]:"MEDIA LOCK", [0]:"NOP", [160]:"PACKET", [200]:"READ DMA", [37]:"READ DMA EXT", [41]:"READ MULTIPLE", [196]:"READ MULTIPLE EXT", [248]:"READ NATIVE MAX ADDRESS", [39]:"READ NATIVE MAX ADDRESS EXT", [32]:"READ SECTORS",
|
|
9016
|
-
[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",
|
|
9017
|
-
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}, [35]:{name:"READ FORMAT CAPACITIES", flags:1}, [190]:{name:"READ CD", flags:1}, [81]:{name:"READ DISK INFORMATION", flags:1}, [66]:{name:"READ SUBCHANNEL",
|
|
9018
|
-
flags:1}, [82]:{name:"READ TRACK INFORMATION", flags:1}, [3]:{name:"REQUEST SENSE", flags:0}, [27]:{name:"START STOP UNIT", flags:0}, [0]:{name:"TEST UNIT READY", flags:1}, [164]:{name:"REPORT KEY", flags:0}, [173]:{name:"READ DISC STRUCTURE", flags:1}, };
|
|
9016
|
+
[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", [47]:"READ LOG 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",
|
|
9017
|
+
flags:0}, [18]:{name:"INQUIRY", 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}, [35]:{name:"READ FORMAT CAPACITIES", flags:1}, [190]:{name:"READ CD", flags:1}, [81]:{name:"READ DISK INFORMATION", flags:1}, [66]:{name:"READ SUBCHANNEL",
|
|
9018
|
+
flags:1}, [67]:{name:"READ TOC PMA ATIP", flags:1}, [82]:{name:"READ TRACK INFORMATION", flags:1}, [3]:{name:"REQUEST SENSE", flags:0}, [27]:{name:"START STOP UNIT", flags:0}, [0]:{name:"TEST UNIT READY", flags:1}, [164]:{name:"REPORT KEY", flags:0}, [173]:{name:"READ DISC STRUCTURE", flags:1}, };
|
|
9019
9019
|
function $IDEController$$module$src$ide$$($cpu$jscomp$23$$, $bus$jscomp$27_has_primary$$, $command_base0_ide_config$$) {
|
|
9020
9020
|
this.cpu = $cpu$jscomp$23$$;
|
|
9021
9021
|
this.bus = $bus$jscomp$27_has_primary$$;
|
|
@@ -9407,6 +9407,9 @@ $IDEInterface$$module$src$ide$$.prototype.ata_command = function($cmd$jscomp$1$$
|
|
|
9407
9407
|
this.status_reg = 80;
|
|
9408
9408
|
this.push_irq();
|
|
9409
9409
|
break;
|
|
9410
|
+
case 47:
|
|
9411
|
+
this.ata_abort_command();
|
|
9412
|
+
break;
|
|
9410
9413
|
case 200:
|
|
9411
9414
|
case 37:
|
|
9412
9415
|
$do_dbg_log_result$jscomp$20$$ = !1;
|
|
@@ -11459,6 +11462,7 @@ function $CPU$$module$src$cpu$$($bus$jscomp$31$$, $memory$jscomp$1_wm$$, $stop_i
|
|
|
11459
11462
|
this.sreg = $view$$module$src$lib$$(Uint16Array, $memory$jscomp$1_wm$$, 668, 8);
|
|
11460
11463
|
this.dreg = $view$$module$src$lib$$(Int32Array, $memory$jscomp$1_wm$$, 684, 8);
|
|
11461
11464
|
this.reg_pdpte = $view$$module$src$lib$$(Int32Array, $memory$jscomp$1_wm$$, 968, 8);
|
|
11465
|
+
this.pat = $view$$module$src$lib$$(Uint32Array, $memory$jscomp$1_wm$$, 1288, 2);
|
|
11462
11466
|
this.svga_dirty_bitmap_min_offset = $view$$module$src$lib$$(Uint32Array, $memory$jscomp$1_wm$$, 716, 1);
|
|
11463
11467
|
this.svga_dirty_bitmap_max_offset = $view$$module$src$lib$$(Uint32Array, $memory$jscomp$1_wm$$, 720, 1);
|
|
11464
11468
|
this.fw_value = [];
|
|
@@ -11672,6 +11676,7 @@ $CPU$$module$src$cpu$$.prototype.get_state = function() {
|
|
|
11672
11676
|
$state$jscomp$58$$[89] = this.devices.vmware;
|
|
11673
11677
|
$state$jscomp$58$$[90] = this.devices.parallel0;
|
|
11674
11678
|
$state$jscomp$58$$[91] = this.devices.parallel1;
|
|
11679
|
+
$state$jscomp$58$$[93] = this.pat;
|
|
11675
11680
|
return $state$jscomp$58$$;
|
|
11676
11681
|
};
|
|
11677
11682
|
$CPU$$module$src$cpu$$.prototype.get_state_pic = function() {
|
|
@@ -11742,6 +11747,7 @@ $CPU$$module$src$cpu$$.prototype.set_state = function($state$jscomp$60$$) {
|
|
|
11742
11747
|
this.sreg.set($state$jscomp$60$$[40]);
|
|
11743
11748
|
this.dreg.set($state$jscomp$60$$[41]);
|
|
11744
11749
|
$state$jscomp$60$$[42] && this.reg_pdpte.set($state$jscomp$60$$[42]);
|
|
11750
|
+
this.pat.set($state$jscomp$60$$[93] || [459782, 459782]);
|
|
11745
11751
|
this.set_tsc($state$jscomp$60$$[43][0], $state$jscomp$60$$[43][1]);
|
|
11746
11752
|
this.devices.virtio_9p && this.devices.virtio_9p.set_state($state$jscomp$60$$[45]);
|
|
11747
11753
|
$state$jscomp$60$$[46] && this.set_state_apic($state$jscomp$60$$[46]);
|
package/build/libv86.js
CHANGED
|
@@ -18,14 +18,14 @@ f.getElementsByTagName("div")[0];m||(m=document.createElement("div"),f.appendChi
|
|
|
18
18
|
25);2===B&&this.set_size_graphical(720,400,720,400);this.set_scale(q,r);this.timer()};this.make_screenshot=function(){const v=new Image;if(1===B||2===B)v.src=g.toDataURL("image/png");else{const u=[9,16],J=document.createElement("canvas");J.width=w*u[0];J.height=t*u[1];const L=J.getContext("2d");L.imageSmoothingEnabled=!1;L.font=window.getComputedStyle(m).font;L.textBaseline="top";for(let V=0;V<t;V++)for(let R=0;R<w;R++){const N=4*(V*w+R),xa=C[N+0],ya=C[N+3];L.fillStyle=c(C[N+2]);L.fillRect(R*u[0],
|
|
19
19
|
V*u[1],u[0],u[1]);L.fillStyle=c(ya);L.fillText(Vb[xa],R*u[0],V*u[1])}"none"!==l.style.display&&n<t&&p<w&&(L.fillStyle=l.style.backgroundColor,L.fillRect(p*u[0],n*u[1]+parseInt(l.style.marginTop,10),parseInt(l.style.width,10),parseInt(l.style.height,10)));v.src=J.toDataURL("image/png")}return v};this.put_char=function(v,u,J,L,V,R){u=4*(v*w+u);C[u+0]=J;C[u+1]=L;C[u+2]=V;C[u+3]=R;F[v]=1};this.timer=function(){Ab=requestAnimationFrame(()=>this.update_screen())};this.update_screen=function(){Wb||(0===
|
|
20
20
|
B?this.update_text():1===B?this.update_graphical():this.update_graphical_text());this.timer()};this.update_text=function(){for(var v=0;v<t;v++)F[v]&&(this.text_update_row(v),F[v]=0)};this.update_graphical=function(){this.screen_fill_buffer()};this.update_graphical_text=function(){if(I){var v=performance.now();if(266<v-jc){xb=!xb;zb&&(F[n]=1);var u=4*w;for(let R=0,N=0;R<t;++R)if(F[R])N+=u;else for(var J=0;J<w;++J,N+=4)if(C[N+1]&1){F[R]=1;N+=u-4*J;break}jc=v}{u=Va.canvas;J=P.canvas;const R=4*w,N=w*
|
|
21
|
-
ja,xa=U;if(0===N)var L=0;else{v=0;for(let ya=0,ba=0,za=0;ya<t;++ya,ba+=U){if(!F[ya]){za+=R;continue}++v;P.clearRect(0,xa,N,U);let Ia,Pa,Qa;for(let ta=0;ta<N;ta+=ja,za+=4){const kc=C[za+0];var V=C[za+1];const lc=C[za+2],mc=C[za+3],nc=V&2?wb:vb;V=(!(V&1)||xb)&&ic[(nc<<8)+kc];Pa!==lc&&(void 0!==Pa&&(I.fillStyle=c(Pa),I.fillRect(Qa,ba,ta-Qa,U)),Pa=lc,Qa=ta);
|
|
22
|
-
0,N-
|
|
23
|
-
this.clear_text_state=function(){wb=vb=t=w=U=ja=null};this.set_mode=function(v){B=v?1:a.use_graphical_text?2:0;0===B?(m.style.display="block",g.style.display="none"):(m.style.display="none",g.style.display="block",2===B&&F&&F.fill(1))};this.set_font_bitmap=function(v,u,J,L,V,R){const N=J?16:u?9:8;if(U!==v||ja!==N||Sb!==u||Rb!==J||Tb!==L||R)R=ja!==N||U!==v,U=v,ja=N,Sb=u,Rb=J,Tb=L,2===B&&(d(V),F.fill(1),R&&this.set_size_graphical_text())};this.set_font_page=function(v,
|
|
24
|
-
F.fill(1)};this.clear_screen=function(){h.fillStyle="#000";h.fillRect(0,0,g.width,g.height)};this.set_size_graphical_text=function(){if(Va){var v=ja*w,u=U*t,J=2*U;I&&I.canvas.width===v&&I.canvas.height===u&&P.canvas.height===J||(I?(I.canvas.width=v,I.canvas.height=u,P.canvas.width=v,P.canvas.height=J):(I=(new OffscreenCanvas(v,u)).getContext("2d",{alpha:!1}),P=(new OffscreenCanvas(v,J)).getContext("2d")),this.set_size_graphical(v,u,v,u),F.fill(1))}};this.set_size_text=
|
|
25
|
-
t)if(F=new Int8Array(u),F.fill(1),C=new Int32Array(v*u*4),w=v,t=u,0===B){for(;m.childNodes.length>u;)m.removeChild(m.firstChild);for(;m.childNodes.length<u;)m.appendChild(document.createElement("div"));for(v=0;v<u;v++)this.text_update_row(v);e(m,q,r,!0)}else 2===B&&this.set_size_graphical_text()};this.set_size_graphical=function(v,u){g.style.display="block";g.width=v;g.height=u;h.imageSmoothingEnabled=!1;x=640>=v&&2*v<window.innerWidth*window.devicePixelRatio&&2*u<window.innerHeight*
|
|
26
|
-
2:1;e(g,q*x,r*x,!1)};this.set_scale=function(v,u){q=v;r=u;e(m,q,r,!0);e(g,q*x,r*x,!1)};this.update_cursor_scanline=function(v,u,J){if(v!==yb||u!==Ub||J!==zb)0===B?J?(l.style.display="inline",l.style.height=u-v+"px",l.style.marginTop=v+"px"):l.style.display="none":2===B&&n<t&&(F[n]=1),yb=v,Ub=u,zb=J};this.update_cursor=function(v,u){if(v!==n||u!==p)v<t&&(F[v]=1),n<t&&(F[n]=1),n=v,p=u};this.text_update_row=function(v){var u=4*v*w,J;var L=m.childNodes[v];var V=document.createElement("div");
|
|
27
|
-
0;R<w;){var N=document.createElement("span");var xa=C[u+1]&1;var ya=C[u+2];var ba=C[u+3];xa&&N.classList.add("blink");N.style.backgroundColor=c(ya);N.style.color=c(ba);for(J="";R<w&&(C[u+1]&1)===xa&&C[u+2]===ya&&C[u+3]===ba;)if(J+=Vb[C[u+0]],R++,u+=4,v===n)if(R===p)break;else if(R===p+1){l.style.backgroundColor=N.style.color;V.appendChild(l);break}N.textContent=J;V.appendChild(N)}L.parentNode.replaceChild(V,L)};this.update_buffer=function(v){for(const u of v)h.putImageData(u.image_data,
|
|
28
|
-
u.buffer_x,u.screen_y-u.buffer_y,u.buffer_x,u.buffer_y,u.buffer_width,u.buffer_height)};this.get_text_screen=function(){for(var v=[],u=0;u<t;u++)v.push(this.get_text_row(u));return v};this.get_text_row=function(v){var u=v*w*4;v=u+4*w;let J="";for(;u<v;u+=4)J+=Vb[C[u]];return J};this.init()};function z(a){this.buffer=a;this.byteLength=a.byteLength;this.onprogress=this.onload=void 0}z.prototype.load=function(){this.onload&&this.onload({buffer:this.buffer})};z.prototype.get=function(a,b,c){c(new Uint8Array(this.buffer,a,b))};z.prototype.get_and_cache=function(a,b,c){this.get(a,b,c)};z.prototype.get_from_cache=function(a,b){return new Uint8Array(this.buffer,a,b)};z.prototype.set=function(a,b,c){(new Uint8Array(this.buffer,a,b.byteLength)).set(b);c()};z.prototype.get_buffer=function(a){a(this.buffer)};
|
|
21
|
+
ja,xa=U;if(0===N)var L=0;else{v=0;for(let ya=0,ba=0,za=0;ya<t;++ya,ba+=U){if(!F[ya]){za+=R;continue}++v;P.clearRect(0,xa,N,U);let Ia=void 0,Pa=void 0,Qa;for(let ta=0;ta<N;ta+=ja,za+=4){const kc=C[za+0];var V=C[za+1];const lc=C[za+2],mc=C[za+3],nc=V&2?wb:vb;V=(!(V&1)||xb)&&ic[(nc<<8)+kc];Pa!==lc&&(void 0!==Pa&&(I.fillStyle=c(Pa),I.fillRect(Qa,ba,ta-Qa,U)),Pa=lc,Qa=ta);Ia!==mc&&(void 0!==Ia&&(P.fillStyle=c(Ia),P.fillRect(L,0,ta-L,U)),Ia=mc,L=ta);V&&P.drawImage(u,kc*ja,nc*U,ja,U,ta,xa,ja,U)}P.fillStyle=
|
|
22
|
+
c(Ia);P.fillRect(L,0,N-L,U);P.globalCompositeOperation="destination-in";P.drawImage(J,0,xa,N,U,0,0,N,U);P.globalCompositeOperation="source-over";I.fillStyle=c(Pa);I.fillRect(Qa,ba,N-Qa,U);I.drawImage(J,0,0,N,U,0,ba,N,U)}v&&(xb&&zb&&F[n]&&(I.fillStyle=c(C[4*(n*w+p)+3]),I.fillRect(p*ja,n*U+yb,ja,Ub-yb+1)),F.fill(0));L=v}}L&&h.drawImage(I.canvas,0,0)}};this.destroy=function(){Ab&&(cancelAnimationFrame(Ab),Ab=0)};this.pause=function(){Wb=!0;l.classList.remove("blinking-cursor")};this.continue=function(){Wb=
|
|
23
|
+
!1;l.classList.add("blinking-cursor")};this.clear_text_state=function(){wb=vb=t=w=U=ja=null};this.set_mode=function(v){B=v?1:a.use_graphical_text?2:0;0===B?(m.style.display="block",g.style.display="none"):(m.style.display="none",g.style.display="block",2===B&&F&&F.fill(1))};this.set_font_bitmap=function(v,u,J,L,V,R){const N=J?16:u?9:8;if(U!==v||ja!==N||Sb!==u||Rb!==J||Tb!==L||R)R=ja!==N||U!==v,U=v,ja=N,Sb=u,Rb=J,Tb=L,2===B&&(d(V),F.fill(1),R&&this.set_size_graphical_text())};this.set_font_page=function(v,
|
|
24
|
+
u){if(vb!==v||wb!==u)vb=v,wb=u,F.fill(1)};this.clear_screen=function(){h.fillStyle="#000";h.fillRect(0,0,g.width,g.height)};this.set_size_graphical_text=function(){if(Va){var v=ja*w,u=U*t,J=2*U;I&&I.canvas.width===v&&I.canvas.height===u&&P.canvas.height===J||(I?(I.canvas.width=v,I.canvas.height=u,P.canvas.width=v,P.canvas.height=J):(I=(new OffscreenCanvas(v,u)).getContext("2d",{alpha:!1}),P=(new OffscreenCanvas(v,J)).getContext("2d")),this.set_size_graphical(v,u,v,u),F.fill(1))}};this.set_size_text=
|
|
25
|
+
function(v,u){if(v!==w||u!==t)if(F=new Int8Array(u),F.fill(1),C=new Int32Array(v*u*4),w=v,t=u,0===B){for(;m.childNodes.length>u;)m.removeChild(m.firstChild);for(;m.childNodes.length<u;)m.appendChild(document.createElement("div"));for(v=0;v<u;v++)this.text_update_row(v);e(m,q,r,!0)}else 2===B&&this.set_size_graphical_text()};this.set_size_graphical=function(v,u){g.style.display="block";g.width=v;g.height=u;h.imageSmoothingEnabled=!1;x=640>=v&&2*v<window.innerWidth*window.devicePixelRatio&&2*u<window.innerHeight*
|
|
26
|
+
window.devicePixelRatio?2:1;e(g,q*x,r*x,!1)};this.set_scale=function(v,u){q=v;r=u;e(m,q,r,!0);e(g,q*x,r*x,!1)};this.update_cursor_scanline=function(v,u,J){if(v!==yb||u!==Ub||J!==zb)0===B?J?(l.style.display="inline",l.style.height=u-v+"px",l.style.marginTop=v+"px"):l.style.display="none":2===B&&n<t&&(F[n]=1),yb=v,Ub=u,zb=J};this.update_cursor=function(v,u){if(v!==n||u!==p)v<t&&(F[v]=1),n<t&&(F[n]=1),n=v,p=u};this.text_update_row=function(v){var u=4*v*w,J;var L=m.childNodes[v];var V=document.createElement("div");
|
|
27
|
+
for(var R=0;R<w;){var N=document.createElement("span");var xa=C[u+1]&1;var ya=C[u+2];var ba=C[u+3];xa&&N.classList.add("blink");N.style.backgroundColor=c(ya);N.style.color=c(ba);for(J="";R<w&&(C[u+1]&1)===xa&&C[u+2]===ya&&C[u+3]===ba;)if(J+=Vb[C[u+0]],R++,u+=4,v===n)if(R===p)break;else if(R===p+1){l.style.backgroundColor=N.style.color;V.appendChild(l);break}N.textContent=J;V.appendChild(N)}L.parentNode.replaceChild(V,L)};this.update_buffer=function(v){for(const u of v)h.putImageData(u.image_data,
|
|
28
|
+
u.screen_x-u.buffer_x,u.screen_y-u.buffer_y,u.buffer_x,u.buffer_y,u.buffer_width,u.buffer_height)};this.get_text_screen=function(){for(var v=[],u=0;u<t;u++)v.push(this.get_text_row(u));return v};this.get_text_row=function(v){var u=v*w*4;v=u+4*w;let J="";for(;u<v;u+=4)J+=Vb[C[u]];return J};this.init()};function z(a){this.buffer=a;this.byteLength=a.byteLength;this.onprogress=this.onload=void 0}z.prototype.load=function(){this.onload&&this.onload({buffer:this.buffer})};z.prototype.get=function(a,b,c){c(new Uint8Array(this.buffer,a,b))};z.prototype.get_and_cache=function(a,b,c){this.get(a,b,c)};z.prototype.get_from_cache=function(a,b){return new Uint8Array(this.buffer,a,b)};z.prototype.set=function(a,b,c){(new Uint8Array(this.buffer,a,b.byteLength)).set(b);c()};z.prototype.get_buffer=function(a){a(this.buffer)};
|
|
29
29
|
z.prototype.get_state=function(){const a=[];a[0]=this.byteLength;a[1]=new Uint8Array(this.buffer);return a};z.prototype.set_state=function(a){this.byteLength=a[0];this.buffer=a[1].slice().buffer};function wa(a,b,c){this.filename=a;this.byteLength=b;this.block_cache=new Map;this.block_cache_is_write=new Set;this.fixed_chunk_size=c;this.cache_reads=!!c;this.onprogress=this.onload=void 0}
|
|
30
30
|
wa.prototype.load=async function(){void 0===this.byteLength&&(this.byteLength=await oa(this.filename));this.onload&&this.onload(Object.create(null))};wa.prototype.get_from_cache=function(a,b){var c=b/256;a/=256;for(var d=0;d<c;d++)if(!this.block_cache.get(a+d))return;if(1===c)return this.block_cache.get(a);b=new Uint8Array(b);for(d=0;d<c;d++)b.set(this.block_cache.get(a+d),256*d);return b};
|
|
31
31
|
wa.prototype.get=function(a,b,c,d){var e=this.get_from_cache(a,b);if(e)c(e);else{var f=a,g=b;this.fixed_chunk_size&&(f=a-a%this.fixed_chunk_size,g=Math.ceil((a-f+b)/this.fixed_chunk_size)*this.fixed_chunk_size);na(this.filename,{done:function(h){h=new Uint8Array(h);this.handle_read(f,g,h);f===a&&g===b?c(h):c(h.subarray(a-f,a-f+b))}.bind(this),range:{start:f,length:g},signal:d?.signal})}};
|
|
@@ -540,9 +540,9 @@ X.prototype.capture_regs=function(){return`ST=${y(this.status_reg&255)} ER=${y(t
|
|
|
540
540
|
X.prototype.ata_command=function(a){if(this.drive_connected||144===a)switch(this.current_command=a,this.error_reg=0,a){case 8:this.data_length=this.data_end=this.data_pointer=0;this.device_reset();this.push_irq();break;case 16:this.lba_mid_reg=0;this.status_reg=80;this.push_irq();break;case 248:a=this.sector_count-1;this.lba_low_reg=a&255;this.lba_mid_reg=a>>8&255;this.lba_high_reg=a>>16&255;this.device_reg=this.device_reg&240|a>>24&15;this.status_reg=80;this.push_irq();break;case 39:a=this.sector_count-
|
|
541
541
|
1;this.lba_low_reg=a&255;this.lba_mid_reg=a>>8&255;this.lba_high_reg=a>>16&255;this.lba_low_reg|=a>>24<<8&65280;this.status_reg=80;this.push_irq();break;case 32:this.is_atapi?(this.lba_mid_reg=20,this.lba_high_reg=235,this.ata_abort_command()):this.ata_read_sectors(a);break;case 36:case 41:case 196:this.is_atapi?this.ata_abort_command():this.ata_read_sectors(a);break;case 48:case 52:case 57:case 197:this.is_atapi?this.ata_abort_command():this.ata_write_sectors(a);break;case 144:this.channel.master.status_reg=
|
|
542
542
|
80;this.channel.master.error_reg=1;this.channel.master.push_irq();this.channel.slave.drive_connected&&(this.channel.slave.status_reg=80,this.channel.slave.error_reg=1,this.channel.slave.push_irq());break;case 145:this.status_reg=80;this.push_irq();break;case 160:this.is_atapi?(this.data_allocate(12),this.data_end=12,this.sector_count_reg=1,this.status_reg=88):this.ata_abort_command();break;case 161:this.is_atapi?(this.create_identify_packet(),this.status_reg=88,this.push_irq()):this.ata_abort_command();
|
|
543
|
-
break;case 198:y(this.sector_count_reg&255);this.sectors_per_drq=this.sector_count_reg&255;this.status_reg=80;this.push_irq();break;case 200:case 37:this.ata_read_sectors_dma(a);break;case 202:case 53:this.ata_write_sectors_dma(a);break;case 64:this.status_reg=80;this.push_irq();break;case 218:this.is_atapi&&(this.buffer||(this.error_reg|=2),this.medium_changed&&(this.error_reg|=32,this.medium_changed=0),this.error_reg|=64);this.status_reg=80;this.push_irq();
|
|
544
|
-
break;case 225:this.status_reg=80;this.push_irq();break;case 231:this.status_reg=80;this.push_irq();break;case 234:this.status_reg=80;this.push_irq();break;case 236:this.is_atapi?(this.lba_mid_reg=20,this.lba_high_reg=235,this.ata_abort_command()):(this.create_identify_packet(),this.status_reg=88,this.push_irq());break;case 239:this.status_reg=80;this.push_irq();break;case 222:this.status_reg=64;this.push_irq();break;case 245:this.status_reg=80;this.push_irq();
|
|
545
|
-
break;case 0:this.ata_abort_command();break;case 240:y(a);this.capture_regs();this.ata_abort_command();break;default:y(a),this.capture_regs(),this.ata_abort_command()}else y(a)};
|
|
543
|
+
break;case 198:y(this.sector_count_reg&255);this.sectors_per_drq=this.sector_count_reg&255;this.status_reg=80;this.push_irq();break;case 47:this.ata_abort_command();break;case 200:case 37:this.ata_read_sectors_dma(a);break;case 202:case 53:this.ata_write_sectors_dma(a);break;case 64:this.status_reg=80;this.push_irq();break;case 218:this.is_atapi&&(this.buffer||(this.error_reg|=2),this.medium_changed&&(this.error_reg|=32,this.medium_changed=0),this.error_reg|=64);this.status_reg=80;this.push_irq();
|
|
544
|
+
break;case 224:this.status_reg=80;this.push_irq();break;case 225:this.status_reg=80;this.push_irq();break;case 231:this.status_reg=80;this.push_irq();break;case 234:this.status_reg=80;this.push_irq();break;case 236:this.is_atapi?(this.lba_mid_reg=20,this.lba_high_reg=235,this.ata_abort_command()):(this.create_identify_packet(),this.status_reg=88,this.push_irq());break;case 239:this.status_reg=80;this.push_irq();break;case 222:this.status_reg=64;this.push_irq();break;case 245:this.status_reg=80;this.push_irq();
|
|
545
|
+
break;case 249:this.ata_abort_command();break;case 0:this.ata_abort_command();break;case 240:y(a);this.capture_regs();this.ata_abort_command();break;default:y(a),this.capture_regs(),this.ata_abort_command()}else y(a)};
|
|
546
546
|
X.prototype.atapi_handle=function(){var a=this.data[0],b=cd[a]?cd[a].flags:0;this.data_pointer=0;this.current_atapi_command=a;if(this.medium_changed&&this.buffer&&3!==a&&18!==a)2===this.medium_changed?(this.medium_changed=1,this.atapi_check_condition_response(2,58)):(this.medium_changed=0,this.atapi_check_condition_response(6,40)),this.push_irq();else if(3!==a&&(this.atapi_add_sense=this.atapi_sense_key=0),!this.buffer&&b&1)this.atapi_check_condition_response(2,58),this.push_irq();else{switch(a){case 0:this.buffer?
|
|
547
547
|
(this.data_allocate(0),this.data_end=this.data_length,this.status_reg=80):this.atapi_check_condition_response(2,58);break;case 3:this.data_allocate(this.data[4]);this.data_end=this.data_length;this.status_reg=88;this.data[0]=240;this.data[2]=this.atapi_sense_key;this.data[7]=8;this.data[12]=this.atapi_add_sense;this.atapi_add_sense=this.atapi_sense_key=0;break;case 18:a=this.data[4];this.status_reg=88;y(this.data[1],2);this.data.set([5,128,1,49,31,0,0,0,83,79,78,89,32,32,32,32,67,68,45,82,79,77,32,
|
|
548
548
|
67,68,85,45,49,48,48,48,32,49,46,49,97]);this.data_end=this.data_length=Math.min(36,a);break;case 26:this.data_allocate(this.data[4]);this.data_end=this.data_length;this.status_reg=88;break;case 30:this.data_allocate(0);this.data_end=this.data_length;this.status_reg=80;break;case 37:a=this.sector_count-1;this.data_set(new Uint8Array([a>>24&255,a>>16&255,a>>8&255,a&255,0,0,this.sector_size>>8&255,this.sector_size&255]));this.data_end=this.data_length;this.status_reg=88;break;case 35:a=this.sector_count-
|
|
@@ -678,10 +678,10 @@ e]=d.charCodeAt(e);h=512*(h+1);y(h);d=new Uint8Array(b,0,h);b=new Uint8Array(b,h
|
|
|
678
678
|
this.idtr_offset=k(Int32Array,b,568,1);this.gdtr_size=k(Int32Array,b,572,1);this.gdtr_offset=k(Int32Array,b,576,1);this.tss_size_32=k(Int32Array,b,1128,1);this.cr=k(Int32Array,b,580,8);this.cpl=k(Uint8Array,b,612,1);this.is_32=k(Int32Array,b,804,1);this.stack_size_32=k(Int32Array,b,808,1);this.in_hlt=k(Uint8Array,b,616,1);this.last_virt_eip=k(Int32Array,b,620,1);this.eip_phys=k(Int32Array,b,624,1);this.sysenter_cs=k(Int32Array,b,636,1);this.sysenter_esp=k(Int32Array,b,640,1);this.sysenter_eip=k(Int32Array,
|
|
679
679
|
b,644,1);this.prefixes=k(Int32Array,b,648,1);this.flags=k(Int32Array,b,120,1);this.flags_changed=k(Int32Array,b,100,1);this.last_op_size=k(Int32Array,b,96,1);this.last_op1=k(Int32Array,b,104,1);this.last_result=k(Int32Array,b,112,1);this.current_tsc=k(Uint32Array,b,960,2);this.devices={};this.instruction_pointer=k(Int32Array,b,556,1);this.previous_ip=k(Int32Array,b,560,1);this.apic_enabled=k(Uint8Array,b,548,1);this.acpi_enabled=k(Uint8Array,b,552,1);this.memory_map_read8=[];this.memory_map_write8=
|
|
680
680
|
[];this.memory_map_read32=[];this.memory_map_write32=[];this.bios={main:null,vga:null};this.instruction_counter=k(Uint32Array,b,664,1);this.reg32=k(Int32Array,b,64,8);this.fpu_st=k(Int32Array,b,1152,32);this.fpu_stack_empty=k(Uint8Array,b,816,1);this.fpu_stack_empty[0]=255;this.fpu_stack_ptr=k(Uint8Array,b,1032,1);this.fpu_stack_ptr[0]=0;this.fpu_control_word=k(Uint16Array,b,1036,1);this.fpu_control_word[0]=895;this.fpu_status_word=k(Uint16Array,b,1040,1);this.fpu_status_word[0]=0;this.fpu_ip=k(Int32Array,
|
|
681
|
-
b,1048,1);this.fpu_ip[0]=0;this.fpu_ip_selector=k(Int32Array,b,1052,1);this.fpu_ip_selector[0]=0;this.fpu_opcode=k(Int32Array,b,1044,1);this.fpu_opcode[0]=0;this.fpu_dp=k(Int32Array,b,1056,1);this.fpu_dp[0]=0;this.fpu_dp_selector=k(Int32Array,b,1060,1);this.fpu_dp_selector[0]=0;this.reg_xmm32s=k(Int32Array,b,832,32);this.mxcsr=k(Int32Array,b,824,1);this.sreg=k(Uint16Array,b,668,8);this.dreg=k(Int32Array,b,684,8);this.reg_pdpte=k(Int32Array,b,968,8);this.
|
|
682
|
-
b,716,1);this.svga_dirty_bitmap_max_offset=k(Uint32Array,b,720,1);this.fw_value=[];this.fw_pointer=0;this.option_roms=[];this.io=void 0;this.bus=a;this.set_tsc(0,0)}S.prototype.mmap_read8=function(a){return this.memory_map_read8[a>>>17](a)};S.prototype.mmap_write8=function(a,b){this.memory_map_write8[a>>>17](a,b)};S.prototype.mmap_write16=function(a,b){var c=this.memory_map_write8[a>>>17];c(a,b&255);c(a+1|0,b>>8)};
|
|
683
|
-
S.prototype.mmap_write32=function(a,b){this.memory_map_write32[a>>>17](a,b)};S.prototype.mmap_write64=function(a,b,c){var d=this.memory_map_write32[a>>>17];d(a,b);d(a+4,c)};S.prototype.mmap_write128=function(a,b,c,d,e){var f=this.memory_map_write32[a>>>17];f(a,b);f(a+4,c);f(a+8,d);f(a+12,e)};
|
|
684
|
-
S.prototype.read_blob=function(a,b){b&&(this.in_mapped_range(a),this.in_mapped_range(a+b-1));return this.mem8.subarray(a,a+b)};S.prototype.clear_opstats=function(){(new Uint8Array(this.wasm_memory.buffer,32768,131072)).fill(0);this.wm.exports.profiler_init()};
|
|
681
|
+
b,1048,1);this.fpu_ip[0]=0;this.fpu_ip_selector=k(Int32Array,b,1052,1);this.fpu_ip_selector[0]=0;this.fpu_opcode=k(Int32Array,b,1044,1);this.fpu_opcode[0]=0;this.fpu_dp=k(Int32Array,b,1056,1);this.fpu_dp[0]=0;this.fpu_dp_selector=k(Int32Array,b,1060,1);this.fpu_dp_selector[0]=0;this.reg_xmm32s=k(Int32Array,b,832,32);this.mxcsr=k(Int32Array,b,824,1);this.sreg=k(Uint16Array,b,668,8);this.dreg=k(Int32Array,b,684,8);this.reg_pdpte=k(Int32Array,b,968,8);this.pat=k(Uint32Array,b,1288,2);this.svga_dirty_bitmap_min_offset=
|
|
682
|
+
k(Uint32Array,b,716,1);this.svga_dirty_bitmap_max_offset=k(Uint32Array,b,720,1);this.fw_value=[];this.fw_pointer=0;this.option_roms=[];this.io=void 0;this.bus=a;this.set_tsc(0,0)}S.prototype.mmap_read8=function(a){return this.memory_map_read8[a>>>17](a)};S.prototype.mmap_write8=function(a,b){this.memory_map_write8[a>>>17](a,b)};S.prototype.mmap_write16=function(a,b){var c=this.memory_map_write8[a>>>17];c(a,b&255);c(a+1|0,b>>8)};
|
|
683
|
+
S.prototype.mmap_read32=function(a){return this.memory_map_read32[a>>>17](a)};S.prototype.mmap_write32=function(a,b){this.memory_map_write32[a>>>17](a,b)};S.prototype.mmap_write64=function(a,b,c){var d=this.memory_map_write32[a>>>17];d(a,b);d(a+4,c)};S.prototype.mmap_write128=function(a,b,c,d,e){var f=this.memory_map_write32[a>>>17];f(a,b);f(a+4,c);f(a+8,d);f(a+12,e)};
|
|
684
|
+
S.prototype.write_blob=function(a,b){a.length&&(this.in_mapped_range(b),this.in_mapped_range(b+a.length-1),this.jit_dirty_cache(b,b+a.length),this.mem8.set(a,b))};S.prototype.read_blob=function(a,b){b&&(this.in_mapped_range(a),this.in_mapped_range(a+b-1));return this.mem8.subarray(a,a+b)};S.prototype.clear_opstats=function(){(new Uint8Array(this.wasm_memory.buffer,32768,131072)).fill(0);this.wm.exports.profiler_init()};
|
|
685
685
|
S.prototype.create_jit_imports=function(){const a=Object.create(null);a.m=this.wm.exports.memory;for(const b of Object.keys(this.wm.exports))b.startsWith("_")||b.startsWith("zstd")||b.endsWith("_js")||(a[b]=this.wm.exports[b]);this.jit_imports=a};
|
|
686
686
|
S.prototype.wasm_patch=function(){const a=c=>this.wm.exports[c],b=c=>{const d=a(c);console.assert(d,"Missing import: "+c);return d};this.reset_cpu=b("reset_cpu");this.getiopl=b("getiopl");this.get_eflags=b("get_eflags");this.handle_irqs=b("handle_irqs");this.main_loop=b("main_loop");this.set_jit_config=b("set_jit_config");this.read8=b("read8");this.read16=b("read16");this.read32s=b("read32s");this.write8=b("write8");this.write16=b("write16");this.write32=b("write32");this.in_mapped_range=b("in_mapped_range");
|
|
687
687
|
this.fpu_load_tag_word=b("fpu_load_tag_word");this.fpu_load_status_word=b("fpu_load_status_word");this.fpu_get_sti_f64=b("fpu_get_sti_f64");this.translate_address_system_read=b("translate_address_system_read_js");this.get_seg_cs=b("get_seg_cs");this.get_real_eip=b("get_real_eip");this.clear_tlb=b("clear_tlb");this.full_clear_tlb=b("full_clear_tlb");this.update_state_flags=b("update_state_flags");this.set_tsc=b("set_tsc");this.store_current_tsc=b("store_current_tsc");this.set_cpuid_level=b("set_cpuid_level");
|
|
@@ -692,16 +692,16 @@ S.prototype.get_state=function(){var a=[];a[0]=this.memory_size[0];a[1]=new Uint
|
|
|
692
692
|
this.sysenter_eip[0];a[24]=this.sysenter_esp[0];a[25]=this.prefixes[0];a[26]=this.flags[0];a[27]=this.flags_changed[0];a[28]=this.last_op1[0];a[30]=this.last_op_size[0];a[37]=this.instruction_pointer[0];a[38]=this.previous_ip[0];a[39]=this.reg32;a[40]=this.sreg;a[41]=this.dreg;a[42]=this.reg_pdpte;this.store_current_tsc();a[43]=this.current_tsc;a[45]=this.devices.virtio_9p;a[46]=this.get_state_apic();a[47]=this.devices.rtc;a[48]=this.devices.pci;a[49]=this.devices.dma;a[50]=this.devices.acpi;a[52]=
|
|
693
693
|
this.devices.vga;a[53]=this.devices.ps2;a[54]=this.devices.uart0;a[55]=this.devices.fdc;this.devices.ide.secondary?a[85]=this.devices.ide:this.devices.ide.primary?.master.is_atapi?a[56]=this.devices.ide.primary:a[57]=this.devices.ide.primary;a[58]=this.devices.pit;a[59]=this.devices.net;a[60]=this.get_state_pic();a[61]=this.devices.sb16;a[62]=this.fw_value;a[63]=this.get_state_ioapic();a[64]=this.tss_size_32[0];a[66]=this.reg_xmm32s;a[67]=this.fpu_st;a[68]=this.fpu_stack_empty[0];a[69]=this.fpu_stack_ptr[0];
|
|
694
694
|
a[70]=this.fpu_control_word[0];a[71]=this.fpu_ip[0];a[72]=this.fpu_ip_selector[0];a[73]=this.fpu_dp[0];a[74]=this.fpu_dp_selector[0];a[75]=this.fpu_opcode[0];const {packed_memory:b,bitmap:c}=this.pack_memory();a[77]=b;a[78]=new Uint8Array(c.get_buffer());a[79]=this.devices.uart1;a[80]=this.devices.uart2;a[81]=this.devices.uart3;a[82]=this.devices.virtio_console;a[83]=this.devices.virtio_net;a[84]=this.devices.virtio_balloon;a[86]=this.last_result;a[87]=this.fpu_status_word;a[88]=this.mxcsr;a[89]=
|
|
695
|
-
this.devices.vmware;a[90]=this.devices.parallel0;a[91]=this.devices.parallel1;return a};
|
|
695
|
+
this.devices.vmware;a[90]=this.devices.parallel0;a[91]=this.devices.parallel1;a[93]=this.pat;return a};
|
|
696
696
|
S.prototype.get_state_pic=function(){const a=new Uint8Array(this.wasm_memory.buffer,this.get_pic_addr_master(),13),b=new Uint8Array(this.wasm_memory.buffer,this.get_pic_addr_slave(),13),c=[],d=[];c[0]=a[0];c[1]=a[1];c[2]=a[2];c[3]=a[3];c[4]=a[4];c[5]=d;c[6]=a[6];c[7]=a[7];c[8]=a[8];c[9]=a[9];c[10]=a[10];c[11]=a[11];c[12]=a[12];d[0]=b[0];d[1]=b[1];d[2]=b[2];d[3]=b[3];d[4]=b[4];d[5]=null;d[6]=b[6];d[7]=b[7];d[8]=b[8];d[9]=b[9];d[10]=b[10];d[11]=b[11];d[12]=b[12];return c};
|
|
697
697
|
S.prototype.get_state_apic=function(){return new Uint8Array(this.wasm_memory.buffer,this.get_apic_addr(),184)};S.prototype.get_state_ioapic=function(){return new Uint8Array(this.wasm_memory.buffer,this.get_ioapic_addr(),208)};
|
|
698
698
|
S.prototype.set_state=function(a){this.memory_size[0]=a[0];this.mem8.length!==this.memory_size[0]&&console.warn("Note: Memory size mismatch. we="+this.mem8.length+" state="+this.memory_size[0]);8===a[1].length?(this.segment_is_null.set(a[1]),this.segment_access_bytes.fill(242),this.segment_access_bytes[1]=250):16===a[1].length&&(this.segment_is_null.set(a[1].subarray(0,8)),this.segment_access_bytes.set(a[1].subarray(8,16)));this.segment_offsets.set(a[2]);this.segment_limits.set(a[3]);this.protected_mode[0]=
|
|
699
699
|
a[4];this.idtr_offset[0]=a[5];this.idtr_size[0]=a[6];this.gdtr_offset[0]=a[7];this.gdtr_size[0]=a[8];this.cr.set(a[10]);this.cpl[0]=a[11];this.is_32[0]=a[13];this.stack_size_32[0]=a[16];this.in_hlt[0]=a[17];this.last_virt_eip[0]=a[18];this.eip_phys[0]=a[19];this.sysenter_cs[0]=a[22];this.sysenter_eip[0]=a[23];this.sysenter_esp[0]=a[24];this.prefixes[0]=a[25];this.flags[0]=a[26];this.flags_changed[0]=a[27];this.last_op1[0]=a[28];this.last_op_size[0]=a[30];this.instruction_pointer[0]=a[37];this.previous_ip[0]=
|
|
700
|
-
a[38];this.reg32.set(a[39]);this.sreg.set(a[40]);this.dreg.set(a[41]);a[42]&&this.reg_pdpte.set(a[42]);this.set_tsc(a[43][0],a[43][1]);this.devices.virtio_9p&&this.devices.virtio_9p.set_state(a[45]);a[46]&&this.set_state_apic(a[46]);this.devices.rtc&&this.devices.rtc.set_state(a[47]);this.devices.dma&&this.devices.dma.set_state(a[49]);this.devices.acpi&&this.devices.acpi.set_state(a[50]);this.devices.vga&&this.devices.vga.set_state(a[52]);this.devices.ps2&&this.devices.ps2.set_state(a[53]);
|
|
701
|
-
this.devices.uart0.set_state(a[54]);this.devices.fdc&&this.devices.fdc.set_state(a[55]);if(a[56]||a[57]){var b=[[void 0,void 0],[void 0,void 0]];b[0][0]=a[56]?{is_cdrom:!0,buffer:this.devices.cdrom.buffer}:{is_cdrom:!1,buffer:this.devices.ide.primary.master.buffer};this.devices.ide=new dd(this,this.devices.ide.bus,b);this.devices.cdrom=a[56]?this.devices.ide.primary.master:void 0;this.devices.ide.primary.set_state(a[56]||a[57])}else a[85]&&this.devices.ide.set_state(a[85]);this.devices.pci&&
|
|
702
|
-
this.devices.pit&&this.devices.pit.set_state(a[58]);this.devices.net&&this.devices.net.set_state(a[59]);this.set_state_pic(a[60]);this.devices.sb16&&this.devices.sb16.set_state(a[61]);this.devices.uart1&&this.devices.uart1.set_state(a[79]);this.devices.uart2&&this.devices.uart2.set_state(a[80]);this.devices.uart3&&this.devices.uart3.set_state(a[81]);this.devices.virtio_console&&this.devices.virtio_console.set_state(a[82]);this.devices.virtio_net&&this.devices.virtio_net.set_state(a[83]);
|
|
703
|
-
this.devices.virtio_balloon.set_state(a[84]);this.devices.vmware&&a[89]&&this.devices.vmware.set_state(a[89]);this.devices.parallel0&&a[90]&&this.devices.parallel0.set_state(a[90]);this.devices.parallel1&&a[91]&&this.devices.parallel1.set_state(a[91]);this.fw_value=a[62];a[63]&&this.set_state_ioapic(a[63]);this.tss_size_32[0]=a[64];this.reg_xmm32s.set(a[66]);this.fpu_st.set(a[67]);this.fpu_stack_empty[0]=a[68];this.fpu_stack_ptr[0]=a[69];this.fpu_control_word[0]=a[70];
|
|
704
|
-
a[72];this.fpu_dp[0]=a[73];this.fpu_dp_selector[0]=a[74];this.fpu_opcode[0]=a[75];void 0!==a[86]&&(this.last_result=a[86]);void 0!==a[87]&&(this.fpu_status_word=a[87]);void 0!==a[88]&&(this.mxcsr=a[88]);b=new ma(a[78].buffer);this.unpack_memory(b,a[77]);this.update_state_flags();this.full_clear_tlb();this.jit_clear_cache()};
|
|
700
|
+
a[38];this.reg32.set(a[39]);this.sreg.set(a[40]);this.dreg.set(a[41]);a[42]&&this.reg_pdpte.set(a[42]);this.pat.set(a[93]||[459782,459782]);this.set_tsc(a[43][0],a[43][1]);this.devices.virtio_9p&&this.devices.virtio_9p.set_state(a[45]);a[46]&&this.set_state_apic(a[46]);this.devices.rtc&&this.devices.rtc.set_state(a[47]);this.devices.dma&&this.devices.dma.set_state(a[49]);this.devices.acpi&&this.devices.acpi.set_state(a[50]);this.devices.vga&&this.devices.vga.set_state(a[52]);this.devices.ps2&&this.devices.ps2.set_state(a[53]);
|
|
701
|
+
this.devices.uart0&&this.devices.uart0.set_state(a[54]);this.devices.fdc&&this.devices.fdc.set_state(a[55]);if(a[56]||a[57]){var b=[[void 0,void 0],[void 0,void 0]];b[0][0]=a[56]?{is_cdrom:!0,buffer:this.devices.cdrom.buffer}:{is_cdrom:!1,buffer:this.devices.ide.primary.master.buffer};this.devices.ide=new dd(this,this.devices.ide.bus,b);this.devices.cdrom=a[56]?this.devices.ide.primary.master:void 0;this.devices.ide.primary.set_state(a[56]||a[57])}else a[85]&&this.devices.ide.set_state(a[85]);this.devices.pci&&
|
|
702
|
+
this.devices.pci.set_state(a[48]);this.devices.pit&&this.devices.pit.set_state(a[58]);this.devices.net&&this.devices.net.set_state(a[59]);this.set_state_pic(a[60]);this.devices.sb16&&this.devices.sb16.set_state(a[61]);this.devices.uart1&&this.devices.uart1.set_state(a[79]);this.devices.uart2&&this.devices.uart2.set_state(a[80]);this.devices.uart3&&this.devices.uart3.set_state(a[81]);this.devices.virtio_console&&this.devices.virtio_console.set_state(a[82]);this.devices.virtio_net&&this.devices.virtio_net.set_state(a[83]);
|
|
703
|
+
this.devices.virtio_balloon&&this.devices.virtio_balloon.set_state(a[84]);this.devices.vmware&&a[89]&&this.devices.vmware.set_state(a[89]);this.devices.parallel0&&a[90]&&this.devices.parallel0.set_state(a[90]);this.devices.parallel1&&a[91]&&this.devices.parallel1.set_state(a[91]);this.fw_value=a[62];a[63]&&this.set_state_ioapic(a[63]);this.tss_size_32[0]=a[64];this.reg_xmm32s.set(a[66]);this.fpu_st.set(a[67]);this.fpu_stack_empty[0]=a[68];this.fpu_stack_ptr[0]=a[69];this.fpu_control_word[0]=a[70];
|
|
704
|
+
this.fpu_ip[0]=a[71];this.fpu_ip_selector[0]=a[72];this.fpu_dp[0]=a[73];this.fpu_dp_selector[0]=a[74];this.fpu_opcode[0]=a[75];void 0!==a[86]&&(this.last_result=a[86]);void 0!==a[87]&&(this.fpu_status_word=a[87]);void 0!==a[88]&&(this.mxcsr=a[88]);b=new ma(a[78].buffer);this.unpack_memory(b,a[77]);this.update_state_flags();this.full_clear_tlb();this.jit_clear_cache()};
|
|
705
705
|
S.prototype.set_state_pic=function(a){const b=new Uint8Array(this.wasm_memory.buffer,this.get_pic_addr_master(),13),c=new Uint8Array(this.wasm_memory.buffer,this.get_pic_addr_slave(),13);b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];const d=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];b[9]=a[9];b[10]=a[10];b[11]=a[11];b[12]=a[12];c[0]=d[0];c[1]=d[1];c[2]=d[2];c[3]=d[3];c[4]=d[4];c[6]=d[6];c[7]=d[7];c[8]=d[8];c[9]=d[9];c[10]=d[10];c[11]=d[11];c[12]=d[12]};
|
|
706
706
|
S.prototype.set_state_apic=function(a){if(a instanceof Array){const b=new Int32Array(this.wasm_memory.buffer,this.get_apic_addr(),46);b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[8]=a[6];b[9]=a[7];b[10]=a[8];b[11]=a[9];b[12]=a[10];b[13]=a[11];b[14]=a[12];b[15]=a[13];b.set(a[15],16);b.set(a[15],24);b.set(a[16],32);b[40]=a[17];b[41]=a[18];b[42]=a[19];b[43]=a[20];b[44]=a[21];b[45]=a[22]||65536}else(new Uint8Array(this.wasm_memory.buffer,this.get_apic_addr(),184)).set(a)};
|
|
707
707
|
S.prototype.set_state_ioapic=function(a){if(a instanceof Array){const b=new Int32Array(this.wasm_memory.buffer,this.get_ioapic_addr(),52);b.set(a[0],0);b.set(a[1],24);b[48]=a[2];b[49]=a[3];b[50]=a[4];b[51]=a[5]}else(new Uint8Array(this.wasm_memory.buffer,this.get_ioapic_addr(),208)).set(a)};
|