Added new blog post: Flickery Fakery

This commit is contained in:
Jeff Parsons 2017-07-15 10:48:06 -07:00 committed by Jeff Parsons
commit 88ab0cd106
10 changed files with 201 additions and 83 deletions

View file

@ -0,0 +1,102 @@
---
layout: post
title: Flickery Fakery
date: 2017-07-15 22:00:00
permalink: /blog/2017/07/15/
---
For years, one of my pet peeves about PC emulators has been their obsession with raw speed, and how hard they
try to squeeze every last drop of performance out of their instruction execution loop, on the assumption that
everyone wants an an 8088 that runs at, say, 500Mhz, as opposed to the 4.77Mhz of the original IBM PC.
And sure, it might be nice if that [Lotus 1-2-3](/disks/pcx86/apps/lotus/123/1as/) spreadsheet recalculated instantly,
instead of the several seconds that it originally took. But most of the time, such a dramatic difference in speed is
more aggravating than helpful. In 1981, you could type `DIR` at a DOS prompt and skim the directory listing as it was
being printed. Do the same thing in a modern emulator, and the directory listing will display so fast that you'll have
no idea what just scrolled off the top of the screen. And many games become unplayable, because they were designed to
run on *machines of the day*, not machines of the future running hundreds of times faster.
Emulators like [DOSBox](https://github.com/Henne/dosbox-svn), which has since been ported to
[EM-DOSBOX](https://github.com/dreamlayers/em-dosbox) for the [Internet Archive's](https://archive.org)
[MS-DOS Collection](https://archive.org/details/softwarelibrary_msdos), do offer some crude controls to "throttle"
the emulated CPU's speed, but they provide no feedback: you don't know what the current speed is or what the target
speed should be. Even a "professional" emulator like Oracle's [VirtualBox](https://www.virtualbox.org/) offers
only very limited speed control: a processor "Execution Cap" that's defined as a percentage, which turns out to be
much too granular to recreate any particular CPU speed.
### Visual Veracity
Beyond speed accuracy, the next commonly short-changed feature is visual authenticity. Most emulators do a good
job faithfully emulating video hardware features, sometimes even obscure features that were used by only a handful
of apps. But many emulators don't bother with:
- Rendering the original IBM PC fonts
- Blinking the cursor
- Emulating character attributes like *underline* and *blink*
- Supporting [Dual Displays](/devices/pcx86/machine/5150/dual/64kb/)
And last, and maybe also least, **FLICKERING**.
Yes, the beloved flicker of the original IBM Color Graphics Adapter, or CGA. And I'm not talking about the
barely perceptible flicker produced by the CGA monitor's 60Hz refresh rate. That flicker was tolerable. In fact,
many people who didn't need either color or graphics would opt for IBM's Monochrome Display Adapter, or MDA, because
the green phosphor of IBM's monochrome monitor had such high persistence that the 60Hz refresh rate was virtually
imperceptible.
No, the capital-letter **FLICKER** that I'm talking about was a side-effect of what IBM's ROM BIOS did every time the
CGA's screen had to be scrolled: completely turn off the video signal OFF, rearrange the contents of video memory, and
then turn the video signal back ON. IBM adopted this approach because otherwise you would see an even *worse* effect:
random video interference or "snow".
This all came about because the CGA's memory wasn't "dual-ported": if the CPU accessed the CGA's memory at the same
that the display hardware was accessing it (to refresh the screen 60 times per second), the CPU would win and the
display hardware would lose, resulting in garbage appearing on the screen for a brief instant.
PC software could avoid that conflict by waiting until the CGA hardware was in a retrace period: either the brief
*horizontal retrace* period that occurs as the CRT repositions the electron beam from the right side of the screen
back to the left side, or the slightly longer *vertical retrace* period that involves moving the beam from the bottom
to the top.
However, IBM decided that, since neither of those retrace periods were long enough to perform a full-screen scroll,
the easiest solution was to simply turn the screen off for the duration. The result, which many of us suffered with
for years, was **FLICKER**.
I can hear the counter-arguments, starting with "Why in the world would anyone *want* to recreate or experience such
an annoying feature?" In part, it's a quest for authenticity. It's the difference between going to an art museum
and seeing original paintings and sculptures, as opposed to just looking at photographs or reading descriptions on the
internet. The photographs and descriptions can never faithfully reproduce the real objects, but the more accurate
they are, the better.
It's also important for understanding the world in which PC users and programmers operated in the early 1980's, the
challenges that programmers faced, and some of the interesting solutions they came up with.
One of those interesting solutions was a program from 1986 called [FlickerFree](/disks/pcx86/tools/other/flickerfree/),
the purpose and value of which would be almost completely lost on someone today if they had never seen or used an original
IBM PC with a CGA.
In fact, FlickerFree proved to be a useful PCjs test case, because it relied on a quirk of CGA hardware that I
hadn't originally implemented: frame buffer wrap-around. FlickerFree resolved the flickering-scroll problem by
treating the CGA's 16Kb of video memory as a giant ring buffer: instead of moving the contents of video memory
"upward", like IBM's ROM BIOS did, FlickerFree would simply shift the video memory start address "downward". After
all, one 25x80 screen of character data required only 4000 bytes, and the CGA had 16,384 bytes of memory.
At first glance, that approach would seem to merely delay the inevitable, because when the start address nears
the end of the buffer, the entire buffer still has to be scrolled. But, as it turned out, the CGA's CRT controller
starts reading from the top of video memory after it reaches the bottom. So all software has to do is write
new lines at the top of the video memory again. If IBM had thought of that trick 5 years earlier, back in 1981,
think of all the years of shared flicker-grief that could have been avoided!
Today, in honor of all that flickering, I'm pleased to announce that [PCx86](devices/pcx86/machine/), one of the
PCjs emulators I'm always trying to improve, now offers **FLICKERING** on all IBM PC Color Graphics configurations.
If you feel the need to override it, you can add *flicker=0* to the URL of your favorite machine; e.g.:
> [www.pcjs.org/disks/pcx86/tools/other/flickerfree/?flicker=0](/disks/pcx86/tools/other/flickerfree/?flicker=0)
In fact, you can set the *flicker* property to any value from 0 to 1; the default is 0.5. This value is applied to
the *opacity* property of the PCx86 <canvas> element, allowing you to mimic whatever degree of "phosphorescent
persistence" you prefer.
You can thank me later.
*[@jeffpar](http://twitter.com/jeffpar)*
*Jul 15, 2017*

View file

@ -10,12 +10,28 @@ machines:
B:
name: FlickerFree 1.0
autoStart: true
autoType: $date\r$time\rb:\rdir\r\xff\xf5ff\r\rfpa\rYff_hist\r\r
autoType: $date\r$time\rdir\r\xff\xf1b:\rdir\r\xff\xf5ff\r\rfpa\rYff_hist\r\r
---
FlickerFree 1.0
---------------
FlickerFree was a DOS utility created by Steve Gibson in 1986 that improved common IBM PC display operations.
It was reviewed by Peter Norton in the
[July 1986 Issue of PC Magazine](https://books.google.com/books?id=5hdeC0k_JHwC&lpg=PP1&pg=PA73#v=onepage&q&f=false),
who described it as "the most fascinating software I've seen for some time." He goes on to say:
> FlickerFree is a memory-resident program that solves several problems that muck up display screens: snow,
flicker, and lack of speed. The original IBM Color/Graphics Adapter was cursed with an ugly "snow" effect
whenever programs wrote directly to the display memory (unless the programs used time-consuming desnowing
operations). Fortunately, newer display adapters, such as Compaq's nifty built-in adapter, dont suffer
from snow, but they do sometimes suffer from an even greater pain-in-the-eye: screen flickers when information
is scrolled. And all the screens, even with the IBM monochrome adapter, often function much more slowly
than they should.
The demo machine below is configured as an IBM PC (Model 5150) with a CGA and 256Kb of RAM. It will automatically
load FlickerFree (`FF.COM`) and then run the companion FlickerFree Performance Analyzer (`FPA.COM`).
{% include machine.html id="ibm5150" %}
### Directory of FlickerFree 1.0

View file

@ -179,7 +179,7 @@ function ne(a,b,c){var d=y(a);-1!==a.X.load(b)&&(oe(a,d),a.X.Rc?(a.dg=a.X.ua+a.X
function ig(a,b){b=(a.ea>>>0)+b;b>a.Tg&&(8088>=a.da||a.Z.Ka==a.Z.wa?b=a.Z.ua+(b-a.Tg&a.R):x.call(a,13,0));return b|0}function jg(a){a.ea=a.pd}function y(a){return a.zc&~a.X.wa|a.Aa-a.X.ua}function oe(a,b){a.zc=b;a.Aa=a.X.ua+(b&a.X.wa)|0}function kg(a,b,c,d,e,f){if(63!=(e&63)&&e!=a.resultType){var g=(e^a.resultType)&a.resultType;g&&(g&1&&lg(a),g&2&&mg(a),g&4&&ng(a),g&8&&og(a),g&16&&pg(a),g&32&&qg(a))}f?(a.Td=d,a.Sd=b):(a.Td=b,a.Sd=d);a.hf=c;a.Ud=d;a.resultType=e}
function rg(a,b,c,d,e){a.resultType=c|26;a.Ud=b;d?sg(a):tg(a);e?ug(a):vg(a);return b}function wg(a,b,c,d){c&d?sg(a):tg(a);(b^c)&d?ug(a):vg(a)}function xg(a){return lg(a)?1:0}function lg(a){a.resultType&1&&(a.P&=-2,(a.Td^(a.Td^a.hf)&(a.hf^a.Sd))&a.resultType&-2147450752&&(a.P|=1),a.resultType&=-2);return a.P&1}function mg(a){a.resultType&2&&(a.P&=-5,38505>>((a.Ud^a.Ud>>4)&15)&1&&(a.P|=4),a.resultType&=-3);return a.P&4}
function ng(a){a.resultType&4&&(a.P&=-17,(a.Sd^a.Td^a.hf)&16&&(a.P|=16),a.resultType&=-5);return a.P&16}function og(a){a.resultType&8&&(a.P&=-65,a.Ud&((a.resultType&-2147450752)-1|a.resultType&-2147450752)||(a.P|=64),a.resultType&=-9);return a.P&64}function pg(a){a.resultType&16&&(a.P&=-129,a.Ud&a.resultType&-2147450752&&(a.P|=128),a.resultType&=-17);return a.P&128}
function qg(a){a.resultType&32&&(a.P&=-2049,(a.Td^a.Sd)&(a.hf^a.Sd)&a.resultType&-2147450752&&(a.P|=2048),a.resultType&=-33);return a.P&2048}function tg(a){a.resultType&=-2;a.P&=-2}function yg(a){a.resultType&=-5;a.P&=-17}function zg(a){a.resultType&=-9;a.P&=-65}function vg(a){a.resultType&=-33;a.P&=-2049}function sg(a){a.resultType&=-2;a.P|=1}function Ag(a){a.resultType&=-5;a.P|=16}function Dg(a){a.resultType&=-9;a.P|=64}function ug(a){a.resultType&=-33;a.P|=2048}
function qg(a){a.resultType&32&&(a.P&=-2049,(a.Td^a.Sd)&(a.hf^a.Sd)&a.resultType&-2147450752&&(a.P|=2048),a.resultType&=-33);return a.P&2048}function tg(a){a.resultType&=-2;a.P&=-2}function yg(a){a.resultType&=-5;a.P&=-17}function zg(a){a.resultType&=-9;a.P&=-65}function vg(a){a.resultType&=-33;a.P&=-2049}function sg(a){a.resultType&=-2;a.P|=1}function Ag(a){a.resultType&=-5;a.P|=16}function Bg(a){a.resultType&=-9;a.P|=64}function ug(a){a.resultType&=-33;a.P|=2048}
function De(a){return a.P&-2262|lg(a)|mg(a)|ng(a)|og(a)|pg(a)|qg(a)}function Eg(a,b){b|=a.qa&1|65520;a.qa=a.qa&-65536|b&65535;a.qa&1&&qe(a,!0)}function Ee(a,b,c){a.qa&1||(b&=~a.wi);void 0===c&&(c=a.Ma);c?b=b&-12289|a.P&12288:a.lc=(b&12288)>>12;c>a.lc&&(b=b&-513|a.P&512);a.resultType=128;a.P=a.P&~(a.Qd|2261)|b&(a.Qd|2261)|a.Vi;a.P&256&&(a.Ya|=2,a.N|=4)}
function Fg(a,b,c,d){var e=0;if(a.qa&1&&(a.Ma>a.lc||a.P&131072)&&a.ka.Wi)for(var f=a.ka.Wi+(b>>>3),e=(1<<c)-1<<(b&7);e&&f<=a.ka.yl&&!(a.Ja(f)&e);)e>>>=8,f++;return e?(r(a,256)&&Rb(a,"checkIOPM("+ua(b)+","+c+","+(d?"input":"output")+"): trapped",!0,!0),x.call(a,13,0),!1):!0}
l.Cb=function(a,b,c){switch(b){case "EAX":case "EBX":case "ECX":case "EDX":case "ESP":case "EBP":case "ESI":case "EDI":case "EIP":case "AX":case "BX":case "CX":case "DX":case "SP":case "BP":case "SI":case "DI":case "IP":case "PC":case "CS":case "DS":case "SS":case "ES":case "FS":case "GS":case "CR0":case "CR2":case "CR3":case "PS":case "C":case "P":case "A":case "Z":case "S":case "T":case "I":case "D":case "V":this.na[b]=c;this.yj++;a=!0;break;default:a=Dd.prototype.Cb.call(this,a,b,c)}return a};
@ -194,9 +194,9 @@ function Qg(a,b,c){var d=4;1==b.length&&(d=1,c=c?1:0);if(80386>a.da)2<b.length&&
l.Pg=function(a){this.ba.complete=!0;var b=this.ba.oj=this.ca&&Rg(this.ca),c=a?this.ba.si?0:1:-1;this.ba.si=!1;this.cd=this.A=a;this.W&&!a&&Wd(this.W);a||r(this,1024)||(this.N|=4);do{var d=this.N&3312;if(d)this.ha|=d;else if(this.pd=this.ea,this.Ea=this.Da,this.Rb=this.X,this.C=this.F=-1,this.ha&3072&&Zf(this),this.ha=this.N&256,this.Ya){a:{if(!(this.N&4))for(var d=80286>this.da?0:1,e=0;2>e;e++){switch(d){case 0:if(this.Ya&1&&this.P&512){var f=Sg(this.W);if(-1<=f&&(this.Ya&=-2,0<=f)){this.Ya&=-5;
Tg.call(this,f);d=!0;break a}}break;case 1:if(this.Ya&2){this.Ya&=-3;80386<=this.da&&(this.Ob[6]|=16384);Tg.call(this,1);d=!0;break a}}d=1-d}d=!1}if(d&&!a){this.O("interrupt dispatched");this.N=0;break}if(this.Ya&4){this.N=this.A=0;break}}if(b){if(Ug(this.ca,this.ea,c)){this.Kb();break}c=1}this.N=0;this.va[this.ra()].call(this)}while(0<this.A);return this.ba.complete?this.cd-this.A:void 0===this.ba.complete?0:-1};var Af=512;
cb(function(){for(var a=Bb(document,"pcx86","cpu"),b=0;b<a.length;b++){var c=a[b],d=Cb(c),d=new He(d);Ab(d,c)}});
function Vg(a){rb.call(this,"FPU",a);this.da=a.model||8087;this.F=new Float64Array(8);this.L=new Int32Array(this.F.buffer);this.Z=new Float32Array(1);this.ha=new Int32Array(this.Z.buffer);this.K=new Float64Array(1);this.G=new Int32Array(this.K.buffer);this.D=Array(3);this.M=this.N=-1;this.I=this.J=this.P=this.A=0;this.X=new Float64Array(1);this.aa=new Int32Array(this.X.buffer);this.aa[0]=0;this.aa[1]=268402688;ih(this);this.ga=Vg.prototype.ri;this.ea=Vg.prototype.hl}ba(Vg,rb);l=Vg.prototype;
l.uc=function(a,b,c){this.H=c;this.W=bc(a,"ChipSet");Ob(this)};l.Xb=function(a,b){if(!b)if(!a||!this.restore)ih(this);else if(!this.restore(a))return!1;return!0};l.Wb=function(a){return a?this.save():!0};l.save=function(){var a=new eg(this),b=[],c=0;b[c++]=this.Yb;b[c++]=jh(this);b[c++]=kh(this);for(var d=0;d<this.F.length;d++)b[c++]=this.F[d];a.set(0,b);return a.data()};
l.restore=function(a){a=a[0];var b=0;this.Yb=a[b++]&-57409;var c=a[b++];this.fa=c&-14337;this.B=(c&14336)>>11;lh(this);mh(this,a[b++]);for(c=0;c<this.F.length;c++)this.F[c]=a[b++];return!0};function ih(a){a.C=0;a.Yb=959;a.fa=0;a.B=0;a.W&&(a=a.W,a.da>=nh&&oh(a,ph))}function lh(a){a.fa&=-129;a.fa&~a.Yb&63&&(a.fa|=128);if(a.fa&128&&!(a.Yb&128))return a=a.W,a.da>=nh?qh(a,ph):a.ea&rh||Tg.call(a.H,2),!0;a=a.W;a.da>=nh&&oh(a,ph);return!1}function sh(a,b){80387<=a.da||(b&=-65);a.fa|=b;return lh(a)}
function Vg(a){rb.call(this,"FPU",a);this.da=a.model||8087;this.F=new Float64Array(8);this.L=new Int32Array(this.F.buffer);this.Z=new Float32Array(1);this.ha=new Int32Array(this.Z.buffer);this.K=new Float64Array(1);this.G=new Int32Array(this.K.buffer);this.D=Array(3);this.M=this.N=-1;this.I=this.J=this.P=this.A=0;this.X=new Float64Array(1);this.aa=new Int32Array(this.X.buffer);this.aa[0]=0;this.aa[1]=268402688;Wg(this);this.ga=Vg.prototype.ri;this.ea=Vg.prototype.hl}ba(Vg,rb);l=Vg.prototype;
l.uc=function(a,b,c){this.H=c;this.W=bc(a,"ChipSet");Ob(this)};l.Xb=function(a,b){if(!b)if(!a||!this.restore)Wg(this);else if(!this.restore(a))return!1;return!0};l.Wb=function(a){return a?this.save():!0};l.save=function(){var a=new eg(this),b=[],c=0;b[c++]=this.Yb;b[c++]=jh(this);b[c++]=kh(this);for(var d=0;d<this.F.length;d++)b[c++]=this.F[d];a.set(0,b);return a.data()};
l.restore=function(a){a=a[0];var b=0;this.Yb=a[b++]&-57409;var c=a[b++];this.fa=c&-14337;this.B=(c&14336)>>11;lh(this);mh(this,a[b++]);for(c=0;c<this.F.length;c++)this.F[c]=a[b++];return!0};function Wg(a){a.C=0;a.Yb=959;a.fa=0;a.B=0;a.W&&(a=a.W,a.da>=nh&&oh(a,ph))}function lh(a){a.fa&=-129;a.fa&~a.Yb&63&&(a.fa|=128);if(a.fa&128&&!(a.Yb&128))return a=a.W,a.da>=nh?qh(a,ph):a.ea&rh||Tg.call(a.H,2),!0;a=a.W;a.da>=nh&&oh(a,ph);return!1}function sh(a,b){80387<=a.da||(b&=-65);a.fa|=b;return lh(a)}
function jh(a){return a.fa|a.B<<11}function th(a,b){return isFinite(b)?!0:!sh(a,Infinity===b?8:16)}function uh(a,b,c){var d=null;null!=b&&null!=c&&(d=b+c,th(a,d)||(d=null));return d}function vh(a,b,c){var d=null;null!=b&&null!=c&&(d=b-c,th(a,d)||(d=null));return d}function wh(a,b,c){var d=null;null!=b&&null!=c&&(d=b*c,th(a,d)||(d=null));return d}function xh(a,b,c){var d=null;null==b||null==c||!c&&sh(a,2)||(d=b/c,th(a,d)||(d=null));return d}
function yh(a,b,c){if(null!=b&&null!=c){var d=0;isNaN(b)||isNaN(c)?d=17664:(b-=c,0>b?d=256:b||(d=16384));a.fa=a.fa&-18177|d;return!0}return!1}function zh(a,b,c){if(null==b)return null;var d=a.Yb&3072;d?d=1024==d||3072==d&&0<b?Math.floor(b):Math.ceil(b):(d=Math.round(b),.5===d-b&&d%2&&d--);if(c){if(d>=c){if(sh(a,1))return null;d=-c}else if(d<-c){if(sh(a,1))return null;d=-c}a.G[0]=d|0;2147483648<c&&(a.G[1]=d/4294967296|0,!a.G[1]&&0>d&&(a.G[1]=-1))}return d}
function Ah(a,b){var c=3;a.C&1<<b&&(a=a.F[b],c=0,a?isFinite(a)||(c=2):c=1);return c}function kh(a){for(var b=0,c=a.F.length-1;0<=c;c--)b<<=2,b|=Ah(a,c);return b}function mh(a,b){a.C=0;for(var c=1;128>=c;c<<=1)3!=(b&3)&&(a.C|=c),b>>=2}function Bh(a){var b=a.B+0&7;return a.C&1<<b?(a.Z[0]=a.F[b],!0):sh(a,1)?!1:(a.Z[0]=a.X[0],!0)}function Ch(a){var b=a.B+0&7;return a.C&1<<b?(a.K[0]=a.F[b],!0):sh(a,1)?!1:(a.K[0]=a.X[0],!0)}
@ -206,7 +206,7 @@ function Eh(a,b,c){var d=c>>20&2047,e=2147483648|(c&1048575)<<11|b>>>21;2047==d?
function Ph(a,b){if(null!=b){var c=a.B-1&7,d=1<<c;if(a.C&d&&(a.fa|=512,sh(a,65)))return;if(isNaN(b)&&sh(a,1)){if(sh(a,1))return;b=NaN}a.F[a.B=c]=b;a.C|=d}}
function Qh(a,b){var c,d=a.H;c=d.mb(b);a.Yb=c&-57409;c=d.mb(b+=d.V);a.fa=c&-14337;a.B=(c&14336)>>11;lh(a);mh(a,d.mb(b+=d.V));!(d.qa&1)||d.P&131072?(a.I=d.mb(b+=d.V),c=d.mb(b+=d.V),a.P=c&2047,a.I|=(c&-4096)<<4,a.M=-1,a.J=d.mb(b+=d.V),a.J|=(d.mb(b+=d.V)&-4096)<<4,a.N=-1):(a.I=d.mb(b+=d.V),c=d.mb(b+=d.V),a.M=c&65535,a.P=c>>16&2047,a.J=d.mb(b+=d.V),a.N=d.mb(b+=d.V)&65535);return b+d.V}
function Rh(a,b){var c=a.H;c.yb(b,a.Yb);c.yb(b+=c.V,jh(a));c.yb(b+=c.V,kh(a));if(!(c.qa&1)||c.P&131072){var d=(a.M<<4)+a.I;c.yb(b+=c.V,d);c.yb(b+=c.V,d>>4&-4096|a.P);d=(a.N<<4)+a.J;c.yb(b+=c.V,d);c.yb(b+=c.V,d>>4&-4096)}else c.yb(b+=c.V,a.I),c.yb(b+=c.V,a.M|a.P<<16),c.yb(b+=c.V,a.J),c.yb(b+=c.V,a.N);return b+c.V}function Sh(){this.fa&=-32896;lh(this)}function Th(){yh(this,K(this,0),K(this,this.A))}function Uh(){yh(this,K(this,0),K(this,this.A))&&Oh(this)}function Vh(){Uh.call(this)}
function Wh(){M(this,0,xh(this,K(this,0),Hh(this)))}function Xh(){this.C&=~(1<<this.B)}function Yh(){ih(this)}function Zh(){this.Yb=this.H.ja(this.H.C)&-57409}function $h(){Qh(this,this.H.C)}function ai(){for(var a=this.H,b=Qh(this,a.C),c=this.D,d=0;d<this.F.length;d++)c[0]=a.ia(b),c[1]=a.ia(b+=4),c[2]=a.ja(b+=4),c&&M(this,d,Lh(this,c)),b+=2}function bi(){for(var a=this.H,b=Rh(this,a.C),c=0;c<this.F.length;c++){var d=Dh(this,c,!0);a.ab(b,d[0]);a.ab(b+=4,d[1]);a.gb(b+=4,d[2]);b+=2}ih(this)}
function Wh(){M(this,0,xh(this,K(this,0),Hh(this)))}function Xh(){this.C&=~(1<<this.B)}function Yh(){Wg(this)}function Zh(){this.Yb=this.H.ja(this.H.C)&-57409}function $h(){Qh(this,this.H.C)}function ai(){for(var a=this.H,b=Qh(this,a.C),c=this.D,d=0;d<this.F.length;d++)c[0]=a.ia(b),c[1]=a.ia(b+=4),c[2]=a.ja(b+=4),c&&M(this,d,Lh(this,c)),b+=2}function bi(){for(var a=this.H,b=Rh(this,a.C),c=0;c<this.F.length;c++){var d=Dh(this,c,!0);a.ab(b,d[0]);a.ab(b+=4,d[1]);a.gb(b+=4,d[2]);b+=2}Wg(this)}
function ci(){Rh(this,this.H.C);this.Yb|=63}function di(){M(this,this.A,K(this,0))&&Oh(this)}function ei(){di.call(this)}function fi(){this.H.gb(this.H.C,this.Yb)}function gi(){this.H.gb(this.H.C,jh(this))}function hi(){80287<=this.da&&(this.H.D=this.H.D&-65536|jh(this))}function ii(){var a=K(this,0);M(this,0,K(this,this.A));M(this,this.A,a)}function ji(){ii.call(this)}
var ki=Math.log(10)/Math.LN2,li=Math.LOG2E,mi=Math.PI,ni=Math.log(2)/Math.LN10,oi=Math.LN2,pi=Math.pow(2,63),qi={216:{0:function(){M(this,0,uh(this,K(this,0),Hh(this)))},1:function(){M(this,0,wh(this,K(this,0),Hh(this)))},2:function(){yh(this,K(this,0),Hh(this))},3:function(){yh(this,K(this,0),Hh(this))&&Oh(this)},4:function(){M(this,0,vh(this,K(this,0),Hh(this)))},5:function(){M(this,0,vh(this,Hh(this),K(this,0)))},6:Wh,7:Wh,48:function(){M(this,0,uh(this,K(this,0),K(this,this.A)))},49:function(){M(this,
0,wh(this,K(this,0),K(this,this.A)))},50:Th,51:Uh,52:function(){M(this,0,vh(this,K(this,0),K(this,this.A)))},53:function(){M(this,0,vh(this,K(this,this.A),K(this,0)))},54:function(){M(this,0,xh(this,K(this,0),K(this,this.A)))},55:function(){M(this,0,xh(this,K(this,this.A),K(this,0)))}},217:{0:function(){Ph(this,Hh(this))},2:function(){Bh(this)&&this.ga()},3:function(){Bh(this)&&(this.ga(),Oh(this))},4:$h,5:Zh,6:ci,7:fi,48:function(){Ph(this,K(this,this.A))},49:ii,50:function(){},51:ei,64:function(){M(this,
@ -221,17 +221,17 @@ this.A,xh(this,K(this,this.A),K(this,0)))}},221:{0:function(){Ph(this,Ih(this))}
54:function(){M(this,this.A,xh(this,K(this,0),K(this,this.A)))&&Oh(this)},55:function(){M(this,this.A,xh(this,K(this,this.A),K(this,0)))&&Oh(this)}},223:{0:function(){Ph(this,Fh(this))},2:function(){null!=zh(this,K(this,0),32768)&&this.H.gb(this.H.C,this.G[0])},3:function(){null!=zh(this,K(this,0),32768)&&(this.H.gb(this.H.C,this.G[0]),Oh(this))},4:function(){var a=Jh(this),b=Mh(a[0],8)+1E8*Mh(a[1],8)+1E16*Mh(a[2],2);a[2]&32768&&(b=-b);Ph(this,b)},5:function(){var a;a=this.H.ia(this.H.C);a=4294967296*
this.H.ia(this.H.C+4)+(a>>>0);Ph(this,a)},6:function(){var a=zh(this,Oh(this));null!=a&&(this.D[0]=Nh(a,8),this.D[1]=Nh(a/1E8,8),this.D[2]=Nh(a/1E16,2),0>a&&(this.D[2]|=32768),Kh(this))},7:function(){null!=zh(this,K(this,0),pi)&&(this.hl(),Oh(this))},48:function(){Xh.call(this);Oh(this)},49:ji,50:ei,51:ei,52:hi}},ri=[Sh,Yh,Zh,$h,ai,bi,fi,ci,gi,hi];cb(function(){for(var a=Bb(document,"pcx86","fpu"),b=0;b<a.length;b++){var c=a[b],d=Cb(c),d=new Vg(d);Ab(d,c)}});
function si(a,b){var c=a+b+xg(this)|0;kg(this,a,b,c,191);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Jb:this.B.Ac;return c&255}function ti(a,b){var c=a+b+xg(this)|0;kg(this,a,b,c,this.Fb|63);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Jb:this.B.Ac;return c&this.R}function ui(a,b){var c=a+b|0;kg(this,a,b,c,191);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Jb:this.B.Ac;return c&255}
function vi(a,b){var c=a+b|0;kg(this,a,b,c,this.Fb|63);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Jb:this.B.Ac;return c&this.R}function wi(a,b){a&=b;rg(this,a,128);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Jb:this.B.Ac;return a}function xi(a,b){this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Jb:this.B.Ac;return rg(this,a&b,this.Fb)&this.R}function yi(a,b){this.A-=10+(-1===this.C?0:1);if((a&3)<(b&3))return a=a&-4|b&3,Dg(this),a;zg(this);return a}
function zi(a){if(-1===this.C)return x.call(this,6),a;var b=a,c=this.mb(this.C),d=this.mb(this.C+this.V);2==this.V&&(b=a<<16>>16,c=c<<16>>16,d=d<<16>>16);this.A-=this.B.Oj;(b<c||b>d)&&x.call(this,5);this.N|=2;return a}function Ai(a,b){var c=0;if(b){zg(this);for(var d=1;d&this.R;){if(b&d){a=c;break}d<<=1;c++}}else Dg(this);this.A-=11+3*c;return a}function Bi(a,b){var c=0;if(b){zg(this);for(var d=2==this.V?15:31,e=1<<d;e;){if(b&e){a=d;break}e>>>=1;c++;d--}}else Dg(this);this.A-=11+3*c;return a}
function vi(a,b){var c=a+b|0;kg(this,a,b,c,this.Fb|63);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Jb:this.B.Ac;return c&this.R}function wi(a,b){a&=b;rg(this,a,128);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Jb:this.B.Ac;return a}function xi(a,b){this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Jb:this.B.Ac;return rg(this,a&b,this.Fb)&this.R}function yi(a,b){this.A-=10+(-1===this.C?0:1);if((a&3)<(b&3))return a=a&-4|b&3,Bg(this),a;zg(this);return a}
function zi(a){if(-1===this.C)return x.call(this,6),a;var b=a,c=this.mb(this.C),d=this.mb(this.C+this.V);2==this.V&&(b=a<<16>>16,c=c<<16>>16,d=d<<16>>16);this.A-=this.B.Oj;(b<c||b>d)&&x.call(this,5);this.N|=2;return a}function Ai(a,b){var c=0;if(b){zg(this);for(var d=1;d&this.R;){if(b&d){a=c;break}d<<=1;c++}}else Bg(this);this.A-=11+3*c;return a}function Bi(a,b){var c=0;if(b){zg(this);for(var d=2==this.V?15:31,e=1<<d;e;){if(b&e){a=d;break}e>>>=1;c++;d--}}else Bg(this);this.A-=11+3*c;return a}
function Ci(a,b){a&1<<(b&(2==this.V?15:31))?sg(this):tg(this);this.A-=-1===this.C?3:6;this.N|=2;return a}function Di(a,b){b=1<<(b&(2==this.V?15:31));a&b?sg(this):tg(this);this.A-=-1===this.C?6:8;return a^b}function Ei(a,b){b=1<<(b&(2==this.V?15:31));a&b?sg(this):tg(this);this.A-=-1===this.C?6:8;return a&~b}function Fi(a,b){b=1<<(b&(2==this.V?15:31));a&b?sg(this):tg(this);this.A-=-1===this.C?6:8;return a|b}
function Gi(a,b){if(-1===this.C)return Ci.call(this,a,b);var c=this.V<<3;if(b>=c||b<-c)a=Jg(this,this.fb,this.tb+(b>>(2==this.V?4:5))*this.V);b=1<<(b&(2==this.V?15:31));a&b?sg(this):tg(this);this.A-=6;this.N|=2;return a}function Hi(a,b){if(-1===this.C)return Di.call(this,a,b);var c=this.V<<3;if(b>=c||b<-c)a=Jg(this,this.fb,this.tb+(b>>(2==this.V?4:5))*this.V);b=1<<(b&(2==this.V?15:31));a&b?sg(this):tg(this);this.A-=8;return a^b}
function Ii(a,b){if(-1===this.C)return Ei.call(this,a,b);var c=this.V<<3;if(b>=c||b<-c)a=Jg(this,this.fb,this.tb+(b>>(2==this.V?4:5))*this.V);b=1<<(b&(2==this.V?15:31));a&b?sg(this):tg(this);this.A-=8;return a&~b}function Ji(a,b){if(-1===this.C)return Fi.call(this,a,b);var c=this.V<<3;if(b>=c||b<-c)a=Jg(this,this.fb,this.tb+(b>>(2==this.V?4:5))*this.V);b=1<<(b&(2==this.V?15:31));a&b?sg(this):tg(this);this.A-=8;return a|b}
function Ki(a,b){kg(this,a,b,a-b|0,191,!0);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Eh:this.B.Jb;this.N|=2;return a}function Li(a,b){kg(this,a,b,a-b|0,this.Fb|63,!0);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Eh:this.B.Jb;this.N|=2;return a}
function Mi(a){if(this.Ic){var b=this.Ic,c=this.xj,d=this.ga,e=d>>3&7;b.A=d&7;var f=(3>(d>>6&3)?0:48)+e;(217==c||219==c)&&52<=f&&(f=e<<4|b.A);if(e=qi[c][f]){if(0>ri.indexOf(e)){var f=b.H,g=f.pd;8087==b.da&&(f.ha&16&&g++,f.ha&32&&g++);b.M=f.Z.U;b.I=g-f.Z.ua;-1!==f.C&&(b.N=f.fb.U,b.J=f.C-f.fb.ua);b.P=(c&7)<<8|d}e.call(b)}}this.A-=-1===this.C?2:8;return a}function Ni(a){if(80186>this.da)return Oi.call(this,a);x.call(this,13,0);return a}function cf(a){x.call(this,6);return a}
function Oi(a){ff.call(this);return a}function Pi(a,b){a=Qi.call(this,this.S(),b);80386>this.da&&(this.A-=12);return a}function Ri(a,b){a=this.Fa();a=2==this.V?Qi.call(this,a,b):Si.call(this,a,b);80386>this.da&&(this.A-=12);return a}function Ti(a,b){var c=!1;0>b&&(b=-b|0,c=!c);0>a&&(a=-a|0,c=!c);Ui.call(this,a,b);c&&(this.Ba=~this.Ba+1|0,this.Za=~this.Za+(this.Ba?0:1)|0)}
function Qi(a,b){a=(a<<16>>16)*(b<<16>>16)|0;32767<a||-32768>a?(sg(this),ug(this)):(tg(this),vg(this));this.A-=-1===this.C?9:12;return a&65535}function Si(a,b){Ti.call(this,a,b);this.Za!=this.Ba>>31?(sg(this),ug(this)):(tg(this),vg(this));this.A-=-1===this.C?9:12;return this.Ba}function Vi(a,b){this.A-=14+(-1===this.C?0:2);zg(this);-1!==this.ub.load(b)&&this.ub.qc>=this.Ma&&this.ub.qc>=(b&3)&&(Dg(this),a=this.ub.nb&-256,2<this.V&&(a|=(this.ub.ext&-65281)<<16));return a}
function Qi(a,b){a=(a<<16>>16)*(b<<16>>16)|0;32767<a||-32768>a?(sg(this),ug(this)):(tg(this),vg(this));this.A-=-1===this.C?9:12;return a&65535}function Si(a,b){Ti.call(this,a,b);this.Za!=this.Ba>>31?(sg(this),ug(this)):(tg(this),vg(this));this.A-=-1===this.C?9:12;return this.Ba}function Vi(a,b){this.A-=14+(-1===this.C?0:2);zg(this);-1!==this.ub.load(b)&&this.ub.qc>=this.Ma&&this.ub.qc>=(b&3)&&(Bg(this),a=this.ub.nb&-256,2<this.V&&(a|=(this.ub.ext&-65281)<<16));return a}
function Wi(a,b){if(-1===this.C)return ff.call(this),a;ue(this,this.ja(this.C+this.V));this.A-=this.B.Ye;return b}function Xi(){this.A-=this.B.rk;return this.C}function Yi(a,b){if(-1===this.C)return ff.call(this),a;ve(this,this.ja(this.C+this.V));this.A-=this.B.Ye;return b}function Zi(a,b){if(-1===this.C)return ff.call(this),a;a=this.ja(this.C+this.V);this.Ga.load(a);this.A-=this.B.Ye;return b}
function $i(a,b){if(-1===this.C)return ff.call(this),a;a=this.ja(this.C+this.V);this.Ia.load(a);this.A-=this.B.Ye;return b}function aj(a,b){this.A-=14+(-1===this.C?0:2);if(b&65528&&-1!==this.ub.load(b)&&(7168==(this.ub.nb&7168)||this.ub.qc>=this.Ma)&&this.ub.qc>=(b&3))return Dg(this),this.ub.Ka;zg(this);return a}function bj(a,b){if(-1===this.C)return ff.call(this),a;ne(this,this.ja(this.C+this.V));this.A-=this.B.Ye;return b}
function $i(a,b){if(-1===this.C)return ff.call(this),a;a=this.ja(this.C+this.V);this.Ia.load(a);this.A-=this.B.Ye;return b}function aj(a,b){this.A-=14+(-1===this.C?0:2);if(b&65528&&-1!==this.ub.load(b)&&(7168==(this.ub.nb&7168)||this.ub.qc>=this.Ma)&&this.ub.qc>=(b&3))return Bg(this),this.ub.Ka;zg(this);return a}function bj(a,b){if(-1===this.C)return ff.call(this),a;ne(this,this.ja(this.C+this.V));this.A-=this.B.Ye;return b}
function cj(a,b){this.A-=-1===this.F?-1===this.C?this.B.yk:this.B.xk:this.B.vk;return b}function dj(a,b){switch(this.ga>>3&7){case 4:this.xa=this.D;break;case 5:this.xa=this.I;break;case 6:this.xa=this.L;break;case 7:this.xa=this.G}return b}function nj(a,b){return b}
function oj(a,b){a=this.ga>>3&7;switch(a){case 0:this.xa=this.D;break;case 2:this.xa=this.L;break;case 3:this.xa=this.G;break;default:if(80286==this.da||80386==this.da&&4!=a&&5!=a)x.call(this,6);else switch(a){case 1:this.xa=this.I;break;case 4:this.xa=y(this);break;case 5:this.xa=this.M;break;case 6:this.xa=this.K;break;case 7:this.xa=this.J}}return cj.call(this,0,b)}
function pj(a,b){switch(this.ga>>3&7){case 0:b=this.oa.U;break;case 1:b=this.Z.U;break;case 2:b=this.X.U;break;case 3:b=this.Da.U;break;case 4:if(80386<=this.da){b=this.Ga.U;break}x.call(this,6);b=a;break;case 5:if(80386<=this.da){b=this.Ia.U;break}default:x.call(this,6),b=a}-1!==this.F&&re(this,2);return cj.call(this,0,b)}
@ -366,7 +366,7 @@ al,this.Fa);this.A-=-1===this.F?1:this.B.Cg},Mk,function(){this.lb.call(this,al,
this.I=this.xa;gg(this,a);break;case 2:a=this.L;this.L=this.xa;ne(this,a);break;case 3:a=this.G;this.G=this.xa;ue(this,a);break;case 4:a=y(this);oe(this,this.xa);80386<=this.da?this.Ga.load(a):ve(this,a);break;case 5:a=this.M;this.M=this.xa;80386<=this.da?this.Ia.load(a):gg(this,a);break;case 6:a=this.K;this.K=this.xa;ne(this,a);break;case 7:a=this.J,this.J=this.xa,ue(this,a)}},function(){this.N|=1;this.sa=this.Aa;this.xa=me(this);this.lb.call(this,bl,pk);this.sa=-1},function(){this.A-=3},function(){var a=
this.D;this.D=this.D&~this.R|this.I&this.R;this.I=this.I&~this.R|a&this.R;this.A-=3},function(){var a=this.D;this.D=this.D&~this.R|this.L&this.R;this.L=this.L&~this.R|a&this.R;this.A-=3},function(){var a=this.D;this.D=this.D&~this.R|this.G&this.R;this.G=this.G&~this.R|a&this.R;this.A-=3},function(){var a=this.D,b=y(this);this.D=this.D&~this.R|b&this.R;oe(this,b&~this.R|a&this.R);this.A-=3},function(){var a=this.D;this.D=this.D&~this.R|this.M&this.R;this.M=this.M&~this.R|a&this.R;this.A-=3},function(){var a=
this.D;this.D=this.D&~this.R|this.K&this.R;this.K=this.K&~this.R|a&this.R;this.A-=3},function(){var a=this.D;this.D=this.D&~this.R|this.J&this.R;this.J=this.J&~this.R|a&this.R;this.A-=3},function(){this.D=2==this.V?this.D&-65536|this.D<<24>>24&65535:this.D<<16>>16;this.A-=2},function(){this.L=2==this.V?this.L&-65536|(this.D&32768?65535:0):this.D&-2147483648?-1:0;this.A-=this.B.Qj},function(){qk.call(this,this.Fa(),Pg(this));this.A-=this.B.Tj},function(){this.A-=3},function(){var a=De(this);a&131072&&
3>this.lc?x.call(this,13,0):(we(this,a&-196609),this.A-=this.B.Jc)},function(){if(this.P&131072&&3>this.lc)x.call(this,13,0);else{var a=me(this),a=a&65535|this.P&-65536;Ee(this,a);this.A-=this.B.nc}},function(){var a=this.D>>8&255;a&1?sg(this):tg(this);a&4?(this.resultType&=-3,this.P|=4):(this.resultType&=-3,this.P&=-5);a&16?Ag(this):yg(this);a&64?Dg(this):zg(this);a&128?(this.resultType&=-17,this.P|=128):(this.resultType&=-17,this.P&=-129);this.A-=this.B.Vb},function(){this.D=this.D&-65281|(De(this)&
3>this.lc?x.call(this,13,0):(we(this,a&-196609),this.A-=this.B.Jc)},function(){if(this.P&131072&&3>this.lc)x.call(this,13,0);else{var a=me(this),a=a&65535|this.P&-65536;Ee(this,a);this.A-=this.B.nc}},function(){var a=this.D>>8&255;a&1?sg(this):tg(this);a&4?(this.resultType&=-3,this.P|=4):(this.resultType&=-3,this.P&=-5);a&16?Ag(this):yg(this);a&64?Bg(this):zg(this);a&128?(this.resultType&=-17,this.P|=128):(this.resultType&=-17,this.P&=-129);this.A-=this.B.Vb},function(){this.D=this.D&-65281|(De(this)&
213)<<8;this.A-=this.B.Vb},function(){var a=this.D&-256,b;b=G(this);b=this.Ja(this.Ea.ac(b,1));this.D=a|b;this.A-=this.B.Oh},function(){this.D=this.D&~this.R|se(this,this.Ea,G(this));this.A-=this.B.Oh},function(){var a=G(this),b=this.D;this.fc(this.Ea.bc(a,1),b);this.A-=this.B.Ph},function(){var a=G(this),b=this.D;this.yb(this.Ea.bc(a,this.V),b);this.A-=this.B.Ph},function(){var a=1,b=0,c=this.wa,d=this.B.Qh;this.ha&192&&(a=this.I&c,b=1,d=this.B.Sh,this.ha&256||(this.A-=this.B.Rh));if(a--){var e=
this.Ja(this.Ea.ac(this.K&c,1));this.fc(this.oa.bc(this.J&c,1),e);e=this.P&1024?-1:1;this.K=this.K&~c|this.K+e&c;this.J=this.J&~c|this.J+e&c;this.A-=d;this.I=this.I&~c|this.I-b&c;a&&(jg(this),this.N|=256)}},function(){var a=1,b=0,c=this.wa,d=this.B.Qh;this.ha&192&&(a=this.I&c,b=1,d=this.B.Sh,this.ha&256||(this.A-=this.B.Rh));if(a--){var e=se(this,this.Ea,this.K&c);this.yb(this.oa.bc(this.J&c,this.V),e);e=this.P&1024?-this.V:this.V;this.K=this.K&~c|this.K+e&c;this.J=this.J&~c|this.J+e&c;this.A-=d;
this.I=this.I&~c|this.I-b&c;a&&(jg(this),this.N|=256)}},function(){var a=1,b=0,c=this.wa,d=this.B.Bh;this.ha&192&&(a=this.I&c,b=1,d=this.B.Dh,this.ha&256||(this.A-=this.B.Ch));if(a--){var e=Hg(this,this.Ea,this.K),f=Hg(this,this.oa,this.J);this.F=this.C;Ki.call(this,e,f);e=this.P&1024?-1:1;this.K=this.K&~c|this.K+e&c;this.J=this.J&~c|this.J+e&c;this.I=this.I&~c|this.I-b&c;this.A-=d-this.B.Jb;a&&og(this)==(this.ha&64)&&(jg(this),this.N|=256)}},function(){var a=1,b=0,c=this.wa,d=this.B.Bh;this.ha&192&&
@ -419,8 +419,8 @@ A[182]=function(){this.kc.call(this,dj);switch(this.ga>>3&7){case 0:this.D=this.
A[188]=function(){this.la.call(this,Ai)};A[189]=function(){this.la.call(this,Bi)};
A[190]=function(){this.kc.call(this,dj);switch(this.ga>>3&7){case 0:this.D=this.D&~this.R|(this.D&255)<<24>>24&this.R;break;case 1:this.I=this.I&~this.R|(this.I&255)<<24>>24&this.R;break;case 2:this.L=this.L&~this.R|(this.L&255)<<24>>24&this.R;break;case 3:this.G=this.G&~this.R|(this.G&255)<<24>>24&this.R;break;case 4:this.zc=this.zc&~this.R|this.D<<16>>24&this.R;this.D=this.xa;break;case 5:this.M=this.M&~this.R|this.I<<16>>24&this.R;this.I=this.xa;break;case 6:this.K=this.K&~this.R|this.L<<16>>24&
this.R;this.L=this.xa;break;case 7:this.J=this.J&~this.R|this.G<<16>>24&this.R,this.G=this.xa}this.A-=-1===this.C?3:6};A[191]=function(){re(this,2);this.la.call(this,nj);switch(this.ga>>3&7){case 0:this.D=this.D<<16>>16;break;case 1:this.I=this.I<<16>>16;break;case 2:this.L=this.L<<16>>16;break;case 3:this.G=this.G<<16>>16;break;case 4:this.zc=this.zc<<16>>16;break;case 5:this.M=this.M<<16>>16;break;case 6:this.K=this.K<<16>>16;break;case 7:this.J=this.J<<16>>16}this.A-=-1===this.C?3:6};
var dg=[function(){this.A-=2+(-1===this.C?0:1);return this.Eb.U},function(){this.A-=2+(-1===this.C?0:1);return this.ka.U},function(a){this.N|=2;this.Eb.load(a);this.A-=17+(-1===this.C?0:2);return a},function(a){this.N|=2;-1!==this.ka.load(a)&&(this.gb(this.ka.Lb+4,this.ka.nb|=512),this.ka.type|=512);this.A-=17+(-1===this.C?0:2);return a},function(a){this.N|=2;this.A-=14+(-1===this.C?0:2);if(-1!==this.ub.load(a)&&2048!=(this.ub.nb&2560)&&(this.ub.qc>=this.Ma&&this.ub.qc>=(a&3)||7168==(this.ub.nb&7168)))return Dg(this),
a;zg(this);return a},function(a){this.N|=2;this.A-=14+(-1===this.C?0:2);if(-1!==this.ub.load(a)&&512==(this.ub.nb&2560)&&this.ub.qc>=this.Ma&&this.ub.qc>=(a&3))return Dg(this),a;zg(this);return a},Oi,Oi],Le=[cf,cf,cf,cf,cf,cf,Oi,Oi],gl=[function(a){if(-1===this.C)x.call(this,6);else{a=this.Hc-this.Ib;var b=this.Ib;80286==this.da?b|=-16777216:80386<=this.da&&2!=this.V&&(a|=b<<16);this.ab(this.C+2,b);this.A-=11}return a},function(a){if(-1===this.C)x.call(this,6);else{a=this.bd-this.Nb;var b=this.Nb;
var dg=[function(){this.A-=2+(-1===this.C?0:1);return this.Eb.U},function(){this.A-=2+(-1===this.C?0:1);return this.ka.U},function(a){this.N|=2;this.Eb.load(a);this.A-=17+(-1===this.C?0:2);return a},function(a){this.N|=2;-1!==this.ka.load(a)&&(this.gb(this.ka.Lb+4,this.ka.nb|=512),this.ka.type|=512);this.A-=17+(-1===this.C?0:2);return a},function(a){this.N|=2;this.A-=14+(-1===this.C?0:2);if(-1!==this.ub.load(a)&&2048!=(this.ub.nb&2560)&&(this.ub.qc>=this.Ma&&this.ub.qc>=(a&3)||7168==(this.ub.nb&7168)))return Bg(this),
a;zg(this);return a},function(a){this.N|=2;this.A-=14+(-1===this.C?0:2);if(-1!==this.ub.load(a)&&512==(this.ub.nb&2560)&&this.ub.qc>=this.Ma&&this.ub.qc>=(a&3))return Bg(this),a;zg(this);return a},Oi,Oi],Le=[cf,cf,cf,cf,cf,cf,Oi,Oi],gl=[function(a){if(-1===this.C)x.call(this,6);else{a=this.Hc-this.Ib;var b=this.Ib;80286==this.da?b|=-16777216:80386<=this.da&&2!=this.V&&(a|=b<<16);this.ab(this.C+2,b);this.A-=11}return a},function(a){if(-1===this.C)x.call(this,6);else{a=this.bd-this.Nb;var b=this.Nb;
80286==this.da?b|=-16777216:80386<=this.da&&2!=this.V&&(a|=b<<16);this.ab(this.C+2,b);this.A-=12}return a},function(a){-1===this.C||this.P&131072?x.call(this,6):(this.Ib=this.ia(this.C+2)&(this.R|this.R<<8),a&=65535,this.Hc=this.Ib+a,this.N|=2,this.A-=11);return a},function(a){-1===this.C||this.P&131072?x.call(this,6):(this.Nb=this.ia(this.C+2)&(this.R|this.R<<8),a&=65535,this.bd=this.Nb+a,this.N|=2,this.A-=12);return a},function(){this.A-=2+(-1===this.C?0:1);return this.qa},Oi,function(a){this.P&
131072?x.call(this,6):(Eg(this,a),this.A-=-1===this.C?3:6,this.N|=2);return a},Oi],hl=[Oi,Oi,Oi,Oi,Ci,Fi,Ei,Di];
function il(a){rb.call(this,"ChipSet",a,32768);var b=a.model;b&&!jl[b]&&mb("Unrecognized ChipSet model: "+b);this.da=jl[b]||kl;this.B=[];b=ll(a[ml]);this.B[0]=[b,b];null==b&&(this.N=[360,360],(b=a.floppies)&&b.length&&(this.N=b),nl(this,ol,this.N.length),nl(this,pl,a.monitor||(this.da<nh?"mono":"ega")));b=ll(a[ql]);this.B[1]=[b,b];this.za=this.ha=1;this.da>=nh&&(this.za=this.ha=2);this.P=a.scaleTimers||!1;this.Ma=a.rtcDate;this.Ga=!1;a.sound&&(this.Ea=this.ka=null,window&&(this.Ea=window.AudioContext||
@ -469,7 +469,7 @@ l.$l=function(a,b){var c=this.J&~(Kp|Lp)|(Kd(this.H)&64?Lp:0);t(this,a,null,b,"8
l.Bn=function(a,b,c){t(this,a,b,c,"8042_INBUFF.CMD",null,16384);this.L=b;this.D|=yp;a=0;this.L>=Mp&&(a=this.L^15,this.L=Mp);switch(this.L){case Np:Jp(this,this.K);break;case Op:Ap(this,this.K|Wl);break;case Pp:Ap(this,this.K&~Wl);this.C&&xp(this.C);break;case Qp:this.C&&(a=this.C,a.A=[],r(a)&&Rb(a,"scan codes flushed"));Ap(this,this.K|Wl);Jp(this,Rp);Cp(this,fm|gm);break;case Sp:Jp(this,Tp);break;case Up:Jp(this,this.M);break;case Vp:Jp(this,this.qa);break;case Wp:Jp(this,this.K&Wl?0:Xp);break;case Mp:a&
1&&sf(this.H)}};function Ap(a,b){a.K=b;a.D=a.D&~Yp|b&Zp;a.C&&qp(a.C,!!(b&$p),!(b&Wl))}function Jp(a,b,c){0<=b&&(a.oa=b,c?a.D|=vp:(a.D&=~vp,a.D|=wp))}function Cp(a,b){a.qa=b;uc(a.ma,!!(b&gm));b&fm||sf(a.H)}function aq(a,b){a.da<nh?(qh(a,bq,4),a.aa|=vp):a.K&Wl||a.D&(vp|wp)||(Jp(a,b,!0),cq(a.C),qh(a,bq,120))}function dq(a,b,c,d){var e=a.B[b][1];t(a,c,null,d,"DIPSW-"+b,e,32768);return e}l.om=function(a,b){t(this,a,null,b,"CMOS.ADDR",this.W,4096);return this.W};
l.Rn=function(a,b,c){t(this,a,b,c,"CMOS.ADDR",null,4096);this.W=b;this.ea=b&eq?rh:fq};l.pm=function(a,b){var c=this.W&gq,d=c<=Ll?Ml(this,c):this.A[c];r(this,4352)&&t(this,a,null,b,"CMOS.DATA["+ta(c)+"]",d,!0);null!=b&&c==$m&&(this.A[c]&=hq,d&ep&&oh(this,fp),d&dp&&this.A[Zd]&$d&&dn(this));return d};
l.Sn=function(a,b,c){var d=this.W&gq;r(this,4352)&&t(this,a,b,c,"CMOS.DATA["+ta(d)+"]",null,!0);a=b^this.A[d];if(d<=Ll){if(c=b,d<Ym){var e=!1;this.A[Zd]&bn||(c=10*(c>>4)+(c&15),e=!0);if(d==xm||d==ym)e&&23<c&&(c+=48),this.A[Zd]&Zm||(12>=c?c=12==c?0:c:(c-=116,c=24==c?12:c))}}else c=b;this.A[d]=c;d==Zd&&a&$d&&b&$d&&dn(this)};l.Tk=function(a,b,c){t(this,a,b,c,"NMI");this.ea=b};l.bo=function(a,b,c){t(this,a,b,c,"FPU.CLEAR")};l.co=function(a,b,c){t(this,a,b,c,"FPU.RESET");this.Ic&&ih(this.Ic)};
l.Sn=function(a,b,c){var d=this.W&gq;r(this,4352)&&t(this,a,b,c,"CMOS.DATA["+ta(d)+"]",null,!0);a=b^this.A[d];if(d<=Ll){if(c=b,d<Ym){var e=!1;this.A[Zd]&bn||(c=10*(c>>4)+(c&15),e=!0);if(d==xm||d==ym)e&&23<c&&(c+=48),this.A[Zd]&Zm||(12>=c?c=12==c?0:c:(c-=116,c=24==c?12:c))}}else c=b;this.A[d]=c;d==Zd&&a&$d&&b&$d&&dn(this)};l.Tk=function(a,b,c){t(this,a,b,c,"NMI");this.ea=b};l.bo=function(a,b,c){t(this,a,b,c,"FPU.CLEAR")};l.co=function(a,b,c){t(this,a,b,c,"FPU.RESET");this.Ic&&Wg(this.Ic)};
l.bn=function(a){if(r(this,16)&&dl(this.ca,26,a)){var b=this.H.D>>8;ag(this.H,a,function(a,d){return function(c){d=Kd(a.H)-d;var e,g=a.H.L&255,h=a.H.L>>8,k=a.H.L&255,m=a.H.L>>8;if(2==b||3==b)e=" CH(hour)="+ua(h)+" CL(min)="+ta(g)+" DH(sec)="+ta(m);else if(4==b||5==b)e=" CX(year)="+ua(a.H.I)+" DH(month)="+ta(m)+" DL(day)="+ta(k);g=a.ca;h=d;g.message("INT "+ta(26)+": C="+(lg(g.H)?1:0)+(e||"")+" (cycles="+h+(c?",level="+(c+1):"")+")")}}(this,Kd(this.H)))}return!0};
function fn(a,b){if(a.ka)try{void 0!==b?a.Ga=b:b=!!(a.Ga&&a.H&&a.H.ba.jb);var c=Math.round(wl/Go(a,Ho));if(20>c||2E4<c)b=!1;b?a.I?(a.I.frequency.value=c,r(a,33554432)&&Rb(a,"speaker set to "+c+"hz",!0)):(a.I=a.ka.createOscillator(),a.I&&(a.I.type="number"==typeof a.I.type?1:"square",a.I.connect(a.ka.destination),a.I.frequency.value=c,"start"in a.I?a.I.start(0):a.I.noteOn(0),r(a,33554432)&&Rb(a,"speaker on at "+c+"hz",!0))):a.I&&("stop"in a.I?a.I.stop(0):a.I.noteOff(0),a.I.disconnect(),delete a.I,
r(a,33554432)&&Rb(a,"speaker off at "+c+"hz",!0))}catch(d){a.Ca("AudioContext exception: "+d.message),a.ka=null}else b&&Rb(a,"BEEP",33554432)}var sl=5150,kl=5150.9,nh=5170,tl=5160.101,Fl=5180,jl={5150:sl,5160:5160,5170:nh,att6300:tl,mpc1600:5150.101,z150:5160.15,compaq:5150.102,other:kl};jl.deskpro386=Fl;
@ -542,9 +542,9 @@ $r[1|Lr]=function(a){a+=this.H;var b=a&-2;a=this.controller.ib&(b==a?16711935:-1
$r[98]=function(a,b){a+=this.H;b=ws[b&15];b&=this.controller.wb;b=b&this.controller.Bb|this.controller.wb&~this.controller.Bb;b=b&this.controller.ib|this.Y[a]&~this.controller.ib;this.Y[a]!=b&&(this.Y[a]=b,this.Oa=!0)};$r[162]=function(a,b){a+=this.H;b=ws[b&15];b|=this.controller.wb;b=b&this.controller.Bb|this.controller.wb&~this.controller.Bb;b=b&this.controller.ib|this.Y[a]&~this.controller.ib;this.Y[a]!=b&&(this.Y[a]=b,this.Oa=!0)};
$r[226]=function(a,b){a+=this.H;b=ws[b&15];b^=this.controller.wb;b=b&this.controller.Bb|this.controller.wb&~this.controller.Bb;b=b&this.controller.ib|this.Y[a]&~this.controller.ib;this.Y[a]!=b&&(this.Y[a]=b,this.Oa=!0)};$r[3]=function(a,b){a+=this.H;b=b>>this.controller.Sc|b<<8-this.controller.Sc&255;b=(b|b<<8|b<<16|b<<24)&this.controller.Bb;b=this.controller.Gf&b|this.controller.wb&~b;b=b&this.controller.ib|this.Y[a]&~this.controller.ib;this.Y[a]!=b&&(this.Y[a]=b,this.Oa=!0)};
function Q(a,b,c,d,e){rb.call(this,"Video",a,262144);var f=this;this.cd=Wa("Gecko/");var g=["","moz","ms","webkit"];this.da=a.model;var h=xs[this.da]||xs.mda;this.La=h[0];this.vd=a.memory||0;this.pd=a.switches;this.aa=a.mode;if(null==this.aa||null==ys[this.aa])this.aa=h[1];this.Ob=a.charCols;this.Hc=a.charRows;if(void 0===this.Ob||void 0===this.Hc)this.Ob=ys[this.aa][0],this.Hc=ys[this.aa][1];this.X=a.screenWidth;this.ha=a.screenHeight;this.ed=a.scale;this.Sd=12<=Math.round(this.X/this.Ob);this.N=
b;this.L=c;this.D=(this.tg=d)||b||null;this.lc=a.screenColor||"black";this.od=(1-(a.flicker||0)).toString();this.Fb=!1;b&&(b.style.backgroundColor=this.lc);e&&(e.style.backgroundColor=this.lc);b=a.smoothing;(c=Xa("smoothing"))&&(b="true"==c);if(null!=b)for(c=0;c<g.length;c++)if(d=(d=g[c])?d+"ImageSmoothingEnabled":"imageSmoothingEnabled",void 0!==this.L[d]){this.L[d]=b;break}this.qd=a.touchScreen;this.Ic=zs;this.G=null;this.Rd=a.autoLock;this.bb=this.Qb=0;this.qa=[];this.ga=Array(this.La==oq?256:
16);this.Ia=!1;this.lb=null;if(this.Ba=e)if(this.lb=e.requestFullscreen||e.msRequestFullscreen||e.mozRequestFullScreen||e.webkitRequestFullscreen){for(c=0;c<g.length;c++)if(d=g[c]+"fullscreenchange","on"+d in document){document.addEventListener(d,function(){As(f,!!(document.fullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement))},!1);break}for(c=0;c<g.length;c++)if(d=g[c]+"fullscreenerror","on"+d in document){document.addEventListener(d,function(){As(f,
null)},!1);break}}this.D&&(this.D.onfocus=function(){return f.Fg(!0)},this.D.onblur=function(){return f.Fg(!1)},this.D.re=this.D.requestPointerLock||this.D.mozRequestPointerLock||this.D.webkitRequestPointerLock,this.D.A=this.D.exitPointerLock||this.D.mozExitPointerLock||this.D.webkitExitPointerLock,this.D.re&&(e=function(){f.If(document.pointerLockElement===f.D||document.mozPointerLockElement===f.D||document.webkitPointerLockElement===f.D)},"onpointerlockchange"in document?document.addEventListener("pointerlockchange",
b;this.L=c;this.D=(this.tg=d)||b||null;this.lc=a.screenColor||"black";this.od=(1-(Xa("flicker")||a.flicker||0)).toString();this.Fb=!1;b&&(b.style.backgroundColor=this.lc);e&&(e.style.backgroundColor=this.lc);b=a.smoothing;(c=Xa("smoothing"))&&(b="true"==c);if(null!=b)for(c=0;c<g.length;c++)if(d=(d=g[c])?d+"ImageSmoothingEnabled":"imageSmoothingEnabled",void 0!==this.L[d]){this.L[d]=b;break}this.qd=a.touchScreen;this.Ic=zs;this.G=null;this.Rd=a.autoLock;this.bb=this.Qb=0;this.qa=[];this.ga=Array(this.La==
oq?256:16);this.Ia=!1;this.lb=null;if(this.Ba=e)if(this.lb=e.requestFullscreen||e.msRequestFullscreen||e.mozRequestFullScreen||e.webkitRequestFullscreen){for(c=0;c<g.length;c++)if(d=g[c]+"fullscreenchange","on"+d in document){document.addEventListener(d,function(){As(f,!!(document.fullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement))},!1);break}for(c=0;c<g.length;c++)if(d=g[c]+"fullscreenerror","on"+d in document){document.addEventListener(d,
function(){As(f,null)},!1);break}}this.D&&(this.D.onfocus=function(){return f.Fg(!0)},this.D.onblur=function(){return f.Fg(!1)},this.D.re=this.D.requestPointerLock||this.D.mozRequestPointerLock||this.D.webkitRequestPointerLock,this.D.A=this.D.exitPointerLock||this.D.mozExitPointerLock||this.D.webkitExitPointerLock,this.D.re&&(e=function(){f.If(document.pointerLockElement===f.D||document.mozPointerLockElement===f.D||document.webkitPointerLockElement===f.D)},"onpointerlockchange"in document?document.addEventListener("pointerlockchange",
e,!1):"onmozpointerlockchange"in document?document.addEventListener("mozpointerlockchange",e,!1):"onwebkitpointerlockchange"in document&&document.addEventListener("webkitpointerlockchange",e,!1)));(this.xa=a.fontROM)&&"json"!=wa(this.xa)&&(this.xa=Pa()+"/api/v1/dump?file="+this.xa+"&format=bytes")}ba(Q,rb);l=Q.prototype;
l.uc=function(a,b,c,d){var e=this;this.ma=b;this.H=c;this.ca=d;c=(c=xs[this.da])&&c[0];c!==Bs&&(Tc(b,this,Cs),Xc(b,this,Ds));c!==Es&&(Tc(b,this,Fs),Xc(b,this,Gs));this.La>=mq&&(Tc(b,this,Hs),Xc(b,this,Is));this.La==oq&&(Tc(b,this,Js),Xc(b,this,Ks));d&&Il(d,262144,function(a){if(e.B)if(a[0]){var b=e.B;if(b.fd){var c,d,f,g=!1,h=8,J=8,H=-1,I=b.video.F>>3;for(c=0;c<a.length;c++){var P=a[c];if(c){var L=P.charAt(0);d=oa(P.substr(1),16);switch(L){case "l":h=d;break;case "n":1<=d&&8>=d&&(J=d,g=!0);break;
case "p":0<=d&&3>=d&&(H=d);break;case "w":d<I&&(I=d);break;default:b.ca.O("unrecognized argument: "+P)}}else f=oa(P,16)}void 0===f?f=b.B||0:f>=b.bb&&(f-=b.bb);a="";for(c=0;c<h;c++){P=q(b.bb+f)+":";for(d=0;d<J&&f<b.fd.length;d++)L=b.fd[f++],P+=" "+(0>H?q(L):ra(L>>(H<<3),8));g&&(f+=I-J);a&&(a+="\n");a+=P}a&&b.ca.O(a);b.B=f}else b.ca.O("no buffer")}else e.ca.O("BIOSMODE: "+ta(e.ka)),b=e.B,Xr(b,"CRTC",b.ec,b.Xa,b.ig),b.La>=mq&&(Xr(b," GRC",b.Dd,b.Cd,b.Yg),Xr(b," SEQ",b.Ed,b.ee,b.Zg),Xr(b," ATC",b.Bd,
@ -563,7 +563,7 @@ function gt(a,b){if(1==b)return a.ga[0]=ht[bt],a.ga[1]=ht[$s],a.ga;if(2==b){var
(c.Cc[20]&12)<<4,c.Cc[16]&128&&(f&=-49,f|=(c.Cc[20]&3)<<4),f=d[f],g=f<<2&252,h=f>>4&252,f=f>>10&252):(g=(f&4?170:0)|(f&32?85:0),h=(f&2?170:0)|(f&16?85:0),f=(f&1?170:0)|(f&8?85:0)),a.ga[e]=[g,h,f,255]}a.Ia=!0}return a.ga}function nq(a,b,c,d){a.yb=b;a.Ya=c;a.Ea=d}
function Xs(a,b){var c=!1;if(window&&a.yb&&(!b||a.I)){var d=0,e=a.Ea?a.Ea:8,f=gt(a);null!=a.Ya[0]&&lt(a,mt,a.Ya[0],d,e,8,a.yb,f)&&(c=!0);d=a.Ea?0:2048;e=a.Ea?a.Ea:9;null!=a.Ya[1]&&(lt(a,nt,a.Ya[1],d,e,14,a.yb,ot,pt)&&(c=!0),a.Ea&&lt(a,a.La,a.Ya[1],0,a.Ea,14,a.yb,f)&&(c=!0))}b||(a.Z=-1,a.za=-1,a.sa=0);return c}function lt(a,b,c,d,e,f,g,h,k){var m=!1;null!=c&&(qt(a,b,c,d,e,f,g,h,k)&&(m=!0),a.Sd&&qt(a,b<<1,c,d,e,f,g,h,k)&&(m=!0));return m}
function qt(a,b,c,d,e,f,g,h,k){var m=!1,p=b&1?0:1,v=a.qa[b],u=16>h.length?h.length:16;v||(v={Fc:e<<p,Gc:f<<p,Fe:Array(u),Ui:h.slice(0,u),jf:k,Wg:Array(u)});for(k=0;k<u;k++){var F=h[k],J=v.Fe[k]?v.Ui[k]:[];if(F[0]!==J[0]||F[1]!==J[1]||F[2]!==J[2]){var m=v,J=k,H=p,I=c,P=d,L=e,ka=f,Z=g,jb=[0,0,0,0],qa=document.createElement("canvas");qa.width=m.Fc<<4;qa.height=m.Gc<<4;var db=qa.getContext("2d"),Oa,kb,eb,sc=8>ka||!P?ka:8,lb=db.createImageData(m.Fc,m.Gc);for(Oa=0;256>Oa;Oa++){for(eb=0;eb<ka;eb++)for(var gf=
m.jf&&J&1&&eb>=ka-2,Nd=Z[eb<sc?I+Oa*sc+eb:P+Oa*sc+eb-sc],hf=0;hf<=H;hf++)for(kb=0;kb<L;kb++){var Bg=kb<<H,jf=(eb<<H)+hf,Cg=gf||Nd&128>>(8<=kb&&192<=Oa&&223>=Oa?7:kb)?F:jb;rt(lb,Bg,jf,Cg);H&&rt(lb,Bg+1,jf,Cg)}db.putImageData(lb,(Oa&15)*m.Fc,(Oa>>4)*m.Gc)}m.Fe[J]="#"+q(F[0],2)+q(F[1],2)+q(F[2],2);m.Ui[J]=F;m.Wg[J]=qa;m=!0}}a.qa[b]=v;return m}function st(a){0<a.sa||0<=a.Z?0>a.za&&(a.za=0):a.za=-1}
m.jf&&J&1&&eb>=ka-2,Nd=Z[eb<sc?I+Oa*sc+eb:P+Oa*sc+eb-sc],hf=0;hf<=H;hf++)for(kb=0;kb<L;kb++){var Cg=kb<<H,jf=(eb<<H)+hf,Dg=gf||Nd&128>>(8<=kb&&192<=Oa&&223>=Oa?7:kb)?F:jb;rt(lb,Cg,jf,Dg);H&&rt(lb,Cg+1,jf,Dg)}db.putImageData(lb,(Oa&15)*m.Fc,(Oa>>4)*m.Gc)}m.Fe[J]="#"+q(F[0],2)+q(F[1],2)+q(F[2],2);m.Ui[J]=F;m.Wg[J]=qa;m=!0}}a.qa[b]=v;return m}function st(a){0<a.sa||0<=a.Z?0>a.za&&(a.za=0):a.za=-1}
function ft(a){if(a.I){for(var b=10;15>=b;b++)if(null==a.B.Xa[b])return;var c=a.B.Xa[10],b=c&31,d=a.B.Xa[11]&vs[11],e=a.B.Xa[9]&vs[9],f=!1;a.B===a.A&&(f=!0,7!=e||4!=b||d||(d=7));if(c&32||b>d&&!f||b>e)tt(a);else{c=a.B.Xa[15];c|=(a.B.Xa[14]&a.B.hg)<<8;a.Z!=c&&(tt(a),a.Z=c);d=d-b+1;if(a.Gd!=b||a.Vc!=d)a.Gd=b,a.Vc=d;a.va=e+1;st(a)}}}
function tt(a){if(0<=a.Z){if(void 0!==a.M){var b=ut<<8,c=a.M[a.Z];if(c&b){var c=c&~b,b=a.Z%a.F,d=a.Z/a.F|0;a.I&&a.qa[a.I]&&(a.Da&&vt(a,b,d,c,a.Da),vt(a,b,d,c));a.M[a.Z]=c}}a.Z=-1}}
function wt(a){var b,c=a.B;a.bd=!1;var d=c.Cd[5];if(null!=d){b=Ir;var e=Kr,f=c.Cd[3]&31;switch(d&3){case 0:if(f){e=Kr|32;switch(f&24){case 8:e=Kr|96;break;case 16:e=Kr|160;break;case 24:e=Kr|224}c.Sc=f&7}break;case 1:e=1;break;case 2:switch(f&24){default:e=2;break;case 8:e=98;break;case 16:e=162;break;case 24:e=226}break;case 3:a.La==oq&&(e=3,c.Sc=f&7)}d&8&&(b=1280);c=c.ee[4];null!=c&&(c&4||(b|=Jr,e|=Lr),d&64&&(c&8&&(b|=16384,e|=4),a.bd=!0));b|=e}return b}
@ -601,7 +601,7 @@ xr[oq]=["VGA",980,753664,16384,262144,7];
var zs=0,Ns=1,Ms=2,Ss=[[1036,1038,1033],[1037,1032,1039],[1035,1040,1034]],Cs={948:Q.prototype.Hm,949:Q.prototype.Gm,952:Q.prototype.Im,954:Q.prototype.Jm},Ds={948:Q.prototype.no,949:Q.prototype.mo,952:Q.prototype.oo},Fs={980:Q.prototype.lm,981:Q.prototype.km,984:Q.prototype.mm,985:Q.prototype.jm,986:Q.prototype.nm},Gs={980:Q.prototype.Pn,981:Q.prototype.On,984:Q.prototype.Qn,985:Q.prototype.Nn},Hs={960:Q.prototype.fm,961:Q.prototype.wl,962:Q.prototype.Tm,964:Q.prototype.Rm,965:Q.prototype.Qm,974:Q.prototype.Am,
975:Q.prototype.zm},Is={954:Q.prototype.Sk,960:Q.prototype.Rk,961:Q.prototype.Rk,962:Q.prototype.po,964:Q.prototype.vo,965:Q.prototype.uo,970:Q.prototype.io,972:Q.prototype.ho,974:Q.prototype.fo,975:Q.prototype.eo,986:Q.prototype.Sk},Js={963:Q.prototype.Um,966:Q.prototype.sm,967:Q.prototype.tm,969:Q.prototype.rm,970:Q.prototype.Vm,972:Q.prototype.Wm},Ks={963:Q.prototype.xo,966:Q.prototype.Vn,967:Q.prototype.Wn,968:Q.prototype.Xn,969:Q.prototype.Un};
cb(function(){for(var a=Bb(document,"pcx86","video"),b=0;b<a.length;b++){var c=a[b],d=Cb(c),e=document.createElement("canvas");if(!e||!e.getContext){c.innerHTML="<br/>Missing &lt;canvas&gt; support. Please try a newer web browser.";break}e.setAttribute("class","pcjs-canvas");e.setAttribute("width",d.screenWidth);e.setAttribute("height",d.screenHeight);e.style.height="auto";0<=Qa().indexOf("MSIE")&&(c.onresize=function(a,b,c,d){return function(){b.style.height=(a.clientWidth*d/c|0)+"px"}}(c,e,d.screenWidth,
d.screenHeight),c.onresize(null));var f=+(d.aspect||Xa("aspect"));f&&.3<=f&&3.33>=f&&(bb("onresize",function(a,b,c){return function(){b.style.height=(a.clientWidth/c|0)+"px"}}(c,e,f)),window.onresize());c.appendChild(e);f=document.createElement("textarea");Wa("iOS")&&(f.setAttribute("autocapitalize","off"),f.setAttribute("autocorrect","off"),f.style.fontSize="16px");c.appendChild(f);var g=e.getContext("2d"),d=new Q(d,e,g,f,c);Ab(d,c)}});
d.screenHeight),c.onresize(null));var f=+(Xa("aspect")||d.aspect);f&&.3<=f&&3.33>=f&&(bb("onresize",function(a,b,c){return function(){b.style.height=(a.clientWidth/c|0)+"px"}}(c,e,f)),window.onresize());c.appendChild(e);f=document.createElement("textarea");Wa("iOS")&&(f.setAttribute("autocapitalize","off"),f.setAttribute("autocorrect","off"),f.style.fontSize="16px");c.appendChild(f);var g=e.getContext("2d"),d=new Q(d,e,g,f,c);Ab(d,c)}});
function xu(a){rb.call(this,"ParallelPort",a,4194304);this.G=a.adapter;switch(this.G){case 1:this.D=956;this.C=7;break;case 2:this.D=888;this.C=7;break;case 3:this.D=632;this.C=5;break;default:mb("Unrecognized parallel adapter #"+this.G);return}this.A=this.B=null;a=a.binding;"console"==a?this.B="":yb(this,a,yu)}ba(xu,rb);l=xu.prototype;l.Cb=function(a,b,c){switch(b){case yu:return this.na[b]=this.A=c,!0}return!1};
l.uc=function(a,b,c,d){this.ma=b;this.H=c;this.ca=d;this.W=bc(a,"ChipSet");Tc(b,this,zu,this.D);Xc(b,this,Au,this.D);Ob(this)};l.Xb=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.Wb=function(a){return a?this.save():!0};l.reset=function(){Bu(this)};l.save=function(){var a=new eg(this),b=0,c=[];c[b++]=this.F;c[b++]=this.Mb;c[b]=this.lf;a.set(0,c);return a.data()};l.restore=function(a){return Bu(this,a[0])};
function Bu(a,b){var c=0;b||(b=[0,0,0]);a.F=b[c++];a.Mb=b[c++];a.lf=b[c];return!0}l.um=function(a,b){var c=this.F;t(this,a,null,b,"DATA",c);return c};l.Sm=function(a,b){var c=this.Mb;t(this,a,null,b,"STAT",c);return c};l.qm=function(a,b){var c=this.lf;t(this,a,null,b,"CTRL",c);return c};
@ -802,7 +802,7 @@ function mA(a,b){var c;if(b&&"?"==b[1])a.O("register commands:"),a.O("\tr\tdump
a.O("ST"+f+": "+Aa(e[2].toFixed(15),24,!0)+" "+q(e[4])+","+q(e[3])+" ["+e[0]+":"+DB[e[1]]+"]")}a.O(" B3SSS210ESPUOZDI xxxIRRPPIxPUOZDI");a.O("SW: "+ra(d,16)+" ("+ua(d)+") CW: "+ra(b,16)+" ("+ua(b)+")");return}if("p"==e)d=80286<=a.H.da;else{f=e.indexOf("=");if(0<f)b=e.substr(f+1),e=e.substr(0,f);else if(2<b.length)b=b[2];else{a.O("missing value for "+b[1]);return}g=Ay(a,b);if(void 0===g)return;f=!0;h=e.toUpperCase();"E"==h.charAt(0)&&4>=a.sa&&(h=null);switch(h){case "AL":a.H.D=
a.H.D&-256|g&255;break;case "AH":a.H.D=a.H.D&-65281|g<<8&255;break;case "AX":a.H.D=a.H.D&-65536|g&65535;break;case "BL":a.H.G=a.H.G&-256|g&255;break;case "BH":a.H.G=a.H.G&-65281|g<<8&255;break;case "BX":a.H.G=a.H.G&-65536|g&65535;break;case "CL":a.H.I=a.H.I&-256|g&255;break;case "CH":a.H.I=a.H.I&-65281|g<<8&255;break;case "CX":a.H.I=a.H.I&-65536|g&65535;break;case "DL":a.H.L=a.H.L&-256|g&255;break;case "DH":a.H.L=a.H.L&-65281|g<<8&255;break;case "DX":a.H.L=a.H.L&-65536|g&65535;break;case "SP":oe(a.H,
y(a.H)&-65536|g&65535);break;case "BP":a.H.M=a.H.M&-65536|g&65535;break;case "SI":a.H.K=a.H.K&-65536|g&65535;break;case "DI":a.H.J=a.H.J&-65536|g&65535;break;case "DS":ue(a.H,g);break;case "ES":ve(a.H,g);break;case "SS":ne(a.H,g);break;case "CS":gg(a.H,g);a.N=Fy(a,z(a.H),a.H.Z.U);break;case "IP":case "EIP":B(a.H,g);a.N=Fy(a,z(a.H),a.H.Z.U);break;case "PC":case "PS":Ee(a.H,g);break;case "C":g?sg(a.H):tg(a.H);break;case "P":g?(e=a.H,e.resultType&=-3,e.P|=4):(e=a.H,e.resultType&=-3,e.P&=-5);break;case "A":g?
Ag(a.H):yg(a.H);break;case "Z":g?Dg(a.H):zg(a.H);break;case "S":g?(e=a.H,e.resultType&=-17,e.P|=128):(e=a.H,e.resultType&=-17,e.P&=-129);break;case "I":g?(e=a.H,e.P|=512):(e=a.H,e.P&=-513);break;case "D":g?(e=a.H,e.P|=1024):(e=a.H,e.P&=-1025);break;case "V":g?ug(a.H):vg(a.H);break;default:var k=!0;if(80286<=a.H.da)switch(k=!1,h){case "MS":Eg(a.H,g);break;case "TR":-1===a.H.ka.load(g)&&(f=!1);break;default:if(k=!0,80386<=a.H.da)switch(k=!1,h){case "EAX":a.H.D=g;break;case "EBX":a.H.G=g;break;case "ECX":a.H.I=
Ag(a.H):yg(a.H);break;case "Z":g?Bg(a.H):zg(a.H);break;case "S":g?(e=a.H,e.resultType&=-17,e.P|=128):(e=a.H,e.resultType&=-17,e.P&=-129);break;case "I":g?(e=a.H,e.P|=512):(e=a.H,e.P&=-513);break;case "D":g?(e=a.H,e.P|=1024):(e=a.H,e.P&=-1025);break;case "V":g?ug(a.H):vg(a.H);break;default:var k=!0;if(80286<=a.H.da)switch(k=!1,h){case "MS":Eg(a.H,g);break;case "TR":-1===a.H.ka.load(g)&&(f=!1);break;default:if(k=!0,80386<=a.H.da)switch(k=!1,h){case "EAX":a.H.D=g;break;case "EBX":a.H.G=g;break;case "ECX":a.H.I=
g;break;case "EDX":a.H.L=g;break;case "ESP":oe(a.H,g);break;case "EBP":a.H.M=g;break;case "ESI":a.H.K=g;break;case "EDI":a.H.J=g;break;case "FS":a.H.Ga.load(g);break;case "GS":a.H.Ia.load(g);break;case "CR0":a.H.qa=g;jk.call(a.H,g);break;case "CR2":a.H.qd=g;break;case "CR3":a.H.Vc=g;Ge.call(a.H,g);break;default:k=!0}}if(k){a.O("unknown register: "+e);return}}if(!f){a.O("invalid value: "+b);return}Id(a.H);a.O("updated registers:")}}a.O(wB(a,d));c&&(a.N=Fy(a,z(a.H),a.H.Z.U),nA(a,cz(a.N)))}}
function EB(a,b){b=Ba(b);var c=b.match(/^(['"])(.*?)\1$/);c?a.O(fA(a,c[2])):Ay(a,b,!1)}function FB(a,b,c){for(var d=null,e=b.Ha,f=e,g=1;6>=g&&e;g++){if(2<g){b.Ha=e;b.ya=null;var h=vA(a,b);if(0<=h.indexOf("CALL")||c&&0<=h.indexOf("INT")){var k=h.indexOf(" ");if(e+(h.indexOf(" ",k+1)-k-1)/2==f){d=h;break}}}e--}b.Ha=f;return d}function GB(a,b,c){var d="t"!=b;c=uy(a,c,null,!0)||1;var e=1==c?0:1;"tc"==b&&(e=c,c=1);$a(c,function(){return Qb(a,!0)&&dz(a,e,d,!1)},function(){Id(a.H);Qb(a,!1)})}
function mB(a,b,c){if(a.gh=b)null!=a.uj&&(a.Hb=a.uj),null!=a.tj&&(a.cc=a.tj),a.uj=a.Hb,a.tj=a.cc;a.Je=c||0}
@ -813,23 +813,23 @@ mz(a,g[1],!0);if(v)if(a.ea=v,void 0===g[2])a.O("begin assemble at "+cz(v)),a.ga=
a.O("\tbc [a]\tclear breakpoint at addr [a]"),a.O("\tbl\tlist all breakpoints"),a.O("\tbn [n]\tbreak after [n] instruction(s)");else{var P=J.charAt(1);if("l"==P){var L;L=0+tA(a,a.B);L+=tA(a,a.W);(L+=tA(a,a.L))||a.O("no breakpoints")}else if("n"==P)a.xa=uy(a,H),a.O("break after "+a.xa+" instruction(s)");else if(void 0===H)a.O("missing breakpoint address");else{var ka={};if("*"!=H&&(ka=mz(a,H,!0,!0),!ka))break a;H=null==ka.Ha?H:ua(ka.Ha);"c"==P?null==ka.Ha?(Gy(a),a.O("all breakpoints cleared")):bz(a,
a.B,ka)||bz(a,a.W,ka)||bz(a,a.L,ka)||a.O("breakpoint missing: "+cz(ka)):"i"==P?a.O("breakpoint "+(Sc(a.ma,ka.Ha)?"enabled":"cleared")+": port "+H+" (input)"):"o"==P?a.O("breakpoint "+(Wc(a.ma,ka.Ha)?"enabled":"cleared")+": port "+H+" (output)"):null!=ka.Ha&&(pz(a,ka,I),"p"==P?a.sd(a.B,ka):"r"==P?a.sd(a.W,ka):"w"==P?a.sd(a.L,ka):a.O("unknown breakpoint command: "+P))}}}break;case "c":CB(a.pa);break;case "d":a:{var Z=g,jb,qa=Z[0],db=Z[1],Oa=Z[2],kb=Z[3];if("?"==db){var eb="";for(jb in Xb)a.Da[jb]&&
(eb&&(eb+=","),eb+=jb);eb+=",state,symbols";a.O("dump memory commands:");a.O("\tdb [a] [#] dump # bytes at address a");a.O("\tdw [a] [#] dump # words at address a");a.O("\tdd [a] [#] dump # dwords at address a");a.O("\tdh [#] [#] dump # instructions from history");a.O("\tdi [#] dump descriptor info for IDT #");a.O("\tds [#] dump descriptor info for selector #");eb.length&&a.O("dump extension commands:\n\t"+eb)}else if("state"==db){var sc=HB(a.pa,!0);sc?"console"==Oa?console.log(sc):
(CB(a.pa),a.O(sc)):a.O("powerOff() error")}else if("symbols"==db)for(var lb=0;lb<a.F.length;lb++){var gf=a.F[lb],Nd;for(Nd in gf.Id)if("."!=Nd.charAt(0)){var hf=gf.Id[Nd],Bg=hf.o;if(void 0!==Bg){var jf=hf.s;void 0===jf&&(jf=gf.U);var Cg=gf.Id[Nd].l;Cg&&(Nd=Cg);a.O(Sy(Bg,jf)+" "+Nd)}}}else{if("ds"==qa||"dg"==qa||"dl"==qa)qa="d",Z=[qa,"desc",db];"d"==qa&&"page"==db&&(qa="dp",Z.shift());if("dp"==qa){Z.shift();var Cm=Z[0];if(Cm){var Wg=a.Sb(mz(a,Cm));if(-1===Wg)a.O("invalid address: "+Cm);else{var tf,
Ra=null;if(80386<=a.H.da){var uf=a.ma,Ra={};Ra.Pk=(Wg&-4194304)>>>20;Ra.Xi=a.H.Vc+Ra.Pk;Ra.ob=uf.aa[(Ra.Xi&uf.C)>>>uf.A];Ra.Fj=Ra.ob.Od(Ra.Pk);Ra.Qk=(Wg&4190208)>>>10;Ra.Yi=(Ra.Fj&-4096)+Ra.Qk;Ra.pb=uf.aa[(Ra.Yi&uf.C)>>>uf.A];Ra.Gj=Ra.pb.Od(Ra.Qk);Ra.zl=(Ra.Gj&-4096)+(Wg&4095)}if(tf=Ra){a.O("linear PDE addr PDE PTE addr PTE physical");a.O("--------- ---------- -------- ---------- -------- ----------");var ye="%"+q(Wg),ye=ye+(" %%"+rz(tf.Xi,tf.Fj)),ye=
ye+(" %%"+rz(tf.Yi,tf.Gj,!0)),ye=ye+(" %%"+q(tf.zl));a.O(ye)}else a.O("unsupported operation")}}else a.O("missing address")}else{if("d"==qa){if("disk"==db){Z[0]="l";Z[1]="json";BB(a,Z);break a}for(jb in Xb)if(Z[1]==jb){var Rt=a.Da[jb];Rt?(Z.shift(),Z.shift(),Rt(Z)):a.O("no dump registered for "+db);break a}db||(qa=a.lb||"db")}if("dh"==qa){var St=db,Tt=Oa,Xg=kb,Xg=void 0===Xg?"history":Xg,Ut="",Vt=0,Nc=a.oa,md=a.X;if(md.length){var wc=+St||a.Ya,Yg=+Tt||10;isNaN(wc)?wc=Yg:Ut="more ";wc>md.length&&
(a.O("note: only "+md.length+" available"),wc=md.length);Nc-=wc;0>Nc&&(null==md[md.length-1].U?(wc=Nc+wc,Nc=0):Nc+=md.length);var Dm=[];"call"==Tt&&(Yg=1E5,Dm=["CALL"]);for(void 0!==St&&a.O(wc+" instructions earlier:");0<Yg&&Nc!=a.oa;){var nd=md[Nc++];if(null==nd.U)break;var Zg=Fy(a,nd.Ha,nd.U,nd.ya,nd.type,nd.Hb,nd.cc),Wt=wc--;null!=nd.mj&&"cycles"==Xg&&(Wt=nd.mj);var Xt=vA(a,Zg,Xg,Wt);(!Dm.length||0<=Xt.indexOf(Dm[0]))&&a.O(Xt);Zg.Je&&(Nc+=Zg.Je,Yg-=Zg.Je,wc-=Zg.Je);Nc>=md.length&&(Nc=0);a.Ya=wc;
Vt++;Yg--}}Vt||(a.O("no "+Ut+"history available"),a.Ya=void 0)}else if("di"==qa){Z.shift();var Em=Z[0];if(Em){var $g=uy(a,Em);if(void 0===$g||0>$g||255<$g)a.O("invalid vector: "+Em);else{var Yt="&",Zt=!!(a.H.qa&1),$t=!1,ej=a.H.Nb+($g<<(Zt?3:2)),au=a.H.ja(ej+0),yC=a.H.ja(ej+2);Zt&&(Yt="#",a.H.ja(ej+4)&2048&&($t=!0,au|=a.H.ja(ej+6)<<16));a.O("dumpIDT("+ua($g)+"): "+Yt+q(yC,4)+":"+q(au,$t?8:4))}}else a.O("no IDT vector")}else if("dt"==qa)Z.shift(),a.O("no information");else if(qa[1]&&0>"abwd".indexOf(qa[1]))a.O("unrecognized dump command");
else{a.lb=qa;var ze=mz(a,db);if(ze&&(null!=ze.U||null!=ze.ya)){var vf=0;if(Oa){if("l"==Oa.charAt(0))Oa=Oa.substr(1)||kb,vf=uy(a,Oa);else{var bu=mz(a,Oa);if(!bu)break a;vf=bu.Ha-ze.Ha+1}if(0>vf||65536<vf)vf=0}var Ae="",Fm=!1,wf="dd"==qa?4:"dw"==qa?2:1,ah=wf*vf||128,Gm=ah+15>>4||1,Hm=4==wf?16:a.D;"a"==qa[1]&&(Fm=!0,Gm=25,Hm=160,ah=Gm*Hm);for(;Gm--&&0<ah;){var bh=0,Im=0,ch,Jm="",fj="",db=cz(ze);for(ch=Hm;0<ch&&0<ah;ch--){var gj=a.Ja(ze,1),bh=bh|gj<<(Im++<<3);Im==wf&&(Jm+=8==a.D?sa(bh,3*wf):q(bh,2*wf),
Jm+=1==wf?9==ch?"-":" ":" ",bh=Im=0);fj+=32<=gj&&128>gj?String.fromCharCode(gj):Fm?"":".";ah--}Ae&&(Ae+="\n");Ae=Fm?Ae+fj:Ae+(db+" "+Jm+Aa(fj,fj.length+3*ch+1,!0))}Ae&&a.O(Ae.replace(/\s*$/,""));a.Aa=ze}}}}}break;case "e":if("else"==g[0])break;var hj=1,cu=255,du=a.Ja,eu=a.fc;"ew"==g[0]&&(hj=2,cu=65535,du=a.Xc,eu=a.nl);var fu=hj<<1,gu=g[1];if(null==gu)a.O("edit memory commands:"),a.O("\teb [a] [...] edit bytes at address a"),a.O("\tew [a] [...] edit words at address a");else{var ij=mz(a,gu);if(ij)for(var jj=
2;jj<g.length;jj++){var dh=Ay(a,g[jj]);if(void 0===dh){a.O("unrecognized value: "+g[jj]);break}dh&~cu&&a.O("warning: "+q(dh)+" exceeds "+hj+"-byte value");var zC=du.call(a,ij);a.O("changing "+cz(ij)+" from "+q(zC,fu,!0)+" to "+q(dh,fu,!0));eu.call(a,ij,dh,hj)}}break;case "f":yB(a,g[1]);break;case "g":a:{var hu=g[1],AC=b;"gt"==g[0]&&(a.Ea=!0);if(void 0!==hu){var Km=mz(a,hu,!0);if(!Km)break a;pz(a,Km,AC);a.sd(a.B,Km,!0)}kA(a,!0)||c||a.O("cpu busy or unavailable, run command ignored")}break;case "h":a:{var Lm;
if(a.ba.jb)Lm="halting",a.Kb();else{if(Pb(a,!0))break a;Lm="already halted"}c||a.O(Lm)}break;case "i":if("if"==g[0]){var Mm;var eh=b.substr(2),eh=Ba(eh);Ay(a,eh)?(c||a.O("true: "+eh),Mm=!0):(c||a.O("false: "+eh),Mm=!1);Mm||(d=!1);break}if("int"==g[0]){var kj;a:switch(uy(a,g[1])){case 19:dl(a,19,a.H.ea,!0);a.ka=a.aa;kj=!0;break a;case 33:dl(a,33,a.H.ea,!0);a.ka=a.aa;kj=!0;break a;default:kj=!1}kj||(d=!1);break}var Nm=g[1];if(Nm&&"?"!=Nm){var Om=uy(a,Nm);if(void 0!==Om){var BC=Uc(a.ma,Om,1);a.O(ua(Om)+
": "+ta(BC))}}else a.O("input commands:"),a.O("\ti [p]\tread port [p]"),a.O("warning: port accesses can affect hardware state");break;case "k":var CC=g[0];if("?"==g[1])a.O("stack trace commands:"),a.O("\tk\tshow frame addresses"),a.O("\tks\tshow symbol information");else{var Pm=0,iu=a.H.Z.U,fh=Fy(a),Vd=Fy(a,y(a.H),a.H.X.U);for(a.O("stack trace for "+cz(Vd));10>Pm;){for(var od=null,DC=256;Vd.Ha>>>0<a.H.dg>>>0;){fh.Ha=a.mb(Vd,!0);if(null==Vd.ya||!DC--)break;fh.U=iu;if(od=FB(a,fh))break;fh.U=a.mb(Vd);
if(od=FB(a,fh,!0)){iu=a.mb(Vd,!0);0<od.indexOf("INT")&&a.mb(Vd,!0);break}}if(!od||null==od)break;var ju=null;if("ks"==CC){var ku=od.match(/[0-9A-F]+$/);ku&&(ju=AB(a,ku[0]))}od=Aa(od,50)+" ;"+(ju||"stack="+cz(Vd));a.O(od);Pm++}Pm||a.O("no return addresses found")}break;case "l":if("ln"==g[0]){AB(a,g[1],!0);break}BB(a,g);break;case "m":if("mouse"==g[0]){var Qm=g[1],lj=g[2];if(a.G){var lu=1;"-"==lj.charAt(0)&&(lu=-1,lj=lj.substr(1));var Be=uy(a,lj,Qm);if(void 0!==Be)switch(Be=Be*lu|0,Qm){case "x":a.G.sf(Be,
(CB(a.pa),a.O(sc)):a.O("powerOff() error")}else if("symbols"==db)for(var lb=0;lb<a.F.length;lb++){var gf=a.F[lb],Nd;for(Nd in gf.Id)if("."!=Nd.charAt(0)){var hf=gf.Id[Nd],Cg=hf.o;if(void 0!==Cg){var jf=hf.s;void 0===jf&&(jf=gf.U);var Dg=gf.Id[Nd].l;Dg&&(Nd=Dg);a.O(Sy(Cg,jf)+" "+Nd)}}}else{if("ds"==qa||"dg"==qa||"dl"==qa)qa="d",Z=[qa,"desc",db];"d"==qa&&"page"==db&&(qa="dp",Z.shift());if("dp"==qa){Z.shift();var Cm=Z[0];if(Cm){var Xg=a.Sb(mz(a,Cm));if(-1===Xg)a.O("invalid address: "+Cm);else{var tf,
Ra=null;if(80386<=a.H.da){var uf=a.ma,Ra={};Ra.Pk=(Xg&-4194304)>>>20;Ra.Xi=a.H.Vc+Ra.Pk;Ra.ob=uf.aa[(Ra.Xi&uf.C)>>>uf.A];Ra.Fj=Ra.ob.Od(Ra.Pk);Ra.Qk=(Xg&4190208)>>>10;Ra.Yi=(Ra.Fj&-4096)+Ra.Qk;Ra.pb=uf.aa[(Ra.Yi&uf.C)>>>uf.A];Ra.Gj=Ra.pb.Od(Ra.Qk);Ra.zl=(Ra.Gj&-4096)+(Xg&4095)}if(tf=Ra){a.O("linear PDE addr PDE PTE addr PTE physical");a.O("--------- ---------- -------- ---------- -------- ----------");var ye="%"+q(Xg),ye=ye+(" %%"+rz(tf.Xi,tf.Fj)),ye=
ye+(" %%"+rz(tf.Yi,tf.Gj,!0)),ye=ye+(" %%"+q(tf.zl));a.O(ye)}else a.O("unsupported operation")}}else a.O("missing address")}else{if("d"==qa){if("disk"==db){Z[0]="l";Z[1]="json";BB(a,Z);break a}for(jb in Xb)if(Z[1]==jb){var Rt=a.Da[jb];Rt?(Z.shift(),Z.shift(),Rt(Z)):a.O("no dump registered for "+db);break a}db||(qa=a.lb||"db")}if("dh"==qa){var St=db,Tt=Oa,Yg=kb,Yg=void 0===Yg?"history":Yg,Ut="",Vt=0,Nc=a.oa,md=a.X;if(md.length){var wc=+St||a.Ya,Zg=+Tt||10;isNaN(wc)?wc=Zg:Ut="more ";wc>md.length&&
(a.O("note: only "+md.length+" available"),wc=md.length);Nc-=wc;0>Nc&&(null==md[md.length-1].U?(wc=Nc+wc,Nc=0):Nc+=md.length);var Dm=[];"call"==Tt&&(Zg=1E5,Dm=["CALL"]);for(void 0!==St&&a.O(wc+" instructions earlier:");0<Zg&&Nc!=a.oa;){var nd=md[Nc++];if(null==nd.U)break;var $g=Fy(a,nd.Ha,nd.U,nd.ya,nd.type,nd.Hb,nd.cc),Wt=wc--;null!=nd.mj&&"cycles"==Yg&&(Wt=nd.mj);var Xt=vA(a,$g,Yg,Wt);(!Dm.length||0<=Xt.indexOf(Dm[0]))&&a.O(Xt);$g.Je&&(Nc+=$g.Je,Zg-=$g.Je,wc-=$g.Je);Nc>=md.length&&(Nc=0);a.Ya=wc;
Vt++;Zg--}}Vt||(a.O("no "+Ut+"history available"),a.Ya=void 0)}else if("di"==qa){Z.shift();var Em=Z[0];if(Em){var ah=uy(a,Em);if(void 0===ah||0>ah||255<ah)a.O("invalid vector: "+Em);else{var Yt="&",Zt=!!(a.H.qa&1),$t=!1,ej=a.H.Nb+(ah<<(Zt?3:2)),au=a.H.ja(ej+0),yC=a.H.ja(ej+2);Zt&&(Yt="#",a.H.ja(ej+4)&2048&&($t=!0,au|=a.H.ja(ej+6)<<16));a.O("dumpIDT("+ua(ah)+"): "+Yt+q(yC,4)+":"+q(au,$t?8:4))}}else a.O("no IDT vector")}else if("dt"==qa)Z.shift(),a.O("no information");else if(qa[1]&&0>"abwd".indexOf(qa[1]))a.O("unrecognized dump command");
else{a.lb=qa;var ze=mz(a,db);if(ze&&(null!=ze.U||null!=ze.ya)){var vf=0;if(Oa){if("l"==Oa.charAt(0))Oa=Oa.substr(1)||kb,vf=uy(a,Oa);else{var bu=mz(a,Oa);if(!bu)break a;vf=bu.Ha-ze.Ha+1}if(0>vf||65536<vf)vf=0}var Ae="",Fm=!1,wf="dd"==qa?4:"dw"==qa?2:1,bh=wf*vf||128,Gm=bh+15>>4||1,Hm=4==wf?16:a.D;"a"==qa[1]&&(Fm=!0,Gm=25,Hm=160,bh=Gm*Hm);for(;Gm--&&0<bh;){var ch=0,Im=0,dh,Jm="",fj="",db=cz(ze);for(dh=Hm;0<dh&&0<bh;dh--){var gj=a.Ja(ze,1),ch=ch|gj<<(Im++<<3);Im==wf&&(Jm+=8==a.D?sa(ch,3*wf):q(ch,2*wf),
Jm+=1==wf?9==dh?"-":" ":" ",ch=Im=0);fj+=32<=gj&&128>gj?String.fromCharCode(gj):Fm?"":".";bh--}Ae&&(Ae+="\n");Ae=Fm?Ae+fj:Ae+(db+" "+Jm+Aa(fj,fj.length+3*dh+1,!0))}Ae&&a.O(Ae.replace(/\s*$/,""));a.Aa=ze}}}}}break;case "e":if("else"==g[0])break;var hj=1,cu=255,du=a.Ja,eu=a.fc;"ew"==g[0]&&(hj=2,cu=65535,du=a.Xc,eu=a.nl);var fu=hj<<1,gu=g[1];if(null==gu)a.O("edit memory commands:"),a.O("\teb [a] [...] edit bytes at address a"),a.O("\tew [a] [...] edit words at address a");else{var ij=mz(a,gu);if(ij)for(var jj=
2;jj<g.length;jj++){var eh=Ay(a,g[jj]);if(void 0===eh){a.O("unrecognized value: "+g[jj]);break}eh&~cu&&a.O("warning: "+q(eh)+" exceeds "+hj+"-byte value");var zC=du.call(a,ij);a.O("changing "+cz(ij)+" from "+q(zC,fu,!0)+" to "+q(eh,fu,!0));eu.call(a,ij,eh,hj)}}break;case "f":yB(a,g[1]);break;case "g":a:{var hu=g[1],AC=b;"gt"==g[0]&&(a.Ea=!0);if(void 0!==hu){var Km=mz(a,hu,!0);if(!Km)break a;pz(a,Km,AC);a.sd(a.B,Km,!0)}kA(a,!0)||c||a.O("cpu busy or unavailable, run command ignored")}break;case "h":a:{var Lm;
if(a.ba.jb)Lm="halting",a.Kb();else{if(Pb(a,!0))break a;Lm="already halted"}c||a.O(Lm)}break;case "i":if("if"==g[0]){var Mm;var fh=b.substr(2),fh=Ba(fh);Ay(a,fh)?(c||a.O("true: "+fh),Mm=!0):(c||a.O("false: "+fh),Mm=!1);Mm||(d=!1);break}if("int"==g[0]){var kj;a:switch(uy(a,g[1])){case 19:dl(a,19,a.H.ea,!0);a.ka=a.aa;kj=!0;break a;case 33:dl(a,33,a.H.ea,!0);a.ka=a.aa;kj=!0;break a;default:kj=!1}kj||(d=!1);break}var Nm=g[1];if(Nm&&"?"!=Nm){var Om=uy(a,Nm);if(void 0!==Om){var BC=Uc(a.ma,Om,1);a.O(ua(Om)+
": "+ta(BC))}}else a.O("input commands:"),a.O("\ti [p]\tread port [p]"),a.O("warning: port accesses can affect hardware state");break;case "k":var CC=g[0];if("?"==g[1])a.O("stack trace commands:"),a.O("\tk\tshow frame addresses"),a.O("\tks\tshow symbol information");else{var Pm=0,iu=a.H.Z.U,gh=Fy(a),Vd=Fy(a,y(a.H),a.H.X.U);for(a.O("stack trace for "+cz(Vd));10>Pm;){for(var od=null,DC=256;Vd.Ha>>>0<a.H.dg>>>0;){gh.Ha=a.mb(Vd,!0);if(null==Vd.ya||!DC--)break;gh.U=iu;if(od=FB(a,gh))break;gh.U=a.mb(Vd);
if(od=FB(a,gh,!0)){iu=a.mb(Vd,!0);0<od.indexOf("INT")&&a.mb(Vd,!0);break}}if(!od||null==od)break;var ju=null;if("ks"==CC){var ku=od.match(/[0-9A-F]+$/);ku&&(ju=AB(a,ku[0]))}od=Aa(od,50)+" ;"+(ju||"stack="+cz(Vd));a.O(od);Pm++}Pm||a.O("no return addresses found")}break;case "l":if("ln"==g[0]){AB(a,g[1],!0);break}BB(a,g);break;case "m":if("mouse"==g[0]){var Qm=g[1],lj=g[2];if(a.G){var lu=1;"-"==lj.charAt(0)&&(lu=-1,lj=lj.substr(1));var Be=uy(a,lj,Qm);if(void 0!==Be)switch(Be=Be*lu|0,Qm){case "x":a.G.sf(Be,
0);break;case "y":a.G.sf(0,Be);break;case "click":a.G.Zd(Be,!0);a.G.Zd(Be,!1);break;default:a.O("unknown action: "+Qm)}}else a.O("no mouse");break}a:{var pd,qd=null,gb=g[1];"?"==gb&&(gb=void 0);if(void 0!==gb){var Ce=0;if("all"==gb)Ce=1610481663,gb=null;else if("on"==gb)qd=!0,gb=null;else if("off"==gb)qd=!1,gb=null;else{"keys"==gb&&(gb="key");"kbd"==gb&&(gb="keyboard");for(pd in Xb)if(gb==pd){Ce=Xb[pd];qd=!!(a.ic&Ce);break}if(!Ce){a.O("unknown message category: "+gb);break a}}Ce&&("on"==g[2]?(a.ic|=
Ce,qd=!0):"off"==g[2]&&(a.ic&=~Ce,qd=!1))}var EC=0,gh="";for(pd in Xb)if(!gb||gb==pd){var FC=!!(a.ic&Xb[pd]);if(null===qd||qd==FC)gh&&(gh+=","),++EC%10||(gh+="\n\t"),"key"==pd&&(pd="keys"),gh+=pd}void 0===gb&&a.O("message commands:\n\tm [category] [on|off]\tturn categories on/off");a.O((null!==qd?qd?"messages on: ":"messages off: ":"message categories:\n\t")+(gh||"none"));Hy(a)}break;case "o":var Rm=g[1],GC=g[2];if(Rm&&"?"!=Rm){var Sm=uy(a,Rm,"port #"),Tm=uy(a,GC);void 0!==Sm&&void 0!==Tm&&(Yc(a.ma,
Ce,qd=!0):"off"==g[2]&&(a.ic&=~Ce,qd=!1))}var EC=0,hh="";for(pd in Xb)if(!gb||gb==pd){var FC=!!(a.ic&Xb[pd]);if(null===qd||qd==FC)hh&&(hh+=","),++EC%10||(hh+="\n\t"),"key"==pd&&(pd="keys"),hh+=pd}void 0===gb&&a.O("message commands:\n\tm [category] [on|off]\tturn categories on/off");a.O((null!==qd?qd?"messages on: ":"messages off: ":"message categories:\n\t")+(hh||"none"));Hy(a)}break;case "o":var Rm=g[1],GC=g[2];if(Rm&&"?"!=Rm){var Sm=uy(a,Rm,"port #"),Tm=uy(a,GC);void 0!==Sm&&void 0!==Tm&&(Yc(a.ma,
Sm,1,Tm),a.O(ua(Sm)+": "+ta(Tm)))}else a.O("output commands:"),a.O("\to [p] [b]\twrite byte [b] to port [p]"),a.O("warning: port accesses can affect hardware state");break;case "p":if("print"==g[0]){EB(a,b.substr(5));break}var mu="pr"==g[0]?1:0,xf=1+mu;if(a.K)a.O("step in progress");else{var mj,nu=!1,Ib=Fy(a,z(a.H),a.H.Z.U);do switch(mj=!1,a.Ja(Ib)){case 38:case 46:case 54:case 62:case 100:case 101:case 102:case 103:case 240:hz(a,Ib,1);mj=!0;break;case 204:case 206:a.K=xf;hz(a,Ib,1);break;case 205:case 224:case 225:case 226:a.K=
xf;hz(a,Ib,Ib.Hb?4:2);break;case 232:a.K=xf;hz(a,Ib,Ib.Hb?5:3);break;case 154:a.K=xf;hz(a,Ib,Ib.Hb?7:5);break;case 255:var ou=a.mb(Ib)&14591;if(4351==ou||6399==ou)a.K=xf,vA(a,Ib);break;case 243:case 242:hz(a,Ib,1);nu=mj=!0;break;case 108:case 109:case 110:case 111:case 164:case 165:case 166:case 167:case 170:case 171:case 172:case 173:case 174:case 175:nu&&(a.K=xf,hz(a,Ib,1))}while(mj);a.K?(a.sd(a.B,Ib,!0),kA(a)||(a.pa&&a.pa.nd(),a.K=0)):GB(a,mu?"tr":"t")}break;case "r":if("reset"==b){a.pa&&a.pa.reset();
break}mA(a,g);break;case "t":GB(a,g[0],g[1]);break;case "u":nA(a,g[1],g[2],8);break;case "v":if("var"==g[0]){zB(a,b.substr(3))||(d=!1);break}a.O("PCx86 version 1.36.0 ("+a.H.da+",RELEASE,NOPREFETCH"+(Tb?",TYPEDARRAYS":",LONGARRAYS")+",NOBACKTRACK)");a.O(Qa());break;case "x":a:if(g[1]&&"?"!=g[1])switch(g[1]){case "cs":var hh;void 0!==g[3]&&(hh=+g[3]);switch(g[2]){case "int":a.H.T.Ue=hh;break;case "start":a.H.T.vf=hh;break;case "stop":a.H.T.We=hh;break;default:a.O("unknown cs option");break a}void 0!==
hh&&Hd(a.H);a.O("checksums "+(a.H.ba.Le?"enabled":"disabled"));break;case "sp":void 0!==g[2]&&(Ld(a.H,+g[2])||a.O("warning: using 1x multiplier, previous target not reached"));a.O("target speed: "+(a.H.T.te.toFixed(2)+"Mhz")+" ("+a.H.T.Ld+"x)");break;default:a.O("unknown option: "+g[1])}else a.O("execution options:"),a.O("\tcs int #\tset checksum cycle interval to #"),a.O("\tcs start #\tset checksum cycle start count to #"),a.O("\tcs stop #\tset checksum cycle stop count to #"),a.O("\tsp #\t\tset speed multiplier to #");
break}mA(a,g);break;case "t":GB(a,g[0],g[1]);break;case "u":nA(a,g[1],g[2],8);break;case "v":if("var"==g[0]){zB(a,b.substr(3))||(d=!1);break}a.O("PCx86 version 1.36.0 ("+a.H.da+",RELEASE,NOPREFETCH"+(Tb?",TYPEDARRAYS":",LONGARRAYS")+",NOBACKTRACK)");a.O(Qa());break;case "x":a:if(g[1]&&"?"!=g[1])switch(g[1]){case "cs":var ih;void 0!==g[3]&&(ih=+g[3]);switch(g[2]){case "int":a.H.T.Ue=ih;break;case "start":a.H.T.vf=ih;break;case "stop":a.H.T.We=ih;break;default:a.O("unknown cs option");break a}void 0!==
ih&&Hd(a.H);a.O("checksums "+(a.H.ba.Le?"enabled":"disabled"));break;case "sp":void 0!==g[2]&&(Ld(a.H,+g[2])||a.O("warning: using 1x multiplier, previous target not reached"));a.O("target speed: "+(a.H.T.te.toFixed(2)+"Mhz")+" ("+a.H.T.Ld+"x)");break;default:a.O("unknown option: "+g[1])}else a.O("execution options:"),a.O("\tcs int #\tset checksum cycle interval to #"),a.O("\tcs start #\tset checksum cycle start count to #"),a.O("\tcs stop #\tset checksum cycle stop count to #"),a.O("\tsp #\t\tset speed multiplier to #");
break;case "?":if(g[1]){EB(a,b.substr(1));break}var Um="commands:",Vm;for(Vm in IB)Um+="\n"+Aa(Vm,7)+IB[Vm];Rg(a)||(Um+="\nnote: frequency/history disabled if no exec breakpoints");a.O(Um);break;default:a.O("unknown command: "+b),d=!1}}}catch(qu){a.O("debugger error: "+(qu.stack||qu.message)),d=!1}return d}function Jy(a,b,c){b=a.Gg(b,c);for(var d in b)if(!uA(a,b[+d]))return!1;return!0}
var hA={16:262144,19:524288,21:32768,22:65536,28:2048,33:134217728,51:16777216},gA=[26,28,40,42,109],IB={"?":"help/print","a [#]":"assemble","b [#]":"breakpoint",c:"clear output","d [#]":"dump memory","e [#]":"edit memory",f:"frequencies","g [#]":"go [to #]",h:"halt","i [#]":"input port #","if":"eval expression",k:"stack trace",l:"load sector(s)",ln:"list nearest symbol(s)",m:"messages",mouse:"mouse action","o [#]":"output port #",p:"step over",print:"print expression",r:"dump/set registers",reset:"reset machine",
"t [#]":"trace","u [#]":"unassemble",x:"execution options",v:"print version","var":"assign variable"},nz=0,fz=1,Py=2,qz=3,oz=4,gz=5,DA=18,EA=28,zA=36,IA=80,FA=104,GA=107,xA=176,wA="INVALID AAA AAD AAM AAS ADC ADD AND ARPL AS: BOUND BSF BSR BT BTC BTR BTS CALL CBW CLC CLD CLI CLTS CMC CMP CMPSB CMPSW CS: CWD DAA DAS DEC DIV DS: ENTER ES: ESC FS: GS: HLT IBTS IDIV IMUL IN INC INS INT INT3 INTO IRET JBE JC JCXZ JG JGE JL JLE JMP JA JNC JNO JNP JNS JNZ JO JP JS JZ LAHF LAR LDS LEA LEAVE LES LFS LGDT LGS LIDT LLDT LMSW LOADALL LOCK LODSB LODSW LOOP LOOPNZ LOOPZ LSL LSS LTR MOV MOVSB MOVSW MOVSX MOVZX MUL NEG NOP NOT OR OS: OUT OUTS POP POPA POPF PUSHF PUSHA PUSH RCL RCR REPNZ REPZ RET RETF ROL ROR SAHF SALC SAR SBB SCASB SCASW SETBE SETC SETG SETGE SETL SETLE SETNBE SETNC SETNO SETNP SETNS SETNZ SETO SETP SETS SETZ SGDT SHL SHLD SHR SHRD SIDT SLDT SMSW SS: STC STD STI STOSB STOSW STR SUB TEST VERR VERW WAIT XBTS XCHG XLAT XOR".split(" "),

View file

@ -511,9 +511,9 @@ Cp[1|sp]=function(a){a+=this.G;var b=a&-2;a=this.controller.Wa&(b==a?16711935:-1
Cp[98]=function(a,b){a+=this.G;b=$p[b&15];b&=this.controller.nb;b=b&this.controller.qb|this.controller.nb&~this.controller.qb;b=b&this.controller.Wa|this.U[a]&~this.controller.Wa;this.U[a]!=b&&(this.U[a]=b,this.Da=!0)};Cp[162]=function(a,b){a+=this.G;b=$p[b&15];b|=this.controller.nb;b=b&this.controller.qb|this.controller.nb&~this.controller.qb;b=b&this.controller.Wa|this.U[a]&~this.controller.Wa;this.U[a]!=b&&(this.U[a]=b,this.Da=!0)};
Cp[226]=function(a,b){a+=this.G;b=$p[b&15];b^=this.controller.nb;b=b&this.controller.qb|this.controller.nb&~this.controller.qb;b=b&this.controller.Wa|this.U[a]&~this.controller.Wa;this.U[a]!=b&&(this.U[a]=b,this.Da=!0)};Cp[3]=function(a,b){a+=this.G;b=b>>this.controller.Ac|b<<8-this.controller.Ac&255;b=(b|b<<8|b<<16|b<<24)&this.controller.qb;b=this.controller.Xe&b|this.controller.nb&~b;b=b&this.controller.Wa|this.U[a]&~this.controller.Wa;this.U[a]!=b&&(this.U[a]=b,this.Da=!0)};
function W(a,b,c,d,e){u.call(this,"Video",a);var f=this;this.Pc=La("Gecko/");var g=["","moz","ms","webkit"];this.ba=a.model;var h=aq[this.ba]||aq.mda;this.Ma=h[0];this.Wc=a.memory||0;this.bd=a.switches;this.aa=a.mode;if(null==this.aa||null==bq[this.aa])this.aa=h[1];this.Gb=a.charCols;this.lc=a.charRows;if(void 0===this.Gb||void 0===this.lc)this.Gb=bq[this.aa][0],this.lc=bq[this.aa][1];this.W=a.screenWidth;this.fa=a.screenHeight;this.Rc=a.scale;this.qd=12<=Math.round(this.W/this.Gb);this.M=b;this.J=
c;this.D=(this.Jf=d)||b||null;this.Wb=a.screenColor||"black";this.Uc=(1-(a.flicker||0)).toString();this.Bb=!1;b&&(b.style.backgroundColor=this.Wb);e&&(e.style.backgroundColor=this.Wb);b=a.smoothing;(c=Ma("smoothing"))&&(b="true"==c);if(null!=b)for(c=0;c<g.length;c++)if(d=(d=g[c])?d+"ImageSmoothingEnabled":"imageSmoothingEnabled",void 0!==this.J[d]){this.J[d]=b;break}this.cd=a.touchScreen;this.rc=cq;this.K=null;this.pd=a.autoLock;this.$a=this.Eb=0;this.pa=[];this.ea=Array(this.Ma==Yn?256:16);this.Ha=
!1;this.jb=null;if(this.Aa=e)if(this.jb=e.requestFullscreen||e.msRequestFullscreen||e.mozRequestFullScreen||e.webkitRequestFullscreen){for(c=0;c<g.length;c++)if(d=g[c]+"fullscreenchange","on"+d in document){document.addEventListener(d,function(){dq(f,!!(document.fullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement))},!1);break}for(c=0;c<g.length;c++)if(d=g[c]+"fullscreenerror","on"+d in document){document.addEventListener(d,function(){dq(f,
null)},!1);break}}this.D&&(this.D.onfocus=function(){return f.Vf(!0)},this.D.onblur=function(){return f.Vf(!1)},this.D.Nd=this.D.requestPointerLock||this.D.mozRequestPointerLock||this.D.webkitRequestPointerLock,this.D.A=this.D.exitPointerLock||this.D.mozExitPointerLock||this.D.webkitExitPointerLock,this.D.Nd&&(e=function(){f.Ze(document.pointerLockElement===f.D||document.mozPointerLockElement===f.D||document.webkitPointerLockElement===f.D)},"onpointerlockchange"in document?document.addEventListener("pointerlockchange",
c;this.D=(this.Jf=d)||b||null;this.Wb=a.screenColor||"black";this.Uc=(1-(Ma("flicker")||a.flicker||0)).toString();this.Bb=!1;b&&(b.style.backgroundColor=this.Wb);e&&(e.style.backgroundColor=this.Wb);b=a.smoothing;(c=Ma("smoothing"))&&(b="true"==c);if(null!=b)for(c=0;c<g.length;c++)if(d=(d=g[c])?d+"ImageSmoothingEnabled":"imageSmoothingEnabled",void 0!==this.J[d]){this.J[d]=b;break}this.cd=a.touchScreen;this.rc=cq;this.K=null;this.pd=a.autoLock;this.$a=this.Eb=0;this.pa=[];this.ea=Array(this.Ma==Yn?
256:16);this.Ha=!1;this.jb=null;if(this.Aa=e)if(this.jb=e.requestFullscreen||e.msRequestFullscreen||e.mozRequestFullScreen||e.webkitRequestFullscreen){for(c=0;c<g.length;c++)if(d=g[c]+"fullscreenchange","on"+d in document){document.addEventListener(d,function(){dq(f,!!(document.fullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement))},!1);break}for(c=0;c<g.length;c++)if(d=g[c]+"fullscreenerror","on"+d in document){document.addEventListener(d,
function(){dq(f,null)},!1);break}}this.D&&(this.D.onfocus=function(){return f.Vf(!0)},this.D.onblur=function(){return f.Vf(!1)},this.D.Nd=this.D.requestPointerLock||this.D.mozRequestPointerLock||this.D.webkitRequestPointerLock,this.D.A=this.D.exitPointerLock||this.D.mozExitPointerLock||this.D.webkitExitPointerLock,this.D.Nd&&(e=function(){f.Ze(document.pointerLockElement===f.D||document.mozPointerLockElement===f.D||document.webkitPointerLockElement===f.D)},"onpointerlockchange"in document?document.addEventListener("pointerlockchange",
e,!1):"onmozpointerlockchange"in document?document.addEventListener("mozpointerlockchange",e,!1):"onwebkitpointerlockchange"in document&&document.addEventListener("webkitpointerlockchange",e,!1)));(this.ua=a.fontROM)&&"json"!=pa(this.ua)&&(this.ua=Fa()+"/api/v1/dump?file="+this.ua+"&format=bytes")}ba(W,u);l=W.prototype;
l.ic=function(a,b,c,d){var e=this;this.na=b;this.S=c;this.Ea=d;c=(c=aq[this.ba])&&c[0];c!==eq&&(pc(b,this,fq),sc(b,this,gq));c!==hq&&(pc(b,this,iq),sc(b,this,jq));this.Ma>=Wn&&(pc(b,this,kq),sc(b,this,lq));this.Ma==Yn&&(pc(b,this,mq),sc(b,this,nq));if((this.C=Bb(a,"Keyboard"))&&this.M){for(var f in this.ia)0<f.indexOf("lock")&&this.C.yb("led",f,this.ia[f]);this.C.yb(this.Jf?"textarea":"canvas","screen",this.D)}this.sb=9;(this.V=Bb(a,"ChipSet"))&&this.bd&&this.Ma==Wn&&(this.sb=zj(this.bd,this.sb));
"mouse"==this.cd?(this.K=Bb(a,"Mouse"))&&oq(this,pq):"keygrid"==this.cd&&this.C&&oq(this,qq);if(this.ua){var g="Loading "+this.ua+"...";Ea(this.ua,null,!0,function(a,b,c){rq(e,a,b,c)},function(){e.ub(g,pb.ae)})}};
@ -564,7 +564,7 @@ gp[Yn]=["VGA",980,753664,16384,262144,7];
var cq=0,qq=1,pq=2,vq=[[1036,1038,1033],[1037,1032,1039],[1035,1040,1034]],fq={948:W.prototype.rl,949:W.prototype.ql,952:W.prototype.sl,954:W.prototype.tl},gq={948:W.prototype.Om,949:W.prototype.Nm,952:W.prototype.Pm},iq={980:W.prototype.Wk,981:W.prototype.Vk,984:W.prototype.Xk,985:W.prototype.Uk,986:W.prototype.Yk},jq={980:W.prototype.rm,981:W.prototype.qm,984:W.prototype.sm,985:W.prototype.pm},kq={960:W.prototype.Qk,961:W.prototype.lk,962:W.prototype.Dl,964:W.prototype.Bl,965:W.prototype.Al,974:W.prototype.kl,
975:W.prototype.jl},lq={954:W.prototype.Kj,960:W.prototype.Jj,961:W.prototype.Jj,962:W.prototype.Qm,964:W.prototype.Wm,965:W.prototype.Vm,970:W.prototype.Jm,972:W.prototype.Im,974:W.prototype.Hm,975:W.prototype.Gm,986:W.prototype.Kj},mq={963:W.prototype.El,966:W.prototype.cl,967:W.prototype.dl,969:W.prototype.bl,970:W.prototype.Fl,972:W.prototype.Gl},nq={963:W.prototype.Ym,966:W.prototype.xm,967:W.prototype.ym,968:W.prototype.zm,969:W.prototype.wm};
Qa(function(){for(var a=gb(document,"pcx86","video"),b=0;b<a.length;b++){var c=a[b],d=hb(c),e=document.createElement("canvas");if(!e||!e.getContext){c.innerHTML="<br/>Missing &lt;canvas&gt; support. Please try a newer web browser.";break}e.setAttribute("class","pcjs-canvas");e.setAttribute("width",d.screenWidth);e.setAttribute("height",d.screenHeight);e.style.height="auto";0<=(window?window.navigator.userAgent:"").indexOf("MSIE")&&(c.onresize=function(a,b,c,d){return function(){b.style.height=(a.clientWidth*
d/c|0)+"px"}}(c,e,d.screenWidth,d.screenHeight),c.onresize(null));var f=+(d.aspect||Ma("aspect"));f&&.3<=f&&3.33>=f&&(Pa("onresize",function(a,b,c){return function(){b.style.height=(a.clientWidth/c|0)+"px"}}(c,e,f)),window.onresize());c.appendChild(e);f=document.createElement("textarea");La("iOS")&&(f.setAttribute("autocapitalize","off"),f.setAttribute("autocorrect","off"),f.style.fontSize="16px");c.appendChild(f);var g=e.getContext("2d"),d=new W(d,e,g,f,c);fb(d,c)}});
d/c|0)+"px"}}(c,e,d.screenWidth,d.screenHeight),c.onresize(null));var f=+(Ma("aspect")||d.aspect);f&&.3<=f&&3.33>=f&&(Pa("onresize",function(a,b,c){return function(){b.style.height=(a.clientWidth/c|0)+"px"}}(c,e,f)),window.onresize());c.appendChild(e);f=document.createElement("textarea");La("iOS")&&(f.setAttribute("autocapitalize","off"),f.setAttribute("autocorrect","off"),f.style.fontSize="16px");c.appendChild(f);var g=e.getContext("2d"),d=new W(d,e,g,f,c);fb(d,c)}});
function zr(a){u.call(this,"ParallelPort",a);this.G=a.adapter;switch(this.G){case 1:this.D=956;this.C=7;break;case 2:this.D=888;this.C=7;break;case 3:this.D=632;this.C=5;break;default:q("Unrecognized parallel adapter #"+this.G);return}this.A=this.B=null;a=a.binding;"console"==a?this.B="":db(this,a,Ar)}ba(zr,u);l=zr.prototype;l.yb=function(a,b,c){switch(b){case Ar:return this.ia[b]=this.A=c,!0}return!1};
l.ic=function(a,b,c,d){this.na=b;this.S=c;this.Ea=d;this.V=Bb(a,"ChipSet");pc(b,this,Br,this.D);sc(b,this,Cr,this.D);sb(this)};l.Pb=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.Ob=function(a){return a?this.save():!0};l.reset=function(){Dr(this)};l.save=function(){var a=new We(this),b=0,c=[];c[b++]=this.F;c[b++]=this.Cb;c[b]=this.Ge;a.set(0,c);return a.data()};l.restore=function(a){return Dr(this,a[0])};
function Dr(a,b){var c=0;b||(b=[0,0,0]);a.F=b[c++];a.Cb=b[c++];a.Ge=b[c];return!0}l.el=function(){return this.F};l.Cl=function(){return this.Cb};l.al=function(){return this.Ge};l.Am=function(a,b){this.F=b;this.Cb|=Er;a=!1;this.A&&(8==b?this.A.value=this.A.value.slice(0,-1):(this.A.value+=String.fromCharCode(b),this.A.scrollTop=this.A.scrollHeight),a=!0);if(null!=this.B){if(10==b||1024<=this.B.length)this.ub(this.B),this.B="";10!=b&&(this.B+=String.fromCharCode(b));a=!0}a&&(this.Cb&=~Er);Fr(this)};

View file

@ -2269,7 +2269,7 @@ class Video extends Component {
* screen "flicker".
*/
this.colorScreen = parmsVideo['screenColor'] || "black";
this.opacityFlicker = (1 - (parmsVideo['flicker'] || 0)).toString();
this.opacityFlicker = (1 - (Web.getURLParm('flicker') || parmsVideo['flicker'] || 0)).toString();
this.fOpacityReduced = false;
if (canvas) canvas.style.backgroundColor = this.colorScreen;
if (container) container.style.backgroundColor = this.colorScreen;
@ -6872,7 +6872,7 @@ class Video extends Component {
* until we figure out a better UI. And note that we use our Web.onPageEvent() helper function to make
* sure we don't trample any other 'onresize' handler(s) attached to the window object.
*/
var aspect = +(parmsVideo['aspect'] || Web.getURLParm('aspect'));
var aspect = +(Web.getURLParm('aspect') || parmsVideo['aspect']);
/*
* No 'aspect' parameter yields NaN, which is falsey, and anything else must satisfy my arbitrary
* constraints of 0.3 <= aspect <= 3.33, to prevent any useless (or worse, browser-blowing) results.

View file

@ -179,7 +179,7 @@ function ne(a,b,c){var d=y(a);-1!==a.X.load(b)&&(oe(a,d),a.X.Rc?(a.dg=a.X.ua+a.X
function ig(a,b){b=(a.ea>>>0)+b;b>a.Tg&&(8088>=a.da||a.Z.Ka==a.Z.wa?b=a.Z.ua+(b-a.Tg&a.R):x.call(a,13,0));return b|0}function jg(a){a.ea=a.pd}function y(a){return a.zc&~a.X.wa|a.Aa-a.X.ua}function oe(a,b){a.zc=b;a.Aa=a.X.ua+(b&a.X.wa)|0}function kg(a,b,c,d,e,f){if(63!=(e&63)&&e!=a.resultType){var g=(e^a.resultType)&a.resultType;g&&(g&1&&lg(a),g&2&&mg(a),g&4&&ng(a),g&8&&og(a),g&16&&pg(a),g&32&&qg(a))}f?(a.Td=d,a.Sd=b):(a.Td=b,a.Sd=d);a.hf=c;a.Ud=d;a.resultType=e}
function rg(a,b,c,d,e){a.resultType=c|26;a.Ud=b;d?sg(a):tg(a);e?ug(a):vg(a);return b}function wg(a,b,c,d){c&d?sg(a):tg(a);(b^c)&d?ug(a):vg(a)}function xg(a){return lg(a)?1:0}function lg(a){a.resultType&1&&(a.P&=-2,(a.Td^(a.Td^a.hf)&(a.hf^a.Sd))&a.resultType&-2147450752&&(a.P|=1),a.resultType&=-2);return a.P&1}function mg(a){a.resultType&2&&(a.P&=-5,38505>>((a.Ud^a.Ud>>4)&15)&1&&(a.P|=4),a.resultType&=-3);return a.P&4}
function ng(a){a.resultType&4&&(a.P&=-17,(a.Sd^a.Td^a.hf)&16&&(a.P|=16),a.resultType&=-5);return a.P&16}function og(a){a.resultType&8&&(a.P&=-65,a.Ud&((a.resultType&-2147450752)-1|a.resultType&-2147450752)||(a.P|=64),a.resultType&=-9);return a.P&64}function pg(a){a.resultType&16&&(a.P&=-129,a.Ud&a.resultType&-2147450752&&(a.P|=128),a.resultType&=-17);return a.P&128}
function qg(a){a.resultType&32&&(a.P&=-2049,(a.Td^a.Sd)&(a.hf^a.Sd)&a.resultType&-2147450752&&(a.P|=2048),a.resultType&=-33);return a.P&2048}function tg(a){a.resultType&=-2;a.P&=-2}function yg(a){a.resultType&=-5;a.P&=-17}function zg(a){a.resultType&=-9;a.P&=-65}function vg(a){a.resultType&=-33;a.P&=-2049}function sg(a){a.resultType&=-2;a.P|=1}function Ag(a){a.resultType&=-5;a.P|=16}function Dg(a){a.resultType&=-9;a.P|=64}function ug(a){a.resultType&=-33;a.P|=2048}
function qg(a){a.resultType&32&&(a.P&=-2049,(a.Td^a.Sd)&(a.hf^a.Sd)&a.resultType&-2147450752&&(a.P|=2048),a.resultType&=-33);return a.P&2048}function tg(a){a.resultType&=-2;a.P&=-2}function yg(a){a.resultType&=-5;a.P&=-17}function zg(a){a.resultType&=-9;a.P&=-65}function vg(a){a.resultType&=-33;a.P&=-2049}function sg(a){a.resultType&=-2;a.P|=1}function Ag(a){a.resultType&=-5;a.P|=16}function Bg(a){a.resultType&=-9;a.P|=64}function ug(a){a.resultType&=-33;a.P|=2048}
function De(a){return a.P&-2262|lg(a)|mg(a)|ng(a)|og(a)|pg(a)|qg(a)}function Eg(a,b){b|=a.qa&1|65520;a.qa=a.qa&-65536|b&65535;a.qa&1&&qe(a,!0)}function Ee(a,b,c){a.qa&1||(b&=~a.wi);void 0===c&&(c=a.Ma);c?b=b&-12289|a.P&12288:a.lc=(b&12288)>>12;c>a.lc&&(b=b&-513|a.P&512);a.resultType=128;a.P=a.P&~(a.Qd|2261)|b&(a.Qd|2261)|a.Vi;a.P&256&&(a.Ya|=2,a.N|=4)}
function Fg(a,b,c,d){var e=0;if(a.qa&1&&(a.Ma>a.lc||a.P&131072)&&a.ka.Wi)for(var f=a.ka.Wi+(b>>>3),e=(1<<c)-1<<(b&7);e&&f<=a.ka.yl&&!(a.Ja(f)&e);)e>>>=8,f++;return e?(r(a,256)&&Rb(a,"checkIOPM("+ua(b)+","+c+","+(d?"input":"output")+"): trapped",!0,!0),x.call(a,13,0),!1):!0}
l.Cb=function(a,b,c){switch(b){case "EAX":case "EBX":case "ECX":case "EDX":case "ESP":case "EBP":case "ESI":case "EDI":case "EIP":case "AX":case "BX":case "CX":case "DX":case "SP":case "BP":case "SI":case "DI":case "IP":case "PC":case "CS":case "DS":case "SS":case "ES":case "FS":case "GS":case "CR0":case "CR2":case "CR3":case "PS":case "C":case "P":case "A":case "Z":case "S":case "T":case "I":case "D":case "V":this.na[b]=c;this.yj++;a=!0;break;default:a=Dd.prototype.Cb.call(this,a,b,c)}return a};
@ -194,9 +194,9 @@ function Qg(a,b,c){var d=4;1==b.length&&(d=1,c=c?1:0);if(80386>a.da)2<b.length&&
l.Pg=function(a){this.ba.complete=!0;var b=this.ba.oj=this.ca&&Rg(this.ca),c=a?this.ba.si?0:1:-1;this.ba.si=!1;this.cd=this.A=a;this.W&&!a&&Wd(this.W);a||r(this,1024)||(this.N|=4);do{var d=this.N&3312;if(d)this.ha|=d;else if(this.pd=this.ea,this.Ea=this.Da,this.Rb=this.X,this.C=this.F=-1,this.ha&3072&&Zf(this),this.ha=this.N&256,this.Ya){a:{if(!(this.N&4))for(var d=80286>this.da?0:1,e=0;2>e;e++){switch(d){case 0:if(this.Ya&1&&this.P&512){var f=Sg(this.W);if(-1<=f&&(this.Ya&=-2,0<=f)){this.Ya&=-5;
Tg.call(this,f);d=!0;break a}}break;case 1:if(this.Ya&2){this.Ya&=-3;80386<=this.da&&(this.Ob[6]|=16384);Tg.call(this,1);d=!0;break a}}d=1-d}d=!1}if(d&&!a){this.O("interrupt dispatched");this.N=0;break}if(this.Ya&4){this.N=this.A=0;break}}if(b){if(Ug(this.ca,this.ea,c)){this.Kb();break}c=1}this.N=0;this.va[this.ra()].call(this)}while(0<this.A);return this.ba.complete?this.cd-this.A:void 0===this.ba.complete?0:-1};var Af=512;
cb(function(){for(var a=Bb(document,"pcx86","cpu"),b=0;b<a.length;b++){var c=a[b],d=Cb(c),d=new He(d);Ab(d,c)}});
function Vg(a){rb.call(this,"FPU",a);this.da=a.model||8087;this.F=new Float64Array(8);this.L=new Int32Array(this.F.buffer);this.Z=new Float32Array(1);this.ha=new Int32Array(this.Z.buffer);this.K=new Float64Array(1);this.G=new Int32Array(this.K.buffer);this.D=Array(3);this.M=this.N=-1;this.I=this.J=this.P=this.A=0;this.X=new Float64Array(1);this.aa=new Int32Array(this.X.buffer);this.aa[0]=0;this.aa[1]=268402688;ih(this);this.ga=Vg.prototype.ri;this.ea=Vg.prototype.hl}ba(Vg,rb);l=Vg.prototype;
l.uc=function(a,b,c){this.H=c;this.W=bc(a,"ChipSet");Ob(this)};l.Xb=function(a,b){if(!b)if(!a||!this.restore)ih(this);else if(!this.restore(a))return!1;return!0};l.Wb=function(a){return a?this.save():!0};l.save=function(){var a=new eg(this),b=[],c=0;b[c++]=this.Yb;b[c++]=jh(this);b[c++]=kh(this);for(var d=0;d<this.F.length;d++)b[c++]=this.F[d];a.set(0,b);return a.data()};
l.restore=function(a){a=a[0];var b=0;this.Yb=a[b++]&-57409;var c=a[b++];this.fa=c&-14337;this.B=(c&14336)>>11;lh(this);mh(this,a[b++]);for(c=0;c<this.F.length;c++)this.F[c]=a[b++];return!0};function ih(a){a.C=0;a.Yb=959;a.fa=0;a.B=0;a.W&&(a=a.W,a.da>=nh&&oh(a,ph))}function lh(a){a.fa&=-129;a.fa&~a.Yb&63&&(a.fa|=128);if(a.fa&128&&!(a.Yb&128))return a=a.W,a.da>=nh?qh(a,ph):a.ea&rh||Tg.call(a.H,2),!0;a=a.W;a.da>=nh&&oh(a,ph);return!1}function sh(a,b){80387<=a.da||(b&=-65);a.fa|=b;return lh(a)}
function Vg(a){rb.call(this,"FPU",a);this.da=a.model||8087;this.F=new Float64Array(8);this.L=new Int32Array(this.F.buffer);this.Z=new Float32Array(1);this.ha=new Int32Array(this.Z.buffer);this.K=new Float64Array(1);this.G=new Int32Array(this.K.buffer);this.D=Array(3);this.M=this.N=-1;this.I=this.J=this.P=this.A=0;this.X=new Float64Array(1);this.aa=new Int32Array(this.X.buffer);this.aa[0]=0;this.aa[1]=268402688;Wg(this);this.ga=Vg.prototype.ri;this.ea=Vg.prototype.hl}ba(Vg,rb);l=Vg.prototype;
l.uc=function(a,b,c){this.H=c;this.W=bc(a,"ChipSet");Ob(this)};l.Xb=function(a,b){if(!b)if(!a||!this.restore)Wg(this);else if(!this.restore(a))return!1;return!0};l.Wb=function(a){return a?this.save():!0};l.save=function(){var a=new eg(this),b=[],c=0;b[c++]=this.Yb;b[c++]=jh(this);b[c++]=kh(this);for(var d=0;d<this.F.length;d++)b[c++]=this.F[d];a.set(0,b);return a.data()};
l.restore=function(a){a=a[0];var b=0;this.Yb=a[b++]&-57409;var c=a[b++];this.fa=c&-14337;this.B=(c&14336)>>11;lh(this);mh(this,a[b++]);for(c=0;c<this.F.length;c++)this.F[c]=a[b++];return!0};function Wg(a){a.C=0;a.Yb=959;a.fa=0;a.B=0;a.W&&(a=a.W,a.da>=nh&&oh(a,ph))}function lh(a){a.fa&=-129;a.fa&~a.Yb&63&&(a.fa|=128);if(a.fa&128&&!(a.Yb&128))return a=a.W,a.da>=nh?qh(a,ph):a.ea&rh||Tg.call(a.H,2),!0;a=a.W;a.da>=nh&&oh(a,ph);return!1}function sh(a,b){80387<=a.da||(b&=-65);a.fa|=b;return lh(a)}
function jh(a){return a.fa|a.B<<11}function th(a,b){return isFinite(b)?!0:!sh(a,Infinity===b?8:16)}function uh(a,b,c){var d=null;null!=b&&null!=c&&(d=b+c,th(a,d)||(d=null));return d}function vh(a,b,c){var d=null;null!=b&&null!=c&&(d=b-c,th(a,d)||(d=null));return d}function wh(a,b,c){var d=null;null!=b&&null!=c&&(d=b*c,th(a,d)||(d=null));return d}function xh(a,b,c){var d=null;null==b||null==c||!c&&sh(a,2)||(d=b/c,th(a,d)||(d=null));return d}
function yh(a,b,c){if(null!=b&&null!=c){var d=0;isNaN(b)||isNaN(c)?d=17664:(b-=c,0>b?d=256:b||(d=16384));a.fa=a.fa&-18177|d;return!0}return!1}function zh(a,b,c){if(null==b)return null;var d=a.Yb&3072;d?d=1024==d||3072==d&&0<b?Math.floor(b):Math.ceil(b):(d=Math.round(b),.5===d-b&&d%2&&d--);if(c){if(d>=c){if(sh(a,1))return null;d=-c}else if(d<-c){if(sh(a,1))return null;d=-c}a.G[0]=d|0;2147483648<c&&(a.G[1]=d/4294967296|0,!a.G[1]&&0>d&&(a.G[1]=-1))}return d}
function Ah(a,b){var c=3;a.C&1<<b&&(a=a.F[b],c=0,a?isFinite(a)||(c=2):c=1);return c}function kh(a){for(var b=0,c=a.F.length-1;0<=c;c--)b<<=2,b|=Ah(a,c);return b}function mh(a,b){a.C=0;for(var c=1;128>=c;c<<=1)3!=(b&3)&&(a.C|=c),b>>=2}function Bh(a){var b=a.B+0&7;return a.C&1<<b?(a.Z[0]=a.F[b],!0):sh(a,1)?!1:(a.Z[0]=a.X[0],!0)}function Ch(a){var b=a.B+0&7;return a.C&1<<b?(a.K[0]=a.F[b],!0):sh(a,1)?!1:(a.K[0]=a.X[0],!0)}
@ -206,7 +206,7 @@ function Eh(a,b,c){var d=c>>20&2047,e=2147483648|(c&1048575)<<11|b>>>21;2047==d?
function Ph(a,b){if(null!=b){var c=a.B-1&7,d=1<<c;if(a.C&d&&(a.fa|=512,sh(a,65)))return;if(isNaN(b)&&sh(a,1)){if(sh(a,1))return;b=NaN}a.F[a.B=c]=b;a.C|=d}}
function Qh(a,b){var c,d=a.H;c=d.mb(b);a.Yb=c&-57409;c=d.mb(b+=d.V);a.fa=c&-14337;a.B=(c&14336)>>11;lh(a);mh(a,d.mb(b+=d.V));!(d.qa&1)||d.P&131072?(a.I=d.mb(b+=d.V),c=d.mb(b+=d.V),a.P=c&2047,a.I|=(c&-4096)<<4,a.M=-1,a.J=d.mb(b+=d.V),a.J|=(d.mb(b+=d.V)&-4096)<<4,a.N=-1):(a.I=d.mb(b+=d.V),c=d.mb(b+=d.V),a.M=c&65535,a.P=c>>16&2047,a.J=d.mb(b+=d.V),a.N=d.mb(b+=d.V)&65535);return b+d.V}
function Rh(a,b){var c=a.H;c.yb(b,a.Yb);c.yb(b+=c.V,jh(a));c.yb(b+=c.V,kh(a));if(!(c.qa&1)||c.P&131072){var d=(a.M<<4)+a.I;c.yb(b+=c.V,d);c.yb(b+=c.V,d>>4&-4096|a.P);d=(a.N<<4)+a.J;c.yb(b+=c.V,d);c.yb(b+=c.V,d>>4&-4096)}else c.yb(b+=c.V,a.I),c.yb(b+=c.V,a.M|a.P<<16),c.yb(b+=c.V,a.J),c.yb(b+=c.V,a.N);return b+c.V}function Sh(){this.fa&=-32896;lh(this)}function Th(){yh(this,K(this,0),K(this,this.A))}function Uh(){yh(this,K(this,0),K(this,this.A))&&Oh(this)}function Vh(){Uh.call(this)}
function Wh(){M(this,0,xh(this,K(this,0),Hh(this)))}function Xh(){this.C&=~(1<<this.B)}function Yh(){ih(this)}function Zh(){this.Yb=this.H.ja(this.H.C)&-57409}function $h(){Qh(this,this.H.C)}function ai(){for(var a=this.H,b=Qh(this,a.C),c=this.D,d=0;d<this.F.length;d++)c[0]=a.ia(b),c[1]=a.ia(b+=4),c[2]=a.ja(b+=4),c&&M(this,d,Lh(this,c)),b+=2}function bi(){for(var a=this.H,b=Rh(this,a.C),c=0;c<this.F.length;c++){var d=Dh(this,c,!0);a.ab(b,d[0]);a.ab(b+=4,d[1]);a.gb(b+=4,d[2]);b+=2}ih(this)}
function Wh(){M(this,0,xh(this,K(this,0),Hh(this)))}function Xh(){this.C&=~(1<<this.B)}function Yh(){Wg(this)}function Zh(){this.Yb=this.H.ja(this.H.C)&-57409}function $h(){Qh(this,this.H.C)}function ai(){for(var a=this.H,b=Qh(this,a.C),c=this.D,d=0;d<this.F.length;d++)c[0]=a.ia(b),c[1]=a.ia(b+=4),c[2]=a.ja(b+=4),c&&M(this,d,Lh(this,c)),b+=2}function bi(){for(var a=this.H,b=Rh(this,a.C),c=0;c<this.F.length;c++){var d=Dh(this,c,!0);a.ab(b,d[0]);a.ab(b+=4,d[1]);a.gb(b+=4,d[2]);b+=2}Wg(this)}
function ci(){Rh(this,this.H.C);this.Yb|=63}function di(){M(this,this.A,K(this,0))&&Oh(this)}function ei(){di.call(this)}function fi(){this.H.gb(this.H.C,this.Yb)}function gi(){this.H.gb(this.H.C,jh(this))}function hi(){80287<=this.da&&(this.H.D=this.H.D&-65536|jh(this))}function ii(){var a=K(this,0);M(this,0,K(this,this.A));M(this,this.A,a)}function ji(){ii.call(this)}
var ki=Math.log(10)/Math.LN2,li=Math.LOG2E,mi=Math.PI,ni=Math.log(2)/Math.LN10,oi=Math.LN2,pi=Math.pow(2,63),qi={216:{0:function(){M(this,0,uh(this,K(this,0),Hh(this)))},1:function(){M(this,0,wh(this,K(this,0),Hh(this)))},2:function(){yh(this,K(this,0),Hh(this))},3:function(){yh(this,K(this,0),Hh(this))&&Oh(this)},4:function(){M(this,0,vh(this,K(this,0),Hh(this)))},5:function(){M(this,0,vh(this,Hh(this),K(this,0)))},6:Wh,7:Wh,48:function(){M(this,0,uh(this,K(this,0),K(this,this.A)))},49:function(){M(this,
0,wh(this,K(this,0),K(this,this.A)))},50:Th,51:Uh,52:function(){M(this,0,vh(this,K(this,0),K(this,this.A)))},53:function(){M(this,0,vh(this,K(this,this.A),K(this,0)))},54:function(){M(this,0,xh(this,K(this,0),K(this,this.A)))},55:function(){M(this,0,xh(this,K(this,this.A),K(this,0)))}},217:{0:function(){Ph(this,Hh(this))},2:function(){Bh(this)&&this.ga()},3:function(){Bh(this)&&(this.ga(),Oh(this))},4:$h,5:Zh,6:ci,7:fi,48:function(){Ph(this,K(this,this.A))},49:ii,50:function(){},51:ei,64:function(){M(this,
@ -221,17 +221,17 @@ this.A,xh(this,K(this,this.A),K(this,0)))}},221:{0:function(){Ph(this,Ih(this))}
54:function(){M(this,this.A,xh(this,K(this,0),K(this,this.A)))&&Oh(this)},55:function(){M(this,this.A,xh(this,K(this,this.A),K(this,0)))&&Oh(this)}},223:{0:function(){Ph(this,Fh(this))},2:function(){null!=zh(this,K(this,0),32768)&&this.H.gb(this.H.C,this.G[0])},3:function(){null!=zh(this,K(this,0),32768)&&(this.H.gb(this.H.C,this.G[0]),Oh(this))},4:function(){var a=Jh(this),b=Mh(a[0],8)+1E8*Mh(a[1],8)+1E16*Mh(a[2],2);a[2]&32768&&(b=-b);Ph(this,b)},5:function(){var a;a=this.H.ia(this.H.C);a=4294967296*
this.H.ia(this.H.C+4)+(a>>>0);Ph(this,a)},6:function(){var a=zh(this,Oh(this));null!=a&&(this.D[0]=Nh(a,8),this.D[1]=Nh(a/1E8,8),this.D[2]=Nh(a/1E16,2),0>a&&(this.D[2]|=32768),Kh(this))},7:function(){null!=zh(this,K(this,0),pi)&&(this.hl(),Oh(this))},48:function(){Xh.call(this);Oh(this)},49:ji,50:ei,51:ei,52:hi}},ri=[Sh,Yh,Zh,$h,ai,bi,fi,ci,gi,hi];cb(function(){for(var a=Bb(document,"pcx86","fpu"),b=0;b<a.length;b++){var c=a[b],d=Cb(c),d=new Vg(d);Ab(d,c)}});
function si(a,b){var c=a+b+xg(this)|0;kg(this,a,b,c,191);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Jb:this.B.Ac;return c&255}function ti(a,b){var c=a+b+xg(this)|0;kg(this,a,b,c,this.Fb|63);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Jb:this.B.Ac;return c&this.R}function ui(a,b){var c=a+b|0;kg(this,a,b,c,191);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Jb:this.B.Ac;return c&255}
function vi(a,b){var c=a+b|0;kg(this,a,b,c,this.Fb|63);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Jb:this.B.Ac;return c&this.R}function wi(a,b){a&=b;rg(this,a,128);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Jb:this.B.Ac;return a}function xi(a,b){this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Jb:this.B.Ac;return rg(this,a&b,this.Fb)&this.R}function yi(a,b){this.A-=10+(-1===this.C?0:1);if((a&3)<(b&3))return a=a&-4|b&3,Dg(this),a;zg(this);return a}
function zi(a){if(-1===this.C)return x.call(this,6),a;var b=a,c=this.mb(this.C),d=this.mb(this.C+this.V);2==this.V&&(b=a<<16>>16,c=c<<16>>16,d=d<<16>>16);this.A-=this.B.Oj;(b<c||b>d)&&x.call(this,5);this.N|=2;return a}function Ai(a,b){var c=0;if(b){zg(this);for(var d=1;d&this.R;){if(b&d){a=c;break}d<<=1;c++}}else Dg(this);this.A-=11+3*c;return a}function Bi(a,b){var c=0;if(b){zg(this);for(var d=2==this.V?15:31,e=1<<d;e;){if(b&e){a=d;break}e>>>=1;c++;d--}}else Dg(this);this.A-=11+3*c;return a}
function vi(a,b){var c=a+b|0;kg(this,a,b,c,this.Fb|63);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Jb:this.B.Ac;return c&this.R}function wi(a,b){a&=b;rg(this,a,128);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Jb:this.B.Ac;return a}function xi(a,b){this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Jb:this.B.Ac;return rg(this,a&b,this.Fb)&this.R}function yi(a,b){this.A-=10+(-1===this.C?0:1);if((a&3)<(b&3))return a=a&-4|b&3,Bg(this),a;zg(this);return a}
function zi(a){if(-1===this.C)return x.call(this,6),a;var b=a,c=this.mb(this.C),d=this.mb(this.C+this.V);2==this.V&&(b=a<<16>>16,c=c<<16>>16,d=d<<16>>16);this.A-=this.B.Oj;(b<c||b>d)&&x.call(this,5);this.N|=2;return a}function Ai(a,b){var c=0;if(b){zg(this);for(var d=1;d&this.R;){if(b&d){a=c;break}d<<=1;c++}}else Bg(this);this.A-=11+3*c;return a}function Bi(a,b){var c=0;if(b){zg(this);for(var d=2==this.V?15:31,e=1<<d;e;){if(b&e){a=d;break}e>>>=1;c++;d--}}else Bg(this);this.A-=11+3*c;return a}
function Ci(a,b){a&1<<(b&(2==this.V?15:31))?sg(this):tg(this);this.A-=-1===this.C?3:6;this.N|=2;return a}function Di(a,b){b=1<<(b&(2==this.V?15:31));a&b?sg(this):tg(this);this.A-=-1===this.C?6:8;return a^b}function Ei(a,b){b=1<<(b&(2==this.V?15:31));a&b?sg(this):tg(this);this.A-=-1===this.C?6:8;return a&~b}function Fi(a,b){b=1<<(b&(2==this.V?15:31));a&b?sg(this):tg(this);this.A-=-1===this.C?6:8;return a|b}
function Gi(a,b){if(-1===this.C)return Ci.call(this,a,b);var c=this.V<<3;if(b>=c||b<-c)a=Jg(this,this.fb,this.tb+(b>>(2==this.V?4:5))*this.V);b=1<<(b&(2==this.V?15:31));a&b?sg(this):tg(this);this.A-=6;this.N|=2;return a}function Hi(a,b){if(-1===this.C)return Di.call(this,a,b);var c=this.V<<3;if(b>=c||b<-c)a=Jg(this,this.fb,this.tb+(b>>(2==this.V?4:5))*this.V);b=1<<(b&(2==this.V?15:31));a&b?sg(this):tg(this);this.A-=8;return a^b}
function Ii(a,b){if(-1===this.C)return Ei.call(this,a,b);var c=this.V<<3;if(b>=c||b<-c)a=Jg(this,this.fb,this.tb+(b>>(2==this.V?4:5))*this.V);b=1<<(b&(2==this.V?15:31));a&b?sg(this):tg(this);this.A-=8;return a&~b}function Ji(a,b){if(-1===this.C)return Fi.call(this,a,b);var c=this.V<<3;if(b>=c||b<-c)a=Jg(this,this.fb,this.tb+(b>>(2==this.V?4:5))*this.V);b=1<<(b&(2==this.V?15:31));a&b?sg(this):tg(this);this.A-=8;return a|b}
function Ki(a,b){kg(this,a,b,a-b|0,191,!0);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Eh:this.B.Jb;this.N|=2;return a}function Li(a,b){kg(this,a,b,a-b|0,this.Fb|63,!0);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Eh:this.B.Jb;this.N|=2;return a}
function Mi(a){if(this.Ic){var b=this.Ic,c=this.xj,d=this.ga,e=d>>3&7;b.A=d&7;var f=(3>(d>>6&3)?0:48)+e;(217==c||219==c)&&52<=f&&(f=e<<4|b.A);if(e=qi[c][f]){if(0>ri.indexOf(e)){var f=b.H,g=f.pd;8087==b.da&&(f.ha&16&&g++,f.ha&32&&g++);b.M=f.Z.U;b.I=g-f.Z.ua;-1!==f.C&&(b.N=f.fb.U,b.J=f.C-f.fb.ua);b.P=(c&7)<<8|d}e.call(b)}}this.A-=-1===this.C?2:8;return a}function Ni(a){if(80186>this.da)return Oi.call(this,a);x.call(this,13,0);return a}function cf(a){x.call(this,6);return a}
function Oi(a){ff.call(this);return a}function Pi(a,b){a=Qi.call(this,this.S(),b);80386>this.da&&(this.A-=12);return a}function Ri(a,b){a=this.Fa();a=2==this.V?Qi.call(this,a,b):Si.call(this,a,b);80386>this.da&&(this.A-=12);return a}function Ti(a,b){var c=!1;0>b&&(b=-b|0,c=!c);0>a&&(a=-a|0,c=!c);Ui.call(this,a,b);c&&(this.Ba=~this.Ba+1|0,this.Za=~this.Za+(this.Ba?0:1)|0)}
function Qi(a,b){a=(a<<16>>16)*(b<<16>>16)|0;32767<a||-32768>a?(sg(this),ug(this)):(tg(this),vg(this));this.A-=-1===this.C?9:12;return a&65535}function Si(a,b){Ti.call(this,a,b);this.Za!=this.Ba>>31?(sg(this),ug(this)):(tg(this),vg(this));this.A-=-1===this.C?9:12;return this.Ba}function Vi(a,b){this.A-=14+(-1===this.C?0:2);zg(this);-1!==this.ub.load(b)&&this.ub.qc>=this.Ma&&this.ub.qc>=(b&3)&&(Dg(this),a=this.ub.nb&-256,2<this.V&&(a|=(this.ub.ext&-65281)<<16));return a}
function Qi(a,b){a=(a<<16>>16)*(b<<16>>16)|0;32767<a||-32768>a?(sg(this),ug(this)):(tg(this),vg(this));this.A-=-1===this.C?9:12;return a&65535}function Si(a,b){Ti.call(this,a,b);this.Za!=this.Ba>>31?(sg(this),ug(this)):(tg(this),vg(this));this.A-=-1===this.C?9:12;return this.Ba}function Vi(a,b){this.A-=14+(-1===this.C?0:2);zg(this);-1!==this.ub.load(b)&&this.ub.qc>=this.Ma&&this.ub.qc>=(b&3)&&(Bg(this),a=this.ub.nb&-256,2<this.V&&(a|=(this.ub.ext&-65281)<<16));return a}
function Wi(a,b){if(-1===this.C)return ff.call(this),a;ue(this,this.ja(this.C+this.V));this.A-=this.B.Ye;return b}function Xi(){this.A-=this.B.rk;return this.C}function Yi(a,b){if(-1===this.C)return ff.call(this),a;ve(this,this.ja(this.C+this.V));this.A-=this.B.Ye;return b}function Zi(a,b){if(-1===this.C)return ff.call(this),a;a=this.ja(this.C+this.V);this.Ga.load(a);this.A-=this.B.Ye;return b}
function $i(a,b){if(-1===this.C)return ff.call(this),a;a=this.ja(this.C+this.V);this.Ia.load(a);this.A-=this.B.Ye;return b}function aj(a,b){this.A-=14+(-1===this.C?0:2);if(b&65528&&-1!==this.ub.load(b)&&(7168==(this.ub.nb&7168)||this.ub.qc>=this.Ma)&&this.ub.qc>=(b&3))return Dg(this),this.ub.Ka;zg(this);return a}function bj(a,b){if(-1===this.C)return ff.call(this),a;ne(this,this.ja(this.C+this.V));this.A-=this.B.Ye;return b}
function $i(a,b){if(-1===this.C)return ff.call(this),a;a=this.ja(this.C+this.V);this.Ia.load(a);this.A-=this.B.Ye;return b}function aj(a,b){this.A-=14+(-1===this.C?0:2);if(b&65528&&-1!==this.ub.load(b)&&(7168==(this.ub.nb&7168)||this.ub.qc>=this.Ma)&&this.ub.qc>=(b&3))return Bg(this),this.ub.Ka;zg(this);return a}function bj(a,b){if(-1===this.C)return ff.call(this),a;ne(this,this.ja(this.C+this.V));this.A-=this.B.Ye;return b}
function cj(a,b){this.A-=-1===this.F?-1===this.C?this.B.yk:this.B.xk:this.B.vk;return b}function dj(a,b){switch(this.ga>>3&7){case 4:this.xa=this.D;break;case 5:this.xa=this.I;break;case 6:this.xa=this.L;break;case 7:this.xa=this.G}return b}function nj(a,b){return b}
function oj(a,b){a=this.ga>>3&7;switch(a){case 0:this.xa=this.D;break;case 2:this.xa=this.L;break;case 3:this.xa=this.G;break;default:if(80286==this.da||80386==this.da&&4!=a&&5!=a)x.call(this,6);else switch(a){case 1:this.xa=this.I;break;case 4:this.xa=y(this);break;case 5:this.xa=this.M;break;case 6:this.xa=this.K;break;case 7:this.xa=this.J}}return cj.call(this,0,b)}
function pj(a,b){switch(this.ga>>3&7){case 0:b=this.oa.U;break;case 1:b=this.Z.U;break;case 2:b=this.X.U;break;case 3:b=this.Da.U;break;case 4:if(80386<=this.da){b=this.Ga.U;break}x.call(this,6);b=a;break;case 5:if(80386<=this.da){b=this.Ia.U;break}default:x.call(this,6),b=a}-1!==this.F&&re(this,2);return cj.call(this,0,b)}
@ -366,7 +366,7 @@ al,this.Fa);this.A-=-1===this.F?1:this.B.Cg},Mk,function(){this.lb.call(this,al,
this.I=this.xa;gg(this,a);break;case 2:a=this.L;this.L=this.xa;ne(this,a);break;case 3:a=this.G;this.G=this.xa;ue(this,a);break;case 4:a=y(this);oe(this,this.xa);80386<=this.da?this.Ga.load(a):ve(this,a);break;case 5:a=this.M;this.M=this.xa;80386<=this.da?this.Ia.load(a):gg(this,a);break;case 6:a=this.K;this.K=this.xa;ne(this,a);break;case 7:a=this.J,this.J=this.xa,ue(this,a)}},function(){this.N|=1;this.sa=this.Aa;this.xa=me(this);this.lb.call(this,bl,pk);this.sa=-1},function(){this.A-=3},function(){var a=
this.D;this.D=this.D&~this.R|this.I&this.R;this.I=this.I&~this.R|a&this.R;this.A-=3},function(){var a=this.D;this.D=this.D&~this.R|this.L&this.R;this.L=this.L&~this.R|a&this.R;this.A-=3},function(){var a=this.D;this.D=this.D&~this.R|this.G&this.R;this.G=this.G&~this.R|a&this.R;this.A-=3},function(){var a=this.D,b=y(this);this.D=this.D&~this.R|b&this.R;oe(this,b&~this.R|a&this.R);this.A-=3},function(){var a=this.D;this.D=this.D&~this.R|this.M&this.R;this.M=this.M&~this.R|a&this.R;this.A-=3},function(){var a=
this.D;this.D=this.D&~this.R|this.K&this.R;this.K=this.K&~this.R|a&this.R;this.A-=3},function(){var a=this.D;this.D=this.D&~this.R|this.J&this.R;this.J=this.J&~this.R|a&this.R;this.A-=3},function(){this.D=2==this.V?this.D&-65536|this.D<<24>>24&65535:this.D<<16>>16;this.A-=2},function(){this.L=2==this.V?this.L&-65536|(this.D&32768?65535:0):this.D&-2147483648?-1:0;this.A-=this.B.Qj},function(){qk.call(this,this.Fa(),Pg(this));this.A-=this.B.Tj},function(){this.A-=3},function(){var a=De(this);a&131072&&
3>this.lc?x.call(this,13,0):(we(this,a&-196609),this.A-=this.B.Jc)},function(){if(this.P&131072&&3>this.lc)x.call(this,13,0);else{var a=me(this),a=a&65535|this.P&-65536;Ee(this,a);this.A-=this.B.nc}},function(){var a=this.D>>8&255;a&1?sg(this):tg(this);a&4?(this.resultType&=-3,this.P|=4):(this.resultType&=-3,this.P&=-5);a&16?Ag(this):yg(this);a&64?Dg(this):zg(this);a&128?(this.resultType&=-17,this.P|=128):(this.resultType&=-17,this.P&=-129);this.A-=this.B.Vb},function(){this.D=this.D&-65281|(De(this)&
3>this.lc?x.call(this,13,0):(we(this,a&-196609),this.A-=this.B.Jc)},function(){if(this.P&131072&&3>this.lc)x.call(this,13,0);else{var a=me(this),a=a&65535|this.P&-65536;Ee(this,a);this.A-=this.B.nc}},function(){var a=this.D>>8&255;a&1?sg(this):tg(this);a&4?(this.resultType&=-3,this.P|=4):(this.resultType&=-3,this.P&=-5);a&16?Ag(this):yg(this);a&64?Bg(this):zg(this);a&128?(this.resultType&=-17,this.P|=128):(this.resultType&=-17,this.P&=-129);this.A-=this.B.Vb},function(){this.D=this.D&-65281|(De(this)&
213)<<8;this.A-=this.B.Vb},function(){var a=this.D&-256,b;b=G(this);b=this.Ja(this.Ea.ac(b,1));this.D=a|b;this.A-=this.B.Oh},function(){this.D=this.D&~this.R|se(this,this.Ea,G(this));this.A-=this.B.Oh},function(){var a=G(this),b=this.D;this.fc(this.Ea.bc(a,1),b);this.A-=this.B.Ph},function(){var a=G(this),b=this.D;this.yb(this.Ea.bc(a,this.V),b);this.A-=this.B.Ph},function(){var a=1,b=0,c=this.wa,d=this.B.Qh;this.ha&192&&(a=this.I&c,b=1,d=this.B.Sh,this.ha&256||(this.A-=this.B.Rh));if(a--){var e=
this.Ja(this.Ea.ac(this.K&c,1));this.fc(this.oa.bc(this.J&c,1),e);e=this.P&1024?-1:1;this.K=this.K&~c|this.K+e&c;this.J=this.J&~c|this.J+e&c;this.A-=d;this.I=this.I&~c|this.I-b&c;a&&(jg(this),this.N|=256)}},function(){var a=1,b=0,c=this.wa,d=this.B.Qh;this.ha&192&&(a=this.I&c,b=1,d=this.B.Sh,this.ha&256||(this.A-=this.B.Rh));if(a--){var e=se(this,this.Ea,this.K&c);this.yb(this.oa.bc(this.J&c,this.V),e);e=this.P&1024?-this.V:this.V;this.K=this.K&~c|this.K+e&c;this.J=this.J&~c|this.J+e&c;this.A-=d;
this.I=this.I&~c|this.I-b&c;a&&(jg(this),this.N|=256)}},function(){var a=1,b=0,c=this.wa,d=this.B.Bh;this.ha&192&&(a=this.I&c,b=1,d=this.B.Dh,this.ha&256||(this.A-=this.B.Ch));if(a--){var e=Hg(this,this.Ea,this.K),f=Hg(this,this.oa,this.J);this.F=this.C;Ki.call(this,e,f);e=this.P&1024?-1:1;this.K=this.K&~c|this.K+e&c;this.J=this.J&~c|this.J+e&c;this.I=this.I&~c|this.I-b&c;this.A-=d-this.B.Jb;a&&og(this)==(this.ha&64)&&(jg(this),this.N|=256)}},function(){var a=1,b=0,c=this.wa,d=this.B.Bh;this.ha&192&&
@ -419,8 +419,8 @@ A[182]=function(){this.kc.call(this,dj);switch(this.ga>>3&7){case 0:this.D=this.
A[188]=function(){this.la.call(this,Ai)};A[189]=function(){this.la.call(this,Bi)};
A[190]=function(){this.kc.call(this,dj);switch(this.ga>>3&7){case 0:this.D=this.D&~this.R|(this.D&255)<<24>>24&this.R;break;case 1:this.I=this.I&~this.R|(this.I&255)<<24>>24&this.R;break;case 2:this.L=this.L&~this.R|(this.L&255)<<24>>24&this.R;break;case 3:this.G=this.G&~this.R|(this.G&255)<<24>>24&this.R;break;case 4:this.zc=this.zc&~this.R|this.D<<16>>24&this.R;this.D=this.xa;break;case 5:this.M=this.M&~this.R|this.I<<16>>24&this.R;this.I=this.xa;break;case 6:this.K=this.K&~this.R|this.L<<16>>24&
this.R;this.L=this.xa;break;case 7:this.J=this.J&~this.R|this.G<<16>>24&this.R,this.G=this.xa}this.A-=-1===this.C?3:6};A[191]=function(){re(this,2);this.la.call(this,nj);switch(this.ga>>3&7){case 0:this.D=this.D<<16>>16;break;case 1:this.I=this.I<<16>>16;break;case 2:this.L=this.L<<16>>16;break;case 3:this.G=this.G<<16>>16;break;case 4:this.zc=this.zc<<16>>16;break;case 5:this.M=this.M<<16>>16;break;case 6:this.K=this.K<<16>>16;break;case 7:this.J=this.J<<16>>16}this.A-=-1===this.C?3:6};
var dg=[function(){this.A-=2+(-1===this.C?0:1);return this.Eb.U},function(){this.A-=2+(-1===this.C?0:1);return this.ka.U},function(a){this.N|=2;this.Eb.load(a);this.A-=17+(-1===this.C?0:2);return a},function(a){this.N|=2;-1!==this.ka.load(a)&&(this.gb(this.ka.Lb+4,this.ka.nb|=512),this.ka.type|=512);this.A-=17+(-1===this.C?0:2);return a},function(a){this.N|=2;this.A-=14+(-1===this.C?0:2);if(-1!==this.ub.load(a)&&2048!=(this.ub.nb&2560)&&(this.ub.qc>=this.Ma&&this.ub.qc>=(a&3)||7168==(this.ub.nb&7168)))return Dg(this),
a;zg(this);return a},function(a){this.N|=2;this.A-=14+(-1===this.C?0:2);if(-1!==this.ub.load(a)&&512==(this.ub.nb&2560)&&this.ub.qc>=this.Ma&&this.ub.qc>=(a&3))return Dg(this),a;zg(this);return a},Oi,Oi],Le=[cf,cf,cf,cf,cf,cf,Oi,Oi],gl=[function(a){if(-1===this.C)x.call(this,6);else{a=this.Hc-this.Ib;var b=this.Ib;80286==this.da?b|=-16777216:80386<=this.da&&2!=this.V&&(a|=b<<16);this.ab(this.C+2,b);this.A-=11}return a},function(a){if(-1===this.C)x.call(this,6);else{a=this.bd-this.Nb;var b=this.Nb;
var dg=[function(){this.A-=2+(-1===this.C?0:1);return this.Eb.U},function(){this.A-=2+(-1===this.C?0:1);return this.ka.U},function(a){this.N|=2;this.Eb.load(a);this.A-=17+(-1===this.C?0:2);return a},function(a){this.N|=2;-1!==this.ka.load(a)&&(this.gb(this.ka.Lb+4,this.ka.nb|=512),this.ka.type|=512);this.A-=17+(-1===this.C?0:2);return a},function(a){this.N|=2;this.A-=14+(-1===this.C?0:2);if(-1!==this.ub.load(a)&&2048!=(this.ub.nb&2560)&&(this.ub.qc>=this.Ma&&this.ub.qc>=(a&3)||7168==(this.ub.nb&7168)))return Bg(this),
a;zg(this);return a},function(a){this.N|=2;this.A-=14+(-1===this.C?0:2);if(-1!==this.ub.load(a)&&512==(this.ub.nb&2560)&&this.ub.qc>=this.Ma&&this.ub.qc>=(a&3))return Bg(this),a;zg(this);return a},Oi,Oi],Le=[cf,cf,cf,cf,cf,cf,Oi,Oi],gl=[function(a){if(-1===this.C)x.call(this,6);else{a=this.Hc-this.Ib;var b=this.Ib;80286==this.da?b|=-16777216:80386<=this.da&&2!=this.V&&(a|=b<<16);this.ab(this.C+2,b);this.A-=11}return a},function(a){if(-1===this.C)x.call(this,6);else{a=this.bd-this.Nb;var b=this.Nb;
80286==this.da?b|=-16777216:80386<=this.da&&2!=this.V&&(a|=b<<16);this.ab(this.C+2,b);this.A-=12}return a},function(a){-1===this.C||this.P&131072?x.call(this,6):(this.Ib=this.ia(this.C+2)&(this.R|this.R<<8),a&=65535,this.Hc=this.Ib+a,this.N|=2,this.A-=11);return a},function(a){-1===this.C||this.P&131072?x.call(this,6):(this.Nb=this.ia(this.C+2)&(this.R|this.R<<8),a&=65535,this.bd=this.Nb+a,this.N|=2,this.A-=12);return a},function(){this.A-=2+(-1===this.C?0:1);return this.qa},Oi,function(a){this.P&
131072?x.call(this,6):(Eg(this,a),this.A-=-1===this.C?3:6,this.N|=2);return a},Oi],hl=[Oi,Oi,Oi,Oi,Ci,Fi,Ei,Di];
function il(a){rb.call(this,"ChipSet",a,32768);var b=a.model;b&&!jl[b]&&mb("Unrecognized ChipSet model: "+b);this.da=jl[b]||kl;this.B=[];b=ll(a[ml]);this.B[0]=[b,b];null==b&&(this.N=[360,360],(b=a.floppies)&&b.length&&(this.N=b),nl(this,ol,this.N.length),nl(this,pl,a.monitor||(this.da<nh?"mono":"ega")));b=ll(a[ql]);this.B[1]=[b,b];this.za=this.ha=1;this.da>=nh&&(this.za=this.ha=2);this.P=a.scaleTimers||!1;this.Ma=a.rtcDate;this.Ga=!1;a.sound&&(this.Ea=this.ka=null,window&&(this.Ea=window.AudioContext||
@ -469,7 +469,7 @@ l.$l=function(a,b){var c=this.J&~(Kp|Lp)|(Kd(this.H)&64?Lp:0);t(this,a,null,b,"8
l.Bn=function(a,b,c){t(this,a,b,c,"8042_INBUFF.CMD",null,16384);this.L=b;this.D|=yp;a=0;this.L>=Mp&&(a=this.L^15,this.L=Mp);switch(this.L){case Np:Jp(this,this.K);break;case Op:Ap(this,this.K|Wl);break;case Pp:Ap(this,this.K&~Wl);this.C&&xp(this.C);break;case Qp:this.C&&(a=this.C,a.A=[],r(a)&&Rb(a,"scan codes flushed"));Ap(this,this.K|Wl);Jp(this,Rp);Cp(this,fm|gm);break;case Sp:Jp(this,Tp);break;case Up:Jp(this,this.M);break;case Vp:Jp(this,this.qa);break;case Wp:Jp(this,this.K&Wl?0:Xp);break;case Mp:a&
1&&sf(this.H)}};function Ap(a,b){a.K=b;a.D=a.D&~Yp|b&Zp;a.C&&qp(a.C,!!(b&$p),!(b&Wl))}function Jp(a,b,c){0<=b&&(a.oa=b,c?a.D|=vp:(a.D&=~vp,a.D|=wp))}function Cp(a,b){a.qa=b;uc(a.ma,!!(b&gm));b&fm||sf(a.H)}function aq(a,b){a.da<nh?(qh(a,bq,4),a.aa|=vp):a.K&Wl||a.D&(vp|wp)||(Jp(a,b,!0),cq(a.C),qh(a,bq,120))}function dq(a,b,c,d){var e=a.B[b][1];t(a,c,null,d,"DIPSW-"+b,e,32768);return e}l.om=function(a,b){t(this,a,null,b,"CMOS.ADDR",this.W,4096);return this.W};
l.Rn=function(a,b,c){t(this,a,b,c,"CMOS.ADDR",null,4096);this.W=b;this.ea=b&eq?rh:fq};l.pm=function(a,b){var c=this.W&gq,d=c<=Ll?Ml(this,c):this.A[c];r(this,4352)&&t(this,a,null,b,"CMOS.DATA["+ta(c)+"]",d,!0);null!=b&&c==$m&&(this.A[c]&=hq,d&ep&&oh(this,fp),d&dp&&this.A[Zd]&$d&&dn(this));return d};
l.Sn=function(a,b,c){var d=this.W&gq;r(this,4352)&&t(this,a,b,c,"CMOS.DATA["+ta(d)+"]",null,!0);a=b^this.A[d];if(d<=Ll){if(c=b,d<Ym){var e=!1;this.A[Zd]&bn||(c=10*(c>>4)+(c&15),e=!0);if(d==xm||d==ym)e&&23<c&&(c+=48),this.A[Zd]&Zm||(12>=c?c=12==c?0:c:(c-=116,c=24==c?12:c))}}else c=b;this.A[d]=c;d==Zd&&a&$d&&b&$d&&dn(this)};l.Tk=function(a,b,c){t(this,a,b,c,"NMI");this.ea=b};l.bo=function(a,b,c){t(this,a,b,c,"FPU.CLEAR")};l.co=function(a,b,c){t(this,a,b,c,"FPU.RESET");this.Ic&&ih(this.Ic)};
l.Sn=function(a,b,c){var d=this.W&gq;r(this,4352)&&t(this,a,b,c,"CMOS.DATA["+ta(d)+"]",null,!0);a=b^this.A[d];if(d<=Ll){if(c=b,d<Ym){var e=!1;this.A[Zd]&bn||(c=10*(c>>4)+(c&15),e=!0);if(d==xm||d==ym)e&&23<c&&(c+=48),this.A[Zd]&Zm||(12>=c?c=12==c?0:c:(c-=116,c=24==c?12:c))}}else c=b;this.A[d]=c;d==Zd&&a&$d&&b&$d&&dn(this)};l.Tk=function(a,b,c){t(this,a,b,c,"NMI");this.ea=b};l.bo=function(a,b,c){t(this,a,b,c,"FPU.CLEAR")};l.co=function(a,b,c){t(this,a,b,c,"FPU.RESET");this.Ic&&Wg(this.Ic)};
l.bn=function(a){if(r(this,16)&&dl(this.ca,26,a)){var b=this.H.D>>8;ag(this.H,a,function(a,d){return function(c){d=Kd(a.H)-d;var e,g=a.H.L&255,h=a.H.L>>8,k=a.H.L&255,m=a.H.L>>8;if(2==b||3==b)e=" CH(hour)="+ua(h)+" CL(min)="+ta(g)+" DH(sec)="+ta(m);else if(4==b||5==b)e=" CX(year)="+ua(a.H.I)+" DH(month)="+ta(m)+" DL(day)="+ta(k);g=a.ca;h=d;g.message("INT "+ta(26)+": C="+(lg(g.H)?1:0)+(e||"")+" (cycles="+h+(c?",level="+(c+1):"")+")")}}(this,Kd(this.H)))}return!0};
function fn(a,b){if(a.ka)try{void 0!==b?a.Ga=b:b=!!(a.Ga&&a.H&&a.H.ba.jb);var c=Math.round(wl/Go(a,Ho));if(20>c||2E4<c)b=!1;b?a.I?(a.I.frequency.value=c,r(a,33554432)&&Rb(a,"speaker set to "+c+"hz",!0)):(a.I=a.ka.createOscillator(),a.I&&(a.I.type="number"==typeof a.I.type?1:"square",a.I.connect(a.ka.destination),a.I.frequency.value=c,"start"in a.I?a.I.start(0):a.I.noteOn(0),r(a,33554432)&&Rb(a,"speaker on at "+c+"hz",!0))):a.I&&("stop"in a.I?a.I.stop(0):a.I.noteOff(0),a.I.disconnect(),delete a.I,
r(a,33554432)&&Rb(a,"speaker off at "+c+"hz",!0))}catch(d){a.Ca("AudioContext exception: "+d.message),a.ka=null}else b&&Rb(a,"BEEP",33554432)}var sl=5150,kl=5150.9,nh=5170,tl=5160.101,Fl=5180,jl={5150:sl,5160:5160,5170:nh,att6300:tl,mpc1600:5150.101,z150:5160.15,compaq:5150.102,other:kl};jl.deskpro386=Fl;
@ -542,9 +542,9 @@ $r[1|Lr]=function(a){a+=this.H;var b=a&-2;a=this.controller.ib&(b==a?16711935:-1
$r[98]=function(a,b){a+=this.H;b=ws[b&15];b&=this.controller.wb;b=b&this.controller.Bb|this.controller.wb&~this.controller.Bb;b=b&this.controller.ib|this.Y[a]&~this.controller.ib;this.Y[a]!=b&&(this.Y[a]=b,this.Oa=!0)};$r[162]=function(a,b){a+=this.H;b=ws[b&15];b|=this.controller.wb;b=b&this.controller.Bb|this.controller.wb&~this.controller.Bb;b=b&this.controller.ib|this.Y[a]&~this.controller.ib;this.Y[a]!=b&&(this.Y[a]=b,this.Oa=!0)};
$r[226]=function(a,b){a+=this.H;b=ws[b&15];b^=this.controller.wb;b=b&this.controller.Bb|this.controller.wb&~this.controller.Bb;b=b&this.controller.ib|this.Y[a]&~this.controller.ib;this.Y[a]!=b&&(this.Y[a]=b,this.Oa=!0)};$r[3]=function(a,b){a+=this.H;b=b>>this.controller.Sc|b<<8-this.controller.Sc&255;b=(b|b<<8|b<<16|b<<24)&this.controller.Bb;b=this.controller.Gf&b|this.controller.wb&~b;b=b&this.controller.ib|this.Y[a]&~this.controller.ib;this.Y[a]!=b&&(this.Y[a]=b,this.Oa=!0)};
function Q(a,b,c,d,e){rb.call(this,"Video",a,262144);var f=this;this.cd=Wa("Gecko/");var g=["","moz","ms","webkit"];this.da=a.model;var h=xs[this.da]||xs.mda;this.La=h[0];this.vd=a.memory||0;this.pd=a.switches;this.aa=a.mode;if(null==this.aa||null==ys[this.aa])this.aa=h[1];this.Ob=a.charCols;this.Hc=a.charRows;if(void 0===this.Ob||void 0===this.Hc)this.Ob=ys[this.aa][0],this.Hc=ys[this.aa][1];this.X=a.screenWidth;this.ha=a.screenHeight;this.ed=a.scale;this.Sd=12<=Math.round(this.X/this.Ob);this.N=
b;this.L=c;this.D=(this.tg=d)||b||null;this.lc=a.screenColor||"black";this.od=(1-(a.flicker||0)).toString();this.Fb=!1;b&&(b.style.backgroundColor=this.lc);e&&(e.style.backgroundColor=this.lc);b=a.smoothing;(c=Xa("smoothing"))&&(b="true"==c);if(null!=b)for(c=0;c<g.length;c++)if(d=(d=g[c])?d+"ImageSmoothingEnabled":"imageSmoothingEnabled",void 0!==this.L[d]){this.L[d]=b;break}this.qd=a.touchScreen;this.Ic=zs;this.G=null;this.Rd=a.autoLock;this.bb=this.Qb=0;this.qa=[];this.ga=Array(this.La==oq?256:
16);this.Ia=!1;this.lb=null;if(this.Ba=e)if(this.lb=e.requestFullscreen||e.msRequestFullscreen||e.mozRequestFullScreen||e.webkitRequestFullscreen){for(c=0;c<g.length;c++)if(d=g[c]+"fullscreenchange","on"+d in document){document.addEventListener(d,function(){As(f,!!(document.fullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement))},!1);break}for(c=0;c<g.length;c++)if(d=g[c]+"fullscreenerror","on"+d in document){document.addEventListener(d,function(){As(f,
null)},!1);break}}this.D&&(this.D.onfocus=function(){return f.Fg(!0)},this.D.onblur=function(){return f.Fg(!1)},this.D.re=this.D.requestPointerLock||this.D.mozRequestPointerLock||this.D.webkitRequestPointerLock,this.D.A=this.D.exitPointerLock||this.D.mozExitPointerLock||this.D.webkitExitPointerLock,this.D.re&&(e=function(){f.If(document.pointerLockElement===f.D||document.mozPointerLockElement===f.D||document.webkitPointerLockElement===f.D)},"onpointerlockchange"in document?document.addEventListener("pointerlockchange",
b;this.L=c;this.D=(this.tg=d)||b||null;this.lc=a.screenColor||"black";this.od=(1-(Xa("flicker")||a.flicker||0)).toString();this.Fb=!1;b&&(b.style.backgroundColor=this.lc);e&&(e.style.backgroundColor=this.lc);b=a.smoothing;(c=Xa("smoothing"))&&(b="true"==c);if(null!=b)for(c=0;c<g.length;c++)if(d=(d=g[c])?d+"ImageSmoothingEnabled":"imageSmoothingEnabled",void 0!==this.L[d]){this.L[d]=b;break}this.qd=a.touchScreen;this.Ic=zs;this.G=null;this.Rd=a.autoLock;this.bb=this.Qb=0;this.qa=[];this.ga=Array(this.La==
oq?256:16);this.Ia=!1;this.lb=null;if(this.Ba=e)if(this.lb=e.requestFullscreen||e.msRequestFullscreen||e.mozRequestFullScreen||e.webkitRequestFullscreen){for(c=0;c<g.length;c++)if(d=g[c]+"fullscreenchange","on"+d in document){document.addEventListener(d,function(){As(f,!!(document.fullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement))},!1);break}for(c=0;c<g.length;c++)if(d=g[c]+"fullscreenerror","on"+d in document){document.addEventListener(d,
function(){As(f,null)},!1);break}}this.D&&(this.D.onfocus=function(){return f.Fg(!0)},this.D.onblur=function(){return f.Fg(!1)},this.D.re=this.D.requestPointerLock||this.D.mozRequestPointerLock||this.D.webkitRequestPointerLock,this.D.A=this.D.exitPointerLock||this.D.mozExitPointerLock||this.D.webkitExitPointerLock,this.D.re&&(e=function(){f.If(document.pointerLockElement===f.D||document.mozPointerLockElement===f.D||document.webkitPointerLockElement===f.D)},"onpointerlockchange"in document?document.addEventListener("pointerlockchange",
e,!1):"onmozpointerlockchange"in document?document.addEventListener("mozpointerlockchange",e,!1):"onwebkitpointerlockchange"in document&&document.addEventListener("webkitpointerlockchange",e,!1)));(this.xa=a.fontROM)&&"json"!=wa(this.xa)&&(this.xa=Pa()+"/api/v1/dump?file="+this.xa+"&format=bytes")}ba(Q,rb);l=Q.prototype;
l.uc=function(a,b,c,d){var e=this;this.ma=b;this.H=c;this.ca=d;c=(c=xs[this.da])&&c[0];c!==Bs&&(Tc(b,this,Cs),Xc(b,this,Ds));c!==Es&&(Tc(b,this,Fs),Xc(b,this,Gs));this.La>=mq&&(Tc(b,this,Hs),Xc(b,this,Is));this.La==oq&&(Tc(b,this,Js),Xc(b,this,Ks));d&&Il(d,262144,function(a){if(e.B)if(a[0]){var b=e.B;if(b.fd){var c,d,f,g=!1,h=8,J=8,H=-1,I=b.video.F>>3;for(c=0;c<a.length;c++){var P=a[c];if(c){var L=P.charAt(0);d=oa(P.substr(1),16);switch(L){case "l":h=d;break;case "n":1<=d&&8>=d&&(J=d,g=!0);break;
case "p":0<=d&&3>=d&&(H=d);break;case "w":d<I&&(I=d);break;default:b.ca.O("unrecognized argument: "+P)}}else f=oa(P,16)}void 0===f?f=b.B||0:f>=b.bb&&(f-=b.bb);a="";for(c=0;c<h;c++){P=q(b.bb+f)+":";for(d=0;d<J&&f<b.fd.length;d++)L=b.fd[f++],P+=" "+(0>H?q(L):ra(L>>(H<<3),8));g&&(f+=I-J);a&&(a+="\n");a+=P}a&&b.ca.O(a);b.B=f}else b.ca.O("no buffer")}else e.ca.O("BIOSMODE: "+ta(e.ka)),b=e.B,Xr(b,"CRTC",b.ec,b.Xa,b.ig),b.La>=mq&&(Xr(b," GRC",b.Dd,b.Cd,b.Yg),Xr(b," SEQ",b.Ed,b.ee,b.Zg),Xr(b," ATC",b.Bd,
@ -563,7 +563,7 @@ function gt(a,b){if(1==b)return a.ga[0]=ht[bt],a.ga[1]=ht[$s],a.ga;if(2==b){var
(c.Cc[20]&12)<<4,c.Cc[16]&128&&(f&=-49,f|=(c.Cc[20]&3)<<4),f=d[f],g=f<<2&252,h=f>>4&252,f=f>>10&252):(g=(f&4?170:0)|(f&32?85:0),h=(f&2?170:0)|(f&16?85:0),f=(f&1?170:0)|(f&8?85:0)),a.ga[e]=[g,h,f,255]}a.Ia=!0}return a.ga}function nq(a,b,c,d){a.yb=b;a.Ya=c;a.Ea=d}
function Xs(a,b){var c=!1;if(window&&a.yb&&(!b||a.I)){var d=0,e=a.Ea?a.Ea:8,f=gt(a);null!=a.Ya[0]&&lt(a,mt,a.Ya[0],d,e,8,a.yb,f)&&(c=!0);d=a.Ea?0:2048;e=a.Ea?a.Ea:9;null!=a.Ya[1]&&(lt(a,nt,a.Ya[1],d,e,14,a.yb,ot,pt)&&(c=!0),a.Ea&&lt(a,a.La,a.Ya[1],0,a.Ea,14,a.yb,f)&&(c=!0))}b||(a.Z=-1,a.za=-1,a.sa=0);return c}function lt(a,b,c,d,e,f,g,h,k){var m=!1;null!=c&&(qt(a,b,c,d,e,f,g,h,k)&&(m=!0),a.Sd&&qt(a,b<<1,c,d,e,f,g,h,k)&&(m=!0));return m}
function qt(a,b,c,d,e,f,g,h,k){var m=!1,p=b&1?0:1,v=a.qa[b],u=16>h.length?h.length:16;v||(v={Fc:e<<p,Gc:f<<p,Fe:Array(u),Ui:h.slice(0,u),jf:k,Wg:Array(u)});for(k=0;k<u;k++){var F=h[k],J=v.Fe[k]?v.Ui[k]:[];if(F[0]!==J[0]||F[1]!==J[1]||F[2]!==J[2]){var m=v,J=k,H=p,I=c,P=d,L=e,ka=f,Z=g,jb=[0,0,0,0],qa=document.createElement("canvas");qa.width=m.Fc<<4;qa.height=m.Gc<<4;var db=qa.getContext("2d"),Oa,kb,eb,sc=8>ka||!P?ka:8,lb=db.createImageData(m.Fc,m.Gc);for(Oa=0;256>Oa;Oa++){for(eb=0;eb<ka;eb++)for(var gf=
m.jf&&J&1&&eb>=ka-2,Nd=Z[eb<sc?I+Oa*sc+eb:P+Oa*sc+eb-sc],hf=0;hf<=H;hf++)for(kb=0;kb<L;kb++){var Bg=kb<<H,jf=(eb<<H)+hf,Cg=gf||Nd&128>>(8<=kb&&192<=Oa&&223>=Oa?7:kb)?F:jb;rt(lb,Bg,jf,Cg);H&&rt(lb,Bg+1,jf,Cg)}db.putImageData(lb,(Oa&15)*m.Fc,(Oa>>4)*m.Gc)}m.Fe[J]="#"+q(F[0],2)+q(F[1],2)+q(F[2],2);m.Ui[J]=F;m.Wg[J]=qa;m=!0}}a.qa[b]=v;return m}function st(a){0<a.sa||0<=a.Z?0>a.za&&(a.za=0):a.za=-1}
m.jf&&J&1&&eb>=ka-2,Nd=Z[eb<sc?I+Oa*sc+eb:P+Oa*sc+eb-sc],hf=0;hf<=H;hf++)for(kb=0;kb<L;kb++){var Cg=kb<<H,jf=(eb<<H)+hf,Dg=gf||Nd&128>>(8<=kb&&192<=Oa&&223>=Oa?7:kb)?F:jb;rt(lb,Cg,jf,Dg);H&&rt(lb,Cg+1,jf,Dg)}db.putImageData(lb,(Oa&15)*m.Fc,(Oa>>4)*m.Gc)}m.Fe[J]="#"+q(F[0],2)+q(F[1],2)+q(F[2],2);m.Ui[J]=F;m.Wg[J]=qa;m=!0}}a.qa[b]=v;return m}function st(a){0<a.sa||0<=a.Z?0>a.za&&(a.za=0):a.za=-1}
function ft(a){if(a.I){for(var b=10;15>=b;b++)if(null==a.B.Xa[b])return;var c=a.B.Xa[10],b=c&31,d=a.B.Xa[11]&vs[11],e=a.B.Xa[9]&vs[9],f=!1;a.B===a.A&&(f=!0,7!=e||4!=b||d||(d=7));if(c&32||b>d&&!f||b>e)tt(a);else{c=a.B.Xa[15];c|=(a.B.Xa[14]&a.B.hg)<<8;a.Z!=c&&(tt(a),a.Z=c);d=d-b+1;if(a.Gd!=b||a.Vc!=d)a.Gd=b,a.Vc=d;a.va=e+1;st(a)}}}
function tt(a){if(0<=a.Z){if(void 0!==a.M){var b=ut<<8,c=a.M[a.Z];if(c&b){var c=c&~b,b=a.Z%a.F,d=a.Z/a.F|0;a.I&&a.qa[a.I]&&(a.Da&&vt(a,b,d,c,a.Da),vt(a,b,d,c));a.M[a.Z]=c}}a.Z=-1}}
function wt(a){var b,c=a.B;a.bd=!1;var d=c.Cd[5];if(null!=d){b=Ir;var e=Kr,f=c.Cd[3]&31;switch(d&3){case 0:if(f){e=Kr|32;switch(f&24){case 8:e=Kr|96;break;case 16:e=Kr|160;break;case 24:e=Kr|224}c.Sc=f&7}break;case 1:e=1;break;case 2:switch(f&24){default:e=2;break;case 8:e=98;break;case 16:e=162;break;case 24:e=226}break;case 3:a.La==oq&&(e=3,c.Sc=f&7)}d&8&&(b=1280);c=c.ee[4];null!=c&&(c&4||(b|=Jr,e|=Lr),d&64&&(c&8&&(b|=16384,e|=4),a.bd=!0));b|=e}return b}
@ -601,7 +601,7 @@ xr[oq]=["VGA",980,753664,16384,262144,7];
var zs=0,Ns=1,Ms=2,Ss=[[1036,1038,1033],[1037,1032,1039],[1035,1040,1034]],Cs={948:Q.prototype.Hm,949:Q.prototype.Gm,952:Q.prototype.Im,954:Q.prototype.Jm},Ds={948:Q.prototype.no,949:Q.prototype.mo,952:Q.prototype.oo},Fs={980:Q.prototype.lm,981:Q.prototype.km,984:Q.prototype.mm,985:Q.prototype.jm,986:Q.prototype.nm},Gs={980:Q.prototype.Pn,981:Q.prototype.On,984:Q.prototype.Qn,985:Q.prototype.Nn},Hs={960:Q.prototype.fm,961:Q.prototype.wl,962:Q.prototype.Tm,964:Q.prototype.Rm,965:Q.prototype.Qm,974:Q.prototype.Am,
975:Q.prototype.zm},Is={954:Q.prototype.Sk,960:Q.prototype.Rk,961:Q.prototype.Rk,962:Q.prototype.po,964:Q.prototype.vo,965:Q.prototype.uo,970:Q.prototype.io,972:Q.prototype.ho,974:Q.prototype.fo,975:Q.prototype.eo,986:Q.prototype.Sk},Js={963:Q.prototype.Um,966:Q.prototype.sm,967:Q.prototype.tm,969:Q.prototype.rm,970:Q.prototype.Vm,972:Q.prototype.Wm},Ks={963:Q.prototype.xo,966:Q.prototype.Vn,967:Q.prototype.Wn,968:Q.prototype.Xn,969:Q.prototype.Un};
cb(function(){for(var a=Bb(document,"pcx86","video"),b=0;b<a.length;b++){var c=a[b],d=Cb(c),e=document.createElement("canvas");if(!e||!e.getContext){c.innerHTML="<br/>Missing &lt;canvas&gt; support. Please try a newer web browser.";break}e.setAttribute("class","pcjs-canvas");e.setAttribute("width",d.screenWidth);e.setAttribute("height",d.screenHeight);e.style.height="auto";0<=Qa().indexOf("MSIE")&&(c.onresize=function(a,b,c,d){return function(){b.style.height=(a.clientWidth*d/c|0)+"px"}}(c,e,d.screenWidth,
d.screenHeight),c.onresize(null));var f=+(d.aspect||Xa("aspect"));f&&.3<=f&&3.33>=f&&(bb("onresize",function(a,b,c){return function(){b.style.height=(a.clientWidth/c|0)+"px"}}(c,e,f)),window.onresize());c.appendChild(e);f=document.createElement("textarea");Wa("iOS")&&(f.setAttribute("autocapitalize","off"),f.setAttribute("autocorrect","off"),f.style.fontSize="16px");c.appendChild(f);var g=e.getContext("2d"),d=new Q(d,e,g,f,c);Ab(d,c)}});
d.screenHeight),c.onresize(null));var f=+(Xa("aspect")||d.aspect);f&&.3<=f&&3.33>=f&&(bb("onresize",function(a,b,c){return function(){b.style.height=(a.clientWidth/c|0)+"px"}}(c,e,f)),window.onresize());c.appendChild(e);f=document.createElement("textarea");Wa("iOS")&&(f.setAttribute("autocapitalize","off"),f.setAttribute("autocorrect","off"),f.style.fontSize="16px");c.appendChild(f);var g=e.getContext("2d"),d=new Q(d,e,g,f,c);Ab(d,c)}});
function xu(a){rb.call(this,"ParallelPort",a,4194304);this.G=a.adapter;switch(this.G){case 1:this.D=956;this.C=7;break;case 2:this.D=888;this.C=7;break;case 3:this.D=632;this.C=5;break;default:mb("Unrecognized parallel adapter #"+this.G);return}this.A=this.B=null;a=a.binding;"console"==a?this.B="":yb(this,a,yu)}ba(xu,rb);l=xu.prototype;l.Cb=function(a,b,c){switch(b){case yu:return this.na[b]=this.A=c,!0}return!1};
l.uc=function(a,b,c,d){this.ma=b;this.H=c;this.ca=d;this.W=bc(a,"ChipSet");Tc(b,this,zu,this.D);Xc(b,this,Au,this.D);Ob(this)};l.Xb=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.Wb=function(a){return a?this.save():!0};l.reset=function(){Bu(this)};l.save=function(){var a=new eg(this),b=0,c=[];c[b++]=this.F;c[b++]=this.Mb;c[b]=this.lf;a.set(0,c);return a.data()};l.restore=function(a){return Bu(this,a[0])};
function Bu(a,b){var c=0;b||(b=[0,0,0]);a.F=b[c++];a.Mb=b[c++];a.lf=b[c];return!0}l.um=function(a,b){var c=this.F;t(this,a,null,b,"DATA",c);return c};l.Sm=function(a,b){var c=this.Mb;t(this,a,null,b,"STAT",c);return c};l.qm=function(a,b){var c=this.lf;t(this,a,null,b,"CTRL",c);return c};
@ -802,7 +802,7 @@ function mA(a,b){var c;if(b&&"?"==b[1])a.O("register commands:"),a.O("\tr\tdump
a.O("ST"+f+": "+Aa(e[2].toFixed(15),24,!0)+" "+q(e[4])+","+q(e[3])+" ["+e[0]+":"+DB[e[1]]+"]")}a.O(" B3SSS210ESPUOZDI xxxIRRPPIxPUOZDI");a.O("SW: "+ra(d,16)+" ("+ua(d)+") CW: "+ra(b,16)+" ("+ua(b)+")");return}if("p"==e)d=80286<=a.H.da;else{f=e.indexOf("=");if(0<f)b=e.substr(f+1),e=e.substr(0,f);else if(2<b.length)b=b[2];else{a.O("missing value for "+b[1]);return}g=Ay(a,b);if(void 0===g)return;f=!0;h=e.toUpperCase();"E"==h.charAt(0)&&4>=a.sa&&(h=null);switch(h){case "AL":a.H.D=
a.H.D&-256|g&255;break;case "AH":a.H.D=a.H.D&-65281|g<<8&255;break;case "AX":a.H.D=a.H.D&-65536|g&65535;break;case "BL":a.H.G=a.H.G&-256|g&255;break;case "BH":a.H.G=a.H.G&-65281|g<<8&255;break;case "BX":a.H.G=a.H.G&-65536|g&65535;break;case "CL":a.H.I=a.H.I&-256|g&255;break;case "CH":a.H.I=a.H.I&-65281|g<<8&255;break;case "CX":a.H.I=a.H.I&-65536|g&65535;break;case "DL":a.H.L=a.H.L&-256|g&255;break;case "DH":a.H.L=a.H.L&-65281|g<<8&255;break;case "DX":a.H.L=a.H.L&-65536|g&65535;break;case "SP":oe(a.H,
y(a.H)&-65536|g&65535);break;case "BP":a.H.M=a.H.M&-65536|g&65535;break;case "SI":a.H.K=a.H.K&-65536|g&65535;break;case "DI":a.H.J=a.H.J&-65536|g&65535;break;case "DS":ue(a.H,g);break;case "ES":ve(a.H,g);break;case "SS":ne(a.H,g);break;case "CS":gg(a.H,g);a.N=Fy(a,z(a.H),a.H.Z.U);break;case "IP":case "EIP":B(a.H,g);a.N=Fy(a,z(a.H),a.H.Z.U);break;case "PC":case "PS":Ee(a.H,g);break;case "C":g?sg(a.H):tg(a.H);break;case "P":g?(e=a.H,e.resultType&=-3,e.P|=4):(e=a.H,e.resultType&=-3,e.P&=-5);break;case "A":g?
Ag(a.H):yg(a.H);break;case "Z":g?Dg(a.H):zg(a.H);break;case "S":g?(e=a.H,e.resultType&=-17,e.P|=128):(e=a.H,e.resultType&=-17,e.P&=-129);break;case "I":g?(e=a.H,e.P|=512):(e=a.H,e.P&=-513);break;case "D":g?(e=a.H,e.P|=1024):(e=a.H,e.P&=-1025);break;case "V":g?ug(a.H):vg(a.H);break;default:var k=!0;if(80286<=a.H.da)switch(k=!1,h){case "MS":Eg(a.H,g);break;case "TR":-1===a.H.ka.load(g)&&(f=!1);break;default:if(k=!0,80386<=a.H.da)switch(k=!1,h){case "EAX":a.H.D=g;break;case "EBX":a.H.G=g;break;case "ECX":a.H.I=
Ag(a.H):yg(a.H);break;case "Z":g?Bg(a.H):zg(a.H);break;case "S":g?(e=a.H,e.resultType&=-17,e.P|=128):(e=a.H,e.resultType&=-17,e.P&=-129);break;case "I":g?(e=a.H,e.P|=512):(e=a.H,e.P&=-513);break;case "D":g?(e=a.H,e.P|=1024):(e=a.H,e.P&=-1025);break;case "V":g?ug(a.H):vg(a.H);break;default:var k=!0;if(80286<=a.H.da)switch(k=!1,h){case "MS":Eg(a.H,g);break;case "TR":-1===a.H.ka.load(g)&&(f=!1);break;default:if(k=!0,80386<=a.H.da)switch(k=!1,h){case "EAX":a.H.D=g;break;case "EBX":a.H.G=g;break;case "ECX":a.H.I=
g;break;case "EDX":a.H.L=g;break;case "ESP":oe(a.H,g);break;case "EBP":a.H.M=g;break;case "ESI":a.H.K=g;break;case "EDI":a.H.J=g;break;case "FS":a.H.Ga.load(g);break;case "GS":a.H.Ia.load(g);break;case "CR0":a.H.qa=g;jk.call(a.H,g);break;case "CR2":a.H.qd=g;break;case "CR3":a.H.Vc=g;Ge.call(a.H,g);break;default:k=!0}}if(k){a.O("unknown register: "+e);return}}if(!f){a.O("invalid value: "+b);return}Id(a.H);a.O("updated registers:")}}a.O(wB(a,d));c&&(a.N=Fy(a,z(a.H),a.H.Z.U),nA(a,cz(a.N)))}}
function EB(a,b){b=Ba(b);var c=b.match(/^(['"])(.*?)\1$/);c?a.O(fA(a,c[2])):Ay(a,b,!1)}function FB(a,b,c){for(var d=null,e=b.Ha,f=e,g=1;6>=g&&e;g++){if(2<g){b.Ha=e;b.ya=null;var h=vA(a,b);if(0<=h.indexOf("CALL")||c&&0<=h.indexOf("INT")){var k=h.indexOf(" ");if(e+(h.indexOf(" ",k+1)-k-1)/2==f){d=h;break}}}e--}b.Ha=f;return d}function GB(a,b,c){var d="t"!=b;c=uy(a,c,null,!0)||1;var e=1==c?0:1;"tc"==b&&(e=c,c=1);$a(c,function(){return Qb(a,!0)&&dz(a,e,d,!1)},function(){Id(a.H);Qb(a,!1)})}
function mB(a,b,c){if(a.gh=b)null!=a.uj&&(a.Hb=a.uj),null!=a.tj&&(a.cc=a.tj),a.uj=a.Hb,a.tj=a.cc;a.Je=c||0}
@ -813,23 +813,23 @@ mz(a,g[1],!0);if(v)if(a.ea=v,void 0===g[2])a.O("begin assemble at "+cz(v)),a.ga=
a.O("\tbc [a]\tclear breakpoint at addr [a]"),a.O("\tbl\tlist all breakpoints"),a.O("\tbn [n]\tbreak after [n] instruction(s)");else{var P=J.charAt(1);if("l"==P){var L;L=0+tA(a,a.B);L+=tA(a,a.W);(L+=tA(a,a.L))||a.O("no breakpoints")}else if("n"==P)a.xa=uy(a,H),a.O("break after "+a.xa+" instruction(s)");else if(void 0===H)a.O("missing breakpoint address");else{var ka={};if("*"!=H&&(ka=mz(a,H,!0,!0),!ka))break a;H=null==ka.Ha?H:ua(ka.Ha);"c"==P?null==ka.Ha?(Gy(a),a.O("all breakpoints cleared")):bz(a,
a.B,ka)||bz(a,a.W,ka)||bz(a,a.L,ka)||a.O("breakpoint missing: "+cz(ka)):"i"==P?a.O("breakpoint "+(Sc(a.ma,ka.Ha)?"enabled":"cleared")+": port "+H+" (input)"):"o"==P?a.O("breakpoint "+(Wc(a.ma,ka.Ha)?"enabled":"cleared")+": port "+H+" (output)"):null!=ka.Ha&&(pz(a,ka,I),"p"==P?a.sd(a.B,ka):"r"==P?a.sd(a.W,ka):"w"==P?a.sd(a.L,ka):a.O("unknown breakpoint command: "+P))}}}break;case "c":CB(a.pa);break;case "d":a:{var Z=g,jb,qa=Z[0],db=Z[1],Oa=Z[2],kb=Z[3];if("?"==db){var eb="";for(jb in Xb)a.Da[jb]&&
(eb&&(eb+=","),eb+=jb);eb+=",state,symbols";a.O("dump memory commands:");a.O("\tdb [a] [#] dump # bytes at address a");a.O("\tdw [a] [#] dump # words at address a");a.O("\tdd [a] [#] dump # dwords at address a");a.O("\tdh [#] [#] dump # instructions from history");a.O("\tdi [#] dump descriptor info for IDT #");a.O("\tds [#] dump descriptor info for selector #");eb.length&&a.O("dump extension commands:\n\t"+eb)}else if("state"==db){var sc=HB(a.pa,!0);sc?"console"==Oa?console.log(sc):
(CB(a.pa),a.O(sc)):a.O("powerOff() error")}else if("symbols"==db)for(var lb=0;lb<a.F.length;lb++){var gf=a.F[lb],Nd;for(Nd in gf.Id)if("."!=Nd.charAt(0)){var hf=gf.Id[Nd],Bg=hf.o;if(void 0!==Bg){var jf=hf.s;void 0===jf&&(jf=gf.U);var Cg=gf.Id[Nd].l;Cg&&(Nd=Cg);a.O(Sy(Bg,jf)+" "+Nd)}}}else{if("ds"==qa||"dg"==qa||"dl"==qa)qa="d",Z=[qa,"desc",db];"d"==qa&&"page"==db&&(qa="dp",Z.shift());if("dp"==qa){Z.shift();var Cm=Z[0];if(Cm){var Wg=a.Sb(mz(a,Cm));if(-1===Wg)a.O("invalid address: "+Cm);else{var tf,
Ra=null;if(80386<=a.H.da){var uf=a.ma,Ra={};Ra.Pk=(Wg&-4194304)>>>20;Ra.Xi=a.H.Vc+Ra.Pk;Ra.ob=uf.aa[(Ra.Xi&uf.C)>>>uf.A];Ra.Fj=Ra.ob.Od(Ra.Pk);Ra.Qk=(Wg&4190208)>>>10;Ra.Yi=(Ra.Fj&-4096)+Ra.Qk;Ra.pb=uf.aa[(Ra.Yi&uf.C)>>>uf.A];Ra.Gj=Ra.pb.Od(Ra.Qk);Ra.zl=(Ra.Gj&-4096)+(Wg&4095)}if(tf=Ra){a.O("linear PDE addr PDE PTE addr PTE physical");a.O("--------- ---------- -------- ---------- -------- ----------");var ye="%"+q(Wg),ye=ye+(" %%"+rz(tf.Xi,tf.Fj)),ye=
ye+(" %%"+rz(tf.Yi,tf.Gj,!0)),ye=ye+(" %%"+q(tf.zl));a.O(ye)}else a.O("unsupported operation")}}else a.O("missing address")}else{if("d"==qa){if("disk"==db){Z[0]="l";Z[1]="json";BB(a,Z);break a}for(jb in Xb)if(Z[1]==jb){var Rt=a.Da[jb];Rt?(Z.shift(),Z.shift(),Rt(Z)):a.O("no dump registered for "+db);break a}db||(qa=a.lb||"db")}if("dh"==qa){var St=db,Tt=Oa,Xg=kb,Xg=void 0===Xg?"history":Xg,Ut="",Vt=0,Nc=a.oa,md=a.X;if(md.length){var wc=+St||a.Ya,Yg=+Tt||10;isNaN(wc)?wc=Yg:Ut="more ";wc>md.length&&
(a.O("note: only "+md.length+" available"),wc=md.length);Nc-=wc;0>Nc&&(null==md[md.length-1].U?(wc=Nc+wc,Nc=0):Nc+=md.length);var Dm=[];"call"==Tt&&(Yg=1E5,Dm=["CALL"]);for(void 0!==St&&a.O(wc+" instructions earlier:");0<Yg&&Nc!=a.oa;){var nd=md[Nc++];if(null==nd.U)break;var Zg=Fy(a,nd.Ha,nd.U,nd.ya,nd.type,nd.Hb,nd.cc),Wt=wc--;null!=nd.mj&&"cycles"==Xg&&(Wt=nd.mj);var Xt=vA(a,Zg,Xg,Wt);(!Dm.length||0<=Xt.indexOf(Dm[0]))&&a.O(Xt);Zg.Je&&(Nc+=Zg.Je,Yg-=Zg.Je,wc-=Zg.Je);Nc>=md.length&&(Nc=0);a.Ya=wc;
Vt++;Yg--}}Vt||(a.O("no "+Ut+"history available"),a.Ya=void 0)}else if("di"==qa){Z.shift();var Em=Z[0];if(Em){var $g=uy(a,Em);if(void 0===$g||0>$g||255<$g)a.O("invalid vector: "+Em);else{var Yt="&",Zt=!!(a.H.qa&1),$t=!1,ej=a.H.Nb+($g<<(Zt?3:2)),au=a.H.ja(ej+0),yC=a.H.ja(ej+2);Zt&&(Yt="#",a.H.ja(ej+4)&2048&&($t=!0,au|=a.H.ja(ej+6)<<16));a.O("dumpIDT("+ua($g)+"): "+Yt+q(yC,4)+":"+q(au,$t?8:4))}}else a.O("no IDT vector")}else if("dt"==qa)Z.shift(),a.O("no information");else if(qa[1]&&0>"abwd".indexOf(qa[1]))a.O("unrecognized dump command");
else{a.lb=qa;var ze=mz(a,db);if(ze&&(null!=ze.U||null!=ze.ya)){var vf=0;if(Oa){if("l"==Oa.charAt(0))Oa=Oa.substr(1)||kb,vf=uy(a,Oa);else{var bu=mz(a,Oa);if(!bu)break a;vf=bu.Ha-ze.Ha+1}if(0>vf||65536<vf)vf=0}var Ae="",Fm=!1,wf="dd"==qa?4:"dw"==qa?2:1,ah=wf*vf||128,Gm=ah+15>>4||1,Hm=4==wf?16:a.D;"a"==qa[1]&&(Fm=!0,Gm=25,Hm=160,ah=Gm*Hm);for(;Gm--&&0<ah;){var bh=0,Im=0,ch,Jm="",fj="",db=cz(ze);for(ch=Hm;0<ch&&0<ah;ch--){var gj=a.Ja(ze,1),bh=bh|gj<<(Im++<<3);Im==wf&&(Jm+=8==a.D?sa(bh,3*wf):q(bh,2*wf),
Jm+=1==wf?9==ch?"-":" ":" ",bh=Im=0);fj+=32<=gj&&128>gj?String.fromCharCode(gj):Fm?"":".";ah--}Ae&&(Ae+="\n");Ae=Fm?Ae+fj:Ae+(db+" "+Jm+Aa(fj,fj.length+3*ch+1,!0))}Ae&&a.O(Ae.replace(/\s*$/,""));a.Aa=ze}}}}}break;case "e":if("else"==g[0])break;var hj=1,cu=255,du=a.Ja,eu=a.fc;"ew"==g[0]&&(hj=2,cu=65535,du=a.Xc,eu=a.nl);var fu=hj<<1,gu=g[1];if(null==gu)a.O("edit memory commands:"),a.O("\teb [a] [...] edit bytes at address a"),a.O("\tew [a] [...] edit words at address a");else{var ij=mz(a,gu);if(ij)for(var jj=
2;jj<g.length;jj++){var dh=Ay(a,g[jj]);if(void 0===dh){a.O("unrecognized value: "+g[jj]);break}dh&~cu&&a.O("warning: "+q(dh)+" exceeds "+hj+"-byte value");var zC=du.call(a,ij);a.O("changing "+cz(ij)+" from "+q(zC,fu,!0)+" to "+q(dh,fu,!0));eu.call(a,ij,dh,hj)}}break;case "f":yB(a,g[1]);break;case "g":a:{var hu=g[1],AC=b;"gt"==g[0]&&(a.Ea=!0);if(void 0!==hu){var Km=mz(a,hu,!0);if(!Km)break a;pz(a,Km,AC);a.sd(a.B,Km,!0)}kA(a,!0)||c||a.O("cpu busy or unavailable, run command ignored")}break;case "h":a:{var Lm;
if(a.ba.jb)Lm="halting",a.Kb();else{if(Pb(a,!0))break a;Lm="already halted"}c||a.O(Lm)}break;case "i":if("if"==g[0]){var Mm;var eh=b.substr(2),eh=Ba(eh);Ay(a,eh)?(c||a.O("true: "+eh),Mm=!0):(c||a.O("false: "+eh),Mm=!1);Mm||(d=!1);break}if("int"==g[0]){var kj;a:switch(uy(a,g[1])){case 19:dl(a,19,a.H.ea,!0);a.ka=a.aa;kj=!0;break a;case 33:dl(a,33,a.H.ea,!0);a.ka=a.aa;kj=!0;break a;default:kj=!1}kj||(d=!1);break}var Nm=g[1];if(Nm&&"?"!=Nm){var Om=uy(a,Nm);if(void 0!==Om){var BC=Uc(a.ma,Om,1);a.O(ua(Om)+
": "+ta(BC))}}else a.O("input commands:"),a.O("\ti [p]\tread port [p]"),a.O("warning: port accesses can affect hardware state");break;case "k":var CC=g[0];if("?"==g[1])a.O("stack trace commands:"),a.O("\tk\tshow frame addresses"),a.O("\tks\tshow symbol information");else{var Pm=0,iu=a.H.Z.U,fh=Fy(a),Vd=Fy(a,y(a.H),a.H.X.U);for(a.O("stack trace for "+cz(Vd));10>Pm;){for(var od=null,DC=256;Vd.Ha>>>0<a.H.dg>>>0;){fh.Ha=a.mb(Vd,!0);if(null==Vd.ya||!DC--)break;fh.U=iu;if(od=FB(a,fh))break;fh.U=a.mb(Vd);
if(od=FB(a,fh,!0)){iu=a.mb(Vd,!0);0<od.indexOf("INT")&&a.mb(Vd,!0);break}}if(!od||null==od)break;var ju=null;if("ks"==CC){var ku=od.match(/[0-9A-F]+$/);ku&&(ju=AB(a,ku[0]))}od=Aa(od,50)+" ;"+(ju||"stack="+cz(Vd));a.O(od);Pm++}Pm||a.O("no return addresses found")}break;case "l":if("ln"==g[0]){AB(a,g[1],!0);break}BB(a,g);break;case "m":if("mouse"==g[0]){var Qm=g[1],lj=g[2];if(a.G){var lu=1;"-"==lj.charAt(0)&&(lu=-1,lj=lj.substr(1));var Be=uy(a,lj,Qm);if(void 0!==Be)switch(Be=Be*lu|0,Qm){case "x":a.G.sf(Be,
(CB(a.pa),a.O(sc)):a.O("powerOff() error")}else if("symbols"==db)for(var lb=0;lb<a.F.length;lb++){var gf=a.F[lb],Nd;for(Nd in gf.Id)if("."!=Nd.charAt(0)){var hf=gf.Id[Nd],Cg=hf.o;if(void 0!==Cg){var jf=hf.s;void 0===jf&&(jf=gf.U);var Dg=gf.Id[Nd].l;Dg&&(Nd=Dg);a.O(Sy(Cg,jf)+" "+Nd)}}}else{if("ds"==qa||"dg"==qa||"dl"==qa)qa="d",Z=[qa,"desc",db];"d"==qa&&"page"==db&&(qa="dp",Z.shift());if("dp"==qa){Z.shift();var Cm=Z[0];if(Cm){var Xg=a.Sb(mz(a,Cm));if(-1===Xg)a.O("invalid address: "+Cm);else{var tf,
Ra=null;if(80386<=a.H.da){var uf=a.ma,Ra={};Ra.Pk=(Xg&-4194304)>>>20;Ra.Xi=a.H.Vc+Ra.Pk;Ra.ob=uf.aa[(Ra.Xi&uf.C)>>>uf.A];Ra.Fj=Ra.ob.Od(Ra.Pk);Ra.Qk=(Xg&4190208)>>>10;Ra.Yi=(Ra.Fj&-4096)+Ra.Qk;Ra.pb=uf.aa[(Ra.Yi&uf.C)>>>uf.A];Ra.Gj=Ra.pb.Od(Ra.Qk);Ra.zl=(Ra.Gj&-4096)+(Xg&4095)}if(tf=Ra){a.O("linear PDE addr PDE PTE addr PTE physical");a.O("--------- ---------- -------- ---------- -------- ----------");var ye="%"+q(Xg),ye=ye+(" %%"+rz(tf.Xi,tf.Fj)),ye=
ye+(" %%"+rz(tf.Yi,tf.Gj,!0)),ye=ye+(" %%"+q(tf.zl));a.O(ye)}else a.O("unsupported operation")}}else a.O("missing address")}else{if("d"==qa){if("disk"==db){Z[0]="l";Z[1]="json";BB(a,Z);break a}for(jb in Xb)if(Z[1]==jb){var Rt=a.Da[jb];Rt?(Z.shift(),Z.shift(),Rt(Z)):a.O("no dump registered for "+db);break a}db||(qa=a.lb||"db")}if("dh"==qa){var St=db,Tt=Oa,Yg=kb,Yg=void 0===Yg?"history":Yg,Ut="",Vt=0,Nc=a.oa,md=a.X;if(md.length){var wc=+St||a.Ya,Zg=+Tt||10;isNaN(wc)?wc=Zg:Ut="more ";wc>md.length&&
(a.O("note: only "+md.length+" available"),wc=md.length);Nc-=wc;0>Nc&&(null==md[md.length-1].U?(wc=Nc+wc,Nc=0):Nc+=md.length);var Dm=[];"call"==Tt&&(Zg=1E5,Dm=["CALL"]);for(void 0!==St&&a.O(wc+" instructions earlier:");0<Zg&&Nc!=a.oa;){var nd=md[Nc++];if(null==nd.U)break;var $g=Fy(a,nd.Ha,nd.U,nd.ya,nd.type,nd.Hb,nd.cc),Wt=wc--;null!=nd.mj&&"cycles"==Yg&&(Wt=nd.mj);var Xt=vA(a,$g,Yg,Wt);(!Dm.length||0<=Xt.indexOf(Dm[0]))&&a.O(Xt);$g.Je&&(Nc+=$g.Je,Zg-=$g.Je,wc-=$g.Je);Nc>=md.length&&(Nc=0);a.Ya=wc;
Vt++;Zg--}}Vt||(a.O("no "+Ut+"history available"),a.Ya=void 0)}else if("di"==qa){Z.shift();var Em=Z[0];if(Em){var ah=uy(a,Em);if(void 0===ah||0>ah||255<ah)a.O("invalid vector: "+Em);else{var Yt="&",Zt=!!(a.H.qa&1),$t=!1,ej=a.H.Nb+(ah<<(Zt?3:2)),au=a.H.ja(ej+0),yC=a.H.ja(ej+2);Zt&&(Yt="#",a.H.ja(ej+4)&2048&&($t=!0,au|=a.H.ja(ej+6)<<16));a.O("dumpIDT("+ua(ah)+"): "+Yt+q(yC,4)+":"+q(au,$t?8:4))}}else a.O("no IDT vector")}else if("dt"==qa)Z.shift(),a.O("no information");else if(qa[1]&&0>"abwd".indexOf(qa[1]))a.O("unrecognized dump command");
else{a.lb=qa;var ze=mz(a,db);if(ze&&(null!=ze.U||null!=ze.ya)){var vf=0;if(Oa){if("l"==Oa.charAt(0))Oa=Oa.substr(1)||kb,vf=uy(a,Oa);else{var bu=mz(a,Oa);if(!bu)break a;vf=bu.Ha-ze.Ha+1}if(0>vf||65536<vf)vf=0}var Ae="",Fm=!1,wf="dd"==qa?4:"dw"==qa?2:1,bh=wf*vf||128,Gm=bh+15>>4||1,Hm=4==wf?16:a.D;"a"==qa[1]&&(Fm=!0,Gm=25,Hm=160,bh=Gm*Hm);for(;Gm--&&0<bh;){var ch=0,Im=0,dh,Jm="",fj="",db=cz(ze);for(dh=Hm;0<dh&&0<bh;dh--){var gj=a.Ja(ze,1),ch=ch|gj<<(Im++<<3);Im==wf&&(Jm+=8==a.D?sa(ch,3*wf):q(ch,2*wf),
Jm+=1==wf?9==dh?"-":" ":" ",ch=Im=0);fj+=32<=gj&&128>gj?String.fromCharCode(gj):Fm?"":".";bh--}Ae&&(Ae+="\n");Ae=Fm?Ae+fj:Ae+(db+" "+Jm+Aa(fj,fj.length+3*dh+1,!0))}Ae&&a.O(Ae.replace(/\s*$/,""));a.Aa=ze}}}}}break;case "e":if("else"==g[0])break;var hj=1,cu=255,du=a.Ja,eu=a.fc;"ew"==g[0]&&(hj=2,cu=65535,du=a.Xc,eu=a.nl);var fu=hj<<1,gu=g[1];if(null==gu)a.O("edit memory commands:"),a.O("\teb [a] [...] edit bytes at address a"),a.O("\tew [a] [...] edit words at address a");else{var ij=mz(a,gu);if(ij)for(var jj=
2;jj<g.length;jj++){var eh=Ay(a,g[jj]);if(void 0===eh){a.O("unrecognized value: "+g[jj]);break}eh&~cu&&a.O("warning: "+q(eh)+" exceeds "+hj+"-byte value");var zC=du.call(a,ij);a.O("changing "+cz(ij)+" from "+q(zC,fu,!0)+" to "+q(eh,fu,!0));eu.call(a,ij,eh,hj)}}break;case "f":yB(a,g[1]);break;case "g":a:{var hu=g[1],AC=b;"gt"==g[0]&&(a.Ea=!0);if(void 0!==hu){var Km=mz(a,hu,!0);if(!Km)break a;pz(a,Km,AC);a.sd(a.B,Km,!0)}kA(a,!0)||c||a.O("cpu busy or unavailable, run command ignored")}break;case "h":a:{var Lm;
if(a.ba.jb)Lm="halting",a.Kb();else{if(Pb(a,!0))break a;Lm="already halted"}c||a.O(Lm)}break;case "i":if("if"==g[0]){var Mm;var fh=b.substr(2),fh=Ba(fh);Ay(a,fh)?(c||a.O("true: "+fh),Mm=!0):(c||a.O("false: "+fh),Mm=!1);Mm||(d=!1);break}if("int"==g[0]){var kj;a:switch(uy(a,g[1])){case 19:dl(a,19,a.H.ea,!0);a.ka=a.aa;kj=!0;break a;case 33:dl(a,33,a.H.ea,!0);a.ka=a.aa;kj=!0;break a;default:kj=!1}kj||(d=!1);break}var Nm=g[1];if(Nm&&"?"!=Nm){var Om=uy(a,Nm);if(void 0!==Om){var BC=Uc(a.ma,Om,1);a.O(ua(Om)+
": "+ta(BC))}}else a.O("input commands:"),a.O("\ti [p]\tread port [p]"),a.O("warning: port accesses can affect hardware state");break;case "k":var CC=g[0];if("?"==g[1])a.O("stack trace commands:"),a.O("\tk\tshow frame addresses"),a.O("\tks\tshow symbol information");else{var Pm=0,iu=a.H.Z.U,gh=Fy(a),Vd=Fy(a,y(a.H),a.H.X.U);for(a.O("stack trace for "+cz(Vd));10>Pm;){for(var od=null,DC=256;Vd.Ha>>>0<a.H.dg>>>0;){gh.Ha=a.mb(Vd,!0);if(null==Vd.ya||!DC--)break;gh.U=iu;if(od=FB(a,gh))break;gh.U=a.mb(Vd);
if(od=FB(a,gh,!0)){iu=a.mb(Vd,!0);0<od.indexOf("INT")&&a.mb(Vd,!0);break}}if(!od||null==od)break;var ju=null;if("ks"==CC){var ku=od.match(/[0-9A-F]+$/);ku&&(ju=AB(a,ku[0]))}od=Aa(od,50)+" ;"+(ju||"stack="+cz(Vd));a.O(od);Pm++}Pm||a.O("no return addresses found")}break;case "l":if("ln"==g[0]){AB(a,g[1],!0);break}BB(a,g);break;case "m":if("mouse"==g[0]){var Qm=g[1],lj=g[2];if(a.G){var lu=1;"-"==lj.charAt(0)&&(lu=-1,lj=lj.substr(1));var Be=uy(a,lj,Qm);if(void 0!==Be)switch(Be=Be*lu|0,Qm){case "x":a.G.sf(Be,
0);break;case "y":a.G.sf(0,Be);break;case "click":a.G.Zd(Be,!0);a.G.Zd(Be,!1);break;default:a.O("unknown action: "+Qm)}}else a.O("no mouse");break}a:{var pd,qd=null,gb=g[1];"?"==gb&&(gb=void 0);if(void 0!==gb){var Ce=0;if("all"==gb)Ce=1610481663,gb=null;else if("on"==gb)qd=!0,gb=null;else if("off"==gb)qd=!1,gb=null;else{"keys"==gb&&(gb="key");"kbd"==gb&&(gb="keyboard");for(pd in Xb)if(gb==pd){Ce=Xb[pd];qd=!!(a.ic&Ce);break}if(!Ce){a.O("unknown message category: "+gb);break a}}Ce&&("on"==g[2]?(a.ic|=
Ce,qd=!0):"off"==g[2]&&(a.ic&=~Ce,qd=!1))}var EC=0,gh="";for(pd in Xb)if(!gb||gb==pd){var FC=!!(a.ic&Xb[pd]);if(null===qd||qd==FC)gh&&(gh+=","),++EC%10||(gh+="\n\t"),"key"==pd&&(pd="keys"),gh+=pd}void 0===gb&&a.O("message commands:\n\tm [category] [on|off]\tturn categories on/off");a.O((null!==qd?qd?"messages on: ":"messages off: ":"message categories:\n\t")+(gh||"none"));Hy(a)}break;case "o":var Rm=g[1],GC=g[2];if(Rm&&"?"!=Rm){var Sm=uy(a,Rm,"port #"),Tm=uy(a,GC);void 0!==Sm&&void 0!==Tm&&(Yc(a.ma,
Ce,qd=!0):"off"==g[2]&&(a.ic&=~Ce,qd=!1))}var EC=0,hh="";for(pd in Xb)if(!gb||gb==pd){var FC=!!(a.ic&Xb[pd]);if(null===qd||qd==FC)hh&&(hh+=","),++EC%10||(hh+="\n\t"),"key"==pd&&(pd="keys"),hh+=pd}void 0===gb&&a.O("message commands:\n\tm [category] [on|off]\tturn categories on/off");a.O((null!==qd?qd?"messages on: ":"messages off: ":"message categories:\n\t")+(hh||"none"));Hy(a)}break;case "o":var Rm=g[1],GC=g[2];if(Rm&&"?"!=Rm){var Sm=uy(a,Rm,"port #"),Tm=uy(a,GC);void 0!==Sm&&void 0!==Tm&&(Yc(a.ma,
Sm,1,Tm),a.O(ua(Sm)+": "+ta(Tm)))}else a.O("output commands:"),a.O("\to [p] [b]\twrite byte [b] to port [p]"),a.O("warning: port accesses can affect hardware state");break;case "p":if("print"==g[0]){EB(a,b.substr(5));break}var mu="pr"==g[0]?1:0,xf=1+mu;if(a.K)a.O("step in progress");else{var mj,nu=!1,Ib=Fy(a,z(a.H),a.H.Z.U);do switch(mj=!1,a.Ja(Ib)){case 38:case 46:case 54:case 62:case 100:case 101:case 102:case 103:case 240:hz(a,Ib,1);mj=!0;break;case 204:case 206:a.K=xf;hz(a,Ib,1);break;case 205:case 224:case 225:case 226:a.K=
xf;hz(a,Ib,Ib.Hb?4:2);break;case 232:a.K=xf;hz(a,Ib,Ib.Hb?5:3);break;case 154:a.K=xf;hz(a,Ib,Ib.Hb?7:5);break;case 255:var ou=a.mb(Ib)&14591;if(4351==ou||6399==ou)a.K=xf,vA(a,Ib);break;case 243:case 242:hz(a,Ib,1);nu=mj=!0;break;case 108:case 109:case 110:case 111:case 164:case 165:case 166:case 167:case 170:case 171:case 172:case 173:case 174:case 175:nu&&(a.K=xf,hz(a,Ib,1))}while(mj);a.K?(a.sd(a.B,Ib,!0),kA(a)||(a.pa&&a.pa.nd(),a.K=0)):GB(a,mu?"tr":"t")}break;case "r":if("reset"==b){a.pa&&a.pa.reset();
break}mA(a,g);break;case "t":GB(a,g[0],g[1]);break;case "u":nA(a,g[1],g[2],8);break;case "v":if("var"==g[0]){zB(a,b.substr(3))||(d=!1);break}a.O("PCx86 version 1.36.0 ("+a.H.da+",RELEASE,NOPREFETCH"+(Tb?",TYPEDARRAYS":",LONGARRAYS")+",NOBACKTRACK)");a.O(Qa());break;case "x":a:if(g[1]&&"?"!=g[1])switch(g[1]){case "cs":var hh;void 0!==g[3]&&(hh=+g[3]);switch(g[2]){case "int":a.H.T.Ue=hh;break;case "start":a.H.T.vf=hh;break;case "stop":a.H.T.We=hh;break;default:a.O("unknown cs option");break a}void 0!==
hh&&Hd(a.H);a.O("checksums "+(a.H.ba.Le?"enabled":"disabled"));break;case "sp":void 0!==g[2]&&(Ld(a.H,+g[2])||a.O("warning: using 1x multiplier, previous target not reached"));a.O("target speed: "+(a.H.T.te.toFixed(2)+"Mhz")+" ("+a.H.T.Ld+"x)");break;default:a.O("unknown option: "+g[1])}else a.O("execution options:"),a.O("\tcs int #\tset checksum cycle interval to #"),a.O("\tcs start #\tset checksum cycle start count to #"),a.O("\tcs stop #\tset checksum cycle stop count to #"),a.O("\tsp #\t\tset speed multiplier to #");
break}mA(a,g);break;case "t":GB(a,g[0],g[1]);break;case "u":nA(a,g[1],g[2],8);break;case "v":if("var"==g[0]){zB(a,b.substr(3))||(d=!1);break}a.O("PCx86 version 1.36.0 ("+a.H.da+",RELEASE,NOPREFETCH"+(Tb?",TYPEDARRAYS":",LONGARRAYS")+",NOBACKTRACK)");a.O(Qa());break;case "x":a:if(g[1]&&"?"!=g[1])switch(g[1]){case "cs":var ih;void 0!==g[3]&&(ih=+g[3]);switch(g[2]){case "int":a.H.T.Ue=ih;break;case "start":a.H.T.vf=ih;break;case "stop":a.H.T.We=ih;break;default:a.O("unknown cs option");break a}void 0!==
ih&&Hd(a.H);a.O("checksums "+(a.H.ba.Le?"enabled":"disabled"));break;case "sp":void 0!==g[2]&&(Ld(a.H,+g[2])||a.O("warning: using 1x multiplier, previous target not reached"));a.O("target speed: "+(a.H.T.te.toFixed(2)+"Mhz")+" ("+a.H.T.Ld+"x)");break;default:a.O("unknown option: "+g[1])}else a.O("execution options:"),a.O("\tcs int #\tset checksum cycle interval to #"),a.O("\tcs start #\tset checksum cycle start count to #"),a.O("\tcs stop #\tset checksum cycle stop count to #"),a.O("\tsp #\t\tset speed multiplier to #");
break;case "?":if(g[1]){EB(a,b.substr(1));break}var Um="commands:",Vm;for(Vm in IB)Um+="\n"+Aa(Vm,7)+IB[Vm];Rg(a)||(Um+="\nnote: frequency/history disabled if no exec breakpoints");a.O(Um);break;default:a.O("unknown command: "+b),d=!1}}}catch(qu){a.O("debugger error: "+(qu.stack||qu.message)),d=!1}return d}function Jy(a,b,c){b=a.Gg(b,c);for(var d in b)if(!uA(a,b[+d]))return!1;return!0}
var hA={16:262144,19:524288,21:32768,22:65536,28:2048,33:134217728,51:16777216},gA=[26,28,40,42,109],IB={"?":"help/print","a [#]":"assemble","b [#]":"breakpoint",c:"clear output","d [#]":"dump memory","e [#]":"edit memory",f:"frequencies","g [#]":"go [to #]",h:"halt","i [#]":"input port #","if":"eval expression",k:"stack trace",l:"load sector(s)",ln:"list nearest symbol(s)",m:"messages",mouse:"mouse action","o [#]":"output port #",p:"step over",print:"print expression",r:"dump/set registers",reset:"reset machine",
"t [#]":"trace","u [#]":"unassemble",x:"execution options",v:"print version","var":"assign variable"},nz=0,fz=1,Py=2,qz=3,oz=4,gz=5,DA=18,EA=28,zA=36,IA=80,FA=104,GA=107,xA=176,wA="INVALID AAA AAD AAM AAS ADC ADD AND ARPL AS: BOUND BSF BSR BT BTC BTR BTS CALL CBW CLC CLD CLI CLTS CMC CMP CMPSB CMPSW CS: CWD DAA DAS DEC DIV DS: ENTER ES: ESC FS: GS: HLT IBTS IDIV IMUL IN INC INS INT INT3 INTO IRET JBE JC JCXZ JG JGE JL JLE JMP JA JNC JNO JNP JNS JNZ JO JP JS JZ LAHF LAR LDS LEA LEAVE LES LFS LGDT LGS LIDT LLDT LMSW LOADALL LOCK LODSB LODSW LOOP LOOPNZ LOOPZ LSL LSS LTR MOV MOVSB MOVSW MOVSX MOVZX MUL NEG NOP NOT OR OS: OUT OUTS POP POPA POPF PUSHF PUSHA PUSH RCL RCR REPNZ REPZ RET RETF ROL ROR SAHF SALC SAR SBB SCASB SCASW SETBE SETC SETG SETGE SETL SETLE SETNBE SETNC SETNO SETNP SETNS SETNZ SETO SETP SETS SETZ SGDT SHL SHLD SHR SHRD SIDT SLDT SMSW SS: STC STD STI STOSB STOSW STR SUB TEST VERR VERW WAIT XBTS XCHG XLAT XOR".split(" "),

File diff suppressed because one or more lines are too long

View file

@ -48799,7 +48799,7 @@ class Video extends Component {
* screen "flicker".
*/
this.colorScreen = parmsVideo['screenColor'] || "black";
this.opacityFlicker = (1 - (parmsVideo['flicker'] || 0)).toString();
this.opacityFlicker = (1 - (Web.getURLParm('flicker') || parmsVideo['flicker'] || 0)).toString();
this.fOpacityReduced = false;
if (canvas) canvas.style.backgroundColor = this.colorScreen;
if (container) container.style.backgroundColor = this.colorScreen;
@ -53402,7 +53402,7 @@ class Video extends Component {
* until we figure out a better UI. And note that we use our Web.onPageEvent() helper function to make
* sure we don't trample any other 'onresize' handler(s) attached to the window object.
*/
var aspect = +(parmsVideo['aspect'] || Web.getURLParm('aspect'));
var aspect = +(Web.getURLParm('aspect') || parmsVideo['aspect']);
/*
* No 'aspect' parameter yields NaN, which is falsey, and anything else must satisfy my arbitrary
* constraints of 0.3 <= aspect <= 3.33, to prevent any useless (or worse, browser-blowing) results.

View file

@ -511,9 +511,9 @@ Cp[1|sp]=function(a){a+=this.G;var b=a&-2;a=this.controller.Wa&(b==a?16711935:-1
Cp[98]=function(a,b){a+=this.G;b=$p[b&15];b&=this.controller.nb;b=b&this.controller.qb|this.controller.nb&~this.controller.qb;b=b&this.controller.Wa|this.U[a]&~this.controller.Wa;this.U[a]!=b&&(this.U[a]=b,this.Da=!0)};Cp[162]=function(a,b){a+=this.G;b=$p[b&15];b|=this.controller.nb;b=b&this.controller.qb|this.controller.nb&~this.controller.qb;b=b&this.controller.Wa|this.U[a]&~this.controller.Wa;this.U[a]!=b&&(this.U[a]=b,this.Da=!0)};
Cp[226]=function(a,b){a+=this.G;b=$p[b&15];b^=this.controller.nb;b=b&this.controller.qb|this.controller.nb&~this.controller.qb;b=b&this.controller.Wa|this.U[a]&~this.controller.Wa;this.U[a]!=b&&(this.U[a]=b,this.Da=!0)};Cp[3]=function(a,b){a+=this.G;b=b>>this.controller.Ac|b<<8-this.controller.Ac&255;b=(b|b<<8|b<<16|b<<24)&this.controller.qb;b=this.controller.Xe&b|this.controller.nb&~b;b=b&this.controller.Wa|this.U[a]&~this.controller.Wa;this.U[a]!=b&&(this.U[a]=b,this.Da=!0)};
function W(a,b,c,d,e){u.call(this,"Video",a);var f=this;this.Pc=La("Gecko/");var g=["","moz","ms","webkit"];this.ba=a.model;var h=aq[this.ba]||aq.mda;this.Ma=h[0];this.Wc=a.memory||0;this.bd=a.switches;this.aa=a.mode;if(null==this.aa||null==bq[this.aa])this.aa=h[1];this.Gb=a.charCols;this.lc=a.charRows;if(void 0===this.Gb||void 0===this.lc)this.Gb=bq[this.aa][0],this.lc=bq[this.aa][1];this.W=a.screenWidth;this.fa=a.screenHeight;this.Rc=a.scale;this.qd=12<=Math.round(this.W/this.Gb);this.M=b;this.J=
c;this.D=(this.Jf=d)||b||null;this.Wb=a.screenColor||"black";this.Uc=(1-(a.flicker||0)).toString();this.Bb=!1;b&&(b.style.backgroundColor=this.Wb);e&&(e.style.backgroundColor=this.Wb);b=a.smoothing;(c=Ma("smoothing"))&&(b="true"==c);if(null!=b)for(c=0;c<g.length;c++)if(d=(d=g[c])?d+"ImageSmoothingEnabled":"imageSmoothingEnabled",void 0!==this.J[d]){this.J[d]=b;break}this.cd=a.touchScreen;this.rc=cq;this.K=null;this.pd=a.autoLock;this.$a=this.Eb=0;this.pa=[];this.ea=Array(this.Ma==Yn?256:16);this.Ha=
!1;this.jb=null;if(this.Aa=e)if(this.jb=e.requestFullscreen||e.msRequestFullscreen||e.mozRequestFullScreen||e.webkitRequestFullscreen){for(c=0;c<g.length;c++)if(d=g[c]+"fullscreenchange","on"+d in document){document.addEventListener(d,function(){dq(f,!!(document.fullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement))},!1);break}for(c=0;c<g.length;c++)if(d=g[c]+"fullscreenerror","on"+d in document){document.addEventListener(d,function(){dq(f,
null)},!1);break}}this.D&&(this.D.onfocus=function(){return f.Vf(!0)},this.D.onblur=function(){return f.Vf(!1)},this.D.Nd=this.D.requestPointerLock||this.D.mozRequestPointerLock||this.D.webkitRequestPointerLock,this.D.A=this.D.exitPointerLock||this.D.mozExitPointerLock||this.D.webkitExitPointerLock,this.D.Nd&&(e=function(){f.Ze(document.pointerLockElement===f.D||document.mozPointerLockElement===f.D||document.webkitPointerLockElement===f.D)},"onpointerlockchange"in document?document.addEventListener("pointerlockchange",
c;this.D=(this.Jf=d)||b||null;this.Wb=a.screenColor||"black";this.Uc=(1-(Ma("flicker")||a.flicker||0)).toString();this.Bb=!1;b&&(b.style.backgroundColor=this.Wb);e&&(e.style.backgroundColor=this.Wb);b=a.smoothing;(c=Ma("smoothing"))&&(b="true"==c);if(null!=b)for(c=0;c<g.length;c++)if(d=(d=g[c])?d+"ImageSmoothingEnabled":"imageSmoothingEnabled",void 0!==this.J[d]){this.J[d]=b;break}this.cd=a.touchScreen;this.rc=cq;this.K=null;this.pd=a.autoLock;this.$a=this.Eb=0;this.pa=[];this.ea=Array(this.Ma==Yn?
256:16);this.Ha=!1;this.jb=null;if(this.Aa=e)if(this.jb=e.requestFullscreen||e.msRequestFullscreen||e.mozRequestFullScreen||e.webkitRequestFullscreen){for(c=0;c<g.length;c++)if(d=g[c]+"fullscreenchange","on"+d in document){document.addEventListener(d,function(){dq(f,!!(document.fullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement))},!1);break}for(c=0;c<g.length;c++)if(d=g[c]+"fullscreenerror","on"+d in document){document.addEventListener(d,
function(){dq(f,null)},!1);break}}this.D&&(this.D.onfocus=function(){return f.Vf(!0)},this.D.onblur=function(){return f.Vf(!1)},this.D.Nd=this.D.requestPointerLock||this.D.mozRequestPointerLock||this.D.webkitRequestPointerLock,this.D.A=this.D.exitPointerLock||this.D.mozExitPointerLock||this.D.webkitExitPointerLock,this.D.Nd&&(e=function(){f.Ze(document.pointerLockElement===f.D||document.mozPointerLockElement===f.D||document.webkitPointerLockElement===f.D)},"onpointerlockchange"in document?document.addEventListener("pointerlockchange",
e,!1):"onmozpointerlockchange"in document?document.addEventListener("mozpointerlockchange",e,!1):"onwebkitpointerlockchange"in document&&document.addEventListener("webkitpointerlockchange",e,!1)));(this.ua=a.fontROM)&&"json"!=pa(this.ua)&&(this.ua=Fa()+"/api/v1/dump?file="+this.ua+"&format=bytes")}ba(W,u);l=W.prototype;
l.ic=function(a,b,c,d){var e=this;this.na=b;this.S=c;this.Ea=d;c=(c=aq[this.ba])&&c[0];c!==eq&&(pc(b,this,fq),sc(b,this,gq));c!==hq&&(pc(b,this,iq),sc(b,this,jq));this.Ma>=Wn&&(pc(b,this,kq),sc(b,this,lq));this.Ma==Yn&&(pc(b,this,mq),sc(b,this,nq));if((this.C=Bb(a,"Keyboard"))&&this.M){for(var f in this.ia)0<f.indexOf("lock")&&this.C.yb("led",f,this.ia[f]);this.C.yb(this.Jf?"textarea":"canvas","screen",this.D)}this.sb=9;(this.V=Bb(a,"ChipSet"))&&this.bd&&this.Ma==Wn&&(this.sb=zj(this.bd,this.sb));
"mouse"==this.cd?(this.K=Bb(a,"Mouse"))&&oq(this,pq):"keygrid"==this.cd&&this.C&&oq(this,qq);if(this.ua){var g="Loading "+this.ua+"...";Ea(this.ua,null,!0,function(a,b,c){rq(e,a,b,c)},function(){e.ub(g,pb.ae)})}};
@ -564,7 +564,7 @@ gp[Yn]=["VGA",980,753664,16384,262144,7];
var cq=0,qq=1,pq=2,vq=[[1036,1038,1033],[1037,1032,1039],[1035,1040,1034]],fq={948:W.prototype.rl,949:W.prototype.ql,952:W.prototype.sl,954:W.prototype.tl},gq={948:W.prototype.Om,949:W.prototype.Nm,952:W.prototype.Pm},iq={980:W.prototype.Wk,981:W.prototype.Vk,984:W.prototype.Xk,985:W.prototype.Uk,986:W.prototype.Yk},jq={980:W.prototype.rm,981:W.prototype.qm,984:W.prototype.sm,985:W.prototype.pm},kq={960:W.prototype.Qk,961:W.prototype.lk,962:W.prototype.Dl,964:W.prototype.Bl,965:W.prototype.Al,974:W.prototype.kl,
975:W.prototype.jl},lq={954:W.prototype.Kj,960:W.prototype.Jj,961:W.prototype.Jj,962:W.prototype.Qm,964:W.prototype.Wm,965:W.prototype.Vm,970:W.prototype.Jm,972:W.prototype.Im,974:W.prototype.Hm,975:W.prototype.Gm,986:W.prototype.Kj},mq={963:W.prototype.El,966:W.prototype.cl,967:W.prototype.dl,969:W.prototype.bl,970:W.prototype.Fl,972:W.prototype.Gl},nq={963:W.prototype.Ym,966:W.prototype.xm,967:W.prototype.ym,968:W.prototype.zm,969:W.prototype.wm};
Qa(function(){for(var a=gb(document,"pcx86","video"),b=0;b<a.length;b++){var c=a[b],d=hb(c),e=document.createElement("canvas");if(!e||!e.getContext){c.innerHTML="<br/>Missing &lt;canvas&gt; support. Please try a newer web browser.";break}e.setAttribute("class","pcjs-canvas");e.setAttribute("width",d.screenWidth);e.setAttribute("height",d.screenHeight);e.style.height="auto";0<=(window?window.navigator.userAgent:"").indexOf("MSIE")&&(c.onresize=function(a,b,c,d){return function(){b.style.height=(a.clientWidth*
d/c|0)+"px"}}(c,e,d.screenWidth,d.screenHeight),c.onresize(null));var f=+(d.aspect||Ma("aspect"));f&&.3<=f&&3.33>=f&&(Pa("onresize",function(a,b,c){return function(){b.style.height=(a.clientWidth/c|0)+"px"}}(c,e,f)),window.onresize());c.appendChild(e);f=document.createElement("textarea");La("iOS")&&(f.setAttribute("autocapitalize","off"),f.setAttribute("autocorrect","off"),f.style.fontSize="16px");c.appendChild(f);var g=e.getContext("2d"),d=new W(d,e,g,f,c);fb(d,c)}});
d/c|0)+"px"}}(c,e,d.screenWidth,d.screenHeight),c.onresize(null));var f=+(Ma("aspect")||d.aspect);f&&.3<=f&&3.33>=f&&(Pa("onresize",function(a,b,c){return function(){b.style.height=(a.clientWidth/c|0)+"px"}}(c,e,f)),window.onresize());c.appendChild(e);f=document.createElement("textarea");La("iOS")&&(f.setAttribute("autocapitalize","off"),f.setAttribute("autocorrect","off"),f.style.fontSize="16px");c.appendChild(f);var g=e.getContext("2d"),d=new W(d,e,g,f,c);fb(d,c)}});
function zr(a){u.call(this,"ParallelPort",a);this.G=a.adapter;switch(this.G){case 1:this.D=956;this.C=7;break;case 2:this.D=888;this.C=7;break;case 3:this.D=632;this.C=5;break;default:q("Unrecognized parallel adapter #"+this.G);return}this.A=this.B=null;a=a.binding;"console"==a?this.B="":db(this,a,Ar)}ba(zr,u);l=zr.prototype;l.yb=function(a,b,c){switch(b){case Ar:return this.ia[b]=this.A=c,!0}return!1};
l.ic=function(a,b,c,d){this.na=b;this.S=c;this.Ea=d;this.V=Bb(a,"ChipSet");pc(b,this,Br,this.D);sc(b,this,Cr,this.D);sb(this)};l.Pb=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.Ob=function(a){return a?this.save():!0};l.reset=function(){Dr(this)};l.save=function(){var a=new We(this),b=0,c=[];c[b++]=this.F;c[b++]=this.Cb;c[b]=this.Ge;a.set(0,c);return a.data()};l.restore=function(a){return Dr(this,a[0])};
function Dr(a,b){var c=0;b||(b=[0,0,0]);a.F=b[c++];a.Cb=b[c++];a.Ge=b[c];return!0}l.el=function(){return this.F};l.Cl=function(){return this.Cb};l.al=function(){return this.Ge};l.Am=function(a,b){this.F=b;this.Cb|=Er;a=!1;this.A&&(8==b?this.A.value=this.A.value.slice(0,-1):(this.A.value+=String.fromCharCode(b),this.A.scrollTop=this.A.scrollHeight),a=!0);if(null!=this.B){if(10==b||1024<=this.B.length)this.ub(this.B),this.B="";10!=b&&(this.B+=String.fromCharCode(b));a=!0}a&&(this.Cb&=~Er);Fr(this)};

File diff suppressed because one or more lines are too long