Started laying groundwork for more mouse hardware
This commit is contained in:
parent
1961e79955
commit
b91eaeba48
14 changed files with 2087 additions and 1511 deletions
|
|
@ -922,9 +922,21 @@
|
|||
|
||||
<xsl:template match="mouse[not(@ref)]">
|
||||
<xsl:param name="machine" select="''"/>
|
||||
<xsl:variable name="serial">
|
||||
<xsl:variable name="adapter">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@serial"><xsl:value-of select="@serial"/></xsl:when>
|
||||
<xsl:when test="@adapter"><xsl:value-of select="@adapter"/></xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="binding">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@binding"><xsl:value-of select="@binding"/></xsl:when>
|
||||
<xsl:otherwise/>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="type">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@type"><xsl:value-of select="@type"/></xsl:when>
|
||||
<xsl:otherwise/>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
|
@ -934,10 +946,16 @@
|
|||
<xsl:otherwise>0.5</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="serial">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@serial"><xsl:value-of select="@serial"/></xsl:when>
|
||||
<xsl:otherwise/>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:call-template name="component">
|
||||
<xsl:with-param name="machine" select="$machine"/>
|
||||
<xsl:with-param name="class">mouse</xsl:with-param>
|
||||
<xsl:with-param name="parms">,serial:'<xsl:value-of select="$serial"/>',scaleMouse:<xsl:value-of select="$scaleMouse"/></xsl:with-param>
|
||||
<xsl:with-param name="parms">,adapter:<xsl:value-of select="$adapter"/>,binding:'<xsl:value-of select="$binding"/>',type:'<xsl:value-of select="$type"/>',scaleMouse:<xsl:value-of select="$scaleMouse"/>,serial:'<xsl:value-of select="$serial"/>'</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
|
|
|
|||
|
|
@ -922,9 +922,21 @@
|
|||
|
||||
<xsl:template match="mouse[not(@ref)]">
|
||||
<xsl:param name="machine" select="''"/>
|
||||
<xsl:variable name="serial">
|
||||
<xsl:variable name="adapter">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@serial"><xsl:value-of select="@serial"/></xsl:when>
|
||||
<xsl:when test="@adapter"><xsl:value-of select="@adapter"/></xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="binding">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@binding"><xsl:value-of select="@binding"/></xsl:when>
|
||||
<xsl:otherwise/>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="type">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@type"><xsl:value-of select="@type"/></xsl:when>
|
||||
<xsl:otherwise/>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
|
@ -934,10 +946,16 @@
|
|||
<xsl:otherwise>0.5</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="serial">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@serial"><xsl:value-of select="@serial"/></xsl:when>
|
||||
<xsl:otherwise/>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:call-template name="component">
|
||||
<xsl:with-param name="machine" select="$machine"/>
|
||||
<xsl:with-param name="class">mouse</xsl:with-param>
|
||||
<xsl:with-param name="parms">,serial:'<xsl:value-of select="$serial"/>',scaleMouse:<xsl:value-of select="$scaleMouse"/></xsl:with-param>
|
||||
<xsl:with-param name="parms">,adapter:<xsl:value-of select="$adapter"/>,binding:'<xsl:value-of select="$binding"/>',type:'<xsl:value-of select="$type"/>',scaleMouse:<xsl:value-of select="$scaleMouse"/>,serial:'<xsl:value-of select="$serial"/>'</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
|
|
|
|||
|
|
@ -46,9 +46,9 @@
|
|||
var l,aa;function ba(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a;for(var d in b)if(Object.defineProperties){var e=Object.getOwnPropertyDescriptor(b,d);e&&Object.defineProperty(a,d,e)}else a[d]=b[d]}
|
||||
var ca="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},da="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this;
|
||||
function ea(a,b){if(b){var c=da;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ca(c,a,{configurable:!0,writable:!0,value:b})}}ea("Math.trunc",function(a){return a?a:function(a){a=Number(a);if(isNaN(a)||Infinity===a||-Infinity===a||!a)return a;var b=Math.floor(Math.abs(a));return 0>a?-b:b}});ea("Math.sign",function(a){return a?a:function(a){a=Number(a);return!a||isNaN(a)?a:0<a?1:-1}});
|
||||
var fa={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[40,2,9,,253],737280:[80,2,9,,249],1228800:[80,2,15,,249],1474560:[80,2,18,,240],2949120:[80,2,36,,240],10653696:[306,4,17],21411840:[615,4,17],256256:[77,1,26,128],2494464:[203,2,12,512],5242880:[256,2,40,256],10485760:[512,2,40,256]},n={np:0,pp:1,qp:2,el:3,rp:4,sp:5,tp:6,up:7,vp:8,wp:9,xp:10,yp:11,zp:12,Ap:13,Bp:14,Cp:15,Dp:16,Ep:17,Fp:18,Gp:19,Hp:20,Ip:21,Jp:22,Kp:23,Lp:24,Mp:25,Np:26," ":32,"!":33,'"':34,"#":35,$:36,
|
||||
"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,fe:65,si:66,ti:67,ui:68,E:69,vi:70,wi:71,xi:72,yi:73,zi:74,Ai:75,Bi:76,Ci:77,Di:78,Ei:79,Fi:80,Q:81,Gi:82,Hi:83,Ii:84,Ji:85,Ki:86,Li:87,Mi:88,Ni:89,ag:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,ge:97,sl:98,ul:99,d:100,e:101,Dl:102,El:103,Fl:104,Gl:105,Wm:106,k:107,Ym:108,dn:109,n:110,on:111,p:112,q:113,r:114,Mo:115,t:116,Qo:117,
|
||||
Ro:118,So:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126,Op:127},ga={};ga[173]=n["-"];ga[186]=n[";"];ga[187]=n["="];ga[189]=n["-"];ga[188]=n[","];ga[190]=n["."];ga[191]=n["/"];ga[192]=n["`"];ga[219]=n["["];ga[220]=n["\\"];ga[221]=n["]"];ga[222]=n["'"];var ha={};ha[n["1"]]=n["!"];ha[n["2"]]=n["@"];ha[n["3"]]=n["#"];ha[n["4"]]=n.$;ha[n["5"]]=n["%"];ha[n["6"]]=n["^"];ha[n["7"]]=n["&"];ha[n["8"]]=n["*"];ha[n["9"]]=n["("];ha[n["0"]]=n[")"];ha[186]=n[":"];ha[187]=n["+"];ha[188]=n["<"];ha[189]=n._;
|
||||
var fa={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[40,2,9,,253],737280:[80,2,9,,249],1228800:[80,2,15,,249],1474560:[80,2,18,,240],2949120:[80,2,36,,240],10653696:[306,4,17],21411840:[615,4,17],256256:[77,1,26,128],2494464:[203,2,12,512],5242880:[256,2,40,256],10485760:[512,2,40,256]},n={vp:0,xp:1,yp:2,el:3,zp:4,Ap:5,Bp:6,Cp:7,Dp:8,Ep:9,Fp:10,Gp:11,Hp:12,Ip:13,Jp:14,Kp:15,Lp:16,Mp:17,Np:18,Op:19,Pp:20,Qp:21,Rp:22,Sp:23,Tp:24,Up:25,Vp:26," ":32,"!":33,'"':34,"#":35,$:36,
|
||||
"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,fe:65,si:66,ti:67,ui:68,E:69,vi:70,wi:71,xi:72,yi:73,zi:74,Ai:75,Bi:76,Ci:77,Di:78,Ei:79,Fi:80,Q:81,Gi:82,Hi:83,Ii:84,Ji:85,Ki:86,Li:87,Mi:88,Ni:89,ag:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,ge:97,sl:98,ul:99,d:100,e:101,Dl:102,El:103,Fl:104,Gl:105,$m:106,k:107,bn:108,hn:109,n:110,sn:111,p:112,q:113,r:114,Uo:115,t:116,Yo:117,
|
||||
Zo:118,$o:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126,Wp:127},ga={};ga[173]=n["-"];ga[186]=n[";"];ga[187]=n["="];ga[189]=n["-"];ga[188]=n[","];ga[190]=n["."];ga[191]=n["/"];ga[192]=n["`"];ga[219]=n["["];ga[220]=n["\\"];ga[221]=n["]"];ga[222]=n["'"];var ha={};ha[n["1"]]=n["!"];ha[n["2"]]=n["@"];ha[n["3"]]=n["#"];ha[n["4"]]=n.$;ha[n["5"]]=n["%"];ha[n["6"]]=n["^"];ha[n["7"]]=n["&"];ha[n["8"]]=n["*"];ha[n["9"]]=n["("];ha[n["0"]]=n[")"];ha[186]=n[":"];ha[187]=n["+"];ha[188]=n["<"];ha[189]=n._;
|
||||
ha[190]=n[">"];ha[191]=n["?"];ha[192]=n["~"];ha[219]=n["{"];ha[220]=n["|"];ha[221]=n["}"];ha[222]=n['"'];ha[173]=n._;ha[61]=n["+"];ha[59]=n[":"];
|
||||
function ia(a,b){var c;if(a){b||(b=10);var d,e,f=0<a.indexOf(",");f&&(a=a.replace(/,/g,""));d=e=a.charAt(0);"#"==e?(b=8,e=""):"$"==e&&(b=16,e="");d!=e?a=a.substr(1):(d=e=a.substr(0,2),"0b"==e&&f||"^B"==e?(b=2,e=""):"0o"==e||"^O"==e?(b=8,e=""):"^D"==e?(b=10,e=""):"0x"==e&&(b=16,e=""),d!=e&&(a=a.substr(2)));d=e=a.slice(-1);"Y"==e||"y"==e?(b=2,e=""):"."==e?(b=10,e=""):"H"==e||"h"==e?(b=16,e=""):"K"==e?e="000":"M"==e?e="000000":"G"==e&&(e="000000000");d!=e&&(a=a.slice(0,-1)+e);var g;d=0;10>=b&&(e=a.match(/(-?[0-9]+)B([0-9]*)/))&&
|
||||
(a=e[1],d=35-((e[2]||35)&255));e=a;((f=b)&&10!=f?16==f?e.match(/^-?[0-9a-f]+$/i):8==f?e.match(/^-?[0-7]+$/):2==f&&e.match(/^-?[01]+$/):e.match(/^-?[0-9]+$/))&&!isNaN(g=parseInt(a,b))&&(d&&(0>g&&(g+=Math.pow(2,36)),g=0<d?g*Math.pow(2,d):Math.trunc(g/Math.pow(2,-d))),c=g)}return c}
|
||||
|
|
@ -78,8 +78,8 @@ function Bb(a){for(var b=!0,c=Ab[a];c&&c.length;){var d=c.splice(0,1)[0],e=d[0],
|
|||
l.toString=function(){return this.name?this.name:this.id||this.type};
|
||||
l.Eb=function(a,b,c){switch(b){case "clear":return this.ma[b]||(this.ma[b]=c,c.onclick=function(a){return function(){a.ma.print&&(a.ma.print.value="")}}(this)),!0;case "print":return this.ma[b]||(this.ma[b]=c,this.Da=function(a){this.O(a,this.type);return!0},c.value="",this.print=function(a){return function(b){qb(a,b)}}(c),this.O=function(a,b){return function(a,c){a||(a="");c!=Fb.Ee||"..."!=a.slice(-3)?(c&&(a=c+": "+a),qb(b,a+"\n")):rb(b,a,a+".")}}(this,c)),!0;default:return!1}};l.log=function(){};
|
||||
l.print=function(){};l.O=function(){};l.status=function(a){this.O(this.type+": "+a)};l.Da=function(a,b,c){if(!b){var d=tb("Computer",this.id);if(d&&d.Z.Ae)return console.log("ignoring notice during unload: "+a),!1}c=c||this.type;b||ab((c?c+": ":"")+a);return!0};function Gb(a,b){a.Z.error=!0;a.Da(b)}function Hb(a){return a.Z.error?(a.O(a.toString()+" error"),!0):!1}function Ib(a,b){b&&(a.Z.ready?b():a.ng=b);return a.Z.ready}
|
||||
function Jb(a,b){a.Z.error||(a.Z.ready=!1!==b,a.Z.ready&&(b=a.ng,a.ng=null,b&&b()))}function Lb(a,b){a.Z.nf&&(b?a.Z.Zg=!0:void 0===b&&a.O(a.toString()+" busy"));return a.Z.nf}function Mb(a,b){if(a.Z.Zg)return a.Z.nf=!1,a.Z.Zg=!1;if(a.Z.error)return a.O(a.toString()+" error"),!1;a.Z.nf=b;return a.Z.nf}l.ac=function(){return this.Z.bc=!0};l.$b=function(a,b){b&&(this.Z.bc=!1);return!0};function r(a,b){if(a.ca){a===a.ca?b|=0:b=b||a.fc;var c=a.ca.fc&b;return!!b&&c===b||!!(c&a.ca.tl)}return!1}
|
||||
function Nb(a,b,c,d){a.ca&&(!0===c||r(a,c|0))&&a.ca.message(b,d)}function t(a,b,c,d,e,f,g){a.ca&&(!0===g?g=0:null==g&&(g=a.fc),Ob(a.ca,a,b,c,d,e,f,g))}var Fb={ERROR:"error",Sp:"notice",Ee:"progress",SCRIPT:"script",cq:"warning"};window&&(window.PCjs||(window.PCjs={}),window.PCjs.Machines||(window.PCjs.Machines={}),window.PCjs.Components||(window.PCjs.Components=[]),window.PCjs.Commands||(window.PCjs.Commands={}));
|
||||
function Jb(a,b){a.Z.error||(a.Z.ready=!1!==b,a.Z.ready&&(b=a.ng,a.ng=null,b&&b()))}function Kb(a,b){a.Z.nf&&(b?a.Z.Zg=!0:void 0===b&&a.O(a.toString()+" busy"));return a.Z.nf}function Lb(a,b){if(a.Z.Zg)return a.Z.nf=!1,a.Z.Zg=!1;if(a.Z.error)return a.O(a.toString()+" error"),!1;a.Z.nf=b;return a.Z.nf}l.ac=function(){return this.Z.bc=!0};l.$b=function(a,b){b&&(this.Z.bc=!1);return!0};function r(a,b){if(a.ca){a===a.ca?b|=0:b=b||a.fc;var c=a.ca.fc&b;return!!b&&c===b||!!(c&a.ca.tl)}return!1}
|
||||
function Nb(a,b,c,d){a.ca&&(!0===c||r(a,c|0))&&a.ca.message(b,d)}function t(a,b,c,d,e,f,g){a.ca&&(!0===g?g=0:null==g&&(g=a.fc),Ob(a.ca,a,b,c,d,e,f,g))}var Fb={ERROR:"error",$p:"notice",Ee:"progress",SCRIPT:"script",lq:"warning"};window&&(window.PCjs||(window.PCjs={}),window.PCjs.Machines||(window.PCjs.Machines={}),window.PCjs.Components||(window.PCjs.Components=[]),window.PCjs.Commands||(window.PCjs.Commands={}));
|
||||
var ob=window?window.PCjs.Machines:{},mb=window?window.PCjs.Components:[],Ab=window?window.PCjs.Commands:{},Cb=["hold","sleep","wait"],Db={alert:function(a){ab(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},Eb={select:function(a,b,c){var d=!1;if(a=a.bindings[b])for(b=0;b<a.options.length;b++)if(a.options[b].textContent==c){a.selectedIndex!=b&&(a.selectedIndex=b);d=!0;break}return d}};
|
||||
Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});
|
||||
Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});
|
||||
|
|
@ -97,7 +97,7 @@ Xj:25,Uj:20,Wj:28,uk:13,wk:21,tk:16,vk:24,Zj:13,ak:21,Yj:16,$j:24,Df:2,Cf:7,Oh:5
|
|||
93:"critical error information (@AL)",96:"get fully-qualified filename from $@DS:@SI",99:"get lead byte table (@AL)",108:"extended open file $@DS:@SI"},65:{79:"check debugger loaded"}},Tb={cpu:1,seg:2,desc:4,tss:8,"int":16,fault:32,bus:64,mem:128,port:256,dma:512,pic:1024,timer:2048,cmos:4096,rtc:8192,8042:16384,chipset:32768,keyboard:65536,key:131072,video:262144,fdc:524288,hdc:1048576,disk:2097152,parallel:4194304,serial:8388608,mouse:16777216,speaker:33554432,computer:67108864,dos:134217728,data:268435456,
|
||||
log:536870912,warn:1073741824,halt:-2147483648};function Ub(a){ib.call(this,"Panel",a);this.mi=this.A=this.B=this.H=-1}ba(Ub,ib);l=Ub.prototype;l.uc=function(a,b,c,d){this.oa=a;this.na=b;this.G=c;this.ca=d;this.C=Vb(a,"Keyboard")};l.Eb=function(a,b,c,d){return this.oa&&this.oa.Eb(a,b,c,d)||this.G&&this.G.Eb(a,b,c,d)||this.C&&this.C.Eb(a,b,c,d)||this.ca&&this.ca.Eb(a,b,c,d)?!0:ib.prototype.Eb.call(this,a,b,c,d)};l.ac=function(a,b){b||Wb();return!0};l.$b=function(){return!0};
|
||||
l.Yd=function(a,b){a.button||(this.H=b?0:-1,Xb(this,a,b))};l.tf=function(a){Xb(this,a)};
|
||||
function Xb(a,b,c){var d=Yb/null.offsetWidth,e=Zb/null.offsetHeight,f=null.getBoundingClientRect(),d=(b.clientX-f.left)*d|0;b=(b.clientY-f.top)*e|0;null==c&&(a.H||(a.H=Math.abs(a.A-d)>Math.abs(a.B-b)?1:2),1==a.H?b=a.B:2==a.H&&(d=a.A));a.A=d;a.B=b;if(0<=d&&d<Yb&&0<=b&&b<Zb){a:{c=d;if(c<$b&&a.F&&a.F.Qi)for(f=0;f<a.F.Qi.length;f++)if(e=a.F.Qi[f],e.contains(c,b)){c-=e.x;b-=e.y;var f=a.F.gq[f],g,d=ac.nn;g=(a.F.fq[f.kq]&d.en)>>d.shift;d=g*a.na.B;f=(g+f.iq)*a.na.B-1;0<b&&(d+=e.jq*(b-1)*a.ha);d+=c*a.ha;d|=
|
||||
function Xb(a,b,c){var d=Yb/null.offsetWidth,e=Zb/null.offsetHeight,f=null.getBoundingClientRect(),d=(b.clientX-f.left)*d|0;b=(b.clientY-f.top)*e|0;null==c&&(a.H||(a.H=Math.abs(a.A-d)>Math.abs(a.B-b)?1:2),1==a.H?b=a.B:2==a.H&&(d=a.A));a.A=d;a.B=b;if(0<=d&&d<Yb&&0<=b&&b<Zb){a:{c=d;if(c<$b&&a.F&&a.F.Qi)for(f=0;f<a.F.Qi.length;f++)if(e=a.F.Qi[f],e.contains(c,b)){c-=e.x;b-=e.y;var f=a.F.oq[f],g,d=ac.rn;g=(a.F.nq[f.sq]&d.jn)>>d.shift;d=g*a.na.B;f=(g+f.qq)*a.na.B-1;0<b&&(d+=e.rq*(b-1)*a.ha);d+=c*a.ha;d|=
|
||||
0;d>f&&(d=f);c=d;break a}c=-1}if(-1!==c&&(c&=-16,c!=a.N)){b=c;if(a.context&&a.K&&a.L){e=bc-cc;f=a.K.width;a.L.fillStyle=dc;a.L.fillRect(0,e,f,cc);d=e+ec;g=a.K;var h=a.L,k,m=null.style.color,p=a.ka=10;a.D=p;a.J=d;a.ea=a.ba=ec;k||(k=a.U||a.ba+"px "+fc);a.aa=a.U=k;g&&(a.P=g);h&&(a.I=h,a.V=m||"white");a.M=a.P.width/24|0;if(null==b)gc(a,"Mouse over memory to dump");else for(gc(a,q(b,8,!0),null,0,1),k=1;16>=k;k++){d="";for(g=1;8>=g;g++)h=a.na,m=b++,h=h.aa[(m&h.C)>>>h.A].be(m&h.D,m),gc(a,q(h,2),null,1),
|
||||
d+=32<=h&&128>h?String.fromCharCode(h):".";gc(a,d,null,0,1)}a.context.drawImage(a.K,0,e,f,cc,a.ra,a.ta,a.la,a.qa)}a.N=c}}}function gc(a,b,c,d,e){a.I.font=a.aa;a.I.fillStyle=a.V;a.I.fillText(b,a.D,a.J);a.D+=a.M;null!=c&&(16!=a.pa?b=c.toString():(b=8>a.fa?"0x":"",b+=q(c,a.fa)),a.I.fillText(b,a.D,a.J),a.D+=a.M);d&&(a.D+=a.M*d);e&&(a.D=a.ka,a.J+=(a.ea+2)*(e||1))}
|
||||
function Wb(){for(var a=!1,b=vb(document,"pcx86","panel"),c=0;c<b.length;c++){var d=b[c],e=wb(d),f=yb(e.id);f||(a=!0,f=new Ub(e));ub(f,d);a&&Jb(f)}}var Yb=1280,Zb=720,ec=18,fc="Monaco, Lucida Console, Courier New",$b=3*Yb>>2,bc=Zb,dc="black",cc=Zb>>1;Xa(Wb);
|
||||
|
|
@ -106,48 +106,48 @@ a.Tf-1;a=this.G;a.gf=a.cd=this.C;Jb(this)}ba(hc,ib);l=hc.prototype;l.reset=funct
|
|||
function kc(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.A;0<g&&h<a.aa.length;){var k=a.aa[h],m=h*a.B,p=a.B-(f-m);p>g&&(p=g);if(k&&k.size){if(k.type==d&&k.controller==e){if(f+g<=k.za)return k.Be+=k.za-f,k.za=f,!0;if(f>=k.za+k.Be){p=k.size-(f-m);p>g&&(p=g);k.Be=f-k.za+p;f=m+a.B;g-=p;h++;continue}}return lc(a,mc,f,g)}f=new w(f,p,a.B,d,e);ic(f,a.ca,k);a.aa[h++]=f;f=m+a.B;g-=p}return 0>=g?(nc(a.G),a.G.Z.Xa||(e=c/1024|0,a.status((e?e+"Kb ":c+" bytes ")+oc[d]+" at "+q(b))),!0):lc(a,pc,b,c)}
|
||||
function jc(a,b){32==a.I?b?a.J&&(qc(a,1048576,1048576,a.J),a.J=null):a.J||(a.J=rc(a,1048576,1048576),qc(a,1048576,1048576,rc(a,0,1048576))):20<a.I&&(b=a.C&-1048577|(b?1048576:0),b!=a.C&&(a.C=b,a.G&&(a=a.G,a.gf=a.cd=b)))}l.Jg=function(a,b,c,d){if(!(a&this.D||!b||b&this.D)){for(var e=a>>>this.A;0<b;){var f=this.aa[e];if(!f.controller)return lc(this,sc,a,b,d);tc(f,c,!0);b-=this.B;e++}return!0}return lc(this,vc,a,b)};
|
||||
function wc(a,b,c){if(!(b&a.D||!c||c&a.D)){for(var d=b>>>a.A;0<c;){var e=a.aa[d];b=new w(b);ic(b,a.ca,e);a.aa[d++]=b;b=d*a.B;c-=a.B}nc(a.G);return!0}return lc(a,xc,b,c)}function rc(a,b,c){var d=[];for(b>>>=a.A;0<c&&b<a.aa.length;)d.push(a.aa[b++]),c-=a.B;return d}
|
||||
function qc(a,b,c,d,e){for(var f=0,g=b>>>a.A;0<c&&g<a.aa.length;){var h=d[f++];if(!h)break;if(void 0!==e){var k=new w(b),m=k,p=e,v=a.ca;m.id=h.id|1;m.Be=h.Be;m.size=h.size;p&&(m.type=p,m.D=p==zc);Pb?(m.I=h.I,m.H=h.H,m.Qa=h.Qa,m.Ud=h.Ud,m.W=h.W,tc(m,Ac?Bc:Cc)):(m.W=h.W,tc(m,Dc));ic(m,v,h);h=k}a.aa[g++]=h;c-=a.B}}l.ya=function(a){return this.aa[(a&this.C)>>>this.A].Cc(a&this.D,a)};function Ec(a,b){var c=b&a.D,d=(b&a.C)>>>a.A;return c!=a.D?a.aa[d].Lf(c,b):a.aa[d++].be(c,b)|a.aa[d&a.P].be(0,b+1)<<8}
|
||||
function qc(a,b,c,d,e){for(var f=0,g=b>>>a.A;0<c&&g<a.aa.length;){var h=d[f++];if(!h)break;if(void 0!==e){var k=new w(b),m=k,p=e,v=a.ca;m.id=h.id|1;m.Be=h.Be;m.size=h.size;p&&(m.type=p,m.D=p==yc);Pb?(m.I=h.I,m.H=h.H,m.Qa=h.Qa,m.Ud=h.Ud,m.W=h.W,tc(m,Ac?Bc:Cc)):(m.W=h.W,tc(m,Dc));ic(m,v,h);h=k}a.aa[g++]=h;c-=a.B}}l.ya=function(a){return this.aa[(a&this.C)>>>this.A].Cc(a&this.D,a)};function Ec(a,b){var c=b&a.D,d=(b&a.C)>>>a.A;return c!=a.D?a.aa[d].Lf(c,b):a.aa[d++].be(c,b)|a.aa[d&a.P].be(0,b+1)<<8}
|
||||
l.ub=function(a,b){this.aa[(a&this.C)>>>this.A].Ec(a&this.D,b&255,a)};function Fc(a,b,c){var d=b&a.D,e=(b&a.C)>>>a.A;d!=a.D?a.aa[e].pi(d,c&65535,b):(a.aa[e++].df(d,c&255,b),a.aa[e&a.P].df(0,c>>8&255,b+1))}l.uj=function(){return null};
|
||||
function Gc(a,b){var c=0,d=[],e=!a.J&&a.N==a.C;e||jc(a,!0);for(var f=0;f<a.M;f++){var g=a.aa[f];if(b&&g.type!=zc||g.Oa||g.oj){d[c++]=f;var h=c++;if(g=g.save()){for(var k=0,m=0,p=[];k<g.length;){for(var v=g[k],u=k+1;u<g.length&&g[u]===v;)u++;p[m++]=u-k;p[m++]=v;k=u}p.length<g.length&&(g=p)}d[h]=g}}e||jc(a,!1);d[c]=e;return d}function Hc(a,b){if(null==b)return a.K=!a.K,a.K;void 0===a.F[b]&&(a.F[b]=[null,!1]);a.F[b][1]=!a.F[b][1];return a.F[b][1]}
|
||||
function Gc(a,b){var c=0,d=[],e=!a.J&&a.N==a.C;e||jc(a,!0);for(var f=0;f<a.M;f++){var g=a.aa[f];if(b&&g.type!=yc||g.Oa||g.oj){d[c++]=f;var h=c++;if(g=g.save()){for(var k=0,m=0,p=[];k<g.length;){for(var v=g[k],u=k+1;u<g.length&&g[u]===v;)u++;p[m++]=u-k;p[m++]=v;k=u}p.length<g.length&&(g=p)}d[h]=g}}e||jc(a,!1);d[c]=e;return d}function Hc(a,b){if(null==b)return a.K=!a.K,a.K;void 0===a.F[b]&&(a.F[b]=[null,!1]);a.F[b][1]=!a.F[b][1];return a.F[b][1]}
|
||||
function Ic(a,b,c,d){void 0===d&&(d=0);for(var e in c){var f=a,g=+e+d,h=c[e].bind(b);if(h)for(var k=+e+d;k<=g;k++)void 0!==f.F[k]?ab("Input port "+oa(k)+" already registered"):f.F[k]=[h,!1]}}function Jc(a,b,c,d){for(var e=0,f=0;0<c;){var g=a.F[b],h=a.V[b]||1,k=1==h?255:2==h?65535:-1,m=k;void 0!==g?(g[0]&&(m=g[0](b,d),null==m?m=k:m&=k),a.ca&&a.K!=g[1]&&Kc(a.ca,b,m)):a.ca&&(Ob(a.ca,a,b,null,d),a.K&&Kc(a.ca,b,m));e|=m<<f;f+=h<<3;b+=h;c-=h}return e}
|
||||
function Lc(a,b){if(null==b)return a.L=!a.L,a.L;void 0===a.H[b]&&(a.H[b]=[null,!1]);a.H[b][1]=!a.H[b][1];return a.H[b][1]}function Mc(a,b,c,d){void 0===d&&(d=0);for(var e in c){var f=a,g=+e+d,h=c[e].bind(b);if(h)for(var k=+e+d;k<=g;k++)void 0!==f.H[k]?ab("Output port "+oa(k)+" already registered"):f.H[k]=[h,!1]}}
|
||||
function Nc(a,b,c,d,e){for(var f=0;0<c;){var g=a.H[b],h=a.U[b]||1,k=1==h?255:2==h?65535:-1,k=(d>>>=f)&k;if(void 0!==g){if(g[0])g[0](b,k,e);a.ca&&a.L!=g[1]&&Pc(a.ca,b,k)}else a.ca&&(Ob(a.ca,a,b,k,e),a.L&&Pc(a.ca,b,k));f+=h<<3;b+=h;c-=h}}function lc(a,b,c,d,e){b="Memory block error ("+b+": "+q(c)+","+q(d)+")";e?a.ca?a.ca.message(b):a.log(b):ab(b);return!1}var ac,Qc={nn:20,count:8,hq:1,type:3},Rc=0,Sc;for(Sc in Qc){var Tc=Qc[Sc];Qc[Sc]={en:(1<<Tc)-1<<Rc,shift:Rc};Rc+=Tc}ac=Qc;
|
||||
function Nc(a,b,c,d,e){for(var f=0;0<c;){var g=a.H[b],h=a.U[b]||1,k=1==h?255:2==h?65535:-1,k=(d>>>=f)&k;if(void 0!==g){if(g[0])g[0](b,k,e);a.ca&&a.L!=g[1]&&Oc(a.ca,b,k)}else a.ca&&(Ob(a.ca,a,b,k,e),a.L&&Oc(a.ca,b,k));f+=h<<3;b+=h;c-=h}}function lc(a,b,c,d,e){b="Memory block error ("+b+": "+q(c)+","+q(d)+")";e?a.ca?a.ca.message(b):a.log(b):ab(b);return!1}var ac,Qc={rn:20,count:8,pq:1,type:3},Rc=0,Sc;for(Sc in Qc){var Tc=Qc[Sc];Qc[Sc]={jn:(1<<Tc)-1<<Rc,shift:Rc};Rc+=Tc}ac=Qc;
|
||||
var mc=1,pc=2,sc=3,vc=4,xc=5,Uc;if(Pb){var Vc=new ArrayBuffer(2);(new DataView(Vc)).setUint16(0,256,!0);Uc=256===(new Uint16Array(Vc))[0]}else Uc=!1;var Ac=Uc;
|
||||
function w(a,b,c,d,e,f){this.id=Wc+=2;this.W=null;this.G=0;this.za=a;this.Be=b;this.size=c||0;this.type=d||Xc;this.D=d==zc;this.controller=null;this.C=f;ic(this);this.Oa=this.oj=!1;if(c)if(e)this.controller=e,a=e.tj(a),this.W=a[0],this.G=a[1],tc(this,e.eh());else if(Pb)this.I=new ArrayBuffer(c),this.H=new DataView(this.I,0,c),this.Qa=new Uint8Array(this.I,0,c),this.Ud=new Uint16Array(this.I,0,c>>1),this.W=new Int32Array(this.I,0,c>>2),tc(this,Ac?Bc:Cc);else{this.W=Array(c>>2);for(e=0;e<this.W.length;e++)this.W[e]=
|
||||
function w(a,b,c,d,e,f){this.id=Wc+=2;this.W=null;this.G=0;this.za=a;this.Be=b;this.size=c||0;this.type=d||Xc;this.D=d==yc;this.controller=null;this.C=f;ic(this);this.Oa=this.oj=!1;if(c)if(e)this.controller=e,a=e.tj(a),this.W=a[0],this.G=a[1],tc(this,e.eh());else if(Pb)this.I=new ArrayBuffer(c),this.H=new DataView(this.I,0,c),this.Qa=new Uint8Array(this.I,0,c),this.Ud=new Uint16Array(this.I,0,c>>1),this.W=new Int32Array(this.I,0,c>>2),tc(this,Ac?Bc:Cc);else{this.W=Array(c>>2);for(e=0;e<this.W.length;e++)this.W[e]=
|
||||
0;tc(this,Dc)}else tc(this)}l=w.prototype;l.hh=function(a){this.za=a};l.save=function(){var a,b;if(this.controller)a=null;else if(Pb)for(a=Array(this.size>>2),b=0;b<a.length;b++)a[b]=this.H.getInt32(b<<2,!0);else a=this.W;return a};l.restore=function(a){if(this.controller)return!a;if(a&&this.size==a.length<<2){var b;if(Pb)for(b=0;b<a.length;b++)this.H.setInt32(b<<2,a[b],!0);else this.W=a;return this.Oa=!0}return!1};function tc(a,b,c){b||(b=a.type==Yc?Zc:a.type==$c?ad:bd);cd(a,b,c);dd(a,b,c)}
|
||||
function cd(a,b,c){c&&a.le||(a.Cc=b[0]||a.Sk,a.Kf=b[2]||a.Tk,a.Od=b[4]||a.Qk);if(c||void 0===c)a.be=b[0]||a.Sk,a.Lf=b[2]||a.Tk,a.hi=b[4]||a.Qk}function dd(a,b,c){c&&a.me||(a.Ec=!a.D&&b[1]||a.ef,a.Qf=!a.D&&b[3]||a.oi,a.Pf=!a.D&&b[5]||a.ni);if(c||void 0===c)a.df=b[1]||a.ef,a.pi=b[3]||a.oi,a.K=b[5]||a.ni}function ed(a){a.Cc=a.be;a.Kf=a.Lf;a.Od=a.hi}function fd(a){a.Ec=a.D?a.ef:a.df;a.Qf=a.D?a.oi:a.pi;a.Pf=a.D?a.ni:a.K}
|
||||
l.td=function(a,b,c){b?this.me++||(c&&(this.C=c),dd(this,gd,!1)):this.le++||(c&&(this.C=c),cd(this,gd,!1))};function ic(a,b,c){a.ca=b;a.le=a.me=0;c&&(c.C&&(a.C=c.C),(a.le=c.le)&&cd(a,gd,!1),(a.me=c.me)&&dd(a,gd,!1))}l.Sk=function(a,b){this.ca&&r(this.ca,129)&&this.ca.message("attempt to read invalid block %"+q(b),!0);return 255};l.ef=function(a,b,c){this.ca&&r(this.ca,129)&&this.ca.message("attempt to write "+oa(b)+" to invalid block %"+q(c),!0)};
|
||||
l.Tk=function(a,b){return this.Cc(a++,b++)|this.Cc(a,b)<<8};l.Qk=function(a,b){return this.Cc(a++,b++)|this.Cc(a++,b++)<<8|this.Cc(a++,b++)<<16|this.Cc(a,b)<<24};l.oi=function(a,b,c){this.Ec(a++,b&255,c++);this.Ec(a,b>>8,c)};l.ni=function(a,b,c){this.Ec(a++,b&255,c++);this.Ec(a++,b>>8&255,c++);this.Ec(a++,b>>16&255,c++);this.Ec(a,b>>>24,c)};l.vo=function(a){return this.W[a>>2]>>>((a&3)<<3)&255};
|
||||
l.Ho=function(a){var b=a>>2;a=(a&3)<<3;var c=this.W[b]>>a;return 24>a?c&65535:c&255|(this.W[b+1]&255)<<8};l.Bo=function(a){var b=a>>2;a=(a&3)<<3;var c=this.W[b];a&&(c=c>>>a|this.W[b+1]<<32-a);return c};l.Xo=function(a,b){var c=a>>2;a=(a&3)<<3;this.W[c]=this.W[c]&~(255<<a)|b<<a;this.Oa=!0};l.jp=function(a,b){var c=a>>2;a=(a&3)<<3;24>a?this.W[c]=this.W[c]&~(65535<<a)|b<<a:(this.W[c]=this.W[c]&16777215|b<<24,c++,this.W[c]=this.W[c]&-256|b>>8);this.Oa=!0};
|
||||
l.cp=function(a,b){var c=a>>2;if(a=(a&3)<<3){var d=-1<<a;this.W[c]=this.W[c]&~d|b<<a;c++;this.W[c]=this.W[c]&d|b>>>32-a}else this.W[c]=b;this.Oa=!0};l.uo=function(a,b){this.ca&&null!=this.za&&hd(this.ca,this.za+a)||this.C&&id(this.C,b,1,!1);return this.be(a,b)};l.Go=function(a,b){this.ca&&null!=this.za&&hd(this.ca,this.za+a,2)||this.C&&id(this.C,b,2,!1);return this.Lf(a,b)};l.Ao=function(a,b){this.ca&&null!=this.za&&hd(this.ca,this.za+a,4)||this.C&&id(this.C,b,4,!1);return this.hi(a,b)};
|
||||
l.Wo=function(a,b,c){this.ca&&null!=this.za&&jd(this.ca,this.za+a)||this.C&&id(this.C,c,1,!0);this.D?this.ef(0,b,c):this.df(a,b,c)};l.ip=function(a,b,c){this.ca&&null!=this.za&&jd(this.ca,this.za+a,2)||this.C&&id(this.C,c,2,!0);this.D?this.ef(0,b,c):this.pi(a,b,c)};l.bp=function(a,b,c){this.ca&&null!=this.za&&jd(this.ca,this.za+a,4)||this.C&&id(this.C,c,4,!0);this.D?this.ef(0,b,c):this.K(a,b,c)};l.xo=function(a,b){this.pb.W[this.A]|=this.F;this.qb.W[this.B]|=this.F;return this.vd.Cc(a,b)};
|
||||
l.Jo=function(a,b){this.pb.W[this.A]|=this.F;this.qb.W[this.B]|=this.F;return this.vd.Kf(a,b)};l.Do=function(a,b){this.pb.W[this.A]|=this.F;this.qb.W[this.B]|=this.F;return this.vd.Od(a,b)};l.Zo=function(a,b,c){this.pb.W[this.A]|=this.F;this.qb.W[this.B]|=this.J;this.vd.Ec(a,b,c)};l.lp=function(a,b,c){this.pb.W[this.A]|=this.F;this.qb.W[this.B]|=this.J;this.vd.Qf(a,b,c)};l.fp=function(a,b,c){this.pb.W[this.A]|=this.F;this.qb.W[this.B]|=this.J;this.vd.Pf(a,b,c)};
|
||||
l.yo=function(a,b){return kd(this.C,b,!1).Cc(a,b)};l.Ko=function(a,b){return kd(this.C,b,!1).Kf(a,b)};l.Eo=function(a,b){return kd(this.C,b,!1).Od(a,b)};l.$o=function(a,b,c){kd(this.C,c,!0).Ec(a,b,c)};l.mp=function(a,b,c){kd(this.C,c,!0).Qf(a,b,c)};l.gp=function(a,b,c){kd(this.C,c,!0).Pf(a,b,c)};l.to=function(a){return this.Qa[a]};l.Pk=function(a){return this.Qa[a]};l.wo=function(a){this.pb.W[this.A]|=32;this.qb.W[this.B]|=32;this.Cc=this.Pk;return this.Qa[a]};
|
||||
l.Fo=function(a){return this.H.getUint16(a,!0)};l.Uk=function(a){return a&1?this.Qa[a]|this.Qa[a+1]<<8:this.Ud[a>>1]};l.Io=function(a){this.pb.W[this.A]|=32;this.qb.W[this.B]|=32;this.Kf=this.Uk;return a&1?this.Qa[a]|this.Qa[a+1]<<8:this.Ud[a>>1]};l.zo=function(a){return this.H.getInt32(a,!0)};l.Rk=function(a){return a&3?this.Qa[a]|this.Qa[a+1]<<8|this.Qa[a+2]<<16|this.Qa[a+3]<<24:this.W[a>>2]};
|
||||
l.Co=function(a){this.pb.W[this.A]|=32;this.qb.W[this.B]|=32;this.Od=this.Rk;return a&3?this.Qa[a]|this.Qa[a+1]<<8|this.Qa[a+2]<<16|this.Qa[a+3]<<24:this.W[a>>2]};l.Vo=function(a,b){this.Qa[a]=b;this.Oa=!0};l.bl=function(a,b){this.Qa[a]=b;this.Oa=!0};l.Yo=function(a,b){this.Qa[a]=b;this.pb.W[this.A]|=32;this.qb.W[this.B]|=96;this.Ec=this.bl;this.vd.Oa=!0};l.hp=function(a,b){this.H.setUint16(a,b,!0);this.Oa=!0};l.dl=function(a,b){a&1?(this.Qa[a]=b,this.Qa[a+1]=b>>8):this.Ud[a>>1]=b;this.Oa=!0};
|
||||
l.kp=function(a,b){a&1?(this.Qa[a]=b,this.Qa[a+1]=b>>8):this.Ud[a>>1]=b;this.pb.W[this.A]|=32;this.qb.W[this.B]|=96;this.Qf=this.dl;this.vd.Oa=!0};l.ap=function(a,b){this.H.setInt32(a,b,!0);this.Oa=!0};l.cl=function(a,b){a&3?(this.Qa[a]=b,this.Qa[a+1]=b>>8,this.Qa[a+2]=b>>16,this.Qa[a+3]=b>>24):this.W[a>>2]=b;this.Oa=!0};
|
||||
l.ep=function(a,b){a&3?(this.Qa[a]=b,this.Qa[a+1]=b>>8,this.Qa[a+2]=b>>16,this.Qa[a+3]=b>>24):this.W[a>>2]=b;this.pb.W[this.A]|=32;this.qb.W[this.B]|=96;this.Pf=this.cl;this.vd.Oa=!0};function ld(a){Pb&&!Ac&&(a=a<<24|a<<8&16711680|a>>8&65280|a>>>24);return a}
|
||||
var Xc=0,zc=2,Yc=5,$c=6,oc="NONE RAM ROM VIDEO H/W UNPAGED PAGED".split(" "),Wc=0,bd=[],Dc=[w.prototype.vo,w.prototype.Xo,w.prototype.Ho,w.prototype.jp,w.prototype.Bo,w.prototype.cp],gd=[w.prototype.uo,w.prototype.Wo,w.prototype.Go,w.prototype.ip,w.prototype.Ao,w.prototype.bp],ad=[w.prototype.xo,w.prototype.Zo,w.prototype.Jo,w.prototype.lp,w.prototype.Do,w.prototype.fp],Zc=[w.prototype.yo,w.prototype.$o,w.prototype.Ko,w.prototype.mp,w.prototype.Eo,w.prototype.gp];
|
||||
if(Pb)var Cc=[w.prototype.to,w.prototype.Vo,w.prototype.Fo,w.prototype.hp,w.prototype.zo,w.prototype.ap],Bc=[w.prototype.Pk,w.prototype.bl,w.prototype.Uk,w.prototype.dl,w.prototype.Rk,w.prototype.cl],md=[w.prototype.wo,w.prototype.Yo,w.prototype.Io,w.prototype.kp,w.prototype.Co,w.prototype.ep];
|
||||
function sd(a,b){ib.call(this,"CPU",a,1);b=a.cycles||b;var c=a.multiplier||1;this.Y={};this.Y.Zd=b;this.Y.Fj=this.Y.qh=this.Y.Cd=c;this.Y.qg=Math.round(this.Y.Zd/1E4)/100;this.Y.Ld=this.Y.te=this.Y.qg*this.Y.Cd;this.Z.li=this.Z.Xa=this.Z.Rf=!1;this.Z.je=a.autoStart;this.Z.jj=!1;this.Z.Ke=!1;this.Y.vf=this.Y.Ue=0;this.Y.xf=a.csStart;this.Y.Te=a.csInterval;this.Y.Ve=a.csStop;this.qa=[];this.xj=this.Lo.bind(this)}ba(sd,ib);l=sd.prototype;
|
||||
l.Tk=function(a,b){return this.Cc(a++,b++)|this.Cc(a,b)<<8};l.Qk=function(a,b){return this.Cc(a++,b++)|this.Cc(a++,b++)<<8|this.Cc(a++,b++)<<16|this.Cc(a,b)<<24};l.oi=function(a,b,c){this.Ec(a++,b&255,c++);this.Ec(a,b>>8,c)};l.ni=function(a,b,c){this.Ec(a++,b&255,c++);this.Ec(a++,b>>8&255,c++);this.Ec(a++,b>>16&255,c++);this.Ec(a,b>>>24,c)};l.Do=function(a){return this.W[a>>2]>>>((a&3)<<3)&255};
|
||||
l.Po=function(a){var b=a>>2;a=(a&3)<<3;var c=this.W[b]>>a;return 24>a?c&65535:c&255|(this.W[b+1]&255)<<8};l.Jo=function(a){var b=a>>2;a=(a&3)<<3;var c=this.W[b];a&&(c=c>>>a|this.W[b+1]<<32-a);return c};l.fp=function(a,b){var c=a>>2;a=(a&3)<<3;this.W[c]=this.W[c]&~(255<<a)|b<<a;this.Oa=!0};l.rp=function(a,b){var c=a>>2;a=(a&3)<<3;24>a?this.W[c]=this.W[c]&~(65535<<a)|b<<a:(this.W[c]=this.W[c]&16777215|b<<24,c++,this.W[c]=this.W[c]&-256|b>>8);this.Oa=!0};
|
||||
l.lp=function(a,b){var c=a>>2;if(a=(a&3)<<3){var d=-1<<a;this.W[c]=this.W[c]&~d|b<<a;c++;this.W[c]=this.W[c]&d|b>>>32-a}else this.W[c]=b;this.Oa=!0};l.Co=function(a,b){this.ca&&null!=this.za&&hd(this.ca,this.za+a)||this.C&&id(this.C,b,1,!1);return this.be(a,b)};l.Oo=function(a,b){this.ca&&null!=this.za&&hd(this.ca,this.za+a,2)||this.C&&id(this.C,b,2,!1);return this.Lf(a,b)};l.Io=function(a,b){this.ca&&null!=this.za&&hd(this.ca,this.za+a,4)||this.C&&id(this.C,b,4,!1);return this.hi(a,b)};
|
||||
l.ep=function(a,b,c){this.ca&&null!=this.za&&jd(this.ca,this.za+a)||this.C&&id(this.C,c,1,!0);this.D?this.ef(0,b,c):this.df(a,b,c)};l.qp=function(a,b,c){this.ca&&null!=this.za&&jd(this.ca,this.za+a,2)||this.C&&id(this.C,c,2,!0);this.D?this.ef(0,b,c):this.pi(a,b,c)};l.kp=function(a,b,c){this.ca&&null!=this.za&&jd(this.ca,this.za+a,4)||this.C&&id(this.C,c,4,!0);this.D?this.ef(0,b,c):this.K(a,b,c)};l.Fo=function(a,b){this.pb.W[this.A]|=this.F;this.qb.W[this.B]|=this.F;return this.vd.Cc(a,b)};
|
||||
l.Ro=function(a,b){this.pb.W[this.A]|=this.F;this.qb.W[this.B]|=this.F;return this.vd.Kf(a,b)};l.Lo=function(a,b){this.pb.W[this.A]|=this.F;this.qb.W[this.B]|=this.F;return this.vd.Od(a,b)};l.hp=function(a,b,c){this.pb.W[this.A]|=this.F;this.qb.W[this.B]|=this.J;this.vd.Ec(a,b,c)};l.tp=function(a,b,c){this.pb.W[this.A]|=this.F;this.qb.W[this.B]|=this.J;this.vd.Qf(a,b,c)};l.np=function(a,b,c){this.pb.W[this.A]|=this.F;this.qb.W[this.B]|=this.J;this.vd.Pf(a,b,c)};
|
||||
l.Go=function(a,b){return kd(this.C,b,!1).Cc(a,b)};l.So=function(a,b){return kd(this.C,b,!1).Kf(a,b)};l.Mo=function(a,b){return kd(this.C,b,!1).Od(a,b)};l.ip=function(a,b,c){kd(this.C,c,!0).Ec(a,b,c)};l.up=function(a,b,c){kd(this.C,c,!0).Qf(a,b,c)};l.op=function(a,b,c){kd(this.C,c,!0).Pf(a,b,c)};l.Bo=function(a){return this.Qa[a]};l.Pk=function(a){return this.Qa[a]};l.Eo=function(a){this.pb.W[this.A]|=32;this.qb.W[this.B]|=32;this.Cc=this.Pk;return this.Qa[a]};
|
||||
l.No=function(a){return this.H.getUint16(a,!0)};l.Uk=function(a){return a&1?this.Qa[a]|this.Qa[a+1]<<8:this.Ud[a>>1]};l.Qo=function(a){this.pb.W[this.A]|=32;this.qb.W[this.B]|=32;this.Kf=this.Uk;return a&1?this.Qa[a]|this.Qa[a+1]<<8:this.Ud[a>>1]};l.Ho=function(a){return this.H.getInt32(a,!0)};l.Rk=function(a){return a&3?this.Qa[a]|this.Qa[a+1]<<8|this.Qa[a+2]<<16|this.Qa[a+3]<<24:this.W[a>>2]};
|
||||
l.Ko=function(a){this.pb.W[this.A]|=32;this.qb.W[this.B]|=32;this.Od=this.Rk;return a&3?this.Qa[a]|this.Qa[a+1]<<8|this.Qa[a+2]<<16|this.Qa[a+3]<<24:this.W[a>>2]};l.cp=function(a,b){this.Qa[a]=b;this.Oa=!0};l.bl=function(a,b){this.Qa[a]=b;this.Oa=!0};l.gp=function(a,b){this.Qa[a]=b;this.pb.W[this.A]|=32;this.qb.W[this.B]|=96;this.Ec=this.bl;this.vd.Oa=!0};l.pp=function(a,b){this.H.setUint16(a,b,!0);this.Oa=!0};l.dl=function(a,b){a&1?(this.Qa[a]=b,this.Qa[a+1]=b>>8):this.Ud[a>>1]=b;this.Oa=!0};
|
||||
l.sp=function(a,b){a&1?(this.Qa[a]=b,this.Qa[a+1]=b>>8):this.Ud[a>>1]=b;this.pb.W[this.A]|=32;this.qb.W[this.B]|=96;this.Qf=this.dl;this.vd.Oa=!0};l.jp=function(a,b){this.H.setInt32(a,b,!0);this.Oa=!0};l.cl=function(a,b){a&3?(this.Qa[a]=b,this.Qa[a+1]=b>>8,this.Qa[a+2]=b>>16,this.Qa[a+3]=b>>24):this.W[a>>2]=b;this.Oa=!0};
|
||||
l.mp=function(a,b){a&3?(this.Qa[a]=b,this.Qa[a+1]=b>>8,this.Qa[a+2]=b>>16,this.Qa[a+3]=b>>24):this.W[a>>2]=b;this.pb.W[this.A]|=32;this.qb.W[this.B]|=96;this.Pf=this.cl;this.vd.Oa=!0};function ld(a){Pb&&!Ac&&(a=a<<24|a<<8&16711680|a>>8&65280|a>>>24);return a}
|
||||
var Xc=0,yc=2,Yc=5,$c=6,oc="NONE RAM ROM VIDEO H/W UNPAGED PAGED".split(" "),Wc=0,bd=[],Dc=[w.prototype.Do,w.prototype.fp,w.prototype.Po,w.prototype.rp,w.prototype.Jo,w.prototype.lp],gd=[w.prototype.Co,w.prototype.ep,w.prototype.Oo,w.prototype.qp,w.prototype.Io,w.prototype.kp],ad=[w.prototype.Fo,w.prototype.hp,w.prototype.Ro,w.prototype.tp,w.prototype.Lo,w.prototype.np],Zc=[w.prototype.Go,w.prototype.ip,w.prototype.So,w.prototype.up,w.prototype.Mo,w.prototype.op];
|
||||
if(Pb)var Cc=[w.prototype.Bo,w.prototype.cp,w.prototype.No,w.prototype.pp,w.prototype.Ho,w.prototype.jp],Bc=[w.prototype.Pk,w.prototype.bl,w.prototype.Uk,w.prototype.dl,w.prototype.Rk,w.prototype.cl],md=[w.prototype.Eo,w.prototype.gp,w.prototype.Qo,w.prototype.sp,w.prototype.Ko,w.prototype.mp];
|
||||
function nd(a,b){ib.call(this,"CPU",a,1);b=a.cycles||b;var c=a.multiplier||1;this.Y={};this.Y.Zd=b;this.Y.Fj=this.Y.qh=this.Y.Cd=c;this.Y.qg=Math.round(this.Y.Zd/1E4)/100;this.Y.Ld=this.Y.te=this.Y.qg*this.Y.Cd;this.Z.li=this.Z.Xa=this.Z.Rf=!1;this.Z.je=a.autoStart;this.Z.jj=!1;this.Z.Ke=!1;this.Y.vf=this.Y.Ue=0;this.Y.xf=a.csStart;this.Y.Te=a.csInterval;this.Y.Ve=a.csStop;this.qa=[];this.xj=this.To.bind(this)}ba(nd,ib);l=nd.prototype;
|
||||
l.uc=function(a,b,c,d){this.oa=a;this.na=b;this.ca=d;for(b=0;b<td.length;b++)(d=this.ma[td[b]])&&this.oa.Eb(null,td[b],d);this.Kc=Vb(a,"FPU");this.V=Vb(a,"ChipSet");a=ud(a,"autoStart");null!=a&&(this.Z.je="true"==a?!0:"false"==a?!1:!!a);vd(c,this.id,function(){c.Z.Rf=!0},1E3/wd);Jb(this)};l.reset=function(){};l.save=function(){return null};l.restore=function(){return!1};
|
||||
l.ac=function(a,b){if(!b){if(a&&this.restore){xd(this);if(!this.restore(a))return!1;yd(this)}else this.reset();this.ca?this.ca.hh():this.O("No debugger detected")}zd(this);return!0};l.$b=function(a,b){var c=this.Z.Xa;b&&this.Ub();return a?this.save(c):!0};l.je=function(){return this.Z.Xa?!0:this.Z.je||!this.ca&&void 0===this.ma.run?Ad(this):!1};l.sj=function(){return 0};
|
||||
function yd(a){void 0===a.Y.xf&&(a.Y.xf=0);void 0===a.Y.Te&&(a.Y.Te=-1);void 0===a.Y.Ve&&(a.Y.Ve=-1);a.Z.Ke=0<=a.Y.xf&&0<a.Y.Te;a.Z.Ke&&(a.Y.vf=0,a.Y.Ue=a.Y.xf-a.Hd)}function Bd(a,b){if(a.Z.Ke){var c=!1;a.Y.vf=a.Y.vf+a.sj()|0;a.Y.Ue-=b;0>=a.Y.Ue&&(a.Y.Ue+=a.Y.Te,c=!0);0<=a.Y.Ve&&a.Y.Ve<=Cd(a)&&(a.Y.Te=a.Y.Ve=-1,yd(a),a.Ub(),c=!0);c&&a.O(Cd(a)+" cycles: checksum="+q(a.Y.vf))}}
|
||||
l.Eb=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.ma[b]=c;a=!0;break;case "run":this.ma[b]=c;c.onclick=function(){var a=d.Z.Xa,b;if(b=d.oa)if(b=d.oa,b.Z.Ae&&(b.Z.Ae=!1,b.Z.qf&&!b.Z.bc&&b.Ye(Dd)),b.Z.bc)b=!0;else{var c=null,h,k=xb(b.id);for(h=0;h<k.length&&(c=k[h],c===b||c.Z.ready);h++);if(h==k.length)for(h=0;h<k.length&&(c=k[h],c===b||c.Z.bc);h++);h==k.length&&(c=b);ab("The "+c.type+" component ("+c.id+") is not "+(c.Z.ready?"powered yet":"ready yet"+(c.ng?" (waiting for notification)":
|
||||
""))+".");b=!1}b&&a==d.Z.Xa&&(d.Z.Xa?d.Ub(!0):Ad(d,!0))};a=!0;break;case "speed":this.ma[b]=c;a=!0;break;case "setSpeed":this.ma[b]=c,c.onclick=function(){Ed(d,d.Y.Cd<<1,!0)},c.textContent=this.Y.te.toFixed(2)+"Mhz",a=!0}return a};function Fd(a,b){a.Z.Xa&&(b=a.A-b,a.A-=b,a.md-=b)}function Gd(a,b,c){a.Hd+=b;c&&(a.md=a.A=0)}function Hd(a){var b=a.Y.Ld/a.Y.qg;if(!b||b>a.Y.Cd)b=a.Y.Cd;a.Y.Ej=Math.round(1E3/wd);a.Y.jn=Math.floor(a.Y.Zd/wd*b);a.Y.qh=b}
|
||||
""))+".");b=!1}b&&a==d.Z.Xa&&(d.Z.Xa?d.Ub(!0):Ad(d,!0))};a=!0;break;case "speed":this.ma[b]=c;a=!0;break;case "setSpeed":this.ma[b]=c,c.onclick=function(){Ed(d,d.Y.Cd<<1,!0)},c.textContent=this.Y.te.toFixed(2)+"Mhz",a=!0}return a};function Fd(a,b){a.Z.Xa&&(b=a.A-b,a.A-=b,a.md-=b)}function Gd(a,b,c){a.Hd+=b;c&&(a.md=a.A=0)}function Hd(a){var b=a.Y.Ld/a.Y.qg;if(!b||b>a.Y.Cd)b=a.Y.Cd;a.Y.Ej=Math.round(1E3/wd);a.Y.on=Math.floor(a.Y.Zd/wd*b);a.Y.qh=b}
|
||||
function Cd(a,b){var c=a.Hd+a.nd+a.md-a.A;b&&1<a.Y.Cd&&a.Y.Ld>a.Y.qg&&(c=Math.round(c/a.Y.Cd));return c}function xd(a){a.Hd=a.nd=a.md=a.A=0;yd(a);Ed(a,a.Y.Fj)}
|
||||
function Ed(a,b,c){var d=!0;if(void 0!==b){0<a.Y.Ld&&a.Y.Ld<.9*a.Y.te&&(b=a.Y.Fj,d=!1);a.Y.Ld=0;a.Y.Cd=b;b=a.Y.qg*a.Y.Cd;if(a.Y.te!=b){a.Y.te=b;b=a.Y.te.toFixed(2)+"Mhz";var e=a.ma.setSpeed;e&&(e.textContent=b);a.O("target speed: "+b)}c&&a.oa&&a.oa.dd()}Gd(a,a.nd);a.nd=0;a.Y.zd=a.Y.ue=0;Hd(a);for(c=a.qa.length-1;0<=c;c--)b=a.qa[c],0<=b[2]&&Id(a,c,b[2],!0);return d}function vd(a,b,c,d){d=void 0===d?-1:d;var e=a.qa.length;a.qa.push([b,-1,d,c]);0<=d&&Id(a,e,d);return e}
|
||||
function Id(a,b,c,d){0<=b&&b<a.qa.length&&(b=a.qa[b],d||0>b[1])&&(c=a.Y.Zd*a.Y.qh/1E3*c|0,a.Z.Xa&&(c+=Jd(a)),b[1]=c)}function Kd(a){for(var b=[],c=0;c<a.qa.length;c++){var d=a.qa[c];b.push([d[0],d[1],d[2]])}return b}function Jd(a){var b=a.md-a.A;a.md=a.A=0;a.Y.sg+=b;a.nd+=b;return b}
|
||||
l.Lo=function(){if(this.Z.Xa){Hd(this);this.Y.sg=0;this.Y.uf=Ea();this.Y.zd||(this.Y.zd=this.Y.uf);if(this.Y.ue){var a=this.Y.uf-this.Y.ue;a>this.Y.Ej&&(this.Y.zd+=a,this.Y.zd>this.Y.uf&&(this.Y.zd=this.Y.uf))}try{this.Z.Rf=!1;do{for(var b,c=this.Z.Ke?1:this.Y.Zd*this.Y.qh|0,d=this.qa.length-1;0<=d;d--){var e=this.qa[d];0>e[1]||c>e[1]&&(c=e[1])}b=c;if(this.V){Ld(this.V);var f=this.V,a=b,g=f.qa[0];if(g.qe){var h=(Cd(f.G,f.M)-g.jd)/f.Ea|0,k=Md(f,0)-h;g.mode==Nd&&(k-=h);var m=k*f.Ea|0;g.mode==Nd&&(m>>=
|
||||
1);a>m&&(a=m)}b=a;var p=this.V,a=b;if(p.A&&p.A[Pd]&Qd){var v=p.aa-Cd(p.G,p.M);0<v&&a>v&&(a=v)}b=a}try{this.Kg(b)}catch(G){if("number"!=typeof G)throw G;}for(var a=b=Jd(this),u=this.qa.length-1;0<=u;u--){var D=this.qa[u];0>D[1]||(D[1]-=a,0>=D[1]&&(D[1]=-1,D[3](),0<=D[2]&&Id(this,u,D[2])))}Bd(this,b)}while(this.Z.Xa&&!this.Z.Rf)}catch(G){this.Ub();zd(this);this.oa&&this.oa.stop(Ea(),Cd(this));Gb(this,G.stack||G.message);return}if(this.Z.Xa){b=setTimeout;c=this.xj;this.Y.ue=Ea();d=this.Y.Ej;this.Y.sg&&
|
||||
(d=Math.round(d*this.Y.sg/this.Y.jn));d-=this.Y.ue-this.Y.uf;if(e=this.Y.ue-this.Y.zd)this.Y.Ld=Math.round(this.nd/(10*e))/100,864E5<=e&&(this.Hd=0,this.V&&Ld(this.V,!0),Ed(this));0>d?(-1E3>d&&(this.Y.zd-=d),d=0):this.Y.Ld<this.Y.te&&(d=0);this.Y.ue+=d;b(c,d)}}};
|
||||
l.To=function(){if(this.Z.Xa){Hd(this);this.Y.sg=0;this.Y.uf=Ea();this.Y.zd||(this.Y.zd=this.Y.uf);if(this.Y.ue){var a=this.Y.uf-this.Y.ue;a>this.Y.Ej&&(this.Y.zd+=a,this.Y.zd>this.Y.uf&&(this.Y.zd=this.Y.uf))}try{this.Z.Rf=!1;do{for(var b,c=this.Z.Ke?1:this.Y.Zd*this.Y.qh|0,d=this.qa.length-1;0<=d;d--){var e=this.qa[d];0>e[1]||c>e[1]&&(c=e[1])}b=c;if(this.V){Ld(this.V);var f=this.V,a=b,g=f.qa[0];if(g.qe){var h=(Cd(f.G,f.M)-g.jd)/f.Ea|0,k=Md(f,0)-h;g.mode==Nd&&(k-=h);var m=k*f.Ea|0;g.mode==Nd&&(m>>=
|
||||
1);a>m&&(a=m)}b=a;var p=this.V,a=b;if(p.A&&p.A[Od]&Qd){var v=p.aa-Cd(p.G,p.M);0<v&&a>v&&(a=v)}b=a}try{this.Kg(b)}catch(G){if("number"!=typeof G)throw G;}for(var a=b=Jd(this),u=this.qa.length-1;0<=u;u--){var D=this.qa[u];0>D[1]||(D[1]-=a,0>=D[1]&&(D[1]=-1,D[3](),0<=D[2]&&Id(this,u,D[2])))}Bd(this,b)}while(this.Z.Xa&&!this.Z.Rf)}catch(G){this.Ub();zd(this);this.oa&&this.oa.stop(Ea(),Cd(this));Gb(this,G.stack||G.message);return}if(this.Z.Xa){b=setTimeout;c=this.xj;this.Y.ue=Ea();d=this.Y.Ej;this.Y.sg&&
|
||||
(d=Math.round(d*this.Y.sg/this.Y.on));d-=this.Y.ue-this.Y.uf;if(e=this.Y.ue-this.Y.zd)this.Y.Ld=Math.round(this.nd/(10*e))/100,864E5<=e&&(this.Hd=0,this.V&&Ld(this.V,!0),Ed(this));0>d?(-1E3>d&&(this.Y.zd-=d),d=0):this.Y.Ld<this.Y.te&&(d=0);this.Y.ue+=d;b(c,d)}}};
|
||||
function Ad(a,b,c){if(Hb(a))return!1;if(a.Z.Xa)return c||a.O(a.toString()+" busy"),!1;Ed(a);a.Z.Xa=!0;a.Z.li=!0;a.V&&a.V.start();if(c=a.ma.run)c.textContent="Halt";a.oa&&(Rd(a.oa,!0),b&&a.oa.dd(!0),a.oa.start(a.Y.zd,Cd(a)));setTimeout(a.xj,0);return!0}l.Kg=function(){return 0};
|
||||
l.Ub=function(a){var b=!1;if(this.Z.Xa){Jd(this);Gd(this,this.nd);this.nd=0;this.Z.Xa=!1;this.V&&this.V.stop();if(b=this.ma.run)b.textContent="Run";this.oa&&(this.oa.stop(Date.now()||+new Date,Cd(this)),Rd(this.oa,!0));this.ca||this.status("Stopped");b=!0}this.Z.complete=a;return b};function zd(a,b){a.oa&&Rd(a.oa,b)}var wd=30,td=["power","reset"];
|
||||
function Sd(a,b,c,d){this.Lb=a;this.ca=a.ca;this.id=b;this.dc=c||"";this.T=0;this.Sa=65535;this.Nb=this.Sa+1;this.Cb=this.rc=this.ext=this.ob=this.type=this.ua=0;this.Ob=-1;this.X=this.Mc=2;this.R=this.xa=65535;this.H=this.mh;this.F=this.D=this.ig;this.A={T:-1,ua:0,Sa:0,ob:0,type:0,ext:0,Ob:-1};1==this.id&&(this.If=0,this.C=null,this.Pe=!1,this.G=Array(32),this.B=[]);Td(this,!0,d);this.id||(this.Vb=this.Bb=this.cj)}function Ud(a,b){a.B.push(b);return[a.B.length,Vd]}l=Sd.prototype;
|
||||
l.mh=function(a){this.T=a&65535;return this.ua=this.T<<4};l.pg=function(a,b){var c,d,e=this.Lb;a&=65535;a&4?(c=e.Gb.ua,d=c+e.Gb.Sa|0):(c=e.Kb,d=e.Ic);if(c){c=c+(a&65528)|0;if(d-c|0)return e.A-=15,Yd(this,c,a,b);this.id<Zd&&x.call(e,b&&this.id==$d?10:13,a&65532)}return-1};l.cn=function(a){var b=this.Lb;a=b.Qb+(a<<2);var c=b.ja(a);b.P&=-769;return this.load(b.ja(a+2))+c|0};
|
||||
l.bn=function(a){var b=this.Lb;a<<=3;var c=b.Qb+a|0;if(7<=(b.ad-c|0))return this.C=!0,a=Yd(this,c,a),-1!==a&&(a+=this.If),a;x.call(b,13,a|2);return-1};l.cj=function(a){return this.ua+a|0};l.ig=function(a,b){(a>>>0)+b>this.Nb&&(8088>=this.Lb.da?this.Lb.M|=8:x.call(this.Lb,13));return this.ua+a|0};l.bj=function(a,b){return(a>>>0)+b<=this.Nb?this.ua+a|0:this.hg()};l.wl=function(a,b){return(a>>>0)+b>this.Nb?this.ua+a|0:this.hg()};l.hg=function(){x.call(this.Lb,13,0);return-1};
|
||||
l.mh=function(a){this.T=a&65535;return this.ua=this.T<<4};l.pg=function(a,b){var c,d,e=this.Lb;a&=65535;a&4?(c=e.Gb.ua,d=c+e.Gb.Sa|0):(c=e.Kb,d=e.Ic);if(c){c=c+(a&65528)|0;if(d-c|0)return e.A-=15,Wd(this,c,a,b);this.id<Zd&&x.call(e,b&&this.id==$d?10:13,a&65532)}return-1};l.gn=function(a){var b=this.Lb;a=b.Qb+(a<<2);var c=b.ja(a);b.P&=-769;return this.load(b.ja(a+2))+c|0};
|
||||
l.fn=function(a){var b=this.Lb;a<<=3;var c=b.Qb+a|0;if(7<=(b.ad-c|0))return this.C=!0,a=Wd(this,c,a),-1!==a&&(a+=this.If),a;x.call(b,13,a|2);return-1};l.cj=function(a){return this.ua+a|0};l.ig=function(a,b){(a>>>0)+b>this.Nb&&(8088>=this.Lb.da?this.Lb.M|=8:x.call(this.Lb,13));return this.ua+a|0};l.bj=function(a,b){return(a>>>0)+b<=this.Nb?this.ua+a|0:this.hg()};l.wl=function(a,b){return(a>>>0)+b>this.Nb?this.ua+a|0:this.hg()};l.hg=function(){x.call(this.Lb,13,0);return-1};
|
||||
l.dj=function(a,b){return(a>>>0)+b<=this.Nb?this.ua+a|0:this.jg()};l.xl=function(a,b){return(a>>>0)+b>this.Nb?this.ua+a|0:this.jg()};l.jg=function(){x.call(this.Lb,13,0);return-1};function ae(a,b,c,d,e){a.T=b;a.ua=d;a.Sa=e;a.Nb=(e>>>0)+1;a.ob=c;a.type=c&7936;a.ext=c>>16&192;a.Ob=(b&4?a.Lb.Gb.ua:a.Lb.Kb)+(b&65528)|0;a.id<be&&Td(a,!0)}function ce(a,b,c){var d=a.Lb,e=d.ja(b+2),f=d.ja(b)|(e&255)<<16,d=d.ja(b+4);a.T=c;a.ua=f;a.Sa=d;a.Nb=(d>>>0)+1;a.ob=e;a.type=e&7936;a.ext=0;a.Ob=b;a.id<be&&Td(a,!0)}
|
||||
function Yd(a,b,c,d){var e=a.Lb;if(!d&&c===a.A.T)return a.T=c,a.ua=a.A.ua,a.Sa=a.A.Sa,a.Nb=(a.A.Sa>>>0)+1,a.ob=a.A.ob,a.type=a.A.type,a.ext=a.A.ext,a.Ob=a.A.Ob,a.A.T=-1,Td(a,!0,!0,!1),a.ua;a.A.T=-1;var f=e.ja(b+0),g=e.ja(b+4),h=g&7936,k=e.ja(b+2)|(g&255)<<16,m=e.ja(b+6),p=c&65528;if(80386<=e.da){var v=f,k=k|(m&65280)<<16,f=f|(m&15)<<16;m&128&&(f=f<<12|4095)}switch(a.id){case de:var u=a.C;a.Pe=!1;if(u&&c==Vd&&a.B.length){var D=a.B[a.If-1];if(D&&!D())return-1}var G=c&3,I=(g&24576)>>13,D=-1,J,P;p||b>=
|
||||
function Wd(a,b,c,d){var e=a.Lb;if(!d&&c===a.A.T)return a.T=c,a.ua=a.A.ua,a.Sa=a.A.Sa,a.Nb=(a.A.Sa>>>0)+1,a.ob=a.A.ob,a.type=a.A.type,a.ext=a.A.ext,a.Ob=a.A.Ob,a.A.T=-1,Td(a,!0,!0,!1),a.ua;a.A.T=-1;var f=e.ja(b+0),g=e.ja(b+4),h=g&7936,k=e.ja(b+2)|(g&255)<<16,m=e.ja(b+6),p=c&65528;if(80386<=e.da){var v=f,k=k|(m&65280)<<16,f=f|(m&15)<<16;m&128&&(f=f<<12|4095)}switch(a.id){case de:var u=a.C;a.Pe=!1;if(u&&c==Vd&&a.B.length){var D=a.B[a.If-1];if(D&&!D())return-1}var G=c&3,I=(g&24576)>>13,D=-1,J,P;p||b>=
|
||||
e.Kb&&b<e.Ic&&(h=0);if(6144<=h)null!=d?D=0:!1!==u?(h&1024?I<=a.Cb&&(D=0):G<=a.Cb&&I==a.Cb&&(D=0),D||(c=c&-4|a.Cb&3)):G>=a.Cb&&(G>a.Cb&&(D=ee(e),fe(e,ee(e),!0),ge(e,D),a.Pe=!0),D=0);else{if(256==h||2304==h)return he(a,c,u)?a.ua:-1;if(1024==h)D=2,P=0,G<a.Cb&&(G=a.Cb);else if(3072==h)D=4,P=0,G<a.Cb&&(G=a.Cb);else if(1536==h)D=2,P=148224;else if(3584==h)D=4,P=148224;else if(1792==h)D=2,P=147712;else if(3840==h)D=4,P=147712;else if(1280==h)return he(a,k&65535,u)?a.ua:-1}0<D&&!(g&32768)&&(D=0);if(0<D&&
|
||||
(p=a.Cb,J=b==e.Qb+c,G<=I&&(!J||0<=e.Lc||p<=I))){b=k&65535;h&2048&&(f=v|m<<16);m=h=0;d=b&3;if(d<p){if(-1===a.pg(b,!0))return-1;m=e.ka.ua;e.ka.type&2048?(c=(d<<3)+4,k=4):(c=(d<<2)+2,k=2);h=e.ja(m+c+k);if(!h)return x.call(e,10,h),-1;if(-1===e.U.pg(h,!0))return-1;m=2==k?e.ja(m+c):e.ia(m+c)}c=e.P;e.P&=~P;c&131072&&ie(e,!0,!1);if(-1===a.pg(b,!1))return-1;je(e,D);a.If=f;if(d<p){if(!0!==u)return-1;D=y(e);f=0;for(g&=31;g--;)a.G[f++]=ke(e,e.U,D),D+=2;u=e.U.T;g=y(e);fe(e,h,!0);ge(e,m);c&131072&&(je(e,4),le(e,
|
||||
e.La.T,4,2),e.La.load(0),le(e,e.Ka.T,4,2),e.Ka.load(0),le(e,e.Fa.T,4,2),me(e,0),le(e,e.pa.T,4,2),ne(e,0));le(e,u,e.X,2);for(oe(e,g);f;)oe(e,a.G[--f]);a.Pe=!0}return a.ua}if(D)return x.call(e,13,c&65532|(J?2:0)),-1;if(!(g&32768))return x.call(e,11,c&65532|(J?2:0)),-1;break;case pe:if(p){if(4096>h||2048==(h&2560))return x.call(e,13,c&65532),-1;if(!(g&32768))return x.call(e,11,c&65532),-1}break;case $d:if(!p||4096>h||512!=(h&2560))return x.call(e,13,c&65532),-1;if(!(g&32768))return x.call(e,12,c&65532),
|
||||
|
|
@ -156,16 +156,16 @@ function he(a,b,c){var d=a.Lb,e=a.Cb,f=d.ka.T,g=d.ka.ua;if(!c){if(!(d.ka.type&51
|
|||
34,d.pa.T),d.ib(g+36,d.ba.T),d.ib(g+38,d.U.T),d.ib(g+40,d.Fa.T),d.Gb.load(d.ja(h+42)),re(d,d.ja(h+16)|(c?16384:0)),d.D=d.ja(h+18),d.I=d.ja(h+20),d.L=d.ja(h+22),d.H=d.ja(h+24),d.N=d.ja(h+28),d.K=d.ja(h+30),d.J=d.ja(h+32),d.pa.load(d.ja(h+34)),d.Fa.load(d.ja(h+40)),se(d,d.ja(h+14),d.ja(h+36)),b=38,g=26,a.Cb<e&&(g=(a.Cb<<2)+2,b=g+2),fe(d,d.ja(h+b),!0),ge(d,d.ja(h+g))):(d.eb(g+28,d.Uc),d.eb(g+32,z(d)),d.eb(g+36,qe(d)),d.eb(g+40,d.D),d.eb(g+44,d.I),d.eb(g+48,d.L),d.eb(g+52,d.H),d.eb(g+56,y(d)),d.eb(g+
|
||||
60,d.N),d.eb(g+64,d.K),d.eb(g+68,d.J),d.eb(g+72,d.pa.T),d.eb(g+76,d.ba.T),d.eb(g+80,d.U.T),d.eb(g+84,d.Fa.T),d.eb(g+88,d.Ka.T),d.eb(g+92,d.La.T),te.call(d,d.ia(h+28)),d.Gb.load(d.ja(h+96)),re(d,d.ia(h+36)|(c?16384:0)),d.D=d.ia(h+40),d.I=d.ia(h+44),d.L=d.ia(h+48),d.H=d.ia(h+52),d.N=d.ia(h+60),d.K=d.ia(h+64),d.J=d.ia(h+68),d.pa.load(d.ja(h+72)),d.Fa.load(d.ja(h+84)),d.Ka.load(d.ja(h+88)),d.La.load(d.ja(h+92)),se(d,d.ia(h+32),d.ja(h+76)),b=80,g=56,a.Cb<e&&(g=(a.Cb<<3)+4,b=g+4),fe(d,d.ja(h+b),!0),ge(d,
|
||||
d.ia(h+g)));c&&d.ib(h+0,f);d.ra|=8;return!0}l.save=function(){return[this.T,this.ua,this.Sa,this.ob,this.id,this.dc,this.Cb,this.rc,this.Ob,this.Mc,this.xa,this.X,this.R,this.type,this.Nb]};l.restore=function(a){"number"==typeof a?this.load(a):(this.T=a[0],this.ua=a[1],this.Sa=a[2],this.ob=a[3],this.id=a[4],this.dc=a[5],this.Cb=a[6],this.rc=a[7],this.Ob=a[8],this.Mc=a[9]||2,this.xa=a[10]||65535,this.X=a[11]||2,this.R=a[12]||65535,this.type=a[13]||this.ob&7936,this.Nb=a[14]||(this.Sa>>>0)+1)};
|
||||
function Td(a,b,c,d){void 0===c&&(c=!!(a.Lb.ra&1));a.fd=!1;if(c)if(a.load=a.pg,a.Cj=a.bn,a.Bb=a.bj,a.Vb=a.dj,void 0===d&&(d=!!(a.Lb.P&131072)),d)a.load=a.H,a.Bb=a.D,a.Vb=a.F,a.Cb=a.rc=3,a.X=2,a.R=a.xa=65535,a.Sa=65535,a.Nb=a.Sa+1,a.Mc=a.X,a.Ob=-1,a.Pe=!1;else{if(!(a.T&-4))a.Bb=a.hg,a.Vb=a.jg;else if(a.type&4096){6144==(a.type&6656)&&(a.Bb=a.hg);if(a.type&2048||!(a.type&512))a.Vb=a.jg;1024==(a.type&3072)&&(a.Bb==a.bj&&(a.Bb=a.wl),a.Vb==a.dj&&(a.Vb=a.xl),a.fd=!0);b&&a.id<Zd&&a.T&-4&&-1!==a.Ob&&(c=a.Ob+
|
||||
5,d=a.Lb.ya(c),d&1||a.Lb.ub(c,d|1))}b&&(a.Cb=a.T&3,a.rc=(a.ob&24576)>>13,80386>a.Lb.da||!(a.ext&64)?(a.X=2,a.R=65535):(a.X=4,a.R=-1),a.Mc=a.X,a.xa=a.R)}else a.load=a.mh,a.Cj=a.cn,a.Bb=a.ig,a.Vb=a.ig,a.Cb=a.rc=0,a.Ob=-1,a.Pe=!1}var de=1,pe=2,$d=3,be=4,Zd=6,Vd=1;
|
||||
function ue(a){var b,c=+a.model||8088;switch(c){default:b=4772727;break;case 80286:b=6E6;break;case 80386:b=16E6}sd.call(this,a,b);this.da=c;a=a.stepping;this.Rd=c+(a?ia(a,16):0);this.Ri=61442;this.Qd=1792;this.ri=28672;this.Sf=4;this.Ra=255;this.B=80286<=this.da?Rb:Qb;this.wa=ve;this.aj=we;this.hj=xe;this.lj=ye;if(80186<=this.da&&(this.wa=ve.slice(),this.aj=we.slice(),this.hj=xe.slice(),this.Ra=31,this.wa[15]=ze,this.wa[96]=Ee,this.wa[97]=Fe,this.wa[98]=Ge,this.wa[99]=ze,this.wa[100]=ze,this.wa[101]=
|
||||
function Td(a,b,c,d){void 0===c&&(c=!!(a.Lb.ra&1));a.fd=!1;if(c)if(a.load=a.pg,a.Cj=a.fn,a.Bb=a.bj,a.Vb=a.dj,void 0===d&&(d=!!(a.Lb.P&131072)),d)a.load=a.H,a.Bb=a.D,a.Vb=a.F,a.Cb=a.rc=3,a.X=2,a.R=a.xa=65535,a.Sa=65535,a.Nb=a.Sa+1,a.Mc=a.X,a.Ob=-1,a.Pe=!1;else{if(!(a.T&-4))a.Bb=a.hg,a.Vb=a.jg;else if(a.type&4096){6144==(a.type&6656)&&(a.Bb=a.hg);if(a.type&2048||!(a.type&512))a.Vb=a.jg;1024==(a.type&3072)&&(a.Bb==a.bj&&(a.Bb=a.wl),a.Vb==a.dj&&(a.Vb=a.xl),a.fd=!0);b&&a.id<Zd&&a.T&-4&&-1!==a.Ob&&(c=a.Ob+
|
||||
5,d=a.Lb.ya(c),d&1||a.Lb.ub(c,d|1))}b&&(a.Cb=a.T&3,a.rc=(a.ob&24576)>>13,80386>a.Lb.da||!(a.ext&64)?(a.X=2,a.R=65535):(a.X=4,a.R=-1),a.Mc=a.X,a.xa=a.R)}else a.load=a.mh,a.Cj=a.gn,a.Bb=a.ig,a.Vb=a.ig,a.Cb=a.rc=0,a.Ob=-1,a.Pe=!1}var de=1,pe=2,$d=3,be=4,Zd=6,Vd=1;
|
||||
function ue(a){var b,c=+a.model||8088;switch(c){default:b=4772727;break;case 80286:b=6E6;break;case 80386:b=16E6}nd.call(this,a,b);this.da=c;a=a.stepping;this.Rd=c+(a?ia(a,16):0);this.Ri=61442;this.Qd=1792;this.ri=28672;this.Sf=4;this.Ra=255;this.B=80286<=this.da?Rb:Qb;this.wa=ve;this.aj=we;this.hj=xe;this.lj=ye;if(80186<=this.da&&(this.wa=ve.slice(),this.aj=we.slice(),this.hj=xe.slice(),this.Ra=31,this.wa[15]=ze,this.wa[96]=Ae,this.wa[97]=Fe,this.wa[98]=Ge,this.wa[99]=ze,this.wa[100]=ze,this.wa[101]=
|
||||
ze,this.wa[102]=ze,this.wa[103]=ze,this.wa[104]=He,this.wa[105]=Ie,this.wa[106]=Je,this.wa[107]=Ke,this.wa[108]=Le,this.wa[109]=Me,this.wa[110]=Ne,this.wa[111]=Oe,this.wa[192]=Pe,this.wa[193]=Qe,this.wa[200]=Re,this.wa[201]=Se,this.wa[241]=Te,this.aj[7]=Ue,this.hj[7]=Ue,80286<=this.da)){this.Ri=2;this.Qd|=28672;this.Sf=0;this.wa[15]=Ve;this.rd=We.slice();for(c=0;c<this.rd.length;c++)this.rd[c]||(this.rd[c]=Xe);this.wa[84]=Ye;this.wa[99]=Ze;if(80386<=this.da){var d;this.ri=0;this.Qd|=196608;this.wa[100]=
|
||||
$e;this.wa[101]=af;this.wa[102]=bf;this.wa[103]=ff;for(d in A)this.rd[+d]=A[+d];80546<=this.Rd&&80562>=this.Rd&&(this.rd[166]=gf,this.rd[167]=hf)}}this.Vf=[];this.Wf=[];this.Yf=0;xd(this);this.Z.complete=this.Z.ij=!1;this.rj=0;this.tc=this.aa=[];this.lb=this.Mg=this.Fb=this.Tf=this.ff=this.gf=this.cd=0;jf(this)}ba(ue,sd);function kf(a,b,c,d){b=(d?a.tc:a.aa)[b>>>a.lb];c?--b.me||fd(b):--b.le||ed(b);d&&nc(a)}
|
||||
$e;this.wa[101]=af;this.wa[102]=bf;this.wa[103]=cf;for(d in A)this.rd[+d]=A[+d];80546<=this.Rd&&80562>=this.Rd&&(this.rd[166]=gf,this.rd[167]=hf)}}this.Vf=[];this.Wf=[];this.Yf=0;xd(this);this.Z.complete=this.Z.ij=!1;this.rj=0;this.tc=this.aa=[];this.lb=this.Mg=this.Fb=this.Tf=this.ff=this.gf=this.cd=0;jf(this)}ba(ue,nd);function kf(a,b,c,d){b=(d?a.tc:a.aa)[b>>>a.lb];c?--b.me||fd(b):--b.le||ed(b);d&&nc(a)}
|
||||
function lf(a){var b;if(a.aa===a.tc){a.aa=Array(a.Tf);a.Xf=new w(null,0,0,Yc,null,a);ic(a.Xf,a.ca);for(b=0;b<a.Tf;b++)a.aa[b]=a.Xf;a.hf=new w;a.Zi=Array(mf);a.Zf=0}else for(var c=0;c<a.Uf.length;c++){b=a.Uf[c];var d=a.aa[b];a.Zf<mf&&(a.Zi[a.Zf++]=d);a.aa[b]=a.Xf}a.Uf=[]}function nc(a){a.ra&-2147483648&&lf(a)}
|
||||
function kd(a,b,c,d){var e=(b&-4194304)>>>20,f=a.tc[(a.Uc+e&a.gf)>>>a.lb],g=f.Od(e);if(!(g&1))return d||nf.call(a,b,!1,c),a.hf;if(!(g&4)&&3==a.Pa)return d||nf.call(a,b,!0,c),a.hf;var h=(b&4190208)>>>10,g=a.tc[((g&-4096)+h&a.gf)>>>a.lb],k=g.Od(h);if(!(k&1))return d||nf.call(a,b,!1,c),a.hf;if(!(k&4)&&3==a.Pa)return d||nf.call(a,b,!0,c),a.hf;c=a.tc[((k&-4096)+(b&4095)&a.gf)>>>a.lb];if(d)return c;d=b>>>a.lb;k=a.aa[d];b&=-4096;var m;0<a.Zf?(m=a.Zi[--a.Zf],m.hh(b)):m=new w(b,0,0,$c);b=m;b.vd=c;b.pb=f;b.A=
|
||||
e>>2;b.qb=g;b.B=h>>2;Pb&&Ac&&c.W&&!c.controller&&!c.le&&!c.me?(b.Qa=c.Qa,b.Ud=c.Ud,b.W=c.W,tc(b,md)):(b.F=c?ld(32):0,b.J=c?ld(96):0,tc(b,ad));ic(b,a.ca,k);a.aa[d]=b;a.Uf.push(d);return b}function of(a){a.aa!==a.tc&&(a.aa=a.tc,a.Xf=null,a.Uf=null,a.hf=null)}l=ue.prototype;l.reset=function(){jf(this);xd(this);this.Z.error=!1};
|
||||
function uf(a,b){var c;switch(b){case 0:c=a.D;break;case 1:c=a.I;break;case 2:c=a.L;break;case 3:c=a.H;break;case 4:c=y(a);break;case 5:c=a.N;break;case 6:c=a.K;break;case 7:c=a.J}return c}function vf(a,b,c){switch(b){case 0:a.D=c;break;case 1:a.I=c;break;case 2:a.L=c;break;case 3:a.H=c;break;case 4:ge(a,c);break;case 5:a.N=c;break;case 6:a.K=c;break;case 7:a.J=c}}
|
||||
function jf(a){a.D=0;a.H=0;a.I=0;a.L=0;a.Ac=0;a.N=0;a.K=0;a.J=0;a.wc=!1;a.Ea=a.cb=0;a.Xm=[0,0];a.Zm=[0,0];a.Aa=0;a.qj=0;a.fa=0;a.ra=65520;a.Qb=0;a.ad=1023;a.P=a.mc=0;a.Td=a.jf=a.Sd=a.De=0;a.Lc=-1;a.od=a.Tc=-1;a.pd=a.ta=-1;a.ba=new Sd(a,de,"CS");a.Fa=new Sd(a,pe,"DS");a.pa=new Sd(a,pe,"ES");a.U=new Sd(a,$d,"SS");ge(a,0);fe(a,0);if(80386<=a.da){switch(a.Rd){case 80562:case 80563:a.L=771;break;case 80578:a.L=772;break;case 80594:a.L=773;break;case 80595:case 80596:a.L=776}a.ra=16;a.Ng=0;a.qd=0;a.Uc=
|
||||
function pf(a,b){var c;switch(b){case 0:c=a.D;break;case 1:c=a.I;break;case 2:c=a.L;break;case 3:c=a.H;break;case 4:c=y(a);break;case 5:c=a.N;break;case 6:c=a.K;break;case 7:c=a.J}return c}function vf(a,b,c){switch(b){case 0:a.D=c;break;case 1:a.I=c;break;case 2:a.L=c;break;case 3:a.H=c;break;case 4:ge(a,c);break;case 5:a.N=c;break;case 6:a.K=c;break;case 7:a.J=c}}
|
||||
function jf(a){a.D=0;a.H=0;a.I=0;a.L=0;a.Ac=0;a.N=0;a.K=0;a.J=0;a.wc=!1;a.Ea=a.cb=0;a.an=[0,0];a.cn=[0,0];a.Aa=0;a.qj=0;a.fa=0;a.ra=65520;a.Qb=0;a.ad=1023;a.P=a.mc=0;a.Td=a.jf=a.Sd=a.De=0;a.Lc=-1;a.od=a.Tc=-1;a.pd=a.ta=-1;a.ba=new Sd(a,de,"CS");a.Fa=new Sd(a,pe,"DS");a.pa=new Sd(a,pe,"ES");a.U=new Sd(a,$d,"SS");ge(a,0);fe(a,0);if(80386<=a.da){switch(a.Rd){case 80562:case 80563:a.L=771;break;case 80578:a.L=772;break;case 80594:a.L=773;break;case 80595:case 80596:a.L=776}a.ra=16;a.Ng=0;a.qd=0;a.Uc=
|
||||
0;a.Rb=[0,0,0,0,null,null,0,0];a.$f=[null,null,null,null,null,null,0,0];a.Ka=new Sd(a,pe,"FS");a.La=new Sd(a,pe,"GS");of(a)}a.Qg=new Sd(a,0,"NULL");a.Ga=a.Fa;a.Sb=a.U;a.M=a.ha=0;a.C=a.F=-1;a.Ia=a.Qg;a.ab=0;if(80286>a.da)se(a,0,65535);else{a.Kb=0;a.Ic=65535;a.Gb=new Sd(a,5,"LDT",!0);a.ka=new Sd(a,be,"TSS",!0);a.zb=new Sd(a,Zd,"VER",!0);se(a,65520,61440);var b,c=z(a);b=a.ba;var d=-65536;80386>b.Lb.da&&(d&=16777215);b=b.ua=d;a.ea=b+c|0;a.Og=(b>>>0)+(a.ba.Sa>>>0)+1}re(a,0);ie(a)}
|
||||
function wf(a){2==a.Mc?(a.Wb=a.ja,a.lc=xf,a.vc=yf,a.ld=zf,2==a.X?(a.la=Af,a.Ba=Bf,a.mb=Cf):(a.la=Df,a.Ba=Ef,a.mb=Ff)):(a.Wb=a.ia,a.lc=Gf,a.vc=Hf,a.ld=If,2==a.X?(a.la=Jf,a.Ba=Kf,a.mb=Lf):(a.la=Mf,a.Ba=Nf,a.mb=Of))}function je(a,b){a.X!=b&&(a.ha|=1024,a.X=b,a.R=2==b?65535:-1,Pf(a))}function Pf(a){2==a.X?(a.Hb=32768,a.nb=a.ja,a.hc=a.ib,2==a.Mc?(a.la=Af,a.Ba=Bf,a.mb=Cf):(a.la=Jf,a.Ba=Kf,a.mb=Lf)):(a.Hb=-2147483648,a.nb=a.ia,a.hc=a.eb,2==a.Mc?(a.la=Df,a.Ba=Ef,a.mb=Ff):(a.la=Mf,a.Ba=Nf,a.mb=Of))}
|
||||
function Qf(a){a.Mc=a.ba.Mc;a.xa=a.ba.xa;wf(a);a.X=a.ba.X;a.R=a.ba.R;Pf(a);a.ha&=-3073}l.sj=function(){var a=this.D+this.H+this.I+this.L+y(this)+this.N+this.K+this.J|0;return a=a+z(this)+this.ba.T+this.Fa.T+this.U.T+this.pa.T+qe(this)|0};function Rf(a,b,c){void 0===a.Vf[b]&&(a.Vf[b]=[]);a.Vf[b].push(c)}function Sf(a,b,c){c&&(null==a.Wf[b]&&a.Yf++,a.Wf[b]=c)}function Tf(a,b){var c=a.Wf[b];null!=c&&(c(--a.Yf),delete a.Wf[b])}
|
||||
|
|
@ -183,12 +183,12 @@ function cg(a){a.resultType&1&&(a.P&=-2,(a.Td^(a.Td^a.jf)&(a.jf^a.Sd))&a.resultT
|
|||
function gg(a){a.resultType&16&&(a.P&=-129,a.De&a.resultType&-2147450752&&(a.P|=128),a.resultType&=-17);return a.P&128}function hg(a){a.resultType&32&&(a.P&=-2049,(a.Td^a.Sd)&(a.jf^a.Sd)&a.resultType&-2147450752&&(a.P|=2048),a.resultType&=-33);return a.P&2048}function kg(a){a.resultType&=-2;a.P&=-2}function pg(a){a.resultType&=-5;a.P&=-17}function qg(a){a.resultType&=-9;a.P&=-65}function mg(a){a.resultType&=-33;a.P&=-2049}function jg(a){a.resultType&=-2;a.P|=1}
|
||||
function rg(a){a.resultType&=-5;a.P|=16}function sg(a){a.resultType&=-9;a.P|=64}function lg(a){a.resultType&=-33;a.P|=2048}function qe(a){return a.P&-2262|cg(a)|dg(a)|eg(a)|fg(a)|gg(a)|hg(a)}function tg(a,b){b|=a.ra&1|65520;a.ra=a.ra&-65536|b&65535;a.ra&1&&ie(a,!0)}function re(a,b,c){a.ra&1||(b&=~a.ri);void 0===c&&(c=a.Pa);c?b=b&-12289|a.P&12288:a.mc=(b&12288)>>12;c>a.mc&&(b=b&-513|a.P&512);a.resultType=128;a.P=a.P&~(a.Qd|2261)|b&(a.Qd|2261)|a.Ri;a.P&256&&(a.ab|=2,a.M|=4)}
|
||||
function ug(a,b,c,d){var e=0;if(a.ra&1&&(a.Pa>a.mc||a.P&131072)&&a.ka.Si)for(var f=a.ka.Si+(b>>>3),e=(1<<c)-1<<(b&7);e&&f<=a.ka.ql&&!(a.ya(f)&e);)e>>>=8,f++;return e?(r(a,256)&&Nb(a,"checkIOPM("+oa(b)+","+c+","+(d?"input":"output")+"): trapped",!0,!0),x.call(a,13,0),!1):!0}
|
||||
l.Eb=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.ma[b]=c;this.rj++;a=!0;break;default:a=sd.prototype.Eb.call(this,a,b,c)}return a};
|
||||
l.Eb=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.ma[b]=c;this.rj++;a=!0;break;default:a=nd.prototype.Eb.call(this,a,b,c)}return a};
|
||||
function vg(a,b,c,d){var e=(d?a.tc:a.aa)[(b&a.cd)>>>a.lb];e&&e.type==Yc&&(e=kd(a,b,!1,!0));if(e){var f=b&a.Fb;if(!c||1==c)return e.be(f,b);if(2==c)return f<a.Fb?e.Lf(f,b):e.be(f,b)|vg(a,b+1,1,d)<<8;if(4==c)return f<a.Fb-2?e.hi(f,b):f==a.Fb-1?e.Lf(f,b)|vg(a,b+2,2,d)<<16:e.be(f,b)|vg(a,b+1,1,d)<<8|vg(a,b+2,1,d)<<16|vg(a,b+3,1,d)<<24}return null}l.ya=function(a){return this.aa[(a&this.cd)>>>this.lb].Cc(a&this.Fb,a)};
|
||||
l.ja=function(a){var b=a&this.Fb,c=(a&this.cd)>>>this.lb;this.A-=this.B.yg;if(b<this.Fb)return this.aa[c].Kf(b,a);b=this.aa[c].Cc(b,a);this.M&4096||(b|=this.aa[c+1&this.ff].Cc(0,a+1)<<8);return b};l.ia=function(a){var b=a&this.Fb,c=(a&this.cd)>>>this.lb;if(b<this.Fb-2)return this.aa[c].Od(b,a);for(var d=0,e=4,f=0,g=4-(b&3);e--;){d|=this.aa[c].Cc(b++,a++)<<f;if(this.M&4096)break;--g||(c=c+1&this.ff,b=0);f+=8}return d};l.ub=function(a,b){this.aa[(a&this.cd)>>>this.lb].Ec(a&this.Fb,b&255,a)};
|
||||
l.ib=function(a,b){var c=a&this.Fb,d=(a&this.cd)>>>this.lb;this.A-=this.B.yg;c<this.Fb?this.aa[d].Qf(c,b&65535,a):(this.aa[d++].Ec(c,b&255,a),this.M&4096||this.aa[d&this.ff].Ec(0,b>>8&255,a+1))};l.eb=function(a,b){var c=a&this.Fb,d=(a&this.cd)>>>this.lb;this.A-=this.B.yg;if(c<this.Fb-2)this.aa[d].Pf(c,b,a);else for(var e=4,f=4-(c&3);e--;){this.aa[d].Ec(c++,b&255,a++);if(this.M&4096)break;--f||(d=d+1&this.ff,c=0);b>>>=8}};
|
||||
function wg(a,b,c){a.Ia=b;a.vb=c&a.xa;a.C=b.Bb(a.vb,1);return a.M&1?0:a.ya(a.C)}function C(a,b){return wg(a,a.Ga,b)}function xg(a,b){return wg(a,a.Sb,b)}function yg(a,b,c){a.Ia=b;a.vb=c&a.xa;a.C=b.Bb(a.vb,a.X);if(a.M&9){if(a.M&1)return 0;a=a.ya(a.C)|a.ya(b.Bb(0,1))<<8}else a=a.nb(a.C);return a}function E(a,b){a.Ia=a.Ga;a.vb=b&a.xa;a.C=a.Ia.Bb(a.vb,2);if(a.M&9){if(a.M&1)return 0;b=a.ya(a.C)|a.ya(a.Ia.Bb(0,1))<<8;a.M&=-9}else b=a.ja(a.C);return b}
|
||||
function zg(a,b){a.Ia=a.Sb;a.vb=b&a.xa;a.C=a.Ia.Bb(a.vb,2);if(a.M&9){if(a.M&1)return 0;b=a.ya(a.C)|a.ya(a.Ia.Bb(0,1))<<8;a.M&=-9}else b=a.ja(a.C);return b}function F(a,b){a.Ia=a.Ga;a.vb=b&a.xa;a.C=a.Ia.Bb(a.vb,4);return a.M&1?0:a.ia(a.C)}function Ag(a,b){a.Ia=a.Sb;a.vb=b&a.xa;a.C=a.Ia.Bb(a.vb,4);return a.M&1?0:a.ia(a.C)}function Dg(a,b){a.M&2||a.ub(a.Ia.Vb(a.vb,1),b)}function Eg(a,b){if(!(a.M&2)){var c=a.Ia.Vb(a.vb,2);a.M&8?(a.ub(c,b),a.ub(a.Ia.Vb(0,1),b>>8),a.M&=-9):a.ib(c,b)}}
|
||||
function zg(a,b){a.Ia=a.Sb;a.vb=b&a.xa;a.C=a.Ia.Bb(a.vb,2);if(a.M&9){if(a.M&1)return 0;b=a.ya(a.C)|a.ya(a.Ia.Bb(0,1))<<8;a.M&=-9}else b=a.ja(a.C);return b}function F(a,b){a.Ia=a.Ga;a.vb=b&a.xa;a.C=a.Ia.Bb(a.vb,4);return a.M&1?0:a.ia(a.C)}function Ag(a,b){a.Ia=a.Sb;a.vb=b&a.xa;a.C=a.Ia.Bb(a.vb,4);return a.M&1?0:a.ia(a.C)}function Bg(a,b){a.M&2||a.ub(a.Ia.Vb(a.vb,1),b)}function Eg(a,b){if(!(a.M&2)){var c=a.Ia.Vb(a.vb,2);a.M&8?(a.ub(c,b),a.ub(a.Ia.Vb(0,1),b>>8),a.M&=-9):a.ib(c,b)}}
|
||||
function Fg(a,b){a.M&2||a.eb(a.Ia.Vb(a.vb,4),b)}function ke(a,b,c){c=b.Bb(c,a.X);a.M&8?(b=a.ya(c)|a.ya(b.Bb(0,1))<<8,a.M&=-9):b=a.nb(c);return b}function Gg(a,b,c,d){c=b.Vb(c,a.X);a.M&8?(a.ub(c,d),a.ub(b.Vb(0,1),d>>8),a.M&=-9):a.hc(c,d)}l.sa=function(){var a=$f(this,1),b=this.ya(this.ea);this.ea=a;return b};function Hg(a){var b,c=$f(a,2);a.M&8?(b=a.ya(a.ea)|a.ya(c-1)<<8,a.M&=-9):b=a.ja(a.ea);a.ea=c;return b}
|
||||
function H(a){var b,c=$f(a,a.Mc);a.M&8?(b=a.ya(a.ea)|a.ya(c-1)<<8,a.M&=-9):b=a.Wb(a.ea);a.ea=c;return b}l.Ha=function(){var a,b=$f(this,this.X);this.M&8?(a=this.ya(this.ea)|this.ya(b-1)<<8,this.M&=-9):a=this.nb(this.ea);this.ea=b;return a};l.S=function(){var a=$f(this,1),b=this.ya(this.ea)<<24>>24;this.ea=a;return b};
|
||||
function ee(a){var b=a.nb(a.Ca);a.Ca=a.Ca+a.X|0;var c=(a.Pg>>>0)-(a.Ca>>>0);0>c&&(8088>=a.da?(ge(a,a.Ca-a.U.ua&a.U.xa),-1>c&&(b=b&255|a.ya(a.Ca-1)<<8)):-1>c?x.call(a,12,0):(!a.U.fd&&a.U.Sa==a.U.xa||a.U.fd&&!a.U.Sa)&&ge(a,a.Ca-a.U.ua&a.U.xa));return b}function oe(a,b){le(a,b,a.X)}
|
||||
|
|
@ -199,7 +199,7 @@ f);d=!0;break a}}break;case 1:if(this.ab&2){this.ab&=-3;80386<=this.da&&(this.Rb
|
|||
Xa(function(){for(var a=vb(document,"pcx86","cpu"),b=0;b<a.length;b++){var c=a[b],d=wb(c),d=new ue(d);ub(d,c)}});
|
||||
function Ng(a){ib.call(this,"FPU",a);this.da=a.model||8087;this.F=new Float64Array(8);this.L=new Int32Array(this.F.buffer);this.aa=new Float32Array(1);this.ha=new Int32Array(this.aa.buffer);this.K=new Float64Array(1);this.H=new Int32Array(this.K.buffer);this.D=Array(3);this.M=this.N=-1;this.I=this.J=this.P=this.A=0;this.U=new Float64Array(1);this.ba=new Int32Array(this.U.buffer);this.ba[0]=0;this.ba[1]=268402688;Og(this);this.fa=Ng.prototype.ki;this.ea=Ng.prototype.al}ba(Ng,ib);l=Ng.prototype;
|
||||
l.uc=function(a,b,c){this.G=c;this.V=Vb(a,"ChipSet");Jb(this)};l.ac=function(a,b){if(!b)if(!a||!this.restore)Og(this);else if(!this.restore(a))return!1;return!0};l.$b=function(a){return a?this.save():!0};l.save=function(){var a=new Wf(this),b=[],c=0;b[c++]=this.cc;b[c++]=Pg(this);b[c++]=Qg(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.cc=a[b++]&-57409;var c=a[b++];this.ga=c&-14337;this.B=(c&14336)>>11;Rg(this);Sg(this,a[b++]);for(c=0;c<this.F.length;c++)this.F[c]=a[b++];return!0};function Og(a){a.C=0;a.cc=959;a.ga=0;a.B=0;a.V&&(a=a.V,a.da>=Tg&&Ug(a,Vg))}function Rg(a){a.ga&=-129;a.ga&~a.cc&63&&(a.ga|=128);if(a.ga&128&&!(a.cc&128))return a=a.V,a.da>=Tg?ih(a,Vg):a.fa&jh||Lg.call(a.G,2),!0;a=a.V;a.da>=Tg&&Ug(a,Vg);return!1}function kh(a,b){80387<=a.da||(b&=-65);a.ga|=b;return Rg(a)}
|
||||
l.restore=function(a){a=a[0];var b=0;this.cc=a[b++]&-57409;var c=a[b++];this.ga=c&-14337;this.B=(c&14336)>>11;Rg(this);Sg(this,a[b++]);for(c=0;c<this.F.length;c++)this.F[c]=a[b++];return!0};function Og(a){a.C=0;a.cc=959;a.ga=0;a.B=0;a.V&&(a=a.V,a.da>=Tg&&Ug(a,Vg))}function Rg(a){a.ga&=-129;a.ga&~a.cc&63&&(a.ga|=128);if(a.ga&128&&!(a.cc&128))return a=a.V,a.da>=Tg?Wg(a,Vg):a.fa&jh||Lg.call(a.G,2),!0;a=a.V;a.da>=Tg&&Ug(a,Vg);return!1}function kh(a,b){80387<=a.da||(b&=-65);a.ga|=b;return Rg(a)}
|
||||
function Pg(a){return a.ga|a.B<<11}function lh(a,b){return isFinite(b)?!0:!kh(a,Infinity===b?8:16)}function mh(a,b,c){var d=null;null!=b&&null!=c&&(d=b+c,lh(a,d)||(d=null));return d}function nh(a,b,c){var d=null;null!=b&&null!=c&&(d=b-c,lh(a,d)||(d=null));return d}function oh(a,b,c){var d=null;null!=b&&null!=c&&(d=b*c,lh(a,d)||(d=null));return d}function ph(a,b,c){var d=null;null==b||null==c||!c&&kh(a,2)||(d=b/c,lh(a,d)||(d=null));return d}
|
||||
function qh(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.ga=a.ga&-18177|d;return!0}return!1}function rh(a,b,c){if(null==b)return null;var d=a.cc&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(kh(a,1))return null;d=-c}else if(d<-c){if(kh(a,1))return null;d=-c}a.H[0]=d|0;2147483648<c&&(a.H[1]=d/4294967296|0,!a.H[1]&&0>d&&(a.H[1]=-1))}return d}
|
||||
function sh(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 Qg(a){for(var b=0,c=a.F.length-1;0<=c;c--)b<<=2,b|=sh(a,c);return b}function Sg(a,b){a.C=0;for(var c=1;128>=c;c<<=1)3!=(b&3)&&(a.C|=c),b>>=2}function th(a){var b=a.B+0&7;return a.C&1<<b?(a.aa[0]=a.F[b],!0):kh(a,1)?!1:(a.aa[0]=a.U[0],!0)}function uh(a){var b=a.B+0&7;return a.C&1<<b?(a.K[0]=a.F[b],!0):kh(a,1)?!1:(a.K[0]=a.U[0],!0)}
|
||||
|
|
@ -239,14 +239,14 @@ function Vi(a,b){this.A-=-1===this.F?-1===this.C?this.B.sk:this.B.rk:this.B.pk;r
|
|||
function Yi(a,b){a=this.fa>>3&7;switch(a){case 0:this.Aa=this.D;break;case 2:this.Aa=this.L;break;case 3:this.Aa=this.H;break;default:if(80286==this.da||80386==this.da&&4!=a&&5!=a)x.call(this,6);else switch(a){case 1:this.Aa=this.I;break;case 4:this.Aa=y(this);break;case 5:this.Aa=this.N;break;case 6:this.Aa=this.K;break;case 7:this.Aa=this.J}}return Vi.call(this,0,b)}
|
||||
function Zi(a,b){switch(this.fa>>3&7){case 0:b=this.pa.T;break;case 1:b=this.ba.T;break;case 2:b=this.U.T;break;case 3:b=this.Fa.T;break;case 4:if(80386<=this.da){b=this.Ka.T;break}x.call(this,6);b=a;break;case 5:if(80386<=this.da){b=this.La.T;break}default:x.call(this,6),b=a}-1!==this.F&&je(this,2);return Vi.call(this,0,b)}
|
||||
function Mi(a,b){if(a&-65536||b&-65536){var c=b&65535;b>>>=16;var d=a&65535;a>>>=16;var e=c*d,d=(e>>>16)+b*d,f=d>>>16,d=(d&65535)+c*a;this.Ea=d<<16|e&65535;this.cb=f+((d>>>16)+b*a)|0}else this.Ea=a*b|0,this.cb=0}function $i(a,b){this.A-=-1===this.F?-1===this.C?this.B.nc:this.B.Mb:this.B.Bc;return ig(this,a|b,128)}function aj(a,b){this.A-=-1===this.F?-1===this.C?this.B.nc:this.B.Mb:this.B.Bc;return ig(this,a|b,this.Hb)&this.R}
|
||||
function bj(a,b){var c=a-b-og(this)|0;bg(this,a,b,c,191,!0);this.A-=-1===this.F?-1===this.C?this.B.nc:this.B.Mb:this.B.Bc;return c&255}function cj(a,b){var c=a-b-og(this)|0;bg(this,a,b,c,this.Hb|63,!0);this.A-=-1===this.F?-1===this.C?this.B.nc:this.B.Mb:this.B.Bc;return c&this.R}function dj(){return hg(this)?1:0}function ej(){return cg(this)?1:0}function fj(){return cg(this)?0:1}function pj(){return fg(this)?1:0}function qj(){return fg(this)?0:1}function rj(){return cg(this)||fg(this)?1:0}
|
||||
function bj(a,b){var c=a-b-og(this)|0;bg(this,a,b,c,191,!0);this.A-=-1===this.F?-1===this.C?this.B.nc:this.B.Mb:this.B.Bc;return c&255}function cj(a,b){var c=a-b-og(this)|0;bg(this,a,b,c,this.Hb|63,!0);this.A-=-1===this.F?-1===this.C?this.B.nc:this.B.Mb:this.B.Bc;return c&this.R}function dj(){return hg(this)?1:0}function ej(){return cg(this)?1:0}function fj(){return cg(this)?0:1}function gj(){return fg(this)?1:0}function qj(){return fg(this)?0:1}function rj(){return cg(this)||fg(this)?1:0}
|
||||
function sj(){return cg(this)||fg(this)?0:1}function tj(){return gg(this)?1:0}function uj(){return gg(this)?0:1}function vj(){return dg(this)?1:0}function wj(){return dg(this)?0:1}function xj(){return!gg(this)!=!hg(this)?1:0}function yj(){return!gg(this)!=!hg(this)?0:1}function zj(){return fg(this)||!gg(this)!=!hg(this)?1:0}function Aj(){return fg(this)||!gg(this)!=!hg(this)?0:1}function Bj(a,b){return Cj.call(this,a,b,this.sa())}function Dj(a,b){return Ej.call(this,a,b,this.sa())}
|
||||
function Fj(a,b){return Cj.call(this,a,b,this.I&31)}function Gj(a,b){return Ej.call(this,a,b,this.I&31)}function Hj(a,b){return Ij.call(this,a,b,this.sa())}function Jj(a,b){return Kj.call(this,a,b,this.sa())}function Lj(a,b){return Ij.call(this,a,b,this.I&31)}function Mj(a,b){return Kj.call(this,a,b,this.I&31)}function Nj(a,b){var c=a-b|0;bg(this,a,b,c,191,!0);this.A-=-1===this.F?-1===this.C?this.B.nc:this.B.Mb:this.B.Bc;return c&255}
|
||||
function Oj(a,b){var c=a-b|0;bg(this,a,b,c,this.Hb|63,!0);this.A-=-1===this.F?-1===this.C?this.B.nc:this.B.Mb:this.B.Bc;return c&this.R}function Pj(a,b){ig(this,a&b,128);this.A-=-1===this.F?-1===this.C?this.B.$h:this.B.Ef:this.B.Ef;this.M|=2;return a}function Qj(a,b){ig(this,a&b,this.Hb);this.A-=-1===this.F?-1===this.C?this.B.$h:this.B.Ef:this.B.Ef;this.M|=2;return a}function Rj(a,b){var c=this.D&this.R,d=(1<<(this.I&31))-1;return a&~(d<<c)|(b&d)<<c}
|
||||
function Sj(a,b){return b>>(this.D&this.R)&(1<<(this.I&31))-1&this.R}function Tj(a,b){if(-1===this.C){switch(this.fa&7){case 0:this.D=this.D&-256|a;break;case 1:this.I=this.I&-256|a;break;case 2:this.L=this.L&-256|a;break;case 3:this.H=this.H&-256|a;break;case 4:this.D=this.D&-65281|a<<8;break;case 5:this.I=this.I&-65281|a<<8;break;case 6:this.L=this.L&-65281|a<<8;break;case 7:this.H=this.H&-65281|a<<8}this.A-=this.B.bi}else this.F=this.C,Dg(this,a),this.A-=this.B.ai;return b}
|
||||
function Sj(a,b){return b>>(this.D&this.R)&(1<<(this.I&31))-1&this.R}function Tj(a,b){if(-1===this.C){switch(this.fa&7){case 0:this.D=this.D&-256|a;break;case 1:this.I=this.I&-256|a;break;case 2:this.L=this.L&-256|a;break;case 3:this.H=this.H&-256|a;break;case 4:this.D=this.D&-65281|a<<8;break;case 5:this.I=this.I&-65281|a<<8;break;case 6:this.L=this.L&-65281|a<<8;break;case 7:this.H=this.H&-65281|a<<8}this.A-=this.B.bi}else this.F=this.C,Bg(this,a),this.A-=this.B.ai;return b}
|
||||
function Uj(a,b){if(-1===this.C){switch(this.fa&7){case 0:this.D=this.D&~this.R|a;break;case 1:this.I=this.I&~this.R|a;break;case 2:this.L=this.L&~this.R|a;break;case 3:this.H=this.H&~this.R|a;break;case 4:ge(this,y(this)&~this.R|a);break;case 5:this.N=this.H&~this.R|a;break;case 6:this.K=this.K&~this.R|a;break;case 7:this.J=this.J&~this.R|a}this.A-=this.B.bi}else{this.F=this.C;if(!(this.M&2)){var c=this.Ia.Vb(this.vb,this.X);this.M&8?(this.ub(c,a),this.ub(this.Ia.Vb(0,1),a>>8),this.M&=-9):this.hc(c,
|
||||
a)}this.A-=this.B.ai}return b}function Vj(a,b){a^=b;ig(this,a,128);this.A-=-1===this.F?-1===this.C?this.B.nc:this.B.Mb:this.B.Bc;return a}function Wj(a,b){this.A-=-1===this.F?-1===this.C?this.B.nc:this.B.Mb:this.B.Bc;return ig(this,a^b,this.Hb)&this.R}function Xj(a,b){var c=a[1]-b[1];c||(c=a[0]-b[0]);return c}function Yj(a){var b=a-1|0;bg(this,a,1,b,this.Hb|62,!0);this.A-=2;return a&~this.R|b&this.R}
|
||||
function Zj(a,b,c){c>>>=0;if(!c||c<=b>>>0)return!1;var d=0,e=1,f=this.Xm;f[0]=c>>>0;f[1]=0;c=this.Zm;c[0]=a>>>0;for(c[1]=b>>>0;0<Xj(c,f);)b=a=f,a[0]+=b[0],a[1]+=b[1],4294967295<a[0]&&(a[0]>>>=0,a[1]++),e+=e;do 0<=Xj(c,f)&&(a=c,b=f,a[0]-=b[0],a[1]-=b[1],0>a[0]&&(a[0]>>>=0,a[1]--),d+=e),a=f,a[0]>>>=1,a[1]&1&&(a[0]=(a[0]|2147483648)>>>0),a[1]>>>=1,e/=2;while(1<=e);this.Ea=d;this.cb=c[0];return!0}function ak(a){var b=a+1|0;bg(this,a,1,b,this.Hb|62);this.A-=2;return a&~this.R|b&this.R}
|
||||
function Zj(a,b,c){c>>>=0;if(!c||c<=b>>>0)return!1;var d=0,e=1,f=this.an;f[0]=c>>>0;f[1]=0;c=this.cn;c[0]=a>>>0;for(c[1]=b>>>0;0<Xj(c,f);)b=a=f,a[0]+=b[0],a[1]+=b[1],4294967295<a[0]&&(a[0]>>>=0,a[1]++),e+=e;do 0<=Xj(c,f)&&(a=c,b=f,a[0]-=b[0],a[1]-=b[1],0>a[0]&&(a[0]>>>=0,a[1]--),d+=e),a=f,a[0]>>>=1,a[1]&1&&(a[0]=(a[0]|2147483648)>>>0),a[1]>>>=1,e/=2;while(1<=e);this.Ea=d;this.cb=c[0];return!0}function ak(a){var b=a+1|0;bg(this,a,1,b,this.Hb|62);this.A-=2;return a&~this.R|b&this.R}
|
||||
function bk(a){this.ra=a;ie(this);this.ra&-2147483648?lf(this):of(this)}function te(a){this.Uc=a;nc(this)}function ck(a){this.M|=1;this.vc.call(this,a);this.A-=-1===this.C?4:5}function Cj(a,b,c){if(c){16<c&&(a=b,c-=16);var d=a<<c-1;a=(d<<1|b>>>16-c)&65535;ig(this,a,32768,d&32768)}return a}function Ej(a,b,c){if(c){var d=a<<c-1;a=d<<1|b>>>32-c;ig(this,a,-2147483648,d&-2147483648)}return a}
|
||||
function Ij(a,b,c){if(c){16<c&&(a=b,c-=16);var d=a>>>c-1;a=(d>>>1|b<<16-c)&65535;ig(this,a,32768,d&1)}return a}function Kj(a,b,c){if(c){var d=a>>>c-1;a=d>>>1|b<<32-c;ig(this,a,-2147483648,d&1)}return a}function dk(){this.A-=-1===this.C?2:this.B.Fk;return 1}function ek(){var a=this.I&255;this.A-=(-1===this.C?this.B.Th:this.B.Sh)+(a<<this.B.Uh);return a}function fk(){var a=this.sa();this.A-=(-1===this.C?this.B.Th:this.B.Sh)+(a<<this.B.Uh);return a}function gk(){return null}
|
||||
function hk(){return this.Aa}function ik(a,b){this.od=this.ba.T;this.Tc=this.U.T;this.ta=this.Ca;var c=z(this),d=this.X;null!=se(this,a,b,!0)&&(le(this,this.od,d,2),le(this,c,d,d));this.od=this.Tc=this.ta=-1}function jk(a,b,c){this.A-=this.B.ck+(c||0);c=qe(this);var d=this.ba.T,e=z(this);a=this.ba.Cj(a);-1!==a&&(oe(this,c),oe(this,d),oe(this,e),null!=b&&oe(this,b),this.Lc=-1,Zf(this,a))}
|
||||
|
|
@ -262,13 +262,13 @@ this.D&-256|a;break;case 1:this.I=this.I&-256|a;break;case 2:this.L=this.L&-256|
|
|||
function yf(a){var b,c,d=(this.fa=this.sa())&199;switch(d){case 0:b=C(this,this.H+this.K);this.F=this.C;break;case 1:b=C(this,this.H+this.J);this.F=this.C;break;case 2:b=xg(this,this.N+this.K);this.F=this.C;break;case 3:b=xg(this,this.N+this.J);this.F=this.C;break;case 4:b=C(this,this.K);this.F=this.C;break;case 5:b=C(this,this.J);this.F=this.C;break;case 6:b=C(this,H(this));this.F=this.C;break;case 7:b=C(this,this.H);this.F=this.C;break;case 64:b=C(this,this.H+this.K+this.S());this.F=this.C;break;
|
||||
case 65:b=C(this,this.H+this.J+this.S());this.F=this.C;break;case 66:b=xg(this,this.N+this.K+this.S());this.F=this.C;break;case 67:b=xg(this,this.N+this.J+this.S());this.F=this.C;break;case 68:b=C(this,this.K+this.S());this.F=this.C;break;case 69:b=C(this,this.J+this.S());this.F=this.C;break;case 70:b=xg(this,this.N+this.S());this.F=this.C;break;case 71:b=C(this,this.H+this.S());this.F=this.C;break;case 128:b=C(this,this.H+this.K+H(this));this.F=this.C;break;case 129:b=C(this,this.H+this.J+H(this));
|
||||
this.F=this.C;break;case 130:b=xg(this,this.N+this.K+H(this));this.F=this.C;break;case 131:b=xg(this,this.N+this.J+H(this));this.F=this.C;break;case 132:b=C(this,this.K+H(this));this.F=this.C;break;case 133:b=C(this,this.J+H(this));this.F=this.C;break;case 134:b=xg(this,this.N+H(this));this.F=this.C;break;case 135:b=C(this,this.H+H(this));this.F=this.C;break;case 192:b=this.D&255;break;case 193:b=this.I&255;break;case 194:b=this.L&255;break;case 195:b=this.H&255;break;case 196:b=this.D>>8&255;break;
|
||||
case 197:b=this.I>>8&255;break;case 198:b=this.L>>8&255;break;case 199:b=this.H>>8&255;break;default:b=0}switch(this.fa>>3&7){case 0:c=this.D&255;break;case 1:c=this.I&255;break;case 2:c=this.L&255;break;case 3:c=this.H&255;break;case 4:c=this.D>>8&255;break;case 5:c=this.I>>8&255;break;case 6:c=this.L>>8&255;break;case 7:c=this.H>>8&255;break;default:c=0}a=a.call(this,b,c);switch(d){case 0:case 3:Dg(this,a);this.A-=this.B.Rc;break;case 1:case 2:Dg(this,a);this.A-=this.B.Sc;break;case 4:case 5:case 7:Dg(this,
|
||||
a);this.A-=this.B.xc;break;case 6:Dg(this,a);this.A-=this.B.Ad;break;case 64:case 67:case 128:case 131:Dg(this,a);this.A-=this.B.Xb;break;case 65:case 66:case 129:case 130:Dg(this,a);this.A-=this.B.Yb;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:Dg(this,a);this.A-=this.B.Za;break;case 192:this.D=this.D&-256|a;break;case 193:this.I=this.I&-256|a;break;case 194:this.L=this.L&-256|a;break;case 195:this.H=this.H&-256|a;break;case 196:this.D=this.D&-65281|a<<8;break;case 197:this.I=
|
||||
case 197:b=this.I>>8&255;break;case 198:b=this.L>>8&255;break;case 199:b=this.H>>8&255;break;default:b=0}switch(this.fa>>3&7){case 0:c=this.D&255;break;case 1:c=this.I&255;break;case 2:c=this.L&255;break;case 3:c=this.H&255;break;case 4:c=this.D>>8&255;break;case 5:c=this.I>>8&255;break;case 6:c=this.L>>8&255;break;case 7:c=this.H>>8&255;break;default:c=0}a=a.call(this,b,c);switch(d){case 0:case 3:Bg(this,a);this.A-=this.B.Rc;break;case 1:case 2:Bg(this,a);this.A-=this.B.Sc;break;case 4:case 5:case 7:Bg(this,
|
||||
a);this.A-=this.B.xc;break;case 6:Bg(this,a);this.A-=this.B.Ad;break;case 64:case 67:case 128:case 131:Bg(this,a);this.A-=this.B.Xb;break;case 65:case 66:case 129:case 130:Bg(this,a);this.A-=this.B.Yb;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:Bg(this,a);this.A-=this.B.Za;break;case 192:this.D=this.D&-256|a;break;case 193:this.I=this.I&-256|a;break;case 194:this.L=this.L&-256|a;break;case 195:this.H=this.H&-256|a;break;case 196:this.D=this.D&-65281|a<<8;break;case 197:this.I=
|
||||
this.I&-65281|a<<8;break;case 198:this.L=this.L&-65281|a<<8;break;case 199:this.H=this.H&-65281|a<<8}}
|
||||
function zf(a,b){var c,d=(this.fa=this.sa())&199;switch(d){case 0:c=C(this,this.H+this.K);this.F=this.C;break;case 1:c=C(this,this.H+this.J);this.F=this.C;break;case 2:c=xg(this,this.N+this.K);this.F=this.C;break;case 3:c=xg(this,this.N+this.J);this.F=this.C;break;case 4:c=C(this,this.K);this.F=this.C;break;case 5:c=C(this,this.J);this.F=this.C;break;case 6:c=C(this,H(this));this.F=this.C;break;case 7:c=C(this,this.H);this.F=this.C;break;case 64:c=C(this,this.H+this.K+this.S());this.F=this.C;break;
|
||||
case 65:c=C(this,this.H+this.J+this.S());this.F=this.C;break;case 66:c=xg(this,this.N+this.K+this.S());this.F=this.C;break;case 67:c=xg(this,this.N+this.J+this.S());this.F=this.C;break;case 68:c=C(this,this.K+this.S());this.F=this.C;break;case 69:c=C(this,this.J+this.S());this.F=this.C;break;case 70:c=xg(this,this.N+this.S());this.F=this.C;break;case 71:c=C(this,this.H+this.S());this.F=this.C;break;case 128:c=C(this,this.H+this.K+H(this));this.F=this.C;break;case 129:c=C(this,this.H+this.J+H(this));
|
||||
this.F=this.C;break;case 130:c=xg(this,this.N+this.K+H(this));this.F=this.C;break;case 131:c=xg(this,this.N+this.J+H(this));this.F=this.C;break;case 132:c=C(this,this.K+H(this));this.F=this.C;break;case 133:c=C(this,this.J+H(this));this.F=this.C;break;case 134:c=xg(this,this.N+H(this));this.F=this.C;break;case 135:c=C(this,this.H+H(this));this.F=this.C;break;case 192:c=this.D&255;break;case 193:c=this.I&255;break;case 194:c=this.L&255;break;case 195:c=this.H&255;break;case 196:c=this.D>>8&255;break;
|
||||
case 197:c=this.I>>8&255;break;case 198:c=this.L>>8&255;break;case 199:c=this.H>>8&255;break;default:c=0}a=a[this.fa>>3&7].call(this,c,b.call(this));switch(d){case 0:case 3:Dg(this,a);this.A-=this.B.Rc;break;case 1:case 2:Dg(this,a);this.A-=this.B.Sc;break;case 4:case 5:case 7:Dg(this,a);this.A-=this.B.xc;break;case 6:Dg(this,a);this.A-=this.B.Ad;break;case 64:case 67:case 128:case 131:Dg(this,a);this.A-=this.B.Xb;break;case 65:case 66:case 129:case 130:Dg(this,a);this.A-=this.B.Yb;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:Dg(this,
|
||||
case 197:c=this.I>>8&255;break;case 198:c=this.L>>8&255;break;case 199:c=this.H>>8&255;break;default:c=0}a=a[this.fa>>3&7].call(this,c,b.call(this));switch(d){case 0:case 3:Bg(this,a);this.A-=this.B.Rc;break;case 1:case 2:Bg(this,a);this.A-=this.B.Sc;break;case 4:case 5:case 7:Bg(this,a);this.A-=this.B.xc;break;case 6:Bg(this,a);this.A-=this.B.Ad;break;case 64:case 67:case 128:case 131:Bg(this,a);this.A-=this.B.Xb;break;case 65:case 66:case 129:case 130:Bg(this,a);this.A-=this.B.Yb;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:Bg(this,
|
||||
a);this.A-=this.B.Za;break;case 192:this.D=this.D&-256|a;break;case 193:this.I=this.I&-256|a;break;case 194:this.L=this.L&-256|a;break;case 195:this.H=this.H&-256|a;break;case 196:this.D=this.D&-65281|a<<8;break;case 197:this.I=this.I&-65281|a<<8;break;case 198:this.L=this.L&-65281|a<<8;break;case 199:this.H=this.H&-65281|a<<8}}
|
||||
function Af(a){var b,c;switch((this.fa=this.sa())&199){case 0:c=E(this,this.H+this.K);this.A-=this.B.Rc;break;case 1:c=E(this,this.H+this.J);this.A-=this.B.Sc;break;case 2:c=zg(this,this.N+this.K);this.A-=this.B.Sc;break;case 3:c=zg(this,this.N+this.J);this.A-=this.B.Rc;break;case 4:c=E(this,this.K);this.A-=this.B.xc;break;case 5:c=E(this,this.J);this.A-=this.B.xc;break;case 6:c=E(this,H(this));this.A-=this.B.Ad;break;case 7:c=E(this,this.H);this.A-=this.B.xc;break;case 64:c=E(this,this.H+this.K+
|
||||
this.S());this.A-=this.B.Xb;break;case 65:c=E(this,this.H+this.J+this.S());this.A-=this.B.Yb;break;case 66:c=zg(this,this.N+this.K+this.S());this.A-=this.B.Yb;break;case 67:c=zg(this,this.N+this.J+this.S());this.A-=this.B.Xb;break;case 68:c=E(this,this.K+this.S());this.A-=this.B.Za;break;case 69:c=E(this,this.J+this.S());this.A-=this.B.Za;break;case 70:c=zg(this,this.N+this.S());this.A-=this.B.Za;break;case 71:c=E(this,this.H+this.S());this.A-=this.B.Za;break;case 128:c=E(this,this.H+this.K+H(this));
|
||||
|
|
@ -309,11 +309,11 @@ function Hf(a){var b,c,d=(this.fa=this.sa())&199;switch(d){case 0:b=C(this,this.
|
|||
this.F=this.C;break;case 66:b=C(this,this.L+this.S());this.F=this.C;break;case 67:b=C(this,this.H+this.S());this.F=this.C;break;case 68:b=C(this,nk.call(this,1)+this.S());this.F=this.C;break;case 69:b=xg(this,this.N+this.S());this.F=this.C;break;case 70:b=C(this,this.K+this.S());this.F=this.C;break;case 71:b=C(this,this.J+this.S());this.F=this.C;break;case 128:b=C(this,this.D+H(this));this.F=this.C;break;case 129:b=C(this,this.I+H(this));this.F=this.C;break;case 130:b=C(this,this.L+H(this));this.F=
|
||||
this.C;break;case 131:b=C(this,this.H+H(this));this.F=this.C;break;case 132:b=C(this,nk.call(this,2)+H(this));this.F=this.C;break;case 133:b=xg(this,this.N+H(this));this.F=this.C;break;case 134:b=C(this,this.K+H(this));this.F=this.C;break;case 135:b=C(this,this.J+H(this));this.F=this.C;break;case 192:b=this.D&255;break;case 193:b=this.I&255;break;case 194:b=this.L&255;break;case 195:b=this.H&255;break;case 196:b=this.D>>8&255;break;case 197:b=this.I>>8&255;break;case 198:b=this.L>>8&255;break;case 199:b=
|
||||
this.H>>8&255;break;default:b=0}switch(this.fa>>3&7){case 0:c=this.D&255;break;case 1:c=this.I&255;break;case 2:c=this.L&255;break;case 3:c=this.H&255;break;case 4:c=this.D>>8&255;break;case 5:c=this.I>>8&255;break;case 6:c=this.L>>8&255;break;case 7:c=this.H>>8&255;break;default:c=0}a=a.call(this,b,c);switch(d){case 192:this.D=this.D&-256|a;break;case 193:this.I=this.I&-256|a;break;case 194:this.L=this.L&-256|a;break;case 195:this.H=this.H&-256|a;break;case 196:this.D=this.D&-65281|a<<8;break;case 197:this.I=
|
||||
this.I&-65281|a<<8;break;case 198:this.L=this.L&-65281|a<<8;break;case 199:this.H=this.H&-65281|a<<8;break;default:Dg(this,a)}}
|
||||
this.I&-65281|a<<8;break;case 198:this.L=this.L&-65281|a<<8;break;case 199:this.H=this.H&-65281|a<<8;break;default:Bg(this,a)}}
|
||||
function If(a,b){var c,d=(this.fa=this.sa())&199;switch(d){case 0:c=C(this,this.D);this.F=this.C;break;case 1:c=C(this,this.I);this.F=this.C;break;case 2:c=C(this,this.L);this.F=this.C;break;case 3:c=C(this,this.H);this.F=this.C;break;case 4:c=C(this,nk.call(this,0));this.F=this.C;break;case 5:c=C(this,H(this));this.F=this.C;break;case 6:c=C(this,this.K);this.F=this.C;break;case 7:c=C(this,this.J);this.F=this.C;break;case 64:c=C(this,this.D+this.S());this.F=this.C;break;case 65:c=C(this,this.I+this.S());
|
||||
this.F=this.C;break;case 66:c=C(this,this.L+this.S());this.F=this.C;break;case 67:c=C(this,this.H+this.S());this.F=this.C;break;case 68:c=C(this,nk.call(this,1)+this.S());this.F=this.C;break;case 69:c=xg(this,this.N+this.S());this.F=this.C;break;case 70:c=C(this,this.K+this.S());this.F=this.C;break;case 71:c=C(this,this.J+this.S());this.F=this.C;break;case 128:c=C(this,this.D+H(this));this.F=this.C;break;case 129:c=C(this,this.I+H(this));this.F=this.C;break;case 130:c=C(this,this.L+H(this));this.F=
|
||||
this.C;break;case 131:c=C(this,this.H+H(this));this.F=this.C;break;case 132:c=C(this,nk.call(this,2)+H(this));this.F=this.C;break;case 133:c=xg(this,this.N+H(this));this.F=this.C;break;case 134:c=C(this,this.K+H(this));this.F=this.C;break;case 135:c=C(this,this.J+H(this));this.F=this.C;break;case 192:c=this.D&255;break;case 193:c=this.I&255;break;case 194:c=this.L&255;break;case 195:c=this.H&255;break;case 196:c=this.D>>8&255;break;case 197:c=this.I>>8&255;break;case 198:c=this.L>>8&255;break;case 199:c=
|
||||
this.H>>8&255;break;default:c=0}a=a[this.fa>>3&7].call(this,c,b.call(this));switch(d){case 192:this.D=this.D&-256|a;break;case 193:this.I=this.I&-256|a;break;case 194:this.L=this.L&-256|a;break;case 195:this.H=this.H&-256|a;break;case 196:this.D=this.D&-65281|a<<8;break;case 197:this.I=this.I&-65281|a<<8;break;case 198:this.L=this.L&-65281|a<<8;break;case 199:this.H=this.H&-65281|a<<8;break;default:Dg(this,a)}}
|
||||
this.H>>8&255;break;default:c=0}a=a[this.fa>>3&7].call(this,c,b.call(this));switch(d){case 192:this.D=this.D&-256|a;break;case 193:this.I=this.I&-256|a;break;case 194:this.L=this.L&-256|a;break;case 195:this.H=this.H&-256|a;break;case 196:this.D=this.D&-65281|a<<8;break;case 197:this.I=this.I&-65281|a<<8;break;case 198:this.L=this.L&-65281|a<<8;break;case 199:this.H=this.H&-65281|a<<8;break;default:Bg(this,a)}}
|
||||
function Jf(a){var b,c;switch((this.fa=this.sa())&199){case 0:c=E(this,this.D);break;case 1:c=E(this,this.I);break;case 2:c=E(this,this.L);break;case 3:c=E(this,this.H);break;case 4:c=E(this,nk.call(this,0));break;case 5:c=E(this,H(this));break;case 6:c=E(this,this.K);break;case 7:c=E(this,this.J);break;case 64:c=E(this,this.D+this.S());break;case 65:c=E(this,this.I+this.S());break;case 66:c=E(this,this.L+this.S());break;case 67:c=E(this,this.H+this.S());break;case 68:c=E(this,nk.call(this,1)+this.S());
|
||||
break;case 69:c=zg(this,this.N+this.S());break;case 70:c=E(this,this.K+this.S());break;case 71:c=E(this,this.J+this.S());break;case 128:c=E(this,this.D+H(this));break;case 129:c=E(this,this.I+H(this));break;case 130:c=E(this,this.L+H(this));break;case 131:c=E(this,this.H+H(this));break;case 132:c=E(this,nk.call(this,2)+H(this));break;case 133:c=zg(this,this.N+H(this));break;case 134:c=E(this,this.K+H(this));break;case 135:c=E(this,this.J+H(this));break;case 192:c=this.D&65535;break;case 193:c=this.I&
|
||||
65535;break;case 194:c=this.L&65535;break;case 195:c=this.H&65535;break;case 196:c=y(this)&65535;break;case 197:c=this.N&65535;break;case 198:c=this.K&65535;break;case 199:c=this.J&65535;break;default:c=0}var d=this.fa>>3&7;switch(d){case 0:b=this.D&65535;break;case 1:b=this.I&65535;break;case 2:b=this.L&65535;break;case 3:b=this.H&65535;break;case 4:b=y(this)&65535;break;case 5:b=this.N&65535;break;case 6:b=this.K&65535;break;case 7:b=this.J&65535;break;default:b=0}a=a.call(this,b,c);switch(d){case 0:this.D=
|
||||
|
|
@ -340,9 +340,9 @@ this.F=this.C;break;case 66:c=F(this,this.L+this.S());this.F=this.C;break;case 6
|
|||
this.C;break;case 131:c=F(this,this.H+H(this));this.F=this.C;break;case 132:c=F(this,nk.call(this,2)+H(this));this.F=this.C;break;case 133:c=Ag(this,this.N+H(this));this.F=this.C;break;case 134:c=F(this,this.K+H(this));this.F=this.C;break;case 135:c=F(this,this.J+H(this));this.F=this.C;break;case 192:c=this.D;break;case 193:c=this.I;break;case 194:c=this.L;break;case 195:c=this.H;break;case 196:c=y(this);break;case 197:c=this.N;break;case 198:c=this.K;break;case 199:c=this.J;break;default:c=0}a=a[this.fa>>
|
||||
3&7].call(this,c,b.call(this));switch(d){case 192:this.D=a;break;case 193:this.I=a;break;case 194:this.L=a;break;case 195:this.H=a;break;case 196:ge(this,a);break;case 197:this.N=a;break;case 198:this.K=a;break;case 199:this.J=a;break;default:Fg(this,a)}}
|
||||
function nk(a){var b=this.sa(),c=b>>6,d,e;switch(b>>3&7){case 0:d=this.D;break;case 1:d=this.I;break;case 2:d=this.L;break;case 3:d=this.H;break;case 4:d=0;break;case 5:d=this.N;break;case 6:d=this.K;break;case 7:d=this.J}switch(b&7){case 0:e=this.D;break;case 1:e=this.I;break;case 2:e=this.L;break;case 3:e=this.H;break;case 4:e=y(this);this.Ga=this.Sb;break;case 5:a?(e=this.N,this.Ga=this.Sb):e=H(this);break;case 6:e=this.K;break;case 7:e=this.J}return(d<<c)+e|0}
|
||||
function Ve(){this.rd[this.sa()].call(this)}function Ye(){oe(this,y(this)&this.R);this.A-=this.B.Jc}function Ee(){this.ta=this.Ca;var a=y(this)&this.R;oe(this,this.D&this.R);oe(this,this.I&this.R);oe(this,this.L&this.R);oe(this,this.H&this.R);oe(this,a);oe(this,this.N&this.R);oe(this,this.K&this.R);oe(this,this.J&this.R);this.A-=this.B.zk;this.ta=-1}
|
||||
function Ve(){this.rd[this.sa()].call(this)}function Ye(){oe(this,y(this)&this.R);this.A-=this.B.Jc}function Ae(){this.ta=this.Ca;var a=y(this)&this.R;oe(this,this.D&this.R);oe(this,this.I&this.R);oe(this,this.L&this.R);oe(this,this.H&this.R);oe(this,a);oe(this,this.N&this.R);oe(this,this.K&this.R);oe(this,this.J&this.R);this.A-=this.B.zk;this.ta=-1}
|
||||
function Fe(){this.ta=this.Ca;this.J=this.J&~this.R|ee(this);this.K=this.K&~this.R|ee(this);this.N=this.N&~this.R|ee(this);ge(this,y(this)+this.X);this.H=this.H&~this.R|ee(this);this.L=this.L&~this.R|ee(this);this.I=this.I&~this.R|ee(this);this.D=this.D&~this.R|ee(this);this.A-=this.B.xk;this.ta=-1}function Ge(){this.la.call(this,ri)}function Ze(){!(this.ra&1)||this.P&131072?x.call(this,6):this.Ba.call(this,qi)}function $e(){this.M|=20;this.Ga=this.Sb=this.Ka;this.A-=this.B.$c}
|
||||
function af(){this.M|=20;this.Ga=this.Sb=this.La;this.A-=this.B.$c}function bf(){this.M|=1024;this.ha&1024||(this.X^=6,this.R^=-65536,Pf(this));this.A-=this.B.$c}function ff(){this.M|=2048;this.ha&2048||(this.Mc^=6,this.xa^=-65536,wf(this));this.A-=this.B.$c}function He(){oe(this,this.Ha());this.A-=this.B.Jc}function Ie(){this.la.call(this,Ji)}function Je(){oe(this,this.S());this.A-=this.B.Jc}function Ke(){this.la.call(this,Hi)}
|
||||
function af(){this.M|=20;this.Ga=this.Sb=this.La;this.A-=this.B.$c}function bf(){this.M|=1024;this.ha&1024||(this.X^=6,this.R^=-65536,Pf(this));this.A-=this.B.$c}function cf(){this.M|=2048;this.ha&2048||(this.Mc^=6,this.xa^=-65536,wf(this));this.A-=this.B.$c}function He(){oe(this,this.Ha());this.A-=this.B.Jc}function Ie(){this.la.call(this,Ji)}function Je(){oe(this,this.S());this.A-=this.B.Jc}function Ke(){this.la.call(this,Hi)}
|
||||
function Le(){var a=1,b=0,c=this.xa,d=5;this.ha&192&&(a=this.I&c,b=1,this.ha&256&&(d=4));if(a--){var e=this.L&65535;ug(this,e,1,!0)&&(e=Jc(this.na,e,1,this.ea-b-1),this.ub(this.pa.Vb(this.J&c,1),e),this.J=this.J&~c|this.J+(this.P&1024?-1:1)&c,this.I=this.I&~c|this.I-b&c,this.A-=d,a&&(ag(this),this.M|=256))}}
|
||||
function Me(){var a=1,b=0,c=this.xa,d=5;this.ha&192&&(a=this.I&c,b=1,this.ha&256&&(d=4));if(a--){var e=this.L&65535;ug(this,e,this.X,!0)&&(e=Jc(this.na,e,this.X,this.ea-b-1),Gg(this,this.pa,this.J&c,e),this.J=this.J&~c|this.J+(this.P&1024?-this.X:this.X)&c,this.I=this.I&~c|this.I-b&c,this.A-=d,a&&(ag(this),this.M|=256))}}
|
||||
function Ne(){var a=1,b=0,c=this.xa,d=5;this.ha&192&&(a=this.I&c,b=1,this.ha&256&&(d=4));if(a--){var e=this.L&65535;if(ug(this,e,1,!1)){var f=this.ya(this.Fa.Bb(this.K&c,1));Nc(this.na,e,1,f,this.ea-b-1);this.K=this.K&~c|this.K+(this.P&1024?-1:1)&c;this.I=this.I&~c|this.I-b&c;this.A-=d;a&&(ag(this),this.M|=256)}}}
|
||||
|
|
@ -408,12 +408,12 @@ this.ya(2140)<<16,this.ad=this.Qb+this.ja(2142),ce(this.Gb,2132,this.ja(2076)),c
|
|||
A[7]=function(){if(this.Pa)x.call(this,13,0,0,!0);else{var a=this.pa.Bb(this.J&this.xa,204);if(-1!==a){bk.call(this,this.ia(a));var b=this.ia(a+168),c=(b&24576)>>13;re(this,this.ia(a+4),c);this.Kb=this.ia(a+112);this.Ic=this.Kb+this.ia(a+116);this.Qb=this.ia(a+100);this.ad=this.Qb+this.ia(a+104);ae(this.Gb,this.ia(a+56),this.ia(a+120),this.ia(a+124),this.ia(a+128));ae(this.ka,this.ia(a+52),this.ia(a+84),this.ia(a+88),this.ia(a+92));this.J=this.ia(a+12);this.K=this.ia(a+16);this.N=this.ia(a+20);this.H=
|
||||
this.ia(a+28);this.L=this.ia(a+32);this.I=this.ia(a+36);this.D=this.ia(a+40);ae(this.La,this.ia(a+60),this.ia(a+132),this.ia(a+136),this.ia(a+140));ae(this.Ka,this.ia(a+64),this.ia(a+144),this.ia(a+148),this.ia(a+152));ae(this.Fa,this.ia(a+68),this.ia(a+156),this.ia(a+160),this.ia(a+164));ae(this.U,this.ia(a+72),b,this.ia(a+172),this.ia(a+176));ae(this.ba,this.ia(a+76),this.ia(a+180),this.ia(a+184),this.ia(a+188));ae(this.pa,this.ia(a+80),this.ia(a+192),this.ia(a+196),this.ia(a+200));B(this,this.ia(a+
|
||||
8));ge(this,this.ia(a+24))}this.A-=122<<(a&3?1:0)}};A[16]=Gk;A[17]=Hk;A[18]=Ik;A[19]=Jk;A[32]=function(){if(this.Pa)x.call(this,13,0);else{var a,b=this.sa();switch((b&56)>>3){case 0:a=this.ra;break;case 2:a=this.qd;break;case 3:a=this.Uc;break;default:Xe.call(this);return}vf(this,b&7,a);this.A-=6}};A[33]=function(){if(this.Pa)x.call(this,13,0);else{var a=this.sa(),b=(a&56)>>3;4==b||5==b?Xe.call(this):(vf(this,a&7,this.Rb[b]),this.A-=22)}};
|
||||
A[34]=function(){if(this.Pa)x.call(this,13,0);else{var a=this.sa(),b=uf(this,a&7);switch((a&56)>>3){case 0:bk.call(this,b);this.A-=10;break;case 2:this.qd=b;this.A-=4;break;case 3:te.call(this,b);this.A-=5;break;default:Xe.call(this)}}};A[35]=function(){if(this.Pa)x.call(this,13,0);else{var a=this.sa(),b=(a&56)>>3;4==b||5==b?Xe.call(this):(a=uf(this,a&7),a!=this.Rb[b]&&(Uf(this,!1),this.Rb[b]=a,Uf(this,!0)),this.A-=4>b?22:14)}};
|
||||
A[36]=function(){if(this.Pa)x.call(this,13,0);else{var a=this.sa(),b=(a&56)>>3;6>b?Xe.call(this):(vf(this,a&7,this.$f[b]),this.A-=12)}};A[38]=function(){if(this.Pa)x.call(this,13,0);else{var a=this.sa(),b=(a&56)>>3;6>b?Xe.call(this):(this.$f[b]=uf(this,a&7),this.A-=12)}};A[128]=function(){var a=this.Ha();hg(this)?(B(this,z(this)+a),this.A-=this.B.Ta):this.A-=this.B.Ua};A[129]=function(){var a=this.Ha();hg(this)?this.A-=this.B.Ua:(B(this,z(this)+a),this.A-=this.B.Ta)};
|
||||
A[34]=function(){if(this.Pa)x.call(this,13,0);else{var a=this.sa(),b=pf(this,a&7);switch((a&56)>>3){case 0:bk.call(this,b);this.A-=10;break;case 2:this.qd=b;this.A-=4;break;case 3:te.call(this,b);this.A-=5;break;default:Xe.call(this)}}};A[35]=function(){if(this.Pa)x.call(this,13,0);else{var a=this.sa(),b=(a&56)>>3;4==b||5==b?Xe.call(this):(a=pf(this,a&7),a!=this.Rb[b]&&(Uf(this,!1),this.Rb[b]=a,Uf(this,!0)),this.A-=4>b?22:14)}};
|
||||
A[36]=function(){if(this.Pa)x.call(this,13,0);else{var a=this.sa(),b=(a&56)>>3;6>b?Xe.call(this):(vf(this,a&7,this.$f[b]),this.A-=12)}};A[38]=function(){if(this.Pa)x.call(this,13,0);else{var a=this.sa(),b=(a&56)>>3;6>b?Xe.call(this):(this.$f[b]=pf(this,a&7),this.A-=12)}};A[128]=function(){var a=this.Ha();hg(this)?(B(this,z(this)+a),this.A-=this.B.Ta):this.A-=this.B.Ua};A[129]=function(){var a=this.Ha();hg(this)?this.A-=this.B.Ua:(B(this,z(this)+a),this.A-=this.B.Ta)};
|
||||
A[130]=function(){var a=this.Ha();cg(this)?(B(this,z(this)+a),this.A-=this.B.Ta):this.A-=this.B.Ua};A[131]=function(){var a=this.Ha();cg(this)?this.A-=this.B.Ua:(B(this,z(this)+a),this.A-=this.B.Ta)};A[132]=function(){var a=this.Ha();fg(this)?(B(this,z(this)+a),this.A-=this.B.Ta):this.A-=this.B.Ua};A[133]=function(){var a=this.Ha();fg(this)?this.A-=this.B.Ua:(B(this,z(this)+a),this.A-=this.B.Ta)};A[134]=function(){var a=this.Ha();cg(this)||fg(this)?(B(this,z(this)+a),this.A-=this.B.Ta):this.A-=this.B.Ua};
|
||||
A[135]=function(){var a=this.Ha();cg(this)||fg(this)?this.A-=this.B.Ua:(B(this,z(this)+a),this.A-=this.B.Ta)};A[136]=function(){var a=this.Ha();gg(this)?(B(this,z(this)+a),this.A-=this.B.Ta):this.A-=this.B.Ua};A[137]=function(){var a=this.Ha();gg(this)?this.A-=this.B.Ua:(B(this,z(this)+a),this.A-=this.B.Ta)};A[138]=function(){var a=this.Ha();dg(this)?(B(this,z(this)+a),this.A-=this.B.Ta):this.A-=this.B.Ua};A[139]=function(){var a=this.Ha();dg(this)?this.A-=this.B.Ua:(B(this,z(this)+a),this.A-=this.B.Ta)};
|
||||
A[140]=function(){var a=this.Ha();!gg(this)!=!hg(this)?(B(this,z(this)+a),this.A-=this.B.Ta):this.A-=this.B.Ua};A[141]=function(){var a=this.Ha();!gg(this)==!hg(this)?(B(this,z(this)+a),this.A-=this.B.Ta):this.A-=this.B.Ua};A[142]=function(){var a=this.Ha();fg(this)||!gg(this)!=!hg(this)?(B(this,z(this)+a),this.A-=this.B.Ta):this.A-=this.B.Ua};A[143]=function(){var a=this.Ha();fg(this)||!gg(this)!=!hg(this)?this.A-=this.B.Ua:(B(this,z(this)+a),this.A-=this.B.Ta)};A[144]=function(){ck.call(this,dj)};
|
||||
A[145]=function(){ck.call(this,dj)};A[146]=function(){ck.call(this,ej)};A[147]=function(){ck.call(this,fj)};A[148]=function(){ck.call(this,pj)};A[149]=function(){ck.call(this,qj)};A[150]=function(){ck.call(this,rj)};A[151]=function(){ck.call(this,sj)};A[152]=function(){ck.call(this,tj)};A[153]=function(){ck.call(this,uj)};A[154]=function(){ck.call(this,vj)};A[155]=function(){ck.call(this,wj)};A[156]=function(){ck.call(this,xj)};A[157]=function(){ck.call(this,yj)};A[158]=function(){ck.call(this,zj)};
|
||||
A[145]=function(){ck.call(this,dj)};A[146]=function(){ck.call(this,ej)};A[147]=function(){ck.call(this,fj)};A[148]=function(){ck.call(this,gj)};A[149]=function(){ck.call(this,qj)};A[150]=function(){ck.call(this,rj)};A[151]=function(){ck.call(this,sj)};A[152]=function(){ck.call(this,tj)};A[153]=function(){ck.call(this,uj)};A[154]=function(){ck.call(this,vj)};A[155]=function(){ck.call(this,wj)};A[156]=function(){ck.call(this,xj)};A[157]=function(){ck.call(this,yj)};A[158]=function(){ck.call(this,zj)};
|
||||
A[159]=function(){ck.call(this,Aj)};A[160]=function(){le(this,this.Ka.T,this.X,2);this.A-=this.B.we};A[161]=function(){this.ta=this.Ca;var a=ee(this);this.Ka.load(a);this.A-=this.B.oc;this.ta=-1};A[163]=function(){this.Ba.call(this,yi);-1!==this.C&&(this.A-=6)};A[164]=function(){this.Ba.call(this,2==this.X?Bj:Dj);this.A-=-1===this.C?3:7};A[165]=function(){this.Ba.call(this,2==this.X?Fj:Gj);this.A-=-1===this.C?3:7};A[168]=function(){le(this,this.La.T,this.X,2);this.A-=this.B.we};
|
||||
A[169]=function(){this.ta=this.Ca;var a=ee(this);this.La.load(a);this.A-=this.B.oc;this.ta=-1};A[171]=function(){this.Ba.call(this,Bi);-1!==this.C&&(this.A-=5)};A[172]=function(){this.Ba.call(this,2==this.X?Hj:Jj);this.A-=-1===this.C?3:7};A[173]=function(){this.Ba.call(this,2==this.X?Lj:Mj);this.A-=-1===this.C?3:7};A[175]=function(){this.la.call(this,2==this.X?Ii:Ki)};A[178]=function(){this.la.call(this,Ui)};A[179]=function(){this.Ba.call(this,Ai);-1!==this.C&&(this.A-=5)};
|
||||
A[180]=function(){this.la.call(this,Ri)};A[181]=function(){this.la.call(this,Si)};
|
||||
|
|
@ -430,17 +430,17 @@ function al(a){ib.call(this,"ChipSet",a,32768);var b=a.model;b&&!bl[b]&&ab("Unre
|
|||
1<a?.5:a,this.Ga=this.P=null,window&&(this.Ga=window.AudioContext||window.webkitAudioContext),this.Ga&&(this.P=new this.Ga);this.reset(!0)}ba(al,ib);l=al.prototype;
|
||||
l.uc=function(a,b,c,d){this.na=b;this.G=c;this.ca=d;this.oa=a;this.Kc=Vb(a,"FPU");fl(this,jl,this.Kc?1:0,!0);this.C=Vb(a,"Keyboard");a=ud(a,"sound");if(null!=a){var e=+a||0;this.Ia="true"==a||0>e||1<e?.5:e}this.Ea=c.Y.Zd/kl;Ic(b,this,ll);Mc(b,this,ml);this.da<Tg?this.da!=nl?(Ic(b,this,ol),Mc(b,this,pl)):(Ic(b,this,ql),Mc(b,this,rl)):(Ic(b,this,sl),Mc(b,this,tl),(this.da|0)==ul&&(Ic(b,this,vl),Mc(b,this,wl)));if(d){var f=this;xl(d,1024,function(){for(var a=0;a<f.jc.length;a++){for(var b=f.jc[a],c=
|
||||
"PIC"+a+":",d=0;d<b.Nc.length;d++)c+=" IC"+(d+1)+"="+na(b.Nc[d]);c+=" IMR="+na(b.ud)+" IRR="+na(b.ec)+" ISR="+na(b.Fc)+" DELAY="+b.We;f.ca.O(c)}});xl(d,2048,function(a){a=(a=a[0])?+a:null;for(var b=0;b<f.qa.length;b++)if(null==a||b==a){yl(f,b);var c=f.qa[b],d="TIMER"+b+":",e=0;if(null!=c.Zc)for(var g=0;g<=c.Zc;g++)e|=c.rb[g]<<8*g;d+=" mode="+(c.mode>>1)+" bytes="+c.Zc+" count="+oa(e);f.ca.O(d)}});this.da>=Tg&&xl(d,4096,function(){for(var a="",b=0;b<zl;b++){var c=b<=Al?Bl(f,b):f.A[b];a&&(a+="\n");
|
||||
a+="CMOS["+na(b)+"]: "+na(c)}f.ca.O(a)})}Rf(c,26,this.Rm.bind(this));Jb(this)};l.Eb=function(a,b,c){switch(b){case el:return this.ma[b]=c,Cl(this,0,b),!0;case il:if((this.da|0)==Dl||this.da==nl)return this.ma[b]=c,Cl(this,1,b),!0;break;case El:return this.ma[b]=c,!0}return!1};l.ac=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};l.$b=function(a){return a?this.save():!0};
|
||||
a+="CMOS["+na(b)+"]: "+na(c)}f.ca.O(a)})}Rf(c,26,this.Vm.bind(this));Jb(this)};l.Eb=function(a,b,c){switch(b){case el:return this.ma[b]=c,Cl(this,0,b),!0;case il:if((this.da|0)==Dl||this.da==nl)return this.ma[b]=c,Cl(this,1,b),!0;break;case El:return this.ma[b]=c,!0}return!1};l.ac=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};l.$b=function(a){return a?this.save():!0};
|
||||
l.reset=function(a){var b;Fl(this);this.F=Array(this.Ba);for(b=0;b<this.Ba;b++)Gl(this,b);this.jc=Array(this.ka);Hl(this,Il,Jl);1<this.ka&&Hl(this,Kl,Ll);this.wa=this.ta=null;this.qa=Array((this.da|0)==ul?6:3);for(b=0;b<this.qa.length;b++)Ml(this,b);this.ha=this.Fa=this.H=this.Aa=null;this.fa=jh;this.da==nl&&(this.ea=0);if(this.da>=Tg){this.D=Nl;this.J=0;this.I=Ol;this.pa=0;this.K=Pl|Ql;512<=Rl(this)&&(this.K|=Sl);+Tl(this,hl,void 0)==Ul&&(this.K|=Vl);(this.da|0)==ul&&(this.K=this.K|Wl|Xl);this.ra=
|
||||
Yl|Zl;this.U=Array(8);this.N=0;a&&(this.A=Array(zl));$l(this,this.Ra);for(a=am;a<=bm;a++)this.A[a]=0;for(a=cm;a<dm;a++)void 0===this.A[a]&&(this.A[a]=0);a=0|+Tl(this,hl,void 0)<<em.Lg&em.zc;a|=+Tl(this,jl,void 0)?fm:0;b=+Tl(this,gl,void 0);a|=b?b-1<<gm.Lg&gm.zc|gm.ll:0;this.A[hm]=a;this.A[im]=jm(this,0)<<4|jm(this,1);km(this)}};
|
||||
function $l(a,b){var c=b?new Date(b):new Date;"[object Date]"!==Object.prototype.toString.call(c)||isNaN(c.getTime())?(c=new Date,a.O("CMOS date invalid ("+b+"), using "+c)):b&&a.O("CMOS date: "+c);a.A[lm]=c.getSeconds();a.A[mm]=0;a.A[nm]=c.getMinutes();a.A[om]=0;a.A[pm]=c.getHours();a.A[qm]=0;a.A[rm]=c.getDay()+1;a.A[sm]=c.getDate();a.A[tm]=c.getMonth()+1;b=c.getFullYear();a.A[um]=b%100;b/=100;a.A[vm]=b%10|b/10<<4;a.A[wm]=38;a.A[Pd]=xm;a.A[ym]=0;a.A[Al]=zm;a.la=a.aa=0;a.Pa=a.Ca=null}
|
||||
function Bl(a,b){var c=a.A[b];if(b<wm){var d=!1;b!=pm&&b!=qm||a.A[Pd]&xm||(12>c?c=c?c:12:c=(c-=12)?c+128:140,d=!0);a.A[Pd]&Um||(d&&128<c&&(c-=48),c=c%10|c/10<<4)}else b==wm&&(a.A[b]^=Vm);return c}function Wm(a){var b=a.Ca;a.aa=Cd(a.G,a.M)+b;a.A[Pd]&Qd&&Fd(a.G,b)}function km(a){for(var b=0,c=im;c<dm;c++)b+=a.A[c];a.A[Xm]=b&255;a.A[dm]=b>>8}
|
||||
l.save=function(){var a=new Wf(this);a.set(0,[this.B]);for(var b=[],c=0;c<this.F;c++){for(var d=this.F[c],e=d,f=[],g=0;g<e.pc.length;g++){var h=e.pc[g];f[g]=[h.se,h.bg,h.qc,h.wb,h.rb,h.mode,h.eg,h.No,h.Oo]}b[c]=[d.Pb,d.Wg,d.Xi,d.Ab,f,d.Yi]}a.set(1,[b]);b=[];for(c=0;c<this.jc.length;c++)d=this.jc[c],b[c]=[d.We,d.Nc,d.Md,d.ud,d.ec,d.Fc,d.ke,d.mf];a.set(2,[b]);b=[];for(c=0;c<this.qa.length;c++)d=this.qa[c],b[c]=[d.qc,d.Pc,d.rb,d.ne,d.Yg,d.mode,d.Nf,d.xd,d.Zc,d.gd,d.Me,d.qe,d.jd,d.Pb,d.Qe];a.set(3,[this.ta,
|
||||
function $l(a,b){var c=b?new Date(b):new Date;"[object Date]"!==Object.prototype.toString.call(c)||isNaN(c.getTime())?(c=new Date,a.O("CMOS date invalid ("+b+"), using "+c)):b&&a.O("CMOS date: "+c);a.A[lm]=c.getSeconds();a.A[mm]=0;a.A[nm]=c.getMinutes();a.A[om]=0;a.A[pm]=c.getHours();a.A[qm]=0;a.A[rm]=c.getDay()+1;a.A[sm]=c.getDate();a.A[tm]=c.getMonth()+1;b=c.getFullYear();a.A[um]=b%100;b/=100;a.A[vm]=b%10|b/10<<4;a.A[wm]=38;a.A[Od]=xm;a.A[ym]=0;a.A[Al]=zm;a.la=a.aa=0;a.Pa=a.Ca=null}
|
||||
function Bl(a,b){var c=a.A[b];if(b<wm){var d=!1;b!=pm&&b!=qm||a.A[Od]&xm||(12>c?c=c?c:12:c=(c-=12)?c+128:140,d=!0);a.A[Od]&Um||(d&&128<c&&(c-=48),c=c%10|c/10<<4)}else b==wm&&(a.A[b]^=Vm);return c}function Wm(a){var b=a.Ca;a.aa=Cd(a.G,a.M)+b;a.A[Od]&Qd&&Fd(a.G,b)}function km(a){for(var b=0,c=im;c<dm;c++)b+=a.A[c];a.A[Xm]=b&255;a.A[dm]=b>>8}
|
||||
l.save=function(){var a=new Wf(this);a.set(0,[this.B]);for(var b=[],c=0;c<this.F;c++){for(var d=this.F[c],e=d,f=[],g=0;g<e.pc.length;g++){var h=e.pc[g];f[g]=[h.se,h.bg,h.qc,h.wb,h.rb,h.mode,h.eg,h.Vo,h.Wo]}b[c]=[d.Pb,d.Wg,d.Xi,d.Ab,f,d.Yi]}a.set(1,[b]);b=[];for(c=0;c<this.jc.length;c++)d=this.jc[c],b[c]=[d.We,d.Nc,d.Md,d.ud,d.ec,d.Fc,d.ke,d.mf];a.set(2,[b]);b=[];for(c=0;c<this.qa.length;c++)d=this.qa[c],b[c]=[d.qc,d.Pc,d.rb,d.ne,d.Yg,d.mode,d.Nf,d.xd,d.Zc,d.gd,d.Me,d.qe,d.jd,d.Pb,d.Qe];a.set(3,[this.ta,
|
||||
b,this.wa]);a.set(4,[this.Aa,this.H,this.Fa,this.ha,this.fa]);this.da>=Tg&&(a.set(5,[this.D,this.J,this.I,this.pa,this.K,this.ra]),a.set(6,[this.U[7],this.U,this.N,this.A,this.la,this.aa]));return a.data()};
|
||||
l.restore=function(a){var b,c;b=a[0];Array.isArray(b[0])?this.B=b[0]:(this.B[0][0]=b[0],this.B[1][0]=b[1]&15,this.B[0][1]=b[2],this.B[1][1]=b[3]&15);Fl(this);b=a[1];for(c=0;c<this.Ba;c++)Gl(this,c,1==b.length?b[0][c]:b);b=a[2];for(c=0;c<this.ka;c++)Hl(this,c,c?Ll:Jl,b[0][c]);b=a[3];this.ta=b[0];this.wa=b[2];for(c=0;c<this.qa.length;c++)Ml(this,c,b[1][c]);b=a[4];this.Aa=b[0];this.H=b[1];this.Fa=b[2];this.ha=b[3];this.fa=b[4];if(b=a[5])this.D=b[0],this.J=b[1],this.I=b[2],this.pa=b[3],this.K=b[4],this.ra=
|
||||
b[5];if(b=a[6])this.U=b[1],this.U[7]=b[0],this.N=b[2],this.A=b[3],this.la=b[4],this.aa=b[5],$l(this);return!0};l.start=function(){Ym(this)};l.stop=function(){Ym(this)};function Gl(a,b,c){var d=a.F[b];d||(d={pc:Array(4)});c=c&&5<=c.length?c:Zm;d.Pb=c[0];d.Wg=c[1];d.Xi=c[2];d.Ab=c[3];d.fn=b<<2;for(var e=0;e<d.pc.length;e++)$m(d,e,c[4][e]);d.Yi=c[5]||0;a.F[b]=d}
|
||||
function $m(a,b,c){var d=a.pc[b];d||(d={bg:[0,0],qc:[0,0],wb:[0,0],rb:[0,0]});c=c&&8==c.length?c:an;d.se=c[0];d.bg[0]=c[1][0];d.bg[1]=c[1][1];d.qc[0]=c[2][0];d.qc[1]=c[2][1];d.wb[0]=c[3][0];d.wb[1]=c[3][1];d.rb[0]=c[4][0];d.rb[1]=c[4][1];d.mode=c[5];d.eg=c[6];d.controller=a;d.wj=b;bn(d,c[8],c[9]);a.pc[b]=d}function bn(a,b,c,d){"string"==typeof b&&(b=yb(b));b&&(a.done=null,a.No=b.id,a.Oo=c,a.kg=b,a.dh=b[c],a.zg=d)}
|
||||
function Hl(a,b,c,d){var e=a.jc[b];e||(e={Nc:[null,null,null,null]});d=d&&8==d.length?d:cn;e.port=c;e.lq=b<<3;e.We=d[0];e.Nc[0]=d[1][0];e.Nc[1]=d[1][1];e.Nc[2]=d[1][2];e.Nc[3]=d[1][3];e.Md=d[2];e.ud=d[3];e.ec=d[4];e.Fc=d[5];e.ke=d[6];e.mf=d[7];a.jc[b]=e}
|
||||
b[5];if(b=a[6])this.U=b[1],this.U[7]=b[0],this.N=b[2],this.A=b[3],this.la=b[4],this.aa=b[5],$l(this);return!0};l.start=function(){Ym(this)};l.stop=function(){Ym(this)};function Gl(a,b,c){var d=a.F[b];d||(d={pc:Array(4)});c=c&&5<=c.length?c:Zm;d.Pb=c[0];d.Wg=c[1];d.Xi=c[2];d.Ab=c[3];d.kn=b<<2;for(var e=0;e<d.pc.length;e++)$m(d,e,c[4][e]);d.Yi=c[5]||0;a.F[b]=d}
|
||||
function $m(a,b,c){var d=a.pc[b];d||(d={bg:[0,0],qc:[0,0],wb:[0,0],rb:[0,0]});c=c&&8==c.length?c:an;d.se=c[0];d.bg[0]=c[1][0];d.bg[1]=c[1][1];d.qc[0]=c[2][0];d.qc[1]=c[2][1];d.wb[0]=c[3][0];d.wb[1]=c[3][1];d.rb[0]=c[4][0];d.rb[1]=c[4][1];d.mode=c[5];d.eg=c[6];d.controller=a;d.wj=b;bn(d,c[8],c[9]);a.pc[b]=d}function bn(a,b,c,d){"string"==typeof b&&(b=yb(b));b&&(a.done=null,a.Vo=b.id,a.Wo=c,a.kg=b,a.dh=b[c],a.zg=d)}
|
||||
function Hl(a,b,c,d){var e=a.jc[b];e||(e={Nc:[null,null,null,null]});d=d&&8==d.length?d:cn;e.port=c;e.tq=b<<3;e.We=d[0];e.Nc[0]=d[1][0];e.Nc[1]=d[1][1];e.Nc[2]=d[1][2];e.Nc[3]=d[1][3];e.Md=d[2];e.ud=d[3];e.ec=d[4];e.Fc=d[5];e.ke=d[6];e.mf=d[7];a.jc[b]=e}
|
||||
function Ml(a,b,c){var d=a.qa[b];d||(d={qc:[0,0],Pc:[0,0],rb:[0,0],ne:[0,0]});c=c&&13<=c.length?c:dn;d.qc[0]=c[0][0];d.qc[1]=c[0][1];d.Pc[0]=c[1][0];d.Pc[1]=c[1][1];d.rb[0]=c[2][0];d.rb[1]=c[2][1];d.ne[0]=c[3][0];d.ne[1]=c[3][1];d.Yg=c[4];d.mode=c[5];d.Nf=c[6];d.xd=c[7];d.Zc=c[8];d.gd=c[9];d.Me=c[10];d.qe=c[11];d.jd=c[12];d.Pb=c[13]||0;d.Qe=c[14]||!1;a.qa[b]=d}
|
||||
function Cl(a,b,c){for(var d="",e=a.ma[c],f=1;8>=f;f++){var g="pcjs-bitCell";f||(g+=" pcjs-bitCellLeft");d+='<div id="'+(c+"-"+f)+'" class="'+g+'" data-value="0">'+f+"</div>\n"}e.innerHTML=d;en(a,b,c,!0)}function fn(a,b,c){if(b=(a=gn[a.da|0])&&a[b])for(var d in b)if(a=b[d],a.zc&1<<c)return a;return null}
|
||||
function Tl(a,b,c){for(var d=null,e=gn[a.da]||gn[a.da|0]||gn[Dl],f=0;f<e.length;f++){var g=e[f];if(g&&(g=g[b])){a=a.B[f][c?0:1]&g.zc;for(var h in g.Xc)if(g.Xc[h]==a&&(d=h,"number"==typeof+d))break;break}}return d}function jm(a,b){if(b<+Tl(a,gl,void 0)){if(!a.L)return hn;if(b<a.L.length)switch(a.L[b]){case 160:case 180:case 320:case 360:return hn;case 720:return jn;case 1200:return kn;case 1440:return ln}}return mn}function Rl(a,b){return+Tl(a,nn,b)+ +Tl(a,on,b)}
|
||||
|
|
@ -449,68 +449,68 @@ function en(a,b,c,d){if(c=a.ma[c]){d=d?a.B[b][0]:a.B[b][1]=a.B[b][0];c=vb(c,"pcj
|
|||
function qn(a){var b=a.ma[El];if(null!=b){var c;c=""+(Rl(a,!0)+"Kb");c+=", "+(+ +Tl(a,jl,!0)?"":"No ")+"FPU";c+=", "+{0:"Enhanced Color",1:"TV",2:"Color",3:"Monochrome"}[+Tl(a,hl,!0)]+" Monitor";c+=", "+ +Tl(a,gl,!0)+" Floppy Drives";if(null!=a.B[0][1]&&a.B[0][1]!=a.B[0][0]||null!=a.B[1][1]&&a.B[1][1]!=a.B[1][0])c+=" (Reset required)";b.textContent=c}}
|
||||
function rn(a,b,c,d,e){var f=a.F[b],g=f.pc[c],h=g.wb[f.Ab];r(a,768)&&t(a,d,null,e,"DMA"+b+".CHANNEL"+c+".ADDR["+f.Ab+"]",h,!0);f.Ab^=1;b||c!=sn||f.Ab||(g.wb[0]++,255<g.wb[0]&&(g.wb[0]=0,g.wb[1]++,255<g.wb[1]&&(g.wb[1]=0)));return h}function tn(a,b,c,d,e,f){var g=a.F[b];r(a,768)&&t(a,d,e,f,"DMA"+b+".CHANNEL"+c+".ADDR["+g.Ab+"]",null,!0);a=g.pc[c];a.wb[g.Ab]=a.bg[g.Ab]=e;g.Ab^=1}
|
||||
function un(a,b,c,d,e){var f=a.F[b],g=f.pc[c],h=g.rb[f.Ab];r(a,768)&&t(a,d,null,e,"DMA"+b+".CHANNEL"+c+".COUNT["+f.Ab+"]",h,!0);f.Ab^=1;b||c!=sn||f.Ab||(g.rb[0]--,0>g.rb[0]&&(g.rb[0]=255,g.rb[1]--,0>g.rb[1]&&(g.rb[1]=255)));return h}function vn(a,b,c,d,e,f){var g=a.F[b];r(a,768)&&t(a,d,e,f,"DMA"+b+".CHANNEL"+c+".COUNT["+g.Ab+"]",null,!0);a=g.pc[c];a.rb[g.Ab]=a.qc[g.Ab]=e;g.Ab^=1}function wn(a,b,c,d){var e=a.F[b],f=e.Pb|xn;e.Pb&=~yn;r(a,768)&&t(a,c,null,d,"DMA"+b+".STATUS",f,!0);return f}
|
||||
function zn(a,b,c,d,e){var f=a.F[b];r(a,768)&&t(a,c,d,e,"DMA"+b+".REQ",null,!0);a=d&3;f.Pb=f.Pb&~(16<<a)|(d&4)<<a+2;f.Xi=d}function An(a,b,c,d,e){var f=a.F[b];r(a,768)&&t(a,c,d,e,"DMA"+b+".MASK",null,!0);b=d&Bn;c=f.pc[b];c.se=!!(d&Cn);c.se||Dn(a,f.fn+b)}function En(a,b,c,d,e){r(a,768)&&t(a,c,d,e,"DMA"+b+".MODE",null,!0);a.F[b].pc[d&Fn].mode=d}function Gn(a,b,c,d){var e=a.F[b].Yi;r(a,768)&&t(a,c,null,d,"DMA"+b+".TEMP",e,!0);return e}
|
||||
function zn(a,b,c,d,e){var f=a.F[b];r(a,768)&&t(a,c,d,e,"DMA"+b+".REQ",null,!0);a=d&3;f.Pb=f.Pb&~(16<<a)|(d&4)<<a+2;f.Xi=d}function An(a,b,c,d,e){var f=a.F[b];r(a,768)&&t(a,c,d,e,"DMA"+b+".MASK",null,!0);b=d&Bn;c=f.pc[b];c.se=!!(d&Cn);c.se||Dn(a,f.kn+b)}function En(a,b,c,d,e){r(a,768)&&t(a,c,d,e,"DMA"+b+".MODE",null,!0);a.F[b].pc[d&Fn].mode=d}function Gn(a,b,c,d){var e=a.F[b].Yi;r(a,768)&&t(a,c,null,d,"DMA"+b+".TEMP",e,!0);return e}
|
||||
function Hn(a,b,c,d,e){r(a,768)&&t(a,c,d,e,"DMA"+b+".MASTER_CLEAR",null,!0);a=a.F[b];for(b=0;b<a.pc.length;b++)$m(a,b)}function In(a,b,c,d,e){var f=a.F[b].pc[c].eg;r(a,768)&&t(a,d,null,e,"DMA"+b+".CHANNEL"+c+".PAGE",f,!0);return f}function Jn(a,b,c,d,e,f){r(a,768)&&t(a,d,e,f,"DMA"+b+".CHANNEL"+c+".PAGE",null,!0);a.F[b].pc[c].eg=e}function Kn(a,b,c,d){var e=a.U[b];r(a,768)&&t(a,c,null,d,"DMA.SPARE"+b+".PAGE",e,!0);return e}
|
||||
function Ln(a,b,c,d,e){r(a,768)&&t(a,c,d,e,"DMA.SPARE"+b+".PAGE",null,!0);a.U[b]=d}function Mn(a,b,c,d,e){bn(a.F[b>>2].pc[b&3],c,d,e)}function Dn(a,b,c){b=a.F[b>>2].pc[b&3];b.kg&&b.dh&&b.zg?(c&&(b.done=c),b.se||Nn(a,b,!0)):c&&c(!0)}
|
||||
function Nn(a,b,c){c&&(b.count=b.rb[1]<<8|b.rb[0],b.type=b.mode&On,b.pj=b.lg=!1);for(var d=!1;0<=b.count&&(c=b.eg<<16|b.wb[1]<<8|b.wb[0],b.type==Pn?(d=!0,function(c){b.dh.call(b.kg,b.zg,-1,function(e,g){0>e&&(b.pj||(b.pj=!0),e=255);b.se||a.na.ub(c,e);(d=g)&&setTimeout(function(){Qn(b)||Nn(a,b)},0)})}(c)):b.type==Rn?(c=a.na.ya(c),0>b.dh.call(b.kg,b.zg,c)&&(b.lg=!0)):b.type!=Sn&&(b.lg=!0)),!d&&!Qn(b););}
|
||||
function Qn(a){if(!a.lg&&0<=--a.count&&(a.mode&Tn?(a.wb[0]--,0>a.wb[0]&&(a.wb[0]=255,a.wb[1]--,0>a.wb[1]&&(a.wb[1]=255))):(a.wb[0]++,255<a.wb[0]&&(a.wb[0]=0,a.wb[1]++,255<a.wb[1]&&(a.wb[1]=0))),!a.se))return!1;var b=a.controller;b.Pb=b.Pb&~(16<<a.wj)|1<<a.wj;a.mode&Un||(a.se=!0,a.kg=a.zg=null);a.done&&(a.done(!a.lg),a.done=null);return!0}function Vn(a,b,c){var d=0,e=a.jc[b];if(null!=e.mf)switch(e.mf&Wn){case Xn:d=e.ec;break;case Yn:d=e.Fc}r(a,34048)&&t(a,e.port,null,c,"PIC"+b,d,!0);return d}
|
||||
function Zn(a,b,c,d){var e=a.jc[b];r(a,34048)&&t(a,e.port,c,d,"PIC"+b,null,!0);if(c&$n)e.Md=0,e.Nc[e.Md++]=c,e.ud=0,e.ke=7,e.ec=e.Fc=0,e.mf=ao|Xn;else if(c&ao)c&(bo|co)&&r(a,1073741824)&&Nb(a,"PIC"+b+"("+na(e.port)+"): unsupported OCW3 "+na(c),!0,!0),e.mf=c;else if(d=c&eo,d&fo){var f,g=0;if((d&go)==go)f=c&ho,g=1<<f;else for(f=e.ke+1;;){f&=7;var h=1<<f;if(e.Fc&h){g=h;break}if(f++==e.ke)break}e.Fc&g&&(e.Fc&=~g,io(a));d&jo&&r(a,1073741824)&&Nb(a,"PIC"+b+"("+na(e.port)+"): unsupported OCW2 rotate "+na(c),
|
||||
!0,!0)}else d==ko?e.ke=c&ho:r(a,1073741824)&&Nb(a,"PIC"+b+"("+na(e.port)+"): unsupported OCW2 automatic EOI "+na(c),!0,!0)}function lo(a,b,c){var d=a.jc[b],e=d.ud;r(a,34048)&&t(a,d.port+1,null,c,"PIC"+b,e,!0);return e}function mo(a,b,c,d){var e=a.jc[b];r(a,34048)&&t(a,e.port+1,c,d,"PIC"+b,null,!0);e.Md<e.Nc.length?(e.Nc[e.Md++]=c,2==e.Md&&e.Nc[0]&no&&e.Md++,3!=e.Md||e.Nc[0]&oo||e.Md++):(e.ud=c,d=a.G,d.M|=4,io(a,b||253!=c?0:6))}
|
||||
function ih(a,b,c){var d=a.jc[b>>3];b=1<<(b&7);d.ec&b||(d.ec|=b,d.We=c||0,io(a))}function Ug(a,b){var c=a.jc[b>>3];b=1<<(b&7);c.ec&b&&(c.ec&=~b,io(a))}function io(a,b){var c,d=-1;1<a.ka&&(c=a.jc[1],d=~(c.Fc|c.ud)&c.ec);c=a.jc[0];0<=d&&(c.ec=d?c.ec|1<<po:c.ec&~(1<<po));d=~(c.Fc|c.ud)&c.ec;a=a.G;a.V&&(a.ab=d?a.ab|1:a.ab&-2);d&&b&&(c.We=b)}
|
||||
function Wg(a,b,c){var d=a.jc[b>>3];b=1<<(b&7);d.ec&b||(d.ec|=b,d.We=c||0,io(a))}function Ug(a,b){var c=a.jc[b>>3];b=1<<(b&7);c.ec&b&&(c.ec&=~b,io(a))}function io(a,b){var c,d=-1;1<a.ka&&(c=a.jc[1],d=~(c.Fc|c.ud)&c.ec);c=a.jc[0];0<=d&&(c.ec=d?c.ec|1<<po:c.ec&~(1<<po));d=~(c.Fc|c.ud)&c.ec;a=a.G;a.V&&(a.ab=d?a.ab|1:a.ab&-2);d&&b&&(c.We=b)}
|
||||
function Kg(a,b){void 0===b&&(b=0);var c=-1,d=a.jc[b];if(d.We)c=-2,d.We--;else for(var e=d.ec&((d.Fc|d.ud)^255),f=d.ke+1;;){var f=f&7,g=1<<f;if(d.Fc&g)break;if(e&g){b||f!=po?c=d.Nc[1]+f:c=Kg(a,1);0<=c&&(d.Fc|=g,d.ec&=~g);break}if(f++==d.ke)break}return c}function qo(a,b,c,d,e){var f;f=b?3:0;var g=a.qa[f+c];g.Qe?(f=g.Pb,g.Qe=!1):(g.xd==g.Zc&&ro(a,f+c),g.Me?(f=g.ne[g.xd++],g.xd==g.Zc&&(g.Me=!1)):(yl(a,f+c),f=g.rb[g.xd++]));r(a,2304)&&t(a,d,null,e,"PIT"+b+".TIMER"+c,f,!0);return f}
|
||||
function so(a,b,c,d,e,f){r(a,2304)&&t(a,d,e,f,"PIT"+b+".TIMER"+c,null,!0);f=b?3:0;d=a.qa[f+c];d.xd==d.Zc&&ro(a,f+c);d.qc[d.xd++]=e;d.xd==d.Zc&&(d.qe&&d.mode!=to&&d.mode!=uo||(d.Me=!1,d.rb[0]=d.Pc[0]=d.qc[0],d.rb[1]=d.Pc[1]=d.qc[1],d.jd=Cd(a.G,a.M),d.qe=!0,d.gd=d.mode!=to,b==vo&&c==wo&&(Ug(a,xo),e=yo(a,wo)*a.Ea|0,d.mode==Nd&&(e>>=1),Fd(a.G,e))),b==vo&&c==zo&&Ym(a))}function Ao(a,b,c,d){t(a,c,null,d,"PIT"+b+".CTRL",null,2048);return b?a.wa:a.ta}
|
||||
function Bo(a,b,c,d,e){t(a,c,d,e,"PIT"+b+".CTRL",null,2048);e=0;c=d&Co;b?(e=3,a.wa=d):a.ta=d;if(c==Do){if(!(d&Eo))for(c=0;2>=c;c++)if(d&Fo<<c){b=e+c;var f=a.qa[b];f.Qe||(yl(a,b),f.Pb=f.Yg|f.mode|f.Nf|(f.xd<f.Zc?Go:0)|(f.gd?Ho:0),f.Qe=!0)}if(!(d&Io))for(c=0;2>=c;c++)d&Fo<<c&&Jo(a,e+c)}else{c>>=Ko;var f=d&Lo,g=d&Mo;d&=No;if(d==Oo)Jo(a,e+c);else{e+=c;var h=a.qa[e];h.Nf=d;h.mode=g;h.Yg=f;h.qc=[0,0];h.rb=[0,0];h.ne=[0,0];h.gd=!1;h.Me=!1;h.qe=!1;h.Qe=!1;ro(a,e);b==vo&&c==wo&&Ug(a,xo);b==vo&&c==zo&&255==
|
||||
a.jc[0].ud&&a.H==(Po|Qo|Ro|So)&&(b=a.qa[0],b.Pc[0]=b.qc[0],b.Pc[1]=b.qc[1],b.jd=Cd(a.G,a.M))}}}function yo(a,b){a=a.qa[b];(b=a.qc[1]<<8|a.qc[0])||(b=1==a.Zc?256:65536);return b}function Md(a,b){a=a.qa[b];(b=a.Pc[1]<<8|a.Pc[0])||(b=1==a.Zc?256:65536);return b}function Jo(a,b){yl(a,b);var c=a.qa[b];c.ne[0]=c.rb[0];c.ne[1]=c.rb[1];c.Me=!0;ro(a,b)}function ro(a,b){a=a.qa[b];a.xd=a.Nf==To?1:0;a.Zc=a.Nf==Uo?2:1}
|
||||
function yl(a,b,c){var d=a.qa[b];if(d.qe&&(b!=zo||a.H&Po)){var e=Cd(a.G,a.M),f=(e-d.jd)/a.Ea|0;0>f&&(d.jd=e,f=0);var g=yo(a,b),h=Md(a,b)-f;d.mode==to?(0>=h&&(h=0),h||(d.gd=!0,d.qe=!1,b||ih(a,xo))):d.mode==Vo?(d.gd=1!=h,0>=h&&(h=g+h,0>=h&&(h=g),d.Pc[0]=h&255,d.Pc[1]=h>>8&255,d.jd=e,!b&&d.gd&&ih(a,xo))):d.mode==Nd&&(h-=f,0>=h&&(d.gd=!d.gd,h=g+h,0>=h&&(h=g),d.Pc[0]=h&255,d.Pc[1]=h>>8&255,d.jd=e,!b&&d.gd&&ih(a,xo)));d.rb[0]=h&255;d.rb[1]=h>>8&255;c&&(a.jd=0)}return d}
|
||||
function Ld(a,b){for(var c=0;c<a.qa.length;c++)yl(a,c,b);if(a.da>=Tg){b=a.G.Y.Zd;c=Cd(a.G,a.M);null==a.Ca&&(a.la=Cd(a.G,a.M),a.Pa=1024,a.Ca=Math.floor(a.G.Y.Zd/a.Pa),Wm(a));c>=a.aa&&(a.A[ym]|=Wo,a.A[Pd]&Qd&&(a.A[ym]|=Xo,ih(a,Yo)),a.aa=c+a.Ca);a.A[lm]==a.A[mm]&&a.A[nm]==a.A[om]&&a.A[pm]==a.A[qm]&&(a.A[ym]|=Zo,a.A[Pd]&$o&&(a.A[ym]|=Xo,ih(a,Yo)));var d=c-a.la,e=Math.floor(d/b);if(e&&!(a.A[Pd]&ap)){for(;e--;)if(60<=++a.A[lm]&&(a.A[lm]=0,60<=++a.A[nm]&&(a.A[nm]=0,24<=++a.A[pm]))){a.A[pm]=0;a.A[rm]=a.A[rm]%
|
||||
7+1;var f;f=a.A[um];var g=Da[a.A[tm]-1];28==g&&(f%4||!(f%100)&&f%400||g++);f=g;++a.A[sm]>f&&(a.A[sm]=1,12<++a.A[tm]&&(a.A[tm]=1,a.A[um]=(a.A[um]+1)%100))}a.A[ym]|=bp;a.A[Pd]&cp&&(a.A[ym]|=Xo,ih(a,Yo))}a.la=c-d%b}}l.Am=function(a,b){var c=this.Aa;this.ha&dp&&(this.H&ep?c=this.B[0][1]:this.C&&(c=fp(this.C)));t(this,a,null,b,"PPI_A",c);return c};l.ho=function(a,b,c){t(this,a,b,c,"PPI_A");this.Aa=b};l.Bm=function(a,b){var c=this.H;t(this,a,null,b,"PPI_B",c);return c};
|
||||
l.io=function(a,b,c){t(this,a,b,c,"PPI_B");gp(this,b)};function gp(a,b){var c=!!(b&hp),d=!!(a.H&hp);a.H=b;a.C&&ip(a.C,!(b&ep),!!(b&So));c!=d&&Ym(a,c)}l.Cm=function(a,b){var c=0,c=(this.da|0)==Dl?this.H&Qo?c|this.B[1][1]&jp:c|this.B[1][1]>>4&1:this.H&kp?c|this.B[0][1]>>4:c|this.B[0][1]&15;this.H&Po&&yl(this,zo).gd&&(c=this.H&hp?c|lp:c|mp);t(this,a,null,b,"PPI_C",c,32896);return c};l.jo=function(a,b,c){t(this,a,b,c,"PPI_C");this.Fa=b};l.Dm=function(a,b){var c=this.ha;t(this,a,null,b,"PPI_CTRL",c);return c};
|
||||
l.ko=function(a,b,c){t(this,a,b,c,"PPI_CTRL");this.ha=b};l.Ml=function(a,b){var c=this.C?fp(this.C):0;t(this,a,null,b,"8041_KBD",c);this.ea&=~np;return c};l.rn=function(a,b,c){t(this,a,b,c,"8041_KBD")};l.Ll=function(a,b){var c=this.H;t(this,a,null,b,"8041_CTRL",c);return c};l.qn=function(a,b,c){t(this,a,b,c,"8041_CTRL");gp(this,b)};l.Nl=function(a,b){var c=this.ea;t(this,a,null,b,"8041_STATUS",c);return c};
|
||||
function yl(a,b,c){var d=a.qa[b];if(d.qe&&(b!=zo||a.H&Po)){var e=Cd(a.G,a.M),f=(e-d.jd)/a.Ea|0;0>f&&(d.jd=e,f=0);var g=yo(a,b),h=Md(a,b)-f;d.mode==to?(0>=h&&(h=0),h||(d.gd=!0,d.qe=!1,b||Wg(a,xo))):d.mode==Vo?(d.gd=1!=h,0>=h&&(h=g+h,0>=h&&(h=g),d.Pc[0]=h&255,d.Pc[1]=h>>8&255,d.jd=e,!b&&d.gd&&Wg(a,xo))):d.mode==Nd&&(h-=f,0>=h&&(d.gd=!d.gd,h=g+h,0>=h&&(h=g),d.Pc[0]=h&255,d.Pc[1]=h>>8&255,d.jd=e,!b&&d.gd&&Wg(a,xo)));d.rb[0]=h&255;d.rb[1]=h>>8&255;c&&(a.jd=0)}return d}
|
||||
function Ld(a,b){for(var c=0;c<a.qa.length;c++)yl(a,c,b);if(a.da>=Tg){b=a.G.Y.Zd;c=Cd(a.G,a.M);null==a.Ca&&(a.la=Cd(a.G,a.M),a.Pa=1024,a.Ca=Math.floor(a.G.Y.Zd/a.Pa),Wm(a));c>=a.aa&&(a.A[ym]|=Wo,a.A[Od]&Qd&&(a.A[ym]|=Xo,Wg(a,Yo)),a.aa=c+a.Ca);a.A[lm]==a.A[mm]&&a.A[nm]==a.A[om]&&a.A[pm]==a.A[qm]&&(a.A[ym]|=Zo,a.A[Od]&$o&&(a.A[ym]|=Xo,Wg(a,Yo)));var d=c-a.la,e=Math.floor(d/b);if(e&&!(a.A[Od]&ap)){for(;e--;)if(60<=++a.A[lm]&&(a.A[lm]=0,60<=++a.A[nm]&&(a.A[nm]=0,24<=++a.A[pm]))){a.A[pm]=0;a.A[rm]=a.A[rm]%
|
||||
7+1;var f;f=a.A[um];var g=Da[a.A[tm]-1];28==g&&(f%4||!(f%100)&&f%400||g++);f=g;++a.A[sm]>f&&(a.A[sm]=1,12<++a.A[tm]&&(a.A[tm]=1,a.A[um]=(a.A[um]+1)%100))}a.A[ym]|=bp;a.A[Od]&cp&&(a.A[ym]|=Xo,Wg(a,Yo))}a.la=c-d%b}}l.Em=function(a,b){var c=this.Aa;this.ha&dp&&(this.H&ep?c=this.B[0][1]:this.C&&(c=fp(this.C)));t(this,a,null,b,"PPI_A",c);return c};l.po=function(a,b,c){t(this,a,b,c,"PPI_A");this.Aa=b};l.Fm=function(a,b){var c=this.H;t(this,a,null,b,"PPI_B",c);return c};
|
||||
l.qo=function(a,b,c){t(this,a,b,c,"PPI_B");gp(this,b)};function gp(a,b){var c=!!(b&hp),d=!!(a.H&hp);a.H=b;a.C&&ip(a.C,!(b&ep),!!(b&So));c!=d&&Ym(a,c)}l.Gm=function(a,b){var c=0,c=(this.da|0)==Dl?this.H&Qo?c|this.B[1][1]&jp:c|this.B[1][1]>>4&1:this.H&kp?c|this.B[0][1]>>4:c|this.B[0][1]&15;this.H&Po&&yl(this,zo).gd&&(c=this.H&hp?c|lp:c|mp);t(this,a,null,b,"PPI_C",c,32896);return c};l.ro=function(a,b,c){t(this,a,b,c,"PPI_C");this.Fa=b};l.Hm=function(a,b){var c=this.ha;t(this,a,null,b,"PPI_CTRL",c);return c};
|
||||
l.so=function(a,b,c){t(this,a,b,c,"PPI_CTRL");this.ha=b};l.Ml=function(a,b){var c=this.C?fp(this.C):0;t(this,a,null,b,"8041_KBD",c);this.ea&=~np;return c};l.vn=function(a,b,c){t(this,a,b,c,"8041_KBD")};l.Ll=function(a,b){var c=this.H;t(this,a,null,b,"8041_CTRL",c);return c};l.un=function(a,b,c){t(this,a,b,c,"8041_CTRL");gp(this,b)};l.Nl=function(a,b){var c=this.ea;t(this,a,null,b,"8041_STATUS",c);return c};
|
||||
l.Ol=function(a,b){var c=this.pa;t(this,a,null,b,"8042_OUTBUFF",c,16384);this.D&=~(np|op);this.C&&pp(this.C);return c};
|
||||
l.tn=function(a,b,c){t(this,a,b,c,"8042_INBUF.DATA",null,16384);if(this.D&qp)switch(this.J){case rp:sp(this,b);break;case tp:up(this,b);break;default:if(sp(this,this.I&~Ol),this.C){a=this.C;c=b;var d=-1;r(a)&&Nb(a,"sendCmd("+na(c)+")");switch(a.H||c){case vp:d=wp;xp(a);break;case yp:a.H&&(c=0);zp(a,wp);a.H=c;break;case Ap:a.H&&(c=0);zp(a,wp);a.H=c;break;default:Nb(a,"sendCmd(): unrecognized command")}Bp(this,d)}}this.J=b;this.D&=~qp};
|
||||
l.Pl=function(a,b){var c=this.H&~(Cp|Dp)|(Cd(this.G)&64?Dp:0);t(this,a,null,b,"8042_RWREG",c,16384);return c};l.un=function(a,b,c){t(this,a,b,c,"8042_RWREG",null,16384);gp(this,b)};l.Ql=function(a,b){t(this,a,null,b,"8042_STATUS",this.D,16384);a=this.D&255;this.D&op&&(this.D|=np,this.D&=~op);return a};
|
||||
l.sn=function(a,b,c){t(this,a,b,c,"8042_INBUFF.CMD",null,16384);this.J=b;this.D|=qp;a=0;this.J>=Ep&&(a=this.J^15,this.J=Ep);switch(this.J){case Fp:Bp(this,this.I);break;case Gp:sp(this,this.I|Ol);break;case Hp:sp(this,this.I&~Ol);this.C&&pp(this.C);break;case Ip:this.C&&(a=this.C,a.A=[],r(a)&&Nb(a,"scan codes flushed"));sp(this,this.I|Ol);Bp(this,Jp);up(this,Yl|Zl);break;case Kp:Bp(this,Lp);break;case Mp:Bp(this,this.K);break;case Np:Bp(this,this.ra);break;case Op:Bp(this,this.I&Ol?0:Pp);break;case Ep:a&
|
||||
1&&jf(this.G)}};function sp(a,b){a.I=b;a.D=a.D&~Qp|b&Rp;a.C&&ip(a.C,!!(b&Sp),!(b&Ol))}function Bp(a,b,c){0<=b&&(a.pa=b,c?a.D|=np:(a.D&=~np,a.D|=op))}function up(a,b){a.ra=b;jc(a.na,!!(b&Zl));b&Yl||jf(a.G)}function Tp(a,b){a.da<Tg?(ih(a,Up,4),a.ea|=np):a.I&Ol||a.D&(np|op)||(Bp(a,b,!0),Vp(a.C),ih(a,Up,120))}function Wp(a,b,c,d){var e=a.B[b][1];t(a,c,null,d,"DIPSW-"+b,e,32768);return e}l.dm=function(a,b){t(this,a,null,b,"CMOS.ADDR",this.N,4096);return this.N};
|
||||
l.In=function(a,b,c){t(this,a,b,c,"CMOS.ADDR",null,4096);this.N=b;this.fa=b&Xp?jh:Yp};l.em=function(a,b){var c=this.N&Zp,d=c<=Al?Bl(this,c):this.A[c];r(this,4352)&&t(this,a,null,b,"CMOS.DATA["+na(c)+"]",d,!0);null!=b&&c==ym&&(this.A[c]&=$p,d&Xo&&Ug(this,Yo),d&Wo&&this.A[Pd]&Qd&&Wm(this));return d};
|
||||
l.Jn=function(a,b,c){var d=this.N&Zp;r(this,4352)&&t(this,a,b,c,"CMOS.DATA["+na(d)+"]",null,!0);a=b^this.A[d];if(d<=Al){if(c=b,d<wm){var e=!1;this.A[Pd]&Um||(c=10*(c>>4)+(c&15),e=!0);if(d==pm||d==qm)e&&23<c&&(c+=48),this.A[Pd]&xm||(12>=c?c=12==c?0:c:(c-=116,c=24==c?12:c))}}else c=b;this.A[d]=c;d==Pd&&a&Qd&&b&Qd&&Wm(this)};l.Mk=function(a,b,c){t(this,a,b,c,"NMI");this.fa=b};l.Tn=function(a,b,c){t(this,a,b,c,"FPU.CLEAR")};l.Un=function(a,b,c){t(this,a,b,c,"FPU.RESET");this.Kc&&Og(this.Kc)};
|
||||
l.Rm=function(a){if(r(this,16)&&Wk(this.ca,26,a)){var b=this.G.D>>8;Sf(this.G,a,function(a,d){return function(c){d=Cd(a.G)-d;var e,g=a.G.L&255,h=a.G.L>>8,k=a.G.L&255,m=a.G.L>>8;if(2==b||3==b)e=" CH(hour)="+oa(h)+" CL(min)="+na(g)+" DH(sec)="+na(m);else if(4==b||5==b)e=" CX(year)="+oa(a.G.I)+" DH(month)="+na(m)+" DL(day)="+na(k);g=a.ca;h=d;g.message("INT "+na(26)+": C="+(cg(g.G)?1:0)+(e||"")+" (cycles="+h+(c?",level="+(c+1):"")+")")}}(this,Cd(this.G)))}return!0};
|
||||
l.xn=function(a,b,c){t(this,a,b,c,"8042_INBUF.DATA",null,16384);if(this.D&qp)switch(this.J){case rp:sp(this,b);break;case tp:up(this,b);break;default:if(sp(this,this.I&~Ol),this.C){a=this.C;c=b;var d=-1;r(a)&&Nb(a,"sendCmd("+na(c)+")");switch(a.H||c){case vp:d=wp;xp(a);break;case yp:a.H&&(c=0);zp(a,wp);a.H=c;break;case Ap:a.H&&(c=0);zp(a,wp);a.H=c;break;default:Nb(a,"sendCmd(): unrecognized command")}Bp(this,d)}}this.J=b;this.D&=~qp};
|
||||
l.Pl=function(a,b){var c=this.H&~(Cp|Dp)|(Cd(this.G)&64?Dp:0);t(this,a,null,b,"8042_RWREG",c,16384);return c};l.yn=function(a,b,c){t(this,a,b,c,"8042_RWREG",null,16384);gp(this,b)};l.Ql=function(a,b){t(this,a,null,b,"8042_STATUS",this.D,16384);a=this.D&255;this.D&op&&(this.D|=np,this.D&=~op);return a};
|
||||
l.wn=function(a,b,c){t(this,a,b,c,"8042_INBUFF.CMD",null,16384);this.J=b;this.D|=qp;a=0;this.J>=Ep&&(a=this.J^15,this.J=Ep);switch(this.J){case Fp:Bp(this,this.I);break;case Gp:sp(this,this.I|Ol);break;case Hp:sp(this,this.I&~Ol);this.C&&pp(this.C);break;case Ip:this.C&&(a=this.C,a.A=[],r(a)&&Nb(a,"scan codes flushed"));sp(this,this.I|Ol);Bp(this,Jp);up(this,Yl|Zl);break;case Kp:Bp(this,Lp);break;case Mp:Bp(this,this.K);break;case Np:Bp(this,this.ra);break;case Op:Bp(this,this.I&Ol?0:Pp);break;case Ep:a&
|
||||
1&&jf(this.G)}};function sp(a,b){a.I=b;a.D=a.D&~Qp|b&Rp;a.C&&ip(a.C,!!(b&Sp),!(b&Ol))}function Bp(a,b,c){0<=b&&(a.pa=b,c?a.D|=np:(a.D&=~np,a.D|=op))}function up(a,b){a.ra=b;jc(a.na,!!(b&Zl));b&Yl||jf(a.G)}function Tp(a,b){a.da<Tg?(Wg(a,Up,4),a.ea|=np):a.I&Ol||a.D&(np|op)||(Bp(a,b,!0),Vp(a.C),Wg(a,Up,120))}function Wp(a,b,c,d){var e=a.B[b][1];t(a,c,null,d,"DIPSW-"+b,e,32768);return e}l.hm=function(a,b){t(this,a,null,b,"CMOS.ADDR",this.N,4096);return this.N};
|
||||
l.Qn=function(a,b,c){t(this,a,b,c,"CMOS.ADDR",null,4096);this.N=b;this.fa=b&Xp?jh:Yp};l.im=function(a,b){var c=this.N&Zp,d=c<=Al?Bl(this,c):this.A[c];r(this,4352)&&t(this,a,null,b,"CMOS.DATA["+na(c)+"]",d,!0);null!=b&&c==ym&&(this.A[c]&=$p,d&Xo&&Ug(this,Yo),d&Wo&&this.A[Od]&Qd&&Wm(this));return d};
|
||||
l.Rn=function(a,b,c){var d=this.N&Zp;r(this,4352)&&t(this,a,b,c,"CMOS.DATA["+na(d)+"]",null,!0);a=b^this.A[d];if(d<=Al){if(c=b,d<wm){var e=!1;this.A[Od]&Um||(c=10*(c>>4)+(c&15),e=!0);if(d==pm||d==qm)e&&23<c&&(c+=48),this.A[Od]&xm||(12>=c?c=12==c?0:c:(c-=116,c=24==c?12:c))}}else c=b;this.A[d]=c;d==Od&&a&Qd&&b&Qd&&Wm(this)};l.Mk=function(a,b,c){t(this,a,b,c,"NMI");this.fa=b};l.ao=function(a,b,c){t(this,a,b,c,"FPU.CLEAR")};l.bo=function(a,b,c){t(this,a,b,c,"FPU.RESET");this.Kc&&Og(this.Kc)};
|
||||
l.Vm=function(a){if(r(this,16)&&Wk(this.ca,26,a)){var b=this.G.D>>8;Sf(this.G,a,function(a,d){return function(c){d=Cd(a.G)-d;var e,g=a.G.L&255,h=a.G.L>>8,k=a.G.L&255,m=a.G.L>>8;if(2==b||3==b)e=" CH(hour)="+oa(h)+" CL(min)="+na(g)+" DH(sec)="+na(m);else if(4==b||5==b)e=" CX(year)="+oa(a.G.I)+" DH(month)="+na(m)+" DL(day)="+na(k);g=a.ca;h=d;g.message("INT "+na(26)+": C="+(cg(g.G)?1:0)+(e||"")+" (cycles="+h+(c?",level="+(c+1):"")+")")}}(this,Cd(this.G)))}return!0};
|
||||
function Ym(a,b){if(a.P){void 0!==b?a.Ka=b:b=!!(a.Ka&&a.G&&a.G.Z.Xa);var c=Math.round(kl/yo(a,zo));if(20>c||2E4<c)b=!1;b&&aq(a)?(a.V.frequency.setValueAtTime(c,0),a.ba.gain.value=a.Ia,r(a,33554432)&&Nb(a,"speaker on at "+c+"hz",!0)):a.ba&&(a.ba.gain.value=0,r(a,33554432)&&Nb(a,"speaker off at "+c+"hz",!0))}else b&&Nb(a,"BEEP",33554432)}
|
||||
function aq(a,b){if(a.P){if(b){if(a.La)return!0;a.V=null;a.La=!0}if(a.V)return!0;try{if(a.V=a.P.createOscillator(),"start"in a.V)return a.ba=a.P.createGain(),a.V.connect(a.ba),a.ba.connect(a.P.destination),a.ba.gain.value=0,a.V.type="square",a.V.start(0),!0}catch(c){a.Da("AudioContext exception: "+c.message),a.P=null}}return!1}var Dl=5150,cl=5150.9,Tg=5170,nl=5160.101,ul=5180,bl={5150:Dl,5160:5160,5170:Tg,att6300:nl,mpc1600:5150.101,z150:5160.15,compaq:5150.102,other:cl};bl.deskpro386=ul;
|
||||
var el="sw1",il="sw2",El="swdesc",Ul=3,xn=1,yn=15,Bn=3,Cn=4,Fn=3,On=12,Sn=0,Pn=4,Rn=8,Un=16,Tn=32,sn=0,Il=0,Jl=32,Kl=1,Ll=160,$n=16,oo=1,no=2,ho=7,eo=224,fo=32,go=96,jo=128,ko=192,ao=8,Xn=2,Yn=3,Wn=3,bo=4,co=96,xo=0,Up=1,po=2,Yo=8,Vg=13,vo=0,wo=0,zo=2,Lo=1,Mo=14,to=0,Vo=4,Nd=6,uo=8,No=48,Oo=0,To=32,Uo=48,Co=192,Do=192,Ko=6,Fo=2,Eo=16,Io=32,Go=64,Ho=128,kl=1193181,Po=1,hp=2,Qo=4,Ro=8,kp=8,So=64,ep=128,jp=15,mp=16,lp=32,dp=16,gm={ll:1,ONE:0,bq:64,$p:128,Qp:192,zc:192,Lg:6},fm=2,em={aq:16,op:32,Rp:48,
|
||||
var el="sw1",il="sw2",El="swdesc",Ul=3,xn=1,yn=15,Bn=3,Cn=4,Fn=3,On=12,Sn=0,Pn=4,Rn=8,Un=16,Tn=32,sn=0,Il=0,Jl=32,Kl=1,Ll=160,$n=16,oo=1,no=2,ho=7,eo=224,fo=32,go=96,jo=128,ko=192,ao=8,Xn=2,Yn=3,Wn=3,bo=4,co=96,xo=0,Up=1,po=2,Yo=8,Vg=13,vo=0,wo=0,zo=2,Lo=1,Mo=14,to=0,Vo=4,Nd=6,uo=8,No=48,Oo=0,To=32,Uo=48,Co=192,Do=192,Ko=6,Fo=2,Eo=16,Io=32,Go=64,Ho=128,kl=1193181,Po=1,hp=2,Qo=4,Ro=8,kp=8,So=64,ep=128,jp=15,mp=16,lp=32,dp=16,gm={ll:1,ONE:0,kq:64,iq:128,Yp:192,zc:192,Lg:6},fm=2,em={jq:16,wp:32,Zp:48,
|
||||
zc:48,Lg:4},gl=1,jl=3,hl=4,nn=5,on=6,gn={};gn[Dl]=[{},{}];gn[Dl][0][gl]={zc:192,Xc:{1:0,2:64,3:128,4:192},Id:"Number of Floppy Drives"};gn[Dl][0][jl]={zc:2,Xc:{0:0,1:2},Id:"FPU"};gn[Dl][0][hl]={zc:48,Xc:{0:0,1:16,2:32,3:48,none:0,tv:16,color:32,cga:32,mda:48,mono:48,ega:0,vga:0},Id:"Monitor Type"};gn[Dl][0][nn]={zc:12,Xc:{16:0,32:4,48:8,64:12},Id:"Base Memory (16Kb Increments)"};
|
||||
gn[Dl][1][on]={zc:31,Xc:{0:0,32:1,64:2,96:3,128:4,160:5,192:6,224:7,256:8,288:9,320:10,352:11,384:12,416:13,448:14,480:15,512:16,544:17,576:18},Id:"Expansion Memory (32Kb Increments)"};gn[5160]=[{},{}];gn[5160][0][gl]=gn[Dl][0][gl];gn[5160][0][jl]=gn[Dl][0][jl];gn[5160][0][hl]=gn[Dl][0][hl];gn[5160][0][nn]={zc:12,Xc:{64:0,128:4,192:8,256:12},Id:"Base Memory (64Kb Increments)"};gn[5160][1][on]=gn[Dl][1][on];gn[nl]=[{},{}];gn[nl][0][nn]={zc:143,Xc:{128:1,256:130,512:8,640:141},Id:"Base Memory (128Kb Increments)"};
|
||||
gn[nl][0][jl]={zc:16,Xc:{0:0,1:16},Id:"FPU"};gn[nl][1][2]={zc:1,Xc:{0:0,1:1},Id:"Floppy Type"};gn[nl][1][gl]=gn[Dl][0][gl];gn[nl][1][hl]=gn[Dl][0][hl];
|
||||
var Rp=4,Sp=8,Ol=16,Jp=85,Lp=0,Wl=4,Xl=8,Sl=16,Pl=32,Vl=64,Ql=128,Yl=1,Zl=2,Pp=1,Dp=16,Cp=192,Fp=32,rp=96,Ip=170,Kp=171,Gp=173,Hp=174,Mp=192,Np=208,tp=209,Op=224,Ep=240,np=1,Qp=4,qp=8,Nl=16,op=256,lm=0,mm=1,nm=2,om=3,pm=4,qm=5,rm=6,sm=7,tm=8,um=9,wm=10,Pd=11,ym=12,Al=13,cm=14,im=16,hm=20,am=21,bm=24,dm=46,Xm=47,vm=50,Zp=63,zl=64,Xp=128,Vm=128,ap=128,Qd=64,$o=32,cp=16,Um=4,xm=2,Xo=128,Wo=64,Zo=32,bp=16,$p=15,zm=128,mn=0,hn=1,kn=2,jn=3,ln=4,Yp=128,jh=0,Zm=[0,null,null,0,Array(4),0],an=[!0,[0,0],[0,
|
||||
var Rp=4,Sp=8,Ol=16,Jp=85,Lp=0,Wl=4,Xl=8,Sl=16,Pl=32,Vl=64,Ql=128,Yl=1,Zl=2,Pp=1,Dp=16,Cp=192,Fp=32,rp=96,Ip=170,Kp=171,Gp=173,Hp=174,Mp=192,Np=208,tp=209,Op=224,Ep=240,np=1,Qp=4,qp=8,Nl=16,op=256,lm=0,mm=1,nm=2,om=3,pm=4,qm=5,rm=6,sm=7,tm=8,um=9,wm=10,Od=11,ym=12,Al=13,cm=14,im=16,hm=20,am=21,bm=24,dm=46,Xm=47,vm=50,Zp=63,zl=64,Xp=128,Vm=128,ap=128,Qd=64,$o=32,cp=16,Um=4,xm=2,Xo=128,Wo=64,Zo=32,bp=16,$p=15,zm=128,mn=0,hn=1,kn=2,jn=3,ln=4,Yp=128,jh=0,Zm=[0,null,null,0,Array(4),0],an=[!0,[0,0],[0,
|
||||
0],[0,0],[0,0]],cn=[0,Array(4)],dn=[[0,0],[0,0],[0,0],[0,0]],ll={0:function(a,b){return rn(this,0,0,a,b)},1:function(a,b){return un(this,0,0,a,b)},2:function(a,b){return rn(this,0,1,a,b)},3:function(a,b){return un(this,0,1,a,b)},4:function(a,b){return rn(this,0,2,a,b)},5:function(a,b){return un(this,0,2,a,b)},6:function(a,b){return rn(this,0,3,a,b)},7:function(a,b){return un(this,0,3,a,b)},8:function(a,b){return wn(this,0,a,b)},13:function(a,b){return Gn(this,0,a,b)},32:function(a,b){return Vn(this,
|
||||
Il,b)},33:function(a,b){return lo(this,Il,b)},64:function(a,b){return qo(this,vo,wo,a,b)},65:function(a,b){return qo(this,vo,1,a,b)},66:function(a,b){return qo(this,vo,zo,a,b)},67:function(a,b){return Ao(this,vo,a,b)},129:function(a,b){return In(this,0,2,a,b)},130:function(a,b){return In(this,0,3,a,b)},131:function(a,b){return In(this,0,1,a,b)},135:function(a,b){return In(this,0,0,a,b)}},ol={96:al.prototype.Am,97:al.prototype.Bm,98:al.prototype.Cm,99:al.prototype.Dm},sl={96:al.prototype.Ol,97:al.prototype.Pl,
|
||||
100:al.prototype.Ql,112:al.prototype.dm,113:al.prototype.em,128:function(a,b){return Kn(this,7,a,b)},132:function(a,b){return Kn(this,0,a,b)},133:function(a,b){return Kn(this,1,a,b)},134:function(a,b){return Kn(this,2,a,b)},136:function(a,b){return Kn(this,3,a,b)},137:function(a,b){return In(this,1,2,a,b)},138:function(a,b){return In(this,1,3,a,b)},139:function(a,b){return In(this,1,1,a,b)},140:function(a,b){return Kn(this,4,a,b)},141:function(a,b){return Kn(this,5,a,b)},142:function(a,b){return Kn(this,
|
||||
Il,b)},33:function(a,b){return lo(this,Il,b)},64:function(a,b){return qo(this,vo,wo,a,b)},65:function(a,b){return qo(this,vo,1,a,b)},66:function(a,b){return qo(this,vo,zo,a,b)},67:function(a,b){return Ao(this,vo,a,b)},129:function(a,b){return In(this,0,2,a,b)},130:function(a,b){return In(this,0,3,a,b)},131:function(a,b){return In(this,0,1,a,b)},135:function(a,b){return In(this,0,0,a,b)}},ol={96:al.prototype.Em,97:al.prototype.Fm,98:al.prototype.Gm,99:al.prototype.Hm},sl={96:al.prototype.Ol,97:al.prototype.Pl,
|
||||
100:al.prototype.Ql,112:al.prototype.hm,113:al.prototype.im,128:function(a,b){return Kn(this,7,a,b)},132:function(a,b){return Kn(this,0,a,b)},133:function(a,b){return Kn(this,1,a,b)},134:function(a,b){return Kn(this,2,a,b)},136:function(a,b){return Kn(this,3,a,b)},137:function(a,b){return In(this,1,2,a,b)},138:function(a,b){return In(this,1,3,a,b)},139:function(a,b){return In(this,1,1,a,b)},140:function(a,b){return Kn(this,4,a,b)},141:function(a,b){return Kn(this,5,a,b)},142:function(a,b){return Kn(this,
|
||||
6,a,b)},143:function(a,b){return In(this,1,0,a,b)},160:function(a,b){return Vn(this,Kl,b)},161:function(a,b){return lo(this,Kl,b)},192:function(a,b){return rn(this,1,0,a,b)},194:function(a,b){return un(this,1,0,a,b)},196:function(a,b){return rn(this,1,1,a,b)},198:function(a,b){return un(this,1,1,a,b)},200:function(a,b){return rn(this,1,2,a,b)},202:function(a,b){return un(this,1,2,a,b)},204:function(a,b){return rn(this,1,3,a,b)},206:function(a,b){return un(this,1,3,a,b)},208:function(a,b){return wn(this,
|
||||
1,a,b)},218:function(a,b){return Gn(this,1,a,b)}},ql={96:al.prototype.Ml,97:al.prototype.Ll,100:al.prototype.Nl,102:function(a,b){return Wp(this,0,a,b)},103:function(a,b){return Wp(this,1,a,b)}},vl={72:function(a,b){return qo(this,1,0,a,b)},73:function(a,b){return qo(this,1,1,a,b)},74:function(a,b){return qo(this,1,2,a,b)},75:function(a,b){return Ao(this,1,a,b)}},ml={0:function(a,b,c){tn(this,0,0,a,b,c)},1:function(a,b,c){vn(this,0,0,a,b,c)},2:function(a,b,c){tn(this,0,1,a,b,c)},3:function(a,b,c){vn(this,
|
||||
0,1,a,b,c)},4:function(a,b,c){tn(this,0,2,a,b,c)},5:function(a,b,c){vn(this,0,2,a,b,c)},6:function(a,b,c){tn(this,0,3,a,b,c)},7:function(a,b,c){vn(this,0,3,a,b,c)},8:function(a,b,c){r(this,768)&&t(this,a,b,c,"DMA0.CMD",null,!0);this.F[0].Wg=b},9:function(a,b,c){zn(this,0,a,b,c)},10:function(a,b,c){An(this,0,a,b,c)},11:function(a,b,c){En(this,0,a,b,c)},12:function(a,b,c){r(this,768)&&t(this,a,b,c,"DMA0.RESET_FF",null,!0);this.F[0].Ab=0},13:function(a,b,c){Hn(this,0,a,b,c)},32:function(a,b,c){Zn(this,
|
||||
Il,b,c)},33:function(a,b,c){mo(this,Il,b,c)},64:function(a,b,c){so(this,vo,wo,a,b,c)},65:function(a,b,c){so(this,vo,1,a,b,c)},66:function(a,b,c){so(this,vo,zo,a,b,c)},67:function(a,b,c){Bo(this,vo,a,b,c)},129:function(a,b,c){Jn(this,0,2,a,b,c)},130:function(a,b,c){Jn(this,0,3,a,b,c)},131:function(a,b,c){Jn(this,0,1,a,b,c)},135:function(a,b,c){Jn(this,0,0,a,b,c)}},pl={96:al.prototype.ho,97:al.prototype.io,98:al.prototype.jo,99:al.prototype.ko,160:al.prototype.Mk},tl={96:al.prototype.tn,97:al.prototype.un,
|
||||
100:al.prototype.sn,112:al.prototype.In,113:al.prototype.Jn,128:function(a,b,c){Ln(this,7,a,b,c)},132:function(a,b,c){Ln(this,0,a,b,c)},133:function(a,b,c){Ln(this,1,a,b,c)},134:function(a,b,c){Ln(this,2,a,b,c)},136:function(a,b,c){Ln(this,3,a,b,c)},137:function(a,b,c){Jn(this,1,2,a,b,c)},138:function(a,b,c){Jn(this,1,3,a,b,c)},139:function(a,b,c){Jn(this,1,1,a,b,c)},140:function(a,b,c){Ln(this,4,a,b,c)},141:function(a,b,c){Ln(this,5,a,b,c)},142:function(a,b,c){Ln(this,6,a,b,c)},143:function(a,b,
|
||||
Il,b,c)},33:function(a,b,c){mo(this,Il,b,c)},64:function(a,b,c){so(this,vo,wo,a,b,c)},65:function(a,b,c){so(this,vo,1,a,b,c)},66:function(a,b,c){so(this,vo,zo,a,b,c)},67:function(a,b,c){Bo(this,vo,a,b,c)},129:function(a,b,c){Jn(this,0,2,a,b,c)},130:function(a,b,c){Jn(this,0,3,a,b,c)},131:function(a,b,c){Jn(this,0,1,a,b,c)},135:function(a,b,c){Jn(this,0,0,a,b,c)}},pl={96:al.prototype.po,97:al.prototype.qo,98:al.prototype.ro,99:al.prototype.so,160:al.prototype.Mk},tl={96:al.prototype.xn,97:al.prototype.yn,
|
||||
100:al.prototype.wn,112:al.prototype.Qn,113:al.prototype.Rn,128:function(a,b,c){Ln(this,7,a,b,c)},132:function(a,b,c){Ln(this,0,a,b,c)},133:function(a,b,c){Ln(this,1,a,b,c)},134:function(a,b,c){Ln(this,2,a,b,c)},136:function(a,b,c){Ln(this,3,a,b,c)},137:function(a,b,c){Jn(this,1,2,a,b,c)},138:function(a,b,c){Jn(this,1,3,a,b,c)},139:function(a,b,c){Jn(this,1,1,a,b,c)},140:function(a,b,c){Ln(this,4,a,b,c)},141:function(a,b,c){Ln(this,5,a,b,c)},142:function(a,b,c){Ln(this,6,a,b,c)},143:function(a,b,
|
||||
c){Jn(this,1,0,a,b,c)},160:function(a,b,c){Zn(this,Kl,b,c)},161:function(a,b,c){mo(this,Kl,b,c)},192:function(a,b,c){tn(this,1,0,a,b,c)},194:function(a,b,c){vn(this,1,0,a,b,c)},196:function(a,b,c){tn(this,1,1,a,b,c)},198:function(a,b,c){vn(this,1,1,a,b,c)},200:function(a,b,c){tn(this,1,2,a,b,c)},202:function(a,b,c){vn(this,1,2,a,b,c)},204:function(a,b,c){tn(this,1,3,a,b,c)},206:function(a,b,c){vn(this,1,3,a,b,c)},208:function(a,b,c){r(this,768)&&t(this,a,b,c,"DMA1.CMD",null,!0);this.F[1].Wg=b},210:function(a,
|
||||
b,c){zn(this,1,a,b,c)},212:function(a,b,c){An(this,1,a,b,c)},214:function(a,b,c){En(this,1,a,b,c)},216:function(a,b,c){r(this,768)&&t(this,a,b,c,"DMA1.RESET_FF",null,!0);this.F[1].Ab=0},218:function(a,b,c){Hn(this,1,a,b,c)},240:al.prototype.Tn,241:al.prototype.Un},rl={96:al.prototype.rn,97:al.prototype.qn,160:al.prototype.Mk},wl={72:function(a,b,c){so(this,1,0,a,b,c)},73:function(a,b,c){so(this,1,1,a,b,c)},74:function(a,b,c){so(this,1,2,a,b,c)},75:function(a,b,c){Bo(this,1,a,b,c)}};
|
||||
b,c){zn(this,1,a,b,c)},212:function(a,b,c){An(this,1,a,b,c)},214:function(a,b,c){En(this,1,a,b,c)},216:function(a,b,c){r(this,768)&&t(this,a,b,c,"DMA1.RESET_FF",null,!0);this.F[1].Ab=0},218:function(a,b,c){Hn(this,1,a,b,c)},240:al.prototype.ao,241:al.prototype.bo},rl={96:al.prototype.vn,97:al.prototype.un,160:al.prototype.Mk},wl={72:function(a,b,c){so(this,1,0,a,b,c)},73:function(a,b,c){so(this,1,1,a,b,c)},74:function(a,b,c){so(this,1,2,a,b,c)},75:function(a,b,c){Bo(this,1,a,b,c)}};
|
||||
Xa(function(){for(var a=vb(document,"pcx86","chipset"),b=0;b<a.length;b++){var c=a[b],d=wb(c),d=new al(d);ub(d,c);qn(d)}});function bq(a){ib.call(this,"ROM",a);this.A=null;this.H=a.addr;this.C=a.size;this.F=a.alias;this.B=a.notify;this.I=null;if(this.B){var b=this.B.indexOf("[");if(0<b){try{this.I=eval(this.B.substr(b))}catch(c){}this.B=this.B.substr(0,b)}}if(this.D=this.J=a.file)a=ra(pa(this.D)),"json"!=a&&"hex"!=a&&(this.D=Ga()+"/api/v1/dump?file="+this.J+"&format=bytes&decimal=true")}ba(bq,ib);
|
||||
bq.prototype.uc=function(a,b,c,d){this.oa=a;this.na=b;this.G=c;this.ca=d;if(this.D){var e=this,f="Loading "+this.D+"...";Fa(this.D,null,!0,function(a,b,c){cq(e,a,b,c)},function(){e.O(f,Fb.Ee)})}};bq.prototype.ac=function(){this.Jd&&(this.ca&&dq(this.ca,this.id,0,this.H>>>4,0,this.H,this.C,this.Jd),delete this.Jd);return!0};bq.prototype.$b=function(){return!0};
|
||||
function cq(a,b,c,d){if(d)a.Da("Unable to load system ROM (error "+d+": "+b+")",0>d);else{nb(a.ee,b,c);if("["==c.charAt(0)||"{"==c.charAt(0))try{var e=eval("("+c+")"),f=e.bytes,g=e.longs||e.data;if(f)a.A=f;else if(g)for(a.A=Array(4*g.length),d=c=0;c<g.length;c++)a.A[d++]=g[c]&255,a.A[d++]=g[c]>>8&255,a.A[d++]=g[c]>>16&255,a.A[d++]=g[c]>>24&255;else a.A=e;a.Jd=e.symbols;if(!a.A.length){ab("Empty ROM: "+b);return}if(1==a.A.length){ab(a.A[0]);return}}catch(h){a.Da("ROM data error: "+h.message);return}else for(b=
|
||||
c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.A=Array(b.length),e=0;e<b.length;e++)a.A[e]=ia(b[e],16);eq(a)}}
|
||||
function eq(a){if(!Ib(a))if(!a.J)Jb(a);else if(a.A&&a.na){a.C||(a.C=a.A.length);if(a.A.length!=a.C)Gb(a,"ROM size ("+q(a.A.length,8,!0)+") does not match specified size ("+q(a.C,8,!0)+")");else{var b;b=a.H;if(kc(a.na,b,a.C,zc)){for(var c=0;c<a.A.length;c++){var d=a.na,e=b+c;d.aa[(e&d.C)>>>d.A].df(e&d.D,a.A[c]&255,e)}b=!0}else b=!1;if(b){b=[];"number"==typeof a.F?b.push(a.F):null!=a.F&&a.F.length&&(b=a.F);for(c=0;c<b.length;c++){var d=a,e=b[c],f=rc(d.na,d.H,d.C);qc(d.na,e,d.C,f)}a.B&&((b=yb(a.B,a.id))?
|
||||
function eq(a){if(!Ib(a))if(!a.J)Jb(a);else if(a.A&&a.na){a.C||(a.C=a.A.length);if(a.A.length!=a.C)Gb(a,"ROM size ("+q(a.A.length,8,!0)+") does not match specified size ("+q(a.C,8,!0)+")");else{var b;b=a.H;if(kc(a.na,b,a.C,yc)){for(var c=0;c<a.A.length;c++){var d=a.na,e=b+c;d.aa[(e&d.C)>>>d.A].df(e&d.D,a.A[c]&255,e)}b=!0}else b=!1;if(b){b=[];"number"==typeof a.F?b.push(a.F):null!=a.F&&a.F.length&&(b=a.F);for(c=0;c<b.length;c++){var d=a,e=b[c],f=rc(d.na,d.H,d.C);qc(d.na,e,d.C,f)}a.B&&((b=yb(a.B,a.id))?
|
||||
(c=a.A,d=a.I,b.Ma==fq?gq(b,c,d||[12640,8752],8):b.Ma==hq&&gq(b,c,d||[14221,16269],8),Jb(b)):a.Da("Unable to find component: "+a.B));delete a.A}}Jb(a)}}Xa(function(){for(var a=vb(document,"pcx86","rom"),b=0;b<a.length;b++){var c=a[b],d=wb(c),d=new bq(d);ub(d,c)}});function iq(a){ib.call(this,"RAM",a);this.B=a.addr;this.A=a.size;this.F=a.test;this.D=!!this.A;this.C=!1}ba(iq,ib);l=iq.prototype;l.uc=function(a,b,c,d){this.na=b;this.G=c;this.ca=d;this.V=Vb(a,"ChipSet");Jb(this)};
|
||||
l.ac=function(a,b){return!b&&(this.reset(),a&&this.controller&&!this.restore(a))?!1:!0};l.$b=function(a){return a&&this.controller?this.save():!0};
|
||||
l.reset=function(){if(!this.B&&!this.D&&this.V){var a=1024*Rl(this.V);this.A&&a!=this.A&&(wc(this.na,this.B,this.A),this.C=!1);this.A=a}!this.C&&this.A&&kc(this.na,this.B,this.A,1)&&(this.C=!0,"ramCPQ"==this.Ce&&(this.controller=new jq(this),kc(this.na,kq,4,4,this.controller)));if(this.C){if(this.F||Fc(this.na,1138,4660),"ramCPQ"!=this.Ce&&this.V&&(a=this.V,a.A)){var b=1048576>this.B?am:23,c=a.A[b]|a.A[b+1]<<8,c=c+(this.A>>10);a.A[b]=c&255;a.A[b+1]=c>>8;km(a)}}else ab("No RAM allocated")};
|
||||
l.save=function(){var a=new Wf(this);this.controller&&a.set(0,this.controller.save());return a.data()};l.restore=function(a){return this.controller?this.controller.restore(a[0]):!0};function jq(a){this.D=a;this.C=lq;this.G=mq;this.B=nq;this.A=null}l=jq.prototype;l.save=function(){return[this.C,this.B]};l.restore=function(a){this.ub(0,a[0]&255);this.ub(2,a[1]&255);return!0};l.ya=function(a){var b=255;2>a?b=a&1?this.G>>8:this.G&255:4>a&&(b=a&1?this.B>>8:this.B&255);return b};
|
||||
l.ub=function(a,b){if(a)2==a&&(this.B=this.B&-256|b);else if(b!=(this.C&255)){a=this.D.na;if(b&oq)this.A&&(qc(a,pq,qq,this.A),this.A=null);else{this.A||(this.A=rc(a,pq,qq));var c=rc(a,rq,qq);qc(a,pq,qq,c,b&sq?1:zc)}this.C=this.C&-256|b}};l.tj=function(){return tq};l.eh=function(){return uq};var kq=-2134900736,rq=16646144,pq=917504,qq=131072,oq=1,sq=2,lq=65535,mq=2575,nq=2,tq=[null,0],uq=[function(a){return this.controller.ya(a)},null,null,function(a,b){this.controller.ub(a,b)},null,null];
|
||||
Xa(function(){for(var a=vb(document,"pcx86","ram"),b=0;b<a.length;b++){var c=a[b],d=wb(c),d=new iq(d);ub(d,c)}});function vq(a){ib.call(this,"Keyboard",a,65536);wq(this,a.model);this.ba=Ma("Mobi");this.fa=Ma("MSIE");Nb(this,"mobile keyboard support: "+(this.ba?"true":"false"));this.aa=0;this.ea=this.bh=!1;this.B=[];this.ka=50;this.F=null;this.I=a.autoType;this.P=!1;this.L=this.M=null;this.exports={type:this.ih,wait:this.Uo};Jb(this)}ba(vq,ib);l=vq.prototype;
|
||||
l.ub=function(a,b){if(a)2==a&&(this.B=this.B&-256|b);else if(b!=(this.C&255)){a=this.D.na;if(b&oq)this.A&&(qc(a,pq,qq,this.A),this.A=null);else{this.A||(this.A=rc(a,pq,qq));var c=rc(a,rq,qq);qc(a,pq,qq,c,b&sq?1:yc)}this.C=this.C&-256|b}};l.tj=function(){return tq};l.eh=function(){return uq};var kq=-2134900736,rq=16646144,pq=917504,qq=131072,oq=1,sq=2,lq=65535,mq=2575,nq=2,tq=[null,0],uq=[function(a){return this.controller.ya(a)},null,null,function(a,b){this.controller.ub(a,b)},null,null];
|
||||
Xa(function(){for(var a=vb(document,"pcx86","ram"),b=0;b<a.length;b++){var c=a[b],d=wb(c),d=new iq(d);ub(d,c)}});function vq(a){ib.call(this,"Keyboard",a,65536);wq(this,a.model);this.ba=Ma("Mobi");this.fa=Ma("MSIE");Nb(this,"mobile keyboard support: "+(this.ba?"true":"false"));this.aa=0;this.ea=this.bh=!1;this.B=[];this.ka=50;this.F=null;this.I=a.autoType;this.P=!1;this.L=this.M=null;this.exports={type:this.ih,wait:this.bp};Jb(this)}ba(vq,ib);l=vq.prototype;
|
||||
l.Eb=function(a,b,c,d){var e=this,f=a+"-"+b;if(void 0===this.ma[f])switch(b){case "kbd":case "screen":return c.onkeydown=function(a){return xq(e,a,!0)},c.onkeypress=function(a){a=a||window.event;a=a.which||a.keyCode;if(yq(e.oa)){e.C="";var b=!N[a]||!!(e.kc&zq);b||Aq(e,a,!0);a=b}else a=!1;return a},c.onkeyup=function(a){return xq(e,a,!1)},!0;case "caps-lock":return this.ma[f]=c,c.onclick=function(a){a.preventDefault();e.oa&&e.oa.dd();Aq(e,Bq,!0)},!0;case "num-lock":return this.ma[f]=c,c.onclick=function(a){a.preventDefault();
|
||||
e.oa&&e.oa.dd();Aq(e,Cq,!0)},!0;case "scroll-lock":return this.ma[f]=c,c.onclick=function(a){a.preventDefault();e.oa&&e.oa.dd();Aq(e,Dq,!0)},!0;default:var g=b.toUpperCase().replace(/-/g,"_");if(void 0!==Eq[g]&&"button"==a)return this.ma[f]=c,c.onclick=function(a,b,c){return function(b){b.preventDefault();a.oa&&a.oa.dd();a.C="";Fq(a,c,!0);Aq(a,c,!0)}}(this,g,Eq[g]),!0;if(void 0!==Gq[b])return this.aa++,this.ma[f]=c,a=function(a,b,c){return function(b){b.preventDefault();a.oa&&a.oa.dd();a.C="";Aq(a,
|
||||
c)}}(this,b,Gq[b]),b=function(a,b,c){return function(){Hq(a,c)}}(this,b,Gq[b]),"ontouchstart"in window?(c.ontouchstart=a,c.ontouchend=b):(c.onmousedown=a,c.onmouseup=c.onmouseout=b),!0;if(d)return this.ma[f]=c,c.onclick=function(a){a.preventDefault();e.oa&&e.oa.dd();return e.ih(d)},!0}return!1};
|
||||
function Iq(a,b,c){if(a.aa){for(var d in ha)if(b==ha[d]){b=+d;(d=ga[d])&&(b=d);break}for(var e in Gq)if((d=Gq[e]==b)||(d=b,d>=n.ge&&d<=n.z&&(d-=n.ge-n.fe),d=Gq[e]==d),d){(a=a.ma["key-"+e])&&void 0!==c&&(a.style.color=c?"#ffffff":"#000000",a.style.backgroundColor=c?"#000000":"#ffffff");break}}}l.uc=function(a,b,c,d){this.oa=a;this.na=b;this.G=c;this.ca=d;this.V=Vb(a,"ChipSet");this.I=ud(a,"autoType")||this.I;Rf(c,33,this.Sm.bind(this))};
|
||||
l.Sm=function(){if(10==(this.G.D>>8&255))if(this.P=!0,this.L)this.L(),this.L=null,this.P=!1;else{var a=this.I;!this.F&&a&&(this.F=a,this.ih(this.F))}return!0};function wq(a,b){var c=0;a.da=null;"string"==typeof b&&(a.da=b.toUpperCase(),c=Jq.indexOf(a.da),0>c&&(c=0));if(b=Jq[c])a.ha=parseInt(b.substr(2),10)}function xp(a){Nb(a,"keyboard reset",65792);a.A=[];zp(a,Kq)}function ip(a,b,c){a.N!==c&&(a.N=a.U=c)&&(a.J=!0);a.K!==b&&(a.K=b)&&!a.U&&Vp(a,!0);a.K&&a.U&&(xp(a),a.U=!1)}
|
||||
function Iq(a,b,c){if(a.aa){for(var d in ha)if(b==ha[d]){b=+d;(d=ga[d])&&(b=d);break}for(var e in Gq)if((d=Gq[e]==b)||(d=b,d>=n.ge&&d<=n.z&&(d-=n.ge-n.fe),d=Gq[e]==d),d){(a=a.ma["key-"+e])&&void 0!==c&&(a.style.color=c?"#ffffff":"#000000",a.style.backgroundColor=c?"#000000":"#ffffff");break}}}l.uc=function(a,b,c,d){this.oa=a;this.na=b;this.G=c;this.ca=d;this.V=Vb(a,"ChipSet");this.I=ud(a,"autoType")||this.I;Rf(c,33,this.Wm.bind(this))};
|
||||
l.Wm=function(){if(10==(this.G.D>>8&255))if(this.P=!0,this.L)this.L(),this.L=null,this.P=!1;else{var a=this.I;!this.F&&a&&(this.F=a,this.ih(this.F))}return!0};function wq(a,b){var c=0;a.da=null;"string"==typeof b&&(a.da=b.toUpperCase(),c=Jq.indexOf(a.da),0>c&&(c=0));if(b=Jq[c])a.ha=parseInt(b.substr(2),10)}function xp(a){Nb(a,"keyboard reset",65792);a.A=[];zp(a,Kq)}function ip(a,b,c){a.N!==c&&(a.N=a.U=c)&&(a.J=!0);a.K!==b&&(a.K=b)&&!a.U&&Vp(a,!0);a.K&&a.U&&(xp(a),a.U=!1)}
|
||||
function zp(a,b){a.V&&(a.A.unshift(b),a.J=!0,Tp(a.V,b))}function pp(a){var b=0;a.A.length&&a.J&&(b=a.A[0],a.V&&Tp(a.V,b));r(a)&&Nb(a,b?"scan code "+na(b)+" available":"no scan codes available")}function fp(a){var b=0;a.A.length&&(b=a.A[0]);r(a)&&Nb(a,"scan code "+na(b)+" delivered");return b}function Vp(a,b){0<a.A.length&&(a.A.shift(),(a.J=b)&&(a.A.length&&a.V?Tp(a.V,a.A[0]):b=!1),r(a)&&Nb(a,"scan codes shifted, notify "+(b?"true":"false")))}
|
||||
l.ac=function(a,b){return!b&&(this.reset(),a&&this.restore&&!this.restore(a))?!1:!0};l.$b=function(a){return a?this.save():!0};l.reset=function(){if(!this.da&&this.V)switch(this.V.da){case Dl:case 5160:wq(this,Jq[0]);break;default:wq(this,Jq[1])}Lq(this)};l.save=function(){var a=new Wf(this),b=[];b[0]=this.N;b[1]=this.K;a.set(0,b);return a.data()};l.restore=function(a){return Lq(this,a[0])};
|
||||
function Lq(a,b){var c=0;b?a.F=a.I:(b=[],a.F=null);a.N=b[c++];a.K=b[c];a.H=0;a.kc=a.D=0;a.A=[];a.J=!0;a.C="";return!0}l.ih=function(a,b){if(a&&!this.C){if(a){for(var c,d=/(?:^|[^$])\$([a-z]+)/g;c=d.exec(a);){var e;switch(c[1]){case "date":e=za("n-j-Y");break;case "time":e=za("h:i:s");break;default:continue}a=a.replace("$"+c[1],e)}a=a.replace(/\$\$/g,"$$")}this.C=a;Mq(this,b||150);return!0}return!1};
|
||||
function Mq(a,b){for(var c=0;0<a.C.length&&!c;)if(c=a.C.charAt(0),a.C=a.C.substr(1),c=c.charCodeAt(0),240<=c){b=100*(c-240)||150;c=0;break}c&&(10==c&&(c=13),Aq(a,c,!0));a.C.length?setTimeout(function(a){return function(){Mq(a,b)}}(a),b):a.M&&(a.M(),a.M=null)}l.Uo=function(a,b){var c=!1;switch(b){case "DOS":this.P?c=!0:this.L=a;break;default:this.C.length?this.M=a:c=!0}return c};
|
||||
function Mq(a,b){for(var c=0;0<a.C.length&&!c;)if(c=a.C.charAt(0),a.C=a.C.substr(1),c=c.charCodeAt(0),240<=c){b=100*(c-240)||150;c=0;break}c&&(10==c&&(c=13),Aq(a,c,!0));a.C.length?setTimeout(function(a){return function(){Mq(a,b)}}(a),b):a.M&&(a.M(),a.M=null)}l.bp=function(a,b){var c=!1;switch(b){case "DOS":this.P?c=!0:this.L=a;break;default:this.C.length?this.M=a:c=!0}return c};
|
||||
function Fq(a,b,c,d){if(N[b]){var e=Math.floor(b/1E3)&2;if(b=Nq[b]||0){!e||b&Oq||(b>>=1);if(b&Pq){if(!1===d)return!0;d=null}null==d?d=!((c?a.D:a.kc)&b):d||b&Qq&&(b=Qq);if(c){a.D&=~b;d&&(a.D|=b);c=b;var f,g;for(g in Rq)d="led-"+g,e=Rq[g],c&&c!=e||!(f=a.ma[d])||(f.style.backgroundColor=a.D&e?"#00ff00":"#000000")}else a.kc&=~b,d&&(a.kc|=b);return!0}}return!1}
|
||||
function Aq(a,b,c){if((N[b]||N[b+=1E3])&&a.G&&a.G.Z.Xa){Nq[b]&&a.B.length&&0<a.B[0].Bd&&(a.B[0].Bd=0);for(var d,e=0;e<a.B.length;e++)if(d=a.B[e],d.ze==b){if(!c||0<=d.Bd){e=-1;break}0<e&&(0<a.B[0].Bd&&(a.B[0].Bd=0),a.B.splice(e,1));break}0>e||(e==a.B.length&&(d={},d.ze=b,d.kc=a.kc,Iq(a,b,!0),e++),0<e&&a.B.splice(0,0,d),d.pf=!0,d.Bd=c?-1:Nq[b]?0:1,Sq(a,d))}}
|
||||
function Hq(a,b,c){if(!N[b]||!(c||a.G&&a.G.Z.Xa))return!1;for(var d=!1,e=0;e<a.B.length;e++){var f=a.B[e];if(f.ze==b||f.ze==ha[b]){a.B.splice(e,1);f.mi&&clearTimeout(f.mi);f.pf&&!c&&Tq(a,f.ze,!1);Iq(a,b,!1);d=!0;break}}!a.B.length&&a.ea&&(Fq(a,Bq),a.ea=!1);return d}function Sq(a,b){if(!a.G||!a.G.Z.Xa)Hq(a,b.ze,!0);else if(Tq(a,b.ze,b.pf)&&b.Bd){var c;if(0>b.Bd){if(!b.pf){Hq(a,b.ze);return}b.pf=!1;c=a.ka}else c=1==b.Bd++?500:100;b.mi=setTimeout(function(a){return function(){Sq(a,b)}}(a),c)}}
|
||||
|
|
@ -522,14 +522,14 @@ e.A.push(f),1==e.A.length&&e.V&&Tp(e.V,f)):(e.A.length==mr&&e.A.push(nr),Nb(e,"s
|
|||
var Eq={TAB:1009,ESC:1027,F1:1112,F2:1113,F3:1114,F4:1115,F5:1116,F6:1117,F7:1118,F8:1119,F9:1120,F10:1121,LEFT:1037,UP:1038,RIGHT:1039,DOWN:1040,SYSREQ:4027,CTRL_C:or,CTRL_BREAK:$q,CTRL_ALT_DEL:4046,CTRL_ALT_INS:4045,CTRL_ALT_ENTER:4013},Gq={esc:1027,1:n["1"],2:n["2"],3:n["3"],4:n["4"],5:n["5"],6:n["6"],7:n["7"],8:n["8"],9:n["9"],0:n["0"],"-":n["-"],"=":n["="],bs:1008,tab:1009,q:n.Q,w:n.Li,e:n.E,r:n.Gi,t:n.Ii,y:n.Ni,u:n.Ji,i:n.yi,o:n.Ei,p:n.Fi,"[":n["["],"]":n["]"],enter:13,ctrl:1017,a:n.fe,s:n.Hi,
|
||||
d:n.ui,f:n.vi,g:n.wi,h:n.xi,j:n.zi,k:n.Ai,l:n.Bi,";":n[";"],quote:n["'"],"`":n["`"],shift:1016,"\\":n["\\"],z:n.ag,x:n.Mi,c:n.ti,v:n.Ki,b:n.si,n:n.Di,m:n.Ci,",":n[","],".":n["."],"/":n["/"],"right-shift":3016,prtsc:1044,alt:1018,space:1032,"caps-lock":Bq,f1:1112,f2:1113,f3:1114,f4:1115,f5:1116,f6:1117,f7:1118,f8:1119,f9:1120,f10:1121,"num-lock":Cq,"scroll-lock":Dq,"num-home":1036,"num-up":1038,"num-pgup":1033,"num-sub":1109,"num-left":1037,"num-center":1101,"num-right":1039,"num-add":1107,"num-end":1035,
|
||||
"num-down":1040,"num-pgdn":1034,"num-ins":1045,"num-del":1046,sysreq:84},Rq={"caps-lock":Xq,"num-lock":1024,"scroll-lock":2048},N={1027:1};N[n["1"]]=2;N[n["!"]]=2|O<<8;N[n["2"]]=3;N[n["@"]]=3|O<<8;N[n["3"]]=4;N[n["#"]]=4|O<<8;N[n["4"]]=5;N[n.$]=5|O<<8;N[n["5"]]=6;N[n["%"]]=6|O<<8;N[n["6"]]=7;N[n["^"]]=7|O<<8;N[n["7"]]=8;N[n["&"]]=8|O<<8;N[n["8"]]=9;N[n["*"]]=9|O<<8;N[n["9"]]=10;N[n["("]]=10|O<<8;N[n["0"]]=11;N[n[")"]]=11|O<<8;N[n["-"]]=12;N[n._]=12|O<<8;N[n["="]]=13;N[n["+"]]=13|O<<8;N[1008]=dr;
|
||||
N[1009]=15;N[n.q]=16;N[n.Q]=16|O<<8;N[n.So]=17;N[n.Li]=17|O<<8;N[n.e]=18;N[n.E]=18|O<<8;N[n.r]=19;N[n.Gi]=19|O<<8;N[n.t]=20;N[n.Ii]=20|O<<8;N[n.y]=21;N[n.Ni]=21|O<<8;N[n.Qo]=22;N[n.Ji]=22|O<<8;N[n.Gl]=23;N[n.yi]=23|O<<8;N[n.on]=24;N[n.Ei]=24|O<<8;N[n.p]=25;N[n.Fi]=25|O<<8;N[n["["]]=26;N[n["{"]]=26|O<<8;N[n["]"]]=27;N[n["}"]]=27|O<<8;N[13]=28;N[1017]=ir;N[n.ge]=30;N[n.fe]=30|O<<8;N[n.Mo]=31;N[n.Hi]=31|O<<8;N[n.d]=32;N[n.ui]=32|O<<8;N[n.Dl]=33;N[n.vi]=33|O<<8;N[n.El]=34;N[n.wi]=34|O<<8;N[n.Fl]=35;
|
||||
N[n.xi]=35|O<<8;N[n.Wm]=36;N[n.zi]=36|O<<8;N[n.k]=37;N[n.Ai]=37|O<<8;N[n.Ym]=38;N[n.Bi]=38|O<<8;N[n[";"]]=39;N[n[":"]]=39|O<<8;N[n["'"]]=40;N[n['"']]=40|O<<8;N[n["`"]]=41;N[n["~"]]=41|O<<8;N[1016]=O;N[n["\\"]]=43;N[n["|"]]=43|O<<8;N[n.z]=44;N[n.ag]=44|O<<8;N[n.x]=45;N[n.Mi]=45|O<<8;N[n.ul]=46;N[n.ti]=46|O<<8;N[n.Ro]=47;N[n.Ki]=47|O<<8;N[n.sl]=48;N[n.si]=48|O<<8;N[n.n]=49;N[n.Di]=49|O<<8;N[n.dn]=50;N[n.Ci]=50|O<<8;N[n[","]]=51;N[n["<"]]=51|O<<8;N[n["."]]=52;N[n[">"]]=52|O<<8;N[n["/"]]=53;
|
||||
N[1009]=15;N[n.q]=16;N[n.Q]=16|O<<8;N[n.$o]=17;N[n.Li]=17|O<<8;N[n.e]=18;N[n.E]=18|O<<8;N[n.r]=19;N[n.Gi]=19|O<<8;N[n.t]=20;N[n.Ii]=20|O<<8;N[n.y]=21;N[n.Ni]=21|O<<8;N[n.Yo]=22;N[n.Ji]=22|O<<8;N[n.Gl]=23;N[n.yi]=23|O<<8;N[n.sn]=24;N[n.Ei]=24|O<<8;N[n.p]=25;N[n.Fi]=25|O<<8;N[n["["]]=26;N[n["{"]]=26|O<<8;N[n["]"]]=27;N[n["}"]]=27|O<<8;N[13]=28;N[1017]=ir;N[n.ge]=30;N[n.fe]=30|O<<8;N[n.Uo]=31;N[n.Hi]=31|O<<8;N[n.d]=32;N[n.ui]=32|O<<8;N[n.Dl]=33;N[n.vi]=33|O<<8;N[n.El]=34;N[n.wi]=34|O<<8;N[n.Fl]=35;
|
||||
N[n.xi]=35|O<<8;N[n.$m]=36;N[n.zi]=36|O<<8;N[n.k]=37;N[n.Ai]=37|O<<8;N[n.bn]=38;N[n.Bi]=38|O<<8;N[n[";"]]=39;N[n[":"]]=39|O<<8;N[n["'"]]=40;N[n['"']]=40|O<<8;N[n["`"]]=41;N[n["~"]]=41|O<<8;N[1016]=O;N[n["\\"]]=43;N[n["|"]]=43|O<<8;N[n.z]=44;N[n.ag]=44|O<<8;N[n.x]=45;N[n.Mi]=45|O<<8;N[n.ul]=46;N[n.ti]=46|O<<8;N[n.Zo]=47;N[n.Ki]=47|O<<8;N[n.sl]=48;N[n.si]=48|O<<8;N[n.n]=49;N[n.Di]=49|O<<8;N[n.hn]=50;N[n.Ci]=50|O<<8;N[n[","]]=51;N[n["<"]]=51|O<<8;N[n["."]]=52;N[n[">"]]=52|O<<8;N[n["/"]]=53;
|
||||
N[n["?"]]=53|O<<8;N[3016]=54;N[1044]=55;N[1018]=kr;N[1032]=57;N[Bq]=58;N[1112]=59;N[1113]=60;N[1114]=61;N[1115]=62;N[1116]=63;N[1117]=64;N[1118]=65;N[1119]=66;N[1120]=67;N[1121]=68;N[Cq]=69;N[Dq]=70;N[1036]=71;N[1038]=72;N[1033]=73;N[1109]=74;N[1037]=75;N[1101]=76;N[1039]=77;N[1107]=78;N[1035]=79;N[1040]=80;N[1034]=81;N[1045]=82;N[1046]=er;N[4027]=84;N[1122]=87;N[1123]=88;N[1091]=91;N[1093]=93;N[1224]=91;N[or]=46|ir<<8;N[$q]=70|ir<<8;N[4046]=er|ir<<8|kr<<16;N[4045]=82|ir<<8|kr<<16;
|
||||
N[4013]=28|ir<<8|kr<<16;var vp=255,yp=243,Ap=237,Kq=170,wp=250,nr=255,mr=20;Xa(function(){for(var a=vb(document,"pcx86","keyboard"),b=0;b<a.length;b++){var c=a[b],d=wb(c),d=new vq(d);ub(d,c)}});
|
||||
function pr(a,b,c,d){if(void 0!==b&&(!c||c.length)){this.video=a;var e=qr[b],f=a.fa||e[5];if(!c||6>c.length)c=[!1,0,null,null,0,Array(b<fq?rr:sr)];this.ca=a.ca;this.type=e[0];this.port=e[1];this.Ma=b;this.fb=e[2];this.Tb=e[3];this.wd=d||e[4];65536<=this.wd&&720896<=this.fb&&(this.Tb=Math.min(this.wd>>2,32768));this.sc=c[0];this.Vc=c[1];this.$e=c[2];this.ga=c[3];this.ic=c[4]&255;this.Eg=c[4]>>8&255;this.$a=c[5];this.nh=rr;this.dg=tr;this.ae=this.$a[ur]|this.$a[vr]<<8;this.cg=63;if(b>=fq){this.cg=255;
|
||||
this.nh=sr;this.dg=wr;(b=c[6])||(b=[!1,0,Array(xr),0,f==Ul?0:yr,0,0,Array(zr),0,0,0,Array(Ar),0,[this.fb,this.Tb,this.wd],Array(this.wd>>2),Br|Cr|Dr|Er|Fr,0,-1,0,-1,0,-1,0,0,0,0,Gr,Hr,0,0,Ir,Array(Jr)]);this.Le=b[0];this.Dd=b[1];this.Dc=b[2];this.Sg=Kr;this.Hg=b[3];this.bf=b[4];this.Mf=b[5];this.Gd=b[6];this.ce=b[7];this.Ug=Lr;this.Vk=b[8];this.Wk=b[9];this.Fd=b[10];this.Ed=b[11];this.Tg=Mr;this.xb=b[12];d=b[13];"number"==typeof d&&(d=[this.fb,this.Tb,d]);this.fb=d[0];this.Tb=d[1];d=this.wd>>2;if((this.ed=
|
||||
b[14])&&this.ed.length<d){for(var e=this.ed,g=0,h=Array(d),k=0;k<e.length-1;){for(var m=e[k++],p=e[k++];m--;)h[g]=p,g+=2;g==d&&(g=1)}this.ed=h}(d=b[15])&&(d&Fr?d&=~Fr:d=Nr[d&65280]|Nr[d&255]);this.Jg(d);this.ci=b[16];this.kb=b[17];this.Qc=b[18];this.Db=b[19];this.Ff=b[20];this.Nd=b[21];this.$d=b[22];this.oh=b[23];this.ph=b[24];this.ae=b[25];this.di=this.Gf=0;this.Ma==hq&&(this.ii=b[26],this.Fg=b[27],this.bd=b[28],this.yc=b[29],this.Gg=b[30],this.af=b[31])}f=Or[f]||Or[Ul];this.rh=a.G.Y.Zd/f.wg|0;this.hn=
|
||||
this.rh*f.Cg/100|0;this.sh=this.rh*f.vg|0;this.kn=this.sh*f.Dg/100|0;this.uh=c[7]||0}}
|
||||
b[14])&&this.ed.length<d){for(var e=this.ed,g=0,h=Array(d),k=0;k<e.length-1;){for(var m=e[k++],p=e[k++];m--;)h[g]=p,g+=2;g==d&&(g=1)}this.ed=h}(d=b[15])&&(d&Fr?d&=~Fr:d=Nr[d&65280]|Nr[d&255]);this.Jg(d);this.ci=b[16];this.kb=b[17];this.Qc=b[18];this.Db=b[19];this.Ff=b[20];this.Nd=b[21];this.$d=b[22];this.oh=b[23];this.ph=b[24];this.ae=b[25];this.di=this.Gf=0;this.Ma==hq&&(this.ii=b[26],this.Fg=b[27],this.bd=b[28],this.yc=b[29],this.Gg=b[30],this.af=b[31])}f=Or[f]||Or[Ul];this.rh=a.G.Y.Zd/f.wg|0;this.nn=
|
||||
this.rh*f.Cg/100|0;this.sh=this.rh*f.vg|0;this.pn=this.sh*f.Dg/100|0;this.uh=c[7]||0}}
|
||||
function Pr(a){var b=[];if(void 0!==a.Ma){b[0]=a.sc;b[1]=a.Vc;b[2]=a.$e;b[3]=a.ga;b[4]=a.ic|a.Eg<<8;b[5]=a.$a;if(a.Ma>=fq){var c=[];c[0]=a.Le;c[1]=a.Dd;c[2]=a.Dc;c[3]=a.Hg;c[4]=a.bf;c[5]=a.Mf;c[6]=a.Gd;c[7]=a.ce;c[8]=a.Vk;c[9]=a.Wk;c[10]=a.Fd;c[11]=a.Ed;c[12]=a.xb;c[13]=[a.fb,a.Tb,a.wd];var d;if(d=a.ed){var e=0,f=[];if(void 0!==d[0])for(var g=0;2>g;g++)for(var h=g;h<d.length;){for(var k=d[h],m=h+2;m<d.length&&d[m]===k;)m+=2;f[e++]=m-h>>1;f[e++]=k;h=m}f.length<d.length&&(d=f)}c[14]=d;c[15]=a.rg|Fr;
|
||||
c[16]=a.ci;c[17]=a.kb;c[18]=a.Qc;c[19]=a.Db;c[20]=a.Ff;c[21]=a.Nd;c[22]=a.$d;c[23]=a.oh;c[24]=a.ph;c[25]=a.ae;a.Ma==hq&&(c[26]=a.ii,c[27]=a.Fg,c[28]=a.bd,c[29]=a.yc,c[30]=a.Gg,c[31]=a.af);b[6]=c}b[7]=a.uh}return b}function Qr(a,b,c,d,e){if(d){var f,g="";for(f=0;f<e.length;f++){var h=d===a.$a?Rr(a,f):d[f];g&&(g+="\n");g+=b+"["+q(f,2)+"]: "+va(e[f],18)+(f===c?"*":" ")+q(h,255<h?4:2);null!=h&&(g+=" ("+h+".)")}a.ca.O(g)}else a.ca.O(b+": "+q(c,2))}pr.prototype.tj=function(a){return[this.ed,a-this.fb]};
|
||||
pr.prototype.eh=function(){return this.A};pr.prototype.Jg=function(a){if(null!=a&&a!=this.rg){var b=a&Sr,c=Tr[b];c||b&Cr&&(c=Tr[Cr]);var b=a&Ur,d=Tr[b];d||b&Er&&(d=Tr[Er]);this.A||(this.A=Array(6));this.A[0]=c;this.A[1]=d;this.rg=a}};
|
||||
|
|
@ -567,8 +567,8 @@ function Is(a,b,c,d){if(d)a.Da("Unable to load font ROM (error "+d+": "+b+")",0>
|
|||
function bt(a,b){if(1==b)return a.ha[0]=ct[Xs],a.ha[1]=ct[Vs],a.ha;if(2==b){var c=a.B.$e;if(a.B===a.A){var d=a.A.Dc[0],c=d&7;d&16&&(c|=8);18!=a.A.Dc[1]&&(c|=32)}a.ha[0]=ct[c&15];c=c&32?dt:et;for(d=0;d<c.length;d++)a.ha[d+1]=ct[c[d]];return a.ha}if(a.K===a.Gb)return ct;a.Ia&&b&&!a.ha[16]&&(a.Ia=!1);if(!a.Ia){var c=a.A,d=c.af,e,f,g,h;if(8==b)for(e=0;256>e;e++)f=d[e]||0,g=f<<2&252,h=f>>4&252,f=f>>10&252,a.ha[e]=[g,h,f,255];else{var k=d&&d[255];b=null!=c.Dc[15]?c.Dc:ft;for(e=0;16>e;e++)f=b[e]&63,k?(f|=
|
||||
(c.Dc[20]&12)<<4,c.Dc[16]&128&&(f&=-49,f|=(c.Dc[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.ha[e]=[g,h,f,255]}a.Ia=!0}return a.ha}function gq(a,b,c,d){a.zb=b;a.Pa=c;a.Fa=d}
|
||||
function Ss(a,b){var c=!1;if(window&&a.zb&&(!b||a.I)){var d=0,e=a.Fa?a.Fa:8,f=bt(a);null!=a.Pa[0]&>(a,ht,a.Pa[0],d,e,8,a.zb,f)&&(c=!0);d=a.Fa?0:2048;e=a.Fa?a.Fa:9;null!=a.Pa[1]&&(gt(a,it,a.Pa[1],d,e,14,a.zb,jt,kt)&&(c=!0),a.Fa&>(a,a.Ma,a.Pa[1],0,a.Fa,14,a.zb,f)&&(c=!0))}b||(a.ba=-1,a.Ba=-1,a.ta=0);return c}function gt(a,b,c,d,e,f,g,h,k){var m=!1;null!=c&&(lt(a,b,c,d,e,f,g,h,k)&&(m=!0),a.Rd&<(a,b<<1,c,d,e,f,g,h,k)&&(m=!0));return m}
|
||||
function lt(a,b,c,d,e,f,g,h,k){var m=!1,p=b&1?0:1,v=a.ra[b],u=16>h.length?h.length:16;v||(v={Gc:e<<p,Hc:f<<p,Fe:Array(u),Pi:h.slice(0,u),kf:k,Rg:Array(u)});for(k=0;k<u;k++){var D=h[k],G=v.Fe[k]?v.Pi[k]:[];if(D[0]!==G[0]||D[1]!==G[1]||D[2]!==G[2]){var m=v,G=k,I=p,J=c,P=d,K=e,ka=f,Z=g,jb=[0,0,0,0],qa=document.createElement("canvas");qa.width=m.Gc<<4;qa.height=m.Hc<<4;var db=qa.getContext("2d"),Oa,kb,eb,uc=8>ka||!P?ka:8,lb=db.createImageData(m.Gc,m.Hc);for(Oa=0;256>Oa;Oa++){for(eb=0;eb<ka;eb++)for(var cf=
|
||||
m.kf&&G&1&&eb>=ka-2,Od=Z[eb<uc?J+Oa*uc+eb:P+Oa*uc+eb-uc],df=0;df<=I;df++)for(kb=0;kb<K;kb++){var Bg=kb<<I,ef=(eb<<I)+df,Cg=cf||Od&128>>(8<=kb&&192<=Oa&&223>=Oa?7:kb)?D:jb;mt(lb,Bg,ef,Cg);I&&mt(lb,Bg+1,ef,Cg)}db.putImageData(lb,(Oa&15)*m.Gc,(Oa>>4)*m.Hc)}m.Fe[G]="#"+q(D[0],2)+q(D[1],2)+q(D[2],2);m.Pi[G]=D;m.Rg[G]=qa;m=!0}}a.ra[b]=v;return m}function nt(a){0<a.ta||0<=a.ba?0>a.Ba&&(a.Ba=0):a.Ba=-1}
|
||||
function lt(a,b,c,d,e,f,g,h,k){var m=!1,p=b&1?0:1,v=a.ra[b],u=16>h.length?h.length:16;v||(v={Gc:e<<p,Hc:f<<p,Fe:Array(u),Pi:h.slice(0,u),kf:k,Rg:Array(u)});for(k=0;k<u;k++){var D=h[k],G=v.Fe[k]?v.Pi[k]:[];if(D[0]!==G[0]||D[1]!==G[1]||D[2]!==G[2]){var m=v,G=k,I=p,J=c,P=d,K=e,ka=f,Z=g,jb=[0,0,0,0],qa=document.createElement("canvas");qa.width=m.Gc<<4;qa.height=m.Hc<<4;var db=qa.getContext("2d"),Oa,kb,eb,uc=8>ka||!P?ka:8,lb=db.createImageData(m.Gc,m.Hc);for(Oa=0;256>Oa;Oa++){for(eb=0;eb<ka;eb++)for(var df=
|
||||
m.kf&&G&1&&eb>=ka-2,Pd=Z[eb<uc?J+Oa*uc+eb:P+Oa*uc+eb-uc],ef=0;ef<=I;ef++)for(kb=0;kb<K;kb++){var Cg=kb<<I,ff=(eb<<I)+ef,Dg=df||Pd&128>>(8<=kb&&192<=Oa&&223>=Oa?7:kb)?D:jb;mt(lb,Cg,ff,Dg);I&&mt(lb,Cg+1,ff,Dg)}db.putImageData(lb,(Oa&15)*m.Gc,(Oa>>4)*m.Hc)}m.Fe[G]="#"+q(D[0],2)+q(D[1],2)+q(D[2],2);m.Pi[G]=D;m.Rg[G]=qa;m=!0}}a.ra[b]=v;return m}function nt(a){0<a.ta||0<=a.ba?0>a.Ba&&(a.Ba=0):a.Ba=-1}
|
||||
function at(a){if(a.I){for(var b=10;15>=b;b++)if(null==a.B.$a[b])return;var c=a.B.$a[10],b=c&31,d=a.B.$a[11]&os[11],e=a.B.$a[9]&os[9],f=!1;a.B===a.A&&(f=!0,7!=e||4!=b||d||(d=7));if(c&32||b>d&&!f||b>e)ot(a);else{c=a.B.$a[15];c|=(a.B.$a[14]&a.B.cg)<<8;a.ba!=c&&(ot(a),a.ba=c);d=d-b+1;if(a.rd!=b||a.Tc!=d)a.rd=b,a.Tc=d;a.wa=e+1;nt(a)}}}
|
||||
function ot(a){if(0<=a.ba){if(void 0!==a.M){var b=pt<<8,c=a.M[a.ba];if(c&b){var c=c&~b,b=a.ba%a.D,d=a.ba/a.D|0;a.I&&a.ra[a.I]&&(a.Ea&&qt(a,b,d,c,a.Ea),qt(a,b,d,c));a.M[a.ba]=c}}a.ba=-1}}
|
||||
function rt(a){var b,c=a.B;a.Uc=!1;var d=c.Ed[5];if(null!=d){b=Br;var e=Dr,f=c.Ed[3]&31;switch(d&3){case 0:if(f){e=Dr|32;switch(f&24){case 8:e=Dr|96;break;case 16:e=Dr|160;break;case 24:e=Dr|224}c.Qc=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.Ma==hq&&(e=3,c.Qc=f&7)}d&8&&(b=1280);c=c.ce[4];null!=c&&(c&4||(b|=Cr,e|=Er),d&64&&(c&8&&(b|=16384,e|=4),a.Uc=!0));b|=e}return b}
|
||||
|
|
@ -577,332 +577,334 @@ function $s(a,b){var c,d=a.la,e=a.B;if(e)if(e.Ma==xs)d=Qs;else if(e.Ma>=fq){var
|
|||
350>f?d=m?At:Bt:480<=f&&(d=a.fa==Ul?Ct:Dt):d=m?7-d:Et:d-=m?2:0);c=rt(a)}}else e.Vc&8?(e.Vc&2?(d=e.Vc&16?Et:Ft,e.Vc&4||--d):(d=e.Vc&1?Os:Gt,e.Vc&4&&--d),a.Hb&&(a.N.style.opacity="1",a.Hb=!1)):!a.Hb&&1>+a.nd&&(a.Hb=!0,a.N.style.opacity=a.nd,e=a.G,e.Z.Rf=!0,zd(e));else a.la=null,null==d&&(d=a.ea);if(!Ts(a,d,b))return!1;st(a,c);return!0}
|
||||
function Ts(a,b,c){if(null!=b&&(b!=a.la||c)){a.Hd=0;a.la=b;a.Ia=!1;b=a.B||(b==Qs?a.U:a.K);if(b!=a.B||b.fb!=a.fb||b.Tb!=a.Tb){ot(a);if(a.fb){if(!wc(a.na,a.fb,a.Tb))return!1;a.B&&(a.B.sc=!1)}a.B=b;b.sc=!0;a.fb=b.fb;a.Tb=b.Tb;if(!kc(a.na,b.fb,b.Tb,3,b===a.A?b:null))return!1}a:{a.I=0;a.D=a.Rb;a.J=a.Ic;a.La=a.D;a.Qb=rs[Qs][2];b=0;if(c=rs[a.la])a.D=c[0],a.J=c[1],a.Qb=c[2],b=c[3],a.I=c[4],4!=a.fa&&7!=a.fa||a.B!==a.A||a.I!=ht||(7==(a.A.$a[ms]&31)?a.J=350>Rr(a.A,cs)?43:50:a.I=a.Ma);a.md=a.D*a.J|0;a.ld=a.md/
|
||||
a.Qb|0;a.Ra=a.ld;a.lc=0;void 0!==b&&(a.Ra=(a.Ra<<1)+b|0,a.lc=a.Ra+b>>1);if(a.ra.length){a.qa=a.aa/a.D|0;a.pa=a.ka/a.J|0;if(a.I){b=a.ra[a.I];if(!b)break a;c=a.ra[a.I<<1];a.cd&&80==a.D?c&&a.qa>=3*c.Gc>>2&&(a.I<<=1,b=c):(c&&a.qa>=c.Gc&&(a.I<<=1,b=c),a.cd||(a.qa=b.Gc,a.pa=b.Hc));a.ab=a.cb=0;b&&(a.ab=a.D*b.Gc,a.cb=a.J*b.Hc)}else a.qa=a.pa=1,a.ab=a.D,a.cb=a.J;a.Ka=a.L.createImageData(a.ab,a.cb);a.Ca=document.createElement("canvas");a.Ca.width=a.ab;a.Ca.height=a.cb;a.Ea=a.Ca.getContext("2d");a.Kc=a.Lc=0;
|
||||
a.tc=a.aa;a.vc=a.ka;b=a.aa-a.D*a.qa;c=a.ka-a.J*a.pa;0<b&&(a.Kc=b>>1,a.tc-=b);0<c&&(a.Lc=c>>1,a.vc-=c);if(b||c)a.L.fillStyle=a.N.style.backgroundColor,a.L.fillRect(0,0,a.aa,a.ka)}}fu(a,!0);Js(a)}return!0}function mt(a,b,c,d){b=(b+c*a.width)*d.length;a.data[b]=d[0];a.data[b+1]=d[1];a.data[b+2]=d[2];a.data[b+3]=d[3]}function hu(a){a.ta=-1;a.Ga=!1;var b=a.ld;if(void 0===a.M||a.M.length!=b)a.M=Array(b)}function fu(a,b){b||(a.Ia=!1);hu(a)}
|
||||
function qt(a,b,c,d,e){var f=d&255,g=d>>8;d=g&15;var h=a.ra[a.I];h.kf&&(d=h.kf[d]);var k=g>>4&15;h.kf&&(k=h.kf[k]);e?(b*=h.Gc,c*=h.Hc,e.fillStyle=h.Fe[k],e.fillRect(b,c,h.Gc,h.Hc)):(b=b*a.qa+a.Kc,c=c*a.pa+a.Lc,a.L.fillStyle=h.Fe[k],a.L.fillRect(b,c,a.qa,a.pa));g&iu&&(k=(f&15)*h.Gc,f=(f>>4)*h.Hc,e?e.drawImage(h.Rg[d],k,f,h.Gc,h.Hc,b,c,h.Gc,h.Hc):a.L.drawImage(h.Rg[d],k,f,h.Gc,h.Hc,b,c,a.qa,a.pa));g&pt&&(f=a.rd,g=a.Tc,e?(a.wa&&a.wa!==h.Hc&&(f=f*h.Hc/a.wa|0,g=g*h.Hc/a.wa|0),e.fillStyle=h.Fe[d],e.fillRect(b,
|
||||
a.tc=a.aa;a.vc=a.ka;b=a.aa-a.D*a.qa;c=a.ka-a.J*a.pa;0<b&&(a.Kc=b>>1,a.tc-=b);0<c&&(a.Lc=c>>1,a.vc-=c);if(b||c)a.L.fillStyle=a.N.style.backgroundColor,a.L.fillRect(0,0,a.aa,a.ka)}}Ht(a,!0);Js(a)}return!0}function mt(a,b,c,d){b=(b+c*a.width)*d.length;a.data[b]=d[0];a.data[b+1]=d[1];a.data[b+2]=d[2];a.data[b+3]=d[3]}function It(a){a.ta=-1;a.Ga=!1;var b=a.ld;if(void 0===a.M||a.M.length!=b)a.M=Array(b)}function Ht(a,b){b||(a.Ia=!1);It(a)}
|
||||
function qt(a,b,c,d,e){var f=d&255,g=d>>8;d=g&15;var h=a.ra[a.I];h.kf&&(d=h.kf[d]);var k=g>>4&15;h.kf&&(k=h.kf[k]);e?(b*=h.Gc,c*=h.Hc,e.fillStyle=h.Fe[k],e.fillRect(b,c,h.Gc,h.Hc)):(b=b*a.qa+a.Kc,c=c*a.pa+a.Lc,a.L.fillStyle=h.Fe[k],a.L.fillRect(b,c,a.qa,a.pa));g&Jt&&(k=(f&15)*h.Gc,f=(f>>4)*h.Hc,e?e.drawImage(h.Rg[d],k,f,h.Gc,h.Hc,b,c,h.Gc,h.Hc):a.L.drawImage(h.Rg[d],k,f,h.Gc,h.Hc,b,c,a.qa,a.pa));g&pt&&(f=a.rd,g=a.Tc,e?(a.wa&&a.wa!==h.Hc&&(f=f*h.Hc/a.wa|0,g=g*h.Hc/a.wa|0),e.fillStyle=h.Fe[d],e.fillRect(b,
|
||||
c+f,h.Gc,g)):(a.wa&&a.wa!==a.pa&&(f=f*a.pa/a.wa|0,g=g*a.pa/a.wa|0),a.L.fillStyle=h.Fe[d],a.L.fillRect(b,c+f,a.qa,g)))}
|
||||
function Js(a,b){b=void 0===b?!1:b;if(a.Z.bc){var c=!1,d=a.B;d&&(d!==a.A?d.Vc&8&&(c=!0):d.Dd&32&&(c=!0));if(c||b){if(b)hu(a);else if(void 0===a.M)return;c=!1;!(b||++a.Hd&15)&&0<=a.Ba&&(a.Ba++,c=!0);var e=a.md,f=a.fb,g=f,h=g+a.Tb;a.la>=xt&&(f=g=655360,h=g+65536);if(ju(a,d)&8||d.Gf&&d.Gf<d.di){var k=d.$a[ur],k=k|(d.$a[vr]&d.cg)<<8;d.ae!==k&&(d.ae=k,fu(a));d.Gf=0}var m=d.ae<<(a.I?1:0),g=g+m,k=a.Ra;a.Ma>=fq&&d.$a[19]&&d.$a[19]<<1!=d.$a[1]+1&&(a.La=d.$a[19]<<(a.I?1:d.$a[20]&64?3:4),k=(a.La*(a.J-1)+a.D)/
|
||||
function Js(a,b){b=void 0===b?!1:b;if(a.Z.bc){var c=!1,d=a.B;d&&(d!==a.A?d.Vc&8&&(c=!0):d.Dd&32&&(c=!0));if(c||b){if(b)It(a);else if(void 0===a.M)return;c=!1;!(b||++a.Hd&15)&&0<=a.Ba&&(a.Ba++,c=!0);var e=a.md,f=a.fb,g=f,h=g+a.Tb;a.la>=xt&&(f=g=655360,h=g+65536);if(iu(a,d)&8||d.Gf&&d.Gf<d.di){var k=d.$a[ur],k=k|(d.$a[vr]&d.cg)<<8;d.ae!==k&&(d.ae=k,Ht(a));d.Gf=0}var m=d.ae<<(a.I?1:0),g=g+m,k=a.Ra;a.Ma>=fq&&d.$a[19]&&d.$a[19]<<1!=d.$a[1]+1&&(a.La=d.$a[19]<<(a.I?1:d.$a[20]&64?3:4),k=(a.La*(a.J-1)+a.D)/
|
||||
a.Qb|0,a.la<=Qs&&(k<<=1));var p=d=0;g+k>h&&(p=k,g>=h?(d=f+(g-h),k=0):(d=f,k=h-g,p-=k));h=a.ba-(m>>1);g=ku(a,f,g,k,0,h,e,b,c);p&&(g+=ku(a,f,d,p,0+g,h,e,b,c));g&&(a.Ga=!0)}}}
|
||||
function ku(a,b,c,d,e,f,g,h,k){var m=d>>1;m>g&&(m=g);var p=c+d;if(h=!h&&a.Ga){h=a.na;for(var v=!0,u=c>>>h.A,D=h.B-(c&h.D);0<d&&u<h.aa.length;)h.aa[u].Oa&&(h.aa[u].Oa=v=!1,h.aa[u].oj=!0),d-=D,D=h.B,u++;h=v}if(h){if(!k)return m;if(!a.ta){f-=e;if(0>f)return m;c+=f<<1;e+=f;g=e+1}}if(a.I){if(a.ra[a.I]){b=c;c=e;k=f=e=0;h=iu<<8;d=1048575;u=a.B.Vc&32;a.Ma>=fq&&(u=a.B.Dc[16]&8);v=a.ba-a.B.ae;u&&(k=Us<<8,d&=~k,a.Ba&2||(d&=~h));for(a.ta=0;b<p&&c<g;)u=Ec(a.na,b),u|=h,u&k&&(a.ta++,u&=d),c==v&&(u|=a.Ba&1?pt<<8:
|
||||
function ku(a,b,c,d,e,f,g,h,k){var m=d>>1;m>g&&(m=g);var p=c+d;if(h=!h&&a.Ga){h=a.na;for(var v=!0,u=c>>>h.A,D=h.B-(c&h.D);0<d&&u<h.aa.length;)h.aa[u].Oa&&(h.aa[u].Oa=v=!1,h.aa[u].oj=!0),d-=D,D=h.B,u++;h=v}if(h){if(!k)return m;if(!a.ta){f-=e;if(0>f)return m;c+=f<<1;e+=f;g=e+1}}if(a.I){if(a.ra[a.I]){b=c;c=e;k=f=e=0;h=Jt<<8;d=1048575;u=a.B.Vc&32;a.Ma>=fq&&(u=a.B.Dc[16]&8);v=a.ba-a.B.ae;u&&(k=Us<<8,d&=~k,a.Ba&2||(d&=~h));for(a.ta=0;b<p&&c<g;)u=Ec(a.na,b),u|=h,u&k&&(a.ta++,u&=d),c==v&&(u|=a.Ba&1?pt<<8:
|
||||
0),a.Ga&&u===a.M[c]||(qt(a,c%a.D,c/a.D|0,u,a.Ea),a.M[c]=u,f++),b+=2,e++,c++;f&&a.Ea&&a.L.drawImage(a.Ca,0,0,a.ab,a.cb,a.Kc,a.Lc,a.tc,a.vc);nt(a)}}else{if(a.lc){b=c;m=p-b>>1;g=0;c=a.Qb;e=b;f=16==c?65536:196608;k=16==c?1:2;h=bt(a,k);var v=d=0,u=a.D,D=0,G=a.J,I=0;for(a.ta=0;e<p;){var J=Ec(a.na,e);if(a.Ga&&J===a.M[g])d+=c;else{a.M[g]=J;var J=J>>8|(J&255)<<8,P=f,K=16;d<u&&(u=d);for(var ka=0;ka<c;ka++){var Z=(J&(P>>=k))>>(K-=k);mt(a.Ka,d++,v,h[Z])}d>D&&(D=d);v<G&&(G=v);v>=I&&(I=v+1)}e+=2;g++;if(d>=a.D){d=
|
||||
0;v+=2;if(v>a.J)break;v==a.J&&(v=1,e=b+a.lc)}}u<a.D&&(a.Ea.putImageData(a.Ka,0,0,u,G,D-u,I-G),a.L.drawImage(a.Ca,0,0,a.D,a.J,0,0,a.aa,a.ka));a=m}else{if(a.Uc){m=0;g=p-c;e=bt(a,8);f=a.B.ed;h=k=0;d=a.D;v=0;u=a.J;D=0;G=a.B.ce[4]&8?4:1;I=a.B.Dc[19]&15;J=a.La>a.D?a.La-a.D-I>>3:0;for(a.ta=0;c<p;){P=f[c-b];ka=4;I||(a.Ga&&P===a.M[m]?(k+=ka,ka=0):a.M[m]=P,m++);if(ka){k<d&&(d=k);for(K=0;K<ka;K++)mt(a.Ka,k++,h,e[P&255]),P>>=8;k>v&&(v=k);h<u&&(u=h);h>=D&&(D=h+1)}c+=G;if(k>=a.D){k=0;if(++h>a.J)break;c+=J}}I&&
|
||||
(g=0)}else{m=0;g=p-c;e=bt(a);f=a.B.ed;h=k=0;d=a.D;v=0;u=a.J;D=0;G=a.B.Dc[19]&15;I=a.La>a.D?a.La-a.D-G>>3:0;for(a.ta=0;c<p;){J=c++-b;J=f[J];K=8;G?k?(P=a.D-k,K>P&&(K=P)):(J<<=G,K-=G,a.Ga=!1):(a.Ga&&J===a.M[m]?(k+=K,K=0):a.M[m]=J,m++);if(K){k<d&&(d=k);for(P=0;P<K;P++)ka=lu[J&2155905152]||0,mt(a.Ka,k++,h,e[ka]),J<<=1;k>v&&(v=k);h<u&&(u=h);h>=D&&(D=h+1)}if(k>=a.D){k=0;if(++h>a.J)break;c+=I}}G&&(g=0)}d<a.D&&(a.Ea.putImageData(a.Ka,0,0,d,u,v-d,D-u),a.L.drawImage(a.Ca,0,0,a.D,a.J,0,0,a.aa,a.ka));a=g}m=a}return m}
|
||||
function ju(a,b){var c=0;a=Cd(a.G)-b.uh;0>a&&(b.uh=a,a=-a|0);a%b.rh>b.hn&&(c|=1);a%b.sh>b.kn&&(c|=9);b.di=a/b.sh|0;return c}l.wm=function(a,b){return mu(this,this.U,a,b)};l.co=function(a,b,c){var d=this.U;d.Eg=d.ic;d.ic=b&31;t(this,a,b,c,"CRTC.INDX")};l.vm=function(a,b){return nu(this,this.U,a,b)};l.bo=function(a,b,c){ou(this,this.U,a,b,c)};l.xm=function(a,b){return pu(this,this.U,b)};l.eo=function(a,b,c){a=this.U;t(this,a.port+4,b,c,"MODE");a.Vc=b;$s(this,!1)};
|
||||
l.ym=function(a,b){return qu(this,this.U,b)};l.Lk=function(a,b,c){this.A.Mf=this.A.Mf&-4|b&3;t(this,a,b,c,"FEAT")};l.Vl=function(a,b){a=this.A.Dd;b&&!r(this)||t(this,960,null,b,"ATC.INDX",a);return a};l.ol=function(a,b){a=this.A.Dc[this.A.Dd&31];b&&!r(this)||t(this,960,null,b,"ATC."+this.A.Sg[this.A.Dd&31],a);return a};
|
||||
l.Kk=function(a,b,c){var d=this.A,e=d.Dd&32;if(d.Le){d.Le=!1;var f=d.Dd&31;if(16<=f||!e)if(ru||d.Dc[f]!==b)c&&!r(this)||t(this,a,b,c,"ATC."+d.Sg[f]),d.Dc[f]=b,fu(this,!1)}else d.Dd=b,t(this,a,b,c,"ATC.INDX"),d.Le=!0,b&32&&!e&&Ss(this,!0)&&Js(this,!0),a=d.$a[ur],a|=(d.$a[vr]&d.cg)<<8,d.ae!=a&&(d.ae=a,fu(this)),d.Gf=0};
|
||||
l.Im=function(a,b){a=0;if(this.Ma==fq)a=3-((this.A.bf&12)>>2),a=(this.Fb&1<<a)<<4-a;else{var c=this.A.af[0];45!=(c&63)&&2880!=(c&4032)&&184320!=(c&258048)&&(a|=16)}a|=this.A.Hg&-17;this.A.Hg=a;t(this,962,null,b,"STATUS0",a);return a};l.fo=function(a,b,c){this.A.bf=b;Rs(this);t(this,962,b,c,"MISC")};l.Jm=function(a,b){a=this.A.ii;t(this,963,null,b,"VGA_ENABLE",a);return a};l.oo=function(a,b,c){this.A.ii=b;t(this,963,b,c,"VGA_ENABLE")};
|
||||
l.Gm=function(a,b){a=this.A.Gd;t(this,964,null,b,"SEQ.INDX",a);return a};l.mo=function(a,b,c){this.A.Gd=b;t(this,964,b,c,"SEQ.INDX")};l.Fm=function(a,b){a=this.A.ce[this.A.Gd];b&&!r(this)||t(this,965,null,b,"SEQ."+this.A.Ug[this.A.Gd],a);return a};l.lo=function(a,b,c){if(ru||this.A.ce[this.A.Gd]!==b)c&&!r(this)||t(this,965,b,c,"SEQ."+this.A.Ug[this.A.Gd]),this.A.ce[this.A.Gd]=b;switch(this.A.Gd){case 2:this.A.kb=ps[b&15];break;case 4:st(this,rt(this))&&Js(this,!0)}};
|
||||
l.hm=function(a,b){a=this.A.Fg;b&&!r(this)||t(this,966,null,b,"DAC.MASK",a);return a};l.Mn=function(a,b,c){if(ru||this.A.Fg!==b)c&&!r(this)||t(this,966,b,c,"DAC.MASK"),this.A.Fg=b};l.im=function(a,b){a=this.A.Gg;b&&!r(this)||t(this,967,null,b,"DAC.STATE",a);return a};l.Nn=function(a,b,c){c&&!r(this)||t(this,967,b,c,"DAC.READ");this.A.bd=b;this.A.Gg=3;this.A.yc=0};l.On=function(a,b,c){c&&!r(this)||t(this,968,b,c,"DAC.WRITE");this.A.bd=b;this.A.Gg=Ir;this.A.yc=0};
|
||||
l.gm=function(a,b){a=this.A.af[this.A.bd]>>this.A.yc&63;b&&!r(this)||t(this,969,null,b,"DAC.DATA["+na(this.A.bd)+"]["+na(this.A.yc)+"]",a);this.A.yc+=6;12<this.A.yc&&(this.A.yc=0,this.A.bd=this.A.bd+1&Jr-1);return a};l.Ln=function(a,b,c){a=this.A.af[this.A.bd];c&&!r(this)||t(this,969,b,c,"DAC.DATA["+na(this.A.bd)+"]["+na(this.A.yc)+"]");b=a&~(63<<this.A.yc)|(b&63)<<this.A.yc;a!==b&&(this.A.af[this.A.bd]=b,fu(this,!1));this.A.yc+=6;12<this.A.yc&&(this.A.yc=0,this.A.bd=this.A.bd+1&Jr-1)};
|
||||
l.Km=function(a,b){a=this.A.Mf;t(this,970,null,b,"FEAT",a);return a};l.Yn=function(a,b,c){this.A.Wk=b;t(this,970,b,c,"GRC2")};l.Lm=function(a,b){a=this.A.bf;t(this,972,null,b,"MISC",a);return a};l.Xn=function(a,b,c){this.A.Vk=b;t(this,972,b,c,"GRC1")};l.pm=function(a,b){a=this.A.Fd;t(this,974,null,b,"GRC.INDX",a);return a};l.Wn=function(a,b,c){this.A.Fd=b;t(this,974,b,c,"GRC.INDX")};l.om=function(a,b){a=this.A.Ed[this.A.Fd];b&&!r(this)||t(this,975,null,b,"GRC."+this.A.Tg[this.A.Fd],a);return a};
|
||||
l.Vn=function(a,b,c){if(ru||this.A.Ed[this.A.Fd]!==b)c&&!r(this)||t(this,975,b,c,"GRC."+this.A.Tg[this.A.Fd]),this.A.Ed[this.A.Fd]=b;switch(this.A.Fd){case 0:this.A.Ff=ps[b&15];this.A.$d=this.A.Ff&~this.A.Nd;break;case 1:this.A.Nd=~ps[b&15];this.A.$d=this.A.Ff&~this.A.Nd;break;case 2:this.A.oh=ps[b&15]&-2139062144;break;case 3:case 5:st(this,rt(this));break;case 4:this.A.ci=(b&3)<<3;break;case 6:$s(this,!1);break;case 7:this.A.ph=ps[b&15]&-2139062144;break;case 8:this.A.Db=b|b<<8|b<<16|b<<24}};
|
||||
l.am=function(a,b){return mu(this,this.K,a,b)};l.Gn=function(a,b,c){var d=this.K;d.Eg=d.ic;d.ic=b&31;t(this,a,b,c,"CRTC.INDX")};l.$l=function(a,b){return nu(this,this.K,a,b)};l.Fn=function(a,b,c){ou(this,this.K,a,b,c)};l.bm=function(a,b){return pu(this,this.K,b)};l.Hn=function(a,b,c){a=this.K;t(this,a.port+4,b,c,"MODE");a.Vc=b;$s(this,!1)};l.Zl=function(a,b){var c=this.K.$e;b&&!r(this)||t(this,a,null,b,this.K.type+".COLOR",c);return c};
|
||||
l.En=function(a,b,c){c&&!r(this)||t(this,a,b,c,this.K.type+".COLOR");this.K.$e!==b&&(this.K.$e=b,fu(this,!1))};l.cm=function(a,b){return qu(this,this.K,b)};function mu(a,b,c,d){var e;b.sc&&(e=b.ic);t(a,c,null,d,"CRTC.INDX",e);return e}function nu(a,b,c,d){var e;b.sc&&b.ic<b.nh&&(e=b.$a[b.ic]);d&&!r(a)||t(a,c,null,d,"CRTC."+b.dg[b.ic],e);return e}
|
||||
function ou(a,b,c,d,e){if(b.ic<b.nh){if(ru||b.$a[b.ic]!==d)e&&!r(a)||t(a,c,d,e,"CRTC."+b.dg[b.ic]),b.$a[b.ic]=d;if(b.ic==vr||b.ic==ur)ju(a,b),b.Gf=b.di;(9==b.ic&&8!=b.Eg||b.ic==cs&&223==d)&&$s(a,!0);at(a)}}function pu(a,b,c){var d=b.Vc;t(a,b.port+4,null,c,"MODE",d);return d}function qu(a,b,c){var d=ju(a,b);b===a.A?(d|=b.ga&48^48,b.Le=!1):d=(b.ga^=9)|240;b.ga=d;t(a,b.port+6,null,c,b===a.A?"STATUS1":"STATUS",d);return d}
|
||||
function iu(a,b){var c=0;a=Cd(a.G)-b.uh;0>a&&(b.uh=a,a=-a|0);a%b.rh>b.nn&&(c|=1);a%b.sh>b.pn&&(c|=9);b.di=a/b.sh|0;return c}l.Am=function(a,b){return mu(this,this.U,a,b)};l.mo=function(a,b,c){var d=this.U;d.Eg=d.ic;d.ic=b&31;t(this,a,b,c,"CRTC.INDX")};l.zm=function(a,b){return nu(this,this.U,a,b)};l.lo=function(a,b,c){ou(this,this.U,a,b,c)};l.Bm=function(a,b){return pu(this,this.U,b)};l.no=function(a,b,c){a=this.U;t(this,a.port+4,b,c,"MODE");a.Vc=b;$s(this,!1)};
|
||||
l.Cm=function(a,b){return qu(this,this.U,b)};l.Lk=function(a,b,c){this.A.Mf=this.A.Mf&-4|b&3;t(this,a,b,c,"FEAT")};l.Vl=function(a,b){a=this.A.Dd;b&&!r(this)||t(this,960,null,b,"ATC.INDX",a);return a};l.ol=function(a,b){a=this.A.Dc[this.A.Dd&31];b&&!r(this)||t(this,960,null,b,"ATC."+this.A.Sg[this.A.Dd&31],a);return a};
|
||||
l.Kk=function(a,b,c){var d=this.A,e=d.Dd&32;if(d.Le){d.Le=!1;var f=d.Dd&31;if(16<=f||!e)if(ru||d.Dc[f]!==b)c&&!r(this)||t(this,a,b,c,"ATC."+d.Sg[f]),d.Dc[f]=b,Ht(this,!1)}else d.Dd=b,t(this,a,b,c,"ATC.INDX"),d.Le=!0,b&32&&!e&&Ss(this,!0)&&Js(this,!0),a=d.$a[ur],a|=(d.$a[vr]&d.cg)<<8,d.ae!=a&&(d.ae=a,Ht(this)),d.Gf=0};
|
||||
l.Mm=function(a,b){a=0;if(this.Ma==fq)a=3-((this.A.bf&12)>>2),a=(this.Fb&1<<a)<<4-a;else{var c=this.A.af[0];45!=(c&63)&&2880!=(c&4032)&&184320!=(c&258048)&&(a|=16)}a|=this.A.Hg&-17;this.A.Hg=a;t(this,962,null,b,"STATUS0",a);return a};l.oo=function(a,b,c){this.A.bf=b;Rs(this);t(this,962,b,c,"MISC")};l.Nm=function(a,b){a=this.A.ii;t(this,963,null,b,"VGA_ENABLE",a);return a};l.wo=function(a,b,c){this.A.ii=b;t(this,963,b,c,"VGA_ENABLE")};
|
||||
l.Km=function(a,b){a=this.A.Gd;t(this,964,null,b,"SEQ.INDX",a);return a};l.uo=function(a,b,c){this.A.Gd=b;t(this,964,b,c,"SEQ.INDX")};l.Jm=function(a,b){a=this.A.ce[this.A.Gd];b&&!r(this)||t(this,965,null,b,"SEQ."+this.A.Ug[this.A.Gd],a);return a};l.to=function(a,b,c){if(ru||this.A.ce[this.A.Gd]!==b)c&&!r(this)||t(this,965,b,c,"SEQ."+this.A.Ug[this.A.Gd]),this.A.ce[this.A.Gd]=b;switch(this.A.Gd){case 2:this.A.kb=ps[b&15];break;case 4:st(this,rt(this))&&Js(this,!0)}};
|
||||
l.lm=function(a,b){a=this.A.Fg;b&&!r(this)||t(this,966,null,b,"DAC.MASK",a);return a};l.Un=function(a,b,c){if(ru||this.A.Fg!==b)c&&!r(this)||t(this,966,b,c,"DAC.MASK"),this.A.Fg=b};l.mm=function(a,b){a=this.A.Gg;b&&!r(this)||t(this,967,null,b,"DAC.STATE",a);return a};l.Vn=function(a,b,c){c&&!r(this)||t(this,967,b,c,"DAC.READ");this.A.bd=b;this.A.Gg=3;this.A.yc=0};l.Wn=function(a,b,c){c&&!r(this)||t(this,968,b,c,"DAC.WRITE");this.A.bd=b;this.A.Gg=Ir;this.A.yc=0};
|
||||
l.km=function(a,b){a=this.A.af[this.A.bd]>>this.A.yc&63;b&&!r(this)||t(this,969,null,b,"DAC.DATA["+na(this.A.bd)+"]["+na(this.A.yc)+"]",a);this.A.yc+=6;12<this.A.yc&&(this.A.yc=0,this.A.bd=this.A.bd+1&Jr-1);return a};l.Tn=function(a,b,c){a=this.A.af[this.A.bd];c&&!r(this)||t(this,969,b,c,"DAC.DATA["+na(this.A.bd)+"]["+na(this.A.yc)+"]");b=a&~(63<<this.A.yc)|(b&63)<<this.A.yc;a!==b&&(this.A.af[this.A.bd]=b,Ht(this,!1));this.A.yc+=6;12<this.A.yc&&(this.A.yc=0,this.A.bd=this.A.bd+1&Jr-1)};
|
||||
l.Om=function(a,b){a=this.A.Mf;t(this,970,null,b,"FEAT",a);return a};l.ho=function(a,b,c){this.A.Wk=b;t(this,970,b,c,"GRC2")};l.Pm=function(a,b){a=this.A.bf;t(this,972,null,b,"MISC",a);return a};l.fo=function(a,b,c){this.A.Vk=b;t(this,972,b,c,"GRC1")};l.tm=function(a,b){a=this.A.Fd;t(this,974,null,b,"GRC.INDX",a);return a};l.eo=function(a,b,c){this.A.Fd=b;t(this,974,b,c,"GRC.INDX")};l.sm=function(a,b){a=this.A.Ed[this.A.Fd];b&&!r(this)||t(this,975,null,b,"GRC."+this.A.Tg[this.A.Fd],a);return a};
|
||||
l.co=function(a,b,c){if(ru||this.A.Ed[this.A.Fd]!==b)c&&!r(this)||t(this,975,b,c,"GRC."+this.A.Tg[this.A.Fd]),this.A.Ed[this.A.Fd]=b;switch(this.A.Fd){case 0:this.A.Ff=ps[b&15];this.A.$d=this.A.Ff&~this.A.Nd;break;case 1:this.A.Nd=~ps[b&15];this.A.$d=this.A.Ff&~this.A.Nd;break;case 2:this.A.oh=ps[b&15]&-2139062144;break;case 3:case 5:st(this,rt(this));break;case 4:this.A.ci=(b&3)<<3;break;case 6:$s(this,!1);break;case 7:this.A.ph=ps[b&15]&-2139062144;break;case 8:this.A.Db=b|b<<8|b<<16|b<<24}};
|
||||
l.em=function(a,b){return mu(this,this.K,a,b)};l.On=function(a,b,c){var d=this.K;d.Eg=d.ic;d.ic=b&31;t(this,a,b,c,"CRTC.INDX")};l.dm=function(a,b){return nu(this,this.K,a,b)};l.Nn=function(a,b,c){ou(this,this.K,a,b,c)};l.fm=function(a,b){return pu(this,this.K,b)};l.Pn=function(a,b,c){a=this.K;t(this,a.port+4,b,c,"MODE");a.Vc=b;$s(this,!1)};l.cm=function(a,b){var c=this.K.$e;b&&!r(this)||t(this,a,null,b,this.K.type+".COLOR",c);return c};
|
||||
l.Mn=function(a,b,c){c&&!r(this)||t(this,a,b,c,this.K.type+".COLOR");this.K.$e!==b&&(this.K.$e=b,Ht(this,!1))};l.gm=function(a,b){return qu(this,this.K,b)};function mu(a,b,c,d){var e;b.sc&&(e=b.ic);t(a,c,null,d,"CRTC.INDX",e);return e}function nu(a,b,c,d){var e;b.sc&&b.ic<b.nh&&(e=b.$a[b.ic]);d&&!r(a)||t(a,c,null,d,"CRTC."+b.dg[b.ic],e);return e}
|
||||
function ou(a,b,c,d,e){if(b.ic<b.nh){if(ru||b.$a[b.ic]!==d)e&&!r(a)||t(a,c,d,e,"CRTC."+b.dg[b.ic]),b.$a[b.ic]=d;if(b.ic==vr||b.ic==ur)iu(a,b),b.Gf=b.di;(9==b.ic&&8!=b.Eg||b.ic==cs&&223==d)&&$s(a,!0);at(a)}}function pu(a,b,c){var d=b.Vc;t(a,b.port+4,null,c,"MODE",d);return d}function qu(a,b,c){var d=iu(a,b);b===a.A?(d|=b.ga&48^48,b.Le=!1):d=(b.ga^=9)|240;b.ga=d;t(a,b.port+6,null,c,b===a.A?"STATUS1":"STATUS",d);return d}
|
||||
var ru=!0,Gt=1,wt=2,Os=3,Ft=5,Et=6,Qs=7,At=13,Bt=14,ut=15,vt=16,Ct=17,Dt=18,xt=19,yt=20,zt=21,tt=255,Ks=60,it=1,ht=3,xs=it,us=ht,fq=5,hq=7,qs={mda:[xs,Qs],cga:[us,Os],ega:[fq,Os],vga:[hq,Os]},Or={2:{wg:15700,vg:208,Cg:85,Dg:96}};Or[Ul]={wg:18432,vg:364,Cg:85,Dg:96};Or[4]={wg:21850,vg:364,Cg:85,Dg:96};Or[7]={wg:16700,vg:480,Cg:85,Dg:83};var Ps={6:[1,Ul,!0],7:[2,Ul,!0],8:[6,Ul,!0],9:[4,Ul,!0],10:[Ul,1,!0],11:[Ul,2,!0],0:[1,Ul,!1],1:[2,Ul,!1],2:[6,Ul,!1],3:[4,Ul,!1],4:[Ul,1,!1],5:[Ul,2,!1]},rs=[];
|
||||
rs[Gt]=[40,25,1,0,ht];rs[Os]=[80,25,1,0,ht];rs[4]=[320,200,8,192];rs[Et]=[640,200,16,192];rs[Qs]=[80,25,1,0,it];rs[At]=[320,200,8];rs[Bt]=[640,200,8];rs[ut]=[640,350,8];rs[vt]=[640,350,8];rs[Ct]=[640,480,8];rs[Dt]=[640,480,8];rs[xt]=[320,200,1];rs[yt]=[320,240,4];rs[zt]=[320,400,4];rs[0]=rs[Gt];rs[wt]=rs[Os];rs[Ft]=rs[4];
|
||||
var Xs=0,Vs=7,Zs=8,Ws=0,Ys=112,Us=128,iu=256,pt=512,jt=[[0,0,0,255],[127,192,127,255],[127,192,127,255],[127,255,127,255],[127,255,127,255]],kt=[0,1,2,2,2,2,2,2,0,3,4,4,4,4,4,4],ct=[[0,0,0,255],[0,0,170,255],[0,170,0,255],[0,170,170,255],[170,0,0,255],[170,0,170,255],[170,85,0,255],[170,170,170,255],[85,85,85,255],[85,85,255,255],[85,255,85,255],[85,255,255,255],[255,85,85,255],[255,85,255,255],[255,255,85,255],[255,255,255,255]],et=[2,4,6],dt=[3,5,Vs],ft=[0,1,2,3,4,5,20,7,56,57,58,59,60,61,62,63],
|
||||
var Xs=0,Vs=7,Zs=8,Ws=0,Ys=112,Us=128,Jt=256,pt=512,jt=[[0,0,0,255],[127,192,127,255],[127,192,127,255],[127,255,127,255],[127,255,127,255]],kt=[0,1,2,2,2,2,2,2,0,3,4,4,4,4,4,4],ct=[[0,0,0,255],[0,0,170,255],[0,170,0,255],[0,170,170,255],[170,0,0,255],[170,0,170,255],[170,85,0,255],[170,170,170,255],[85,85,85,255],[85,85,255,255],[85,255,85,255],[85,255,255,255],[255,85,85,255],[255,85,255,255],[255,255,85,255],[255,255,255,255]],et=[2,4,6],dt=[3,5,Vs],ft=[0,1,2,3,4,5,20,7,56,57,58,59,60,61,62,63],
|
||||
ps=[0,255,65280,65535,16711680,16711935,16776960,16777215,-16777216,-16776961,-16711936,-16711681,-65536,-65281,-256,-1],lu=[0];lu[128]=1;lu[32768]=2;lu[32896]=3;lu[8388608]=4;lu[8388736]=5;lu[8421376]=6;lu[8421504]=7;lu[-2147483648]=8;lu[-2147483520]=9;lu[-2147450880]=10;lu[-2147450752]=11;lu[-2139095040]=12;lu[-2139094912]=13;lu[-2139062272]=14;lu[-2139062144]=15;var qr=[];qr[xs]=["MDA",948,720896,4096,0,Ul];qr[us]=["CGA",980,753664,16384,0,2];qr[fq]=["EGA",980,753664,16384,65536,4];
|
||||
qr[hq]=["VGA",980,753664,16384,262144,7];
|
||||
var ss=0,Hs=1,Gs=2,Fs=3,Ns=[[1036,1038,1033],[1037,1032,1039],[1035,1040,1034]],vs={948:Q.prototype.wm,949:Q.prototype.vm,952:Q.prototype.xm,954:Q.prototype.ym},ws={948:Q.prototype.co,949:Q.prototype.bo,952:Q.prototype.eo},ys={980:Q.prototype.am,981:Q.prototype.$l,984:Q.prototype.bm,985:Q.prototype.Zl,986:Q.prototype.cm},zs={980:Q.prototype.Gn,981:Q.prototype.Fn,984:Q.prototype.Hn,985:Q.prototype.En},As={960:Q.prototype.Vl,961:Q.prototype.ol,962:Q.prototype.Im,964:Q.prototype.Gm,965:Q.prototype.Fm,
|
||||
974:Q.prototype.pm,975:Q.prototype.om},Bs={954:Q.prototype.Lk,960:Q.prototype.Kk,961:Q.prototype.Kk,962:Q.prototype.fo,964:Q.prototype.mo,965:Q.prototype.lo,970:Q.prototype.Yn,972:Q.prototype.Xn,974:Q.prototype.Wn,975:Q.prototype.Vn,986:Q.prototype.Lk},Cs={963:Q.prototype.Jm,966:Q.prototype.hm,967:Q.prototype.im,969:Q.prototype.gm,970:Q.prototype.Km,972:Q.prototype.Lm},Ds={963:Q.prototype.oo,966:Q.prototype.Mn,967:Q.prototype.Nn,968:Q.prototype.On,969:Q.prototype.Ln};
|
||||
var ss=0,Hs=1,Gs=2,Fs=3,Ns=[[1036,1038,1033],[1037,1032,1039],[1035,1040,1034]],vs={948:Q.prototype.Am,949:Q.prototype.zm,952:Q.prototype.Bm,954:Q.prototype.Cm},ws={948:Q.prototype.mo,949:Q.prototype.lo,952:Q.prototype.no},ys={980:Q.prototype.em,981:Q.prototype.dm,984:Q.prototype.fm,985:Q.prototype.cm,986:Q.prototype.gm},zs={980:Q.prototype.On,981:Q.prototype.Nn,984:Q.prototype.Pn,985:Q.prototype.Mn},As={960:Q.prototype.Vl,961:Q.prototype.ol,962:Q.prototype.Mm,964:Q.prototype.Km,965:Q.prototype.Jm,
|
||||
974:Q.prototype.tm,975:Q.prototype.sm},Bs={954:Q.prototype.Lk,960:Q.prototype.Kk,961:Q.prototype.Kk,962:Q.prototype.oo,964:Q.prototype.uo,965:Q.prototype.to,970:Q.prototype.ho,972:Q.prototype.fo,974:Q.prototype.eo,975:Q.prototype.co,986:Q.prototype.Lk},Cs={963:Q.prototype.Nm,966:Q.prototype.lm,967:Q.prototype.mm,969:Q.prototype.km,970:Q.prototype.Om,972:Q.prototype.Pm},Ds={963:Q.prototype.wo,966:Q.prototype.Un,967:Q.prototype.Vn,968:Q.prototype.Wn,969:Q.prototype.Tn};
|
||||
Xa(function(){for(var a=vb(document,"pcx86","video"),b=0;b<a.length;b++){var c=a[b],d=wb(c),e=document.createElement("canvas");if(!e||!e.getContext){c.innerHTML="<br/>Missing <canvas> 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<=Ha().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=+(Qa("aspect")||d.aspect);f&&.3<=f&&3.33>=f&&(Wa("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");Ma("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);ub(d,c)}});
|
||||
function su(a){ib.call(this,"ParallelPort",a,4194304);this.H=a.adapter;switch(this.H){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:ab("Unrecognized parallel adapter #"+this.H);return}this.A=this.B=null;a=a.binding;"console"==a?this.B="":sb(this,a,tu)}ba(su,ib);l=su.prototype;l.Eb=function(a,b,c){switch(b){case tu:return this.ma[b]=this.A=c,!0}return!1};
|
||||
l.uc=function(a,b,c,d){this.na=b;this.G=c;this.ca=d;this.V=Vb(a,"ChipSet");Ic(b,this,uu,this.D);Mc(b,this,vu,this.D);Jb(this)};l.ac=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.$b=function(a){return a?this.save():!0};l.reset=function(){wu(this)};l.save=function(){var a=new Wf(this),b=0,c=[];c[b++]=this.F;c[b++]=this.Pb;c[b]=this.lf;a.set(0,c);return a.data()};l.restore=function(a){return wu(this,a[0])};
|
||||
function wu(a,b){var c=0;b||(b=[0,0,0]);a.F=b[c++];a.Pb=b[c++];a.lf=b[c];return!0}l.jm=function(a,b){var c=this.F;t(this,a,null,b,"DATA",c);return c};l.Hm=function(a,b){var c=this.Pb;t(this,a,null,b,"STAT",c);return c};l.fm=function(a,b){var c=this.lf;t(this,a,null,b,"CTRL",c);return c};
|
||||
l.Pn=function(a,b,c){t(this,a,b,c,"DATA");this.F=b;this.Pb|=xu;a=!1;Nb(this,"transmitByte("+na(b)+")");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.O(this.B),this.B="";10!=b&&(this.B+=String.fromCharCode(b));a=!0}a&&(this.Pb&=~xu);yu(this)};l.Kn=function(a,b,c){t(this,a,b,c,"CTRL");this.lf=b;yu(this)};
|
||||
function yu(a){a.V&&a.C&&(a.lf&zu&&!(a.Pb&xu)?ih(a.V,a.C):Ug(a.V,a.C))}var tu="buffer",xu=64,zu=16,uu={0:su.prototype.jm,1:su.prototype.Hm,2:su.prototype.fm},vu={0:su.prototype.Pn,2:su.prototype.Kn};Xa(function(){for(var a=vb(document,"pcx86","parallel"),b=0;b<a.length;b++){var c=a[b],d=wb(c),d=new su(d);ub(d,c)}});
|
||||
function wu(a,b){var c=0;b||(b=[0,0,0]);a.F=b[c++];a.Pb=b[c++];a.lf=b[c];return!0}l.nm=function(a,b){var c=this.F;t(this,a,null,b,"DATA",c);return c};l.Lm=function(a,b){var c=this.Pb;t(this,a,null,b,"STAT",c);return c};l.jm=function(a,b){var c=this.lf;t(this,a,null,b,"CTRL",c);return c};
|
||||
l.Xn=function(a,b,c){t(this,a,b,c,"DATA");this.F=b;this.Pb|=xu;a=!1;Nb(this,"transmitByte("+na(b)+")");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.O(this.B),this.B="";10!=b&&(this.B+=String.fromCharCode(b));a=!0}a&&(this.Pb&=~xu);yu(this)};l.Sn=function(a,b,c){t(this,a,b,c,"CTRL");this.lf=b;yu(this)};
|
||||
function yu(a){a.V&&a.C&&(a.lf&zu&&!(a.Pb&xu)?Wg(a.V,a.C):Ug(a.V,a.C))}var tu="buffer",xu=64,zu=16,uu={0:su.prototype.nm,1:su.prototype.Lm,2:su.prototype.jm},vu={0:su.prototype.Xn,2:su.prototype.Sn};Xa(function(){for(var a=vb(document,"pcx86","parallel"),b=0;b<a.length;b++){var c=a[b],d=wb(c),d=new su(d);ub(d,c)}});
|
||||
function Au(a){ib.call(this,"SerialPort",a,8388608);this.ha=a.adapter;switch(this.ha){case 1:this.ea=1016;this.N=4;break;case 2:this.ea=760;this.N=3;break;default:ab("Unrecognized serial adapter #"+this.ha);return}this.C=this.K=null;this.pa=a.tabSize||0;this.la=a.charBOL||0;this.L=this.qa=0;this.ra=Bu|Cu;this.P=!0;a=a.binding;"console"==a?this.K="":sb(this,a,Du);this.H=this.ba=this.U=null;this.exports={connect:this.yj,receiveData:this.Ze,receiveStatus:this.nl}}ba(Au,ib);l=Au.prototype;
|
||||
l.Vi=function(a,b,c){var d=null;a!=this.Ce||this.H||(this.H=b,this.U=c,this.P=!1,d=this);return d};l.Eb=function(a,b,c){var d=this;switch(b){case Du:return this.ma[b]=this.C=c,this.C.onkeydown=function(a){a=a||window.event;var b=a.keyCode;if(8===b||a.ctrlKey&&65<=b&&90>=b)a.preventDefault&&a.preventDefault(),64<b&&(b-=64),d.Ze(b);return!0},this.C.onkeypress=function(a){a=a||window.event;d.Ze(a.which||a.keyCode);a.preventDefault&&a.preventDefault();return!0},this.C.removeAttribute("readonly"),!0}return!1};
|
||||
l.uc=function(a,b,c,d){this.oa=a;this.na=b;this.G=c;this.ca=d;var e=this;this.ta=vd(this.G,this.id+".receive",function(){e.Ze()});this.wa=vd(this.G,this.id+".transmit",function(){e.A=e.A|Eu|Fu});this.V=Vb(a,"ChipSet");Ic(b,this,Gu,this.ea);Mc(b,this,Hu,this.ea);Jb(this)};
|
||||
l.yj=function(a){if(!this.H){var b=ud(this.oa,"connection");if(b){var c=b.split("->");if(2==c.length){var d=wa(c[0]);if(d!=this.Ce)return;c=wa(c[1]);if(this.H=yb(c)){var e=this.H.exports;if(e){var f=e.connect;f&&f.call(this.H,this.P);if(this.ba=e.receiveData){this.P=a;this.U=e.receiveStatus;this.status("Connected "+this.ee+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};
|
||||
l.ac=function(a,b){if(!b)if(this.yj(this.P),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.$b=function(a){return a?this.save():!0};l.reset=function(){Iu(this)};l.save=function(){var a=new Wf(this),b=0,c=[];c[b++]=this.fa;c[b++]=this.ka;c[b++]=this.I;c[b++]=this.M;c[b++]=this.F;c[b++]=this.D;c[b++]=this.aa;c[b++]=this.A;c[b++]=this.B;c[b]=this.J;a.set(0,c);return a.data()};l.restore=function(a){return Iu(this,a[0])};
|
||||
function Iu(a,b){var c=0;b||(b=[0,0,Ju,0,Ku,0,0,Eu|Fu,a.ra,[]]);a.fa=b[c++];a.ka=b[c++];a.I=b[c++];a.M=b[c++];a.F=b[c++];a.D=b[c++];a.aa=b[c++];a.A=b[c++];a.B=b[c++];a.J=b[c];return!0}l.Ze=function(a){if(null!=a)if("number"==typeof a)this.J.push(a);else if("string"==typeof a)for(var b=0;b<a.length;b++)this.J.push(a.charCodeAt(b));else this.J=this.J.concat(a);Lu(this);return!0};l.nl=function(a){var b=this.B;this.B&=~(Bu|Cu);a&32&&(this.B=this.B|Bu|Mu);a&64&&(this.B=this.B|Cu|Nu);b!=this.B&&Ou(this)};
|
||||
function Lu(a){0<a.J.length&&!(a.A&Pu)&&(a.fa=a.J.shift(),a.A|=Pu,a.J.length&&a.G&&Id(a.G,a.ta,1E3/(1843200/((a.I||1)<<7))|0));Ou(a)}l.Em=function(a,b){var c=this.D&Qu?this.I&255:this.fa;t(this,a,null,b,this.D&Qu?"DLL":"RBR",c);this.A&=~Pu;Lu(this);return c};l.qm=function(a,b){var c=this.D&Qu?this.I>>8:this.M;t(this,a,null,b,this.D&Qu?"DLM":"IER",c);return c};l.rm=function(a,b){var c=this.F;this.F|=Ku;t(this,a,null,b,"IIR",c);return c};l.sm=function(a,b){var c=this.D;t(this,a,null,b,"LCR",c);return c};
|
||||
l.um=function(a,b){var c=this.aa;t(this,a,null,b,"MCR",c);return c};l.tm=function(a,b){var c=this.A;t(this,a,null,b,"LSR",c);return c};l.zm=function(a,b){var c=this.B;this.B&=~(Mu|Nu);t(this,a,null,b,"MSR",c);return c};
|
||||
l.no=function(a,b,c){t(this,a,b,c,this.D&Qu?"DLL":"THR");if(this.D&Qu)this.I=this.I&-256|b;else{this.ka=b;this.A&=~(Eu|Fu);a=!1;Nb(this,"transmitByte("+na(b)+")");this.ba&&this.ba.call(this.H,b)&&(a=!0);if(this.C){if(13==b)this.L=0;else if(8==b)this.C.value=this.C.value.slice(0,-1),0<this.L&&this.L--;else{var d;13!=b&&10!=b&&(d=xa[b]);d=d?"<"+d+">":String.fromCharCode(b);a=d.length;32>b&&1==a&&(a=0);9==b&&(a=this.pa||8,a-=this.L%a,this.pa&&(d=va("",a)));!this.L&&a&&(10!=this.qa&&(d="\n"+d),this.la&&
|
||||
(d=String.fromCharCode(this.la)+d));this.C.value+=d;this.C.scrollTop=this.C.scrollHeight;this.L+=a}this.qa=b;a=!0}else if(null!=this.K){if(10==b||1024<=this.K.length)this.O(this.K),this.K="";10!=b&&(this.K+=String.fromCharCode(b));a=!0}a&&(this.G&&Id(this.G,this.wa,1E3/(1843200/((this.I||1)<<7))|0),Ou(this))}};l.Zn=function(a,b,c){t(this,a,b,c,this.D&Qu?"DLM":"IER");this.D&Qu?this.I=this.I&255|b<<8:this.M=b};l.$n=function(a,b,c){t(this,a,b,c,"LCR");this.D=b};
|
||||
l.ao=function(a,b,c){var d=b^this.aa;t(this,a,b,c,"MCR");this.aa=b;d&(Ru|Su)&&this.U&&(a=0,this.P?(a|=b&Su?32:0,a|=b&Ru?320:0):(a|=b&Su?16:0,a|=b&Ru?1048576:0),this.U.call(this.H,a))};function Ou(a){var b=-1;a.A&Pu&&a.M&Tu?b=Uu:a.A&Eu&&a.M&Vu?b=Wu:a.B&(Mu|Nu)&&a.M&Xu&&(b=Yu);0<=b?(a.F&=~(Ku|Zu),a.F|=b,a.V&&a.N&&ih(a.V,a.N,100)):(a.F|=Ku,a.V&&a.N&&Ug(a.V,a.N))}
|
||||
var Du="buffer",Ju=384,Tu=1,Vu=2,Xu=8,Ku=1,Uu=4,Wu=2,Yu=0,Zu=6,Qu=128,Ru=1,Su=2,Pu=1,Eu=32,Fu=64,Mu=1,Nu=2,Bu=16,Cu=32,Gu={0:Au.prototype.Em,1:Au.prototype.qm,2:Au.prototype.rm,3:Au.prototype.sm,4:Au.prototype.um,5:Au.prototype.tm,6:Au.prototype.zm},Hu={0:Au.prototype.no,1:Au.prototype.Zn,3:Au.prototype.$n,4:Au.prototype.ao};Xa(function(){for(var a=vb(document,"pcx86","serial"),b=0;b<a.length;b++){var c=a[b],d=wb(c),d=new Au(d);ub(d,c)}});
|
||||
function $u(a){ib.call(this,"Mouse",a,16777216);if(this.V=a.serial)this.U="SerialPort";this.K=a.scaleMouse;this.P=this.N=this.sc=!1;this.F=[];this.D=[];Jb(this)}ba($u,ib);l=$u.prototype;l.uc=function(a,b,c,d){this.oa=a;this.na=b;this.G=c;this.ca=d;this.K=ud(a,"scaleMouse")||this.K;for(b=null;b=Vb(a,"Video",b);)this.F.push(b)};
|
||||
l.ac=function(a,b){if(!b){if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;if(this.U&&!this.H){for(a=null;(a=Vb(this.oa,this.U,a))&&(!a.Vi||!(this.H=a.Vi(this.V,this,this.ml))););if(this.H)for(this.D=[],a=0;a<this.F.length;a++)b=this.F[a],b.H=this,(b=b.F)&&this.D.push(b);else ab(this.id+": "+this.U+" "+this.V+" unavailable")}this.sc?av(this):bv(this)}return!0};l.$b=function(a){return a?this.save():!0};l.reset=function(){cv(this)};
|
||||
l.save=function(){var a=new Wf(this),b=0,c=[];c[b++]=this.sc;c[b++]=this.A;c[b++]=this.B;c[b++]=this.I;c[b++]=this.J;c[b++]=this.L;c[b++]=this.M;c[b]=this.C;a.set(0,c);return a.data()};l.restore=function(a){return cv(this,a[0])};function cv(a,b){var c=0;b||(b=[!1,-1,-1,0,0,!1,!1,0]);var d=b[c++];a.sc=d;a.A=b[c++];a.B=b[c++];a.I=b[c++];a.J=b[c++];a.L=b[c++];a.M=b[c++];a.C=b[c];a.C&(Ru|Su)&&(a.C=(a.C&Ru?1048576:0)|(a.C&Su?16:0));return!0}l.Hf=function(a){this.N=a};
|
||||
function av(a){if(!a.P)for(var b=0;b<a.D.length;b++)dv(a,a.D[b])&&(a.P=!0)}function bv(a){if(a.P)for(var b=0;b<a.D.length;b++){var c=a.D[b];c&&(c.style.cursor="auto")}}function dv(a,b){return b?(b.addEventListener("mousemove",function(b){ev(a,b)},!1),b.addEventListener("mousedown",function(b){ev(a,b,!0)},!1),b.addEventListener("mouseup",function(b){ev(a,b,!1)},!1),b.style.cursor="none",!0):!1}
|
||||
function ev(a,b,c){if(void 0!==c){var d;!(d=!1!==a.N)&&(d=a.F.length)&&(d=a.F[0],d=d.Qd?d.re(!0):!1);d||(a.N=null);a.Yd(b.button,c)}else{if(0>a.A||0>a.B)a.A=b.screenX,a.B=b.screenY;a.N?(c=b.movementX||b.mozMovementX||b.webkitMovementX||0,d=b.movementY||b.mozMovementY||b.webkitMovementY||0):(c=b.screenX-a.A,d=b.screenY-a.B);a.A=b.screenX;a.B=b.screenY;a.tf(c,d,a.A,a.B)}}
|
||||
l.Yd=function(a,b){if(this.sc&&this.G&&this.G.Z.Xa){var c="mouse button"+a+" "+(b?"dn":"up");switch(a){case Ms:if(this.L!=b){this.L=b;fv(this,c);return}break;case gv:if(this.M!=b){this.M=b;fv(this,c);return}}Nb(this,c+": ignored")}};l.tf=function(a,b,c,d){this.sc&&this.G&&this.G.Z.Xa&&(a=Math.round(Math.abs(a)*this.K)*Math.sign(a)||Math.sign(a),b=Math.round(Math.abs(b)*this.K)*Math.sign(b)||Math.sign(b),a||b)&&(r(this,16777216)&&Nb(this,"moveMouse("+a+","+b+")"),this.I=a,this.J=b,fv(this,null,c,d))};
|
||||
function fv(a,b,c,d){var e=64|(a.L?32:0)|(a.M?16:0)|(a.J&192)>>4|(a.I&192)>>6,f=a.I&63,g=a.J&63;r(a,8388608)&&Nb(a,(b?b+": ":"")+(void 0!==d?"mouse ("+c+","+d+"): ":"")+"serial packet ["+na(e)+","+na(f)+","+na(g)+"]",0,!0);a.H.Ze([e,f,g]);a.I=a.J=0}
|
||||
l.ml=function(a){var b=1048592==(a&1048592);if(b){if(!this.sc){var c=!1;this.C&16||(this.reset(),Nb(this,"serial mouse reset"),c=!0);this.C&1048576||(Nb(this,"serial mouse ID requested"),c=!0);c&&(this.H.Ze([hv,hv]),Nb(this,"serial mouse ID sent"));av(this);this.sc=b}}else this.sc&&(Nb(this,"serial mouse inactive"),bv(this),this.sc=b);this.C=a};var hv=77,Ms=0,gv=2;Xa(function(){for(var a=vb(document,"pcx86","mouse"),b=0;b<a.length;b++){var c=a[b],d=wb(c),d=new $u(d);ub(d,c)}});
|
||||
function iv(a,b,c){ib.call(this,"Disk",{id:a.ee+".disk"+q(++jv,4)},2097152);this.controller=a;this.Da=a.Da;this.O=a.O;this.oa=a.oa;this.ca=a.ca;this.B=b;this.kd=b.name;this.Oe=b.Oe;this.mg=this.D=!1;kv(this,c,b.sb,b.gb,b.Wa,b.Na);this.I=[];this.L=[];this.F=null;this.N=0;this.M=!1;Jb(this)}ba(iv,ib);l=iv.prototype;l.uc=function(a,b,c,d){this.ca=d};l.ac=function(a,b){b||!this.mg||this.D||(Jb(this,!1),this.load(this.kd,this.H,null,this.Cl,this));return!0};l.Cl=function(){Jb(this,!0)};
|
||||
l.$b=function(a,b){if(this.D){var c,d=0;if(this.M&&!pb("Disk writes are still in progress, shut down anyway?"))return!1;for(;c=lv(this,!1);)if(d=c[0]){this.Da('Unable to save "'+this.kd+'" (error '+d+")");break}b&&this.D&&(b="action=close&volume="+this.H,b+="&machine="+mv(this.controller),b+="&user="+nv(this.controller),Fa(Ga()+"/api/v1/disk?"+b,null,!0),this.D=!1);!d&&a&&this.Da(this.kd+" saved")}return!0};
|
||||
function kv(a,b,c,d,e,f){a.mode=b;a.sb=c;a.gb=d;a.Wa=e;a.Na=f;a.A=[];if("preload"!=a.mode){b=Array(a.sb);for(c=0;c<b.length;c++){d=Array(a.gb);for(e=0;e<d.length;e++){f=Array(a.Wa);for(var g=1;g<=f.length;g++)f[g-1]=ov(null,c,e,g,a.Na,"local"==a.mode?0:null);d[e]=f}b[c]=d}a.A=b}a.K=null}
|
||||
l.load=function(a,b,c,d,e){var f=b;if(this.J)return!0;this.kd=a;this.H=b;this.Ig=pa(b);var g=this;this.J=d;this.P=e||this.controller;if(c){var h=new FileReader;h.onload=function(){var a=h.result,b,c=a?a.byteLength:0,d=fa[c];if(d){g.sb=d[0];g.gb=d[1];g.Wa=d[2];g.Na=d[3]||512;b=g.Na>>2;var e=d=0,a=new DataView(a,0,c);g.A=Array(g.sb);for(c=0;c<g.A.length;c++)for(var f=g.A[c]=Array(g.gb),k=0;k<f.length;k++)for(var J=f[k]=Array(g.Wa),P=0;P<J.length;P++){for(var K=ov(null,c,k,P+1,g.Na,0),ka=K.data,Z=0;Z<
|
||||
b;Z++,e+=4)var jb=ka[Z]=a.getInt32(e,!0),d=d+jb&-1;K.Oc=b;J[P]=K}g.K=d;b=g}else g.Da("Unrecognized disk format ("+c+" bytes)");g.J&&(g.J.call(g.controller,g.B,b,g.kd,g.H),g.J=null)};h.readAsArrayBuffer(c);return!0}0>b.indexOf("/api/v1/dump")&&(a=ra(b),"json"==a||"gz"==a?f=encodeURI(b):"demandrw"==this.mode||"demandro"==this.mode?(f=pv(this,b),this.mg=!0):(c="path",d="&mbhd=10",!b.indexOf("http:")||!b.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(a)?(c="disk",d="&mbhd=0"):sa(b,
|
||||
"/")&&(c="dir"),f=Ga()+"/api/v1/dump?"+c+"="+encodeURIComponent(b)+(this.Oe?"":d)+"&format=json"));var k="Loading "+f+"...";return!!Fa(f,null,!0,function(a,b,c){qv(g,a,b,c)},function(){g.O(k,Fb.Ee)})};
|
||||
function qv(a,b,c,d){var e=null;a.Re=!1;var f=!(!(0>d&&a.oa)||a.oa.Z.bc);if(a.mg)d?a.Da('Unable to connect to disk "'+a.H+'" (error '+d+": "+c+")",f):(a.D=!0,rv(a),e=a);else if(d)a.Da('Unable to load disk "'+a.kd+'" (error '+d+": "+b+")",f);else{nb(a.controller.ee,b,c);try{if(0<pa(a.Ig,!0).toLowerCase().indexOf("-readonly"))a.Re=!0;else{var g=c.indexOf("\n");0<g&&1024>g&&0<c.substring(0,g).indexOf("write-protected")&&(a.Re=!0)}var h;"<"==c.substr(0,1)?h=["Missing disk image: "+a.kd]:h=0>c.indexOf("0x")&&
|
||||
function Lu(a){0<a.J.length&&!(a.A&Pu)&&(a.fa=a.J.shift(),a.A|=Pu,a.J.length&&a.G&&Id(a.G,a.ta,1E3/(1843200/((a.I||1)<<7))|0));Ou(a)}l.Im=function(a,b){var c=this.D&Qu?this.I&255:this.fa;t(this,a,null,b,this.D&Qu?"DLL":"RBR",c);this.A&=~Pu;Lu(this);return c};l.um=function(a,b){var c=this.D&Qu?this.I>>8:this.M;t(this,a,null,b,this.D&Qu?"DLM":"IER",c);return c};l.vm=function(a,b){var c=this.F;this.F|=Ku;t(this,a,null,b,"IIR",c);return c};l.wm=function(a,b){var c=this.D;t(this,a,null,b,"LCR",c);return c};
|
||||
l.ym=function(a,b){var c=this.aa;t(this,a,null,b,"MCR",c);return c};l.xm=function(a,b){var c=this.A;t(this,a,null,b,"LSR",c);return c};l.Dm=function(a,b){var c=this.B;this.B&=~(Mu|Nu);t(this,a,null,b,"MSR",c);return c};
|
||||
l.vo=function(a,b,c){t(this,a,b,c,this.D&Qu?"DLL":"THR");if(this.D&Qu)this.I=this.I&-256|b;else{this.ka=b;this.A&=~(Eu|Fu);a=!1;Nb(this,"transmitByte("+na(b)+")");this.ba&&this.ba.call(this.H,b)&&(a=!0);if(this.C){if(13==b)this.L=0;else if(8==b)this.C.value=this.C.value.slice(0,-1),0<this.L&&this.L--;else{var d;13!=b&&10!=b&&(d=xa[b]);d=d?"<"+d+">":String.fromCharCode(b);a=d.length;32>b&&1==a&&(a=0);9==b&&(a=this.pa||8,a-=this.L%a,this.pa&&(d=va("",a)));!this.L&&a&&(10!=this.qa&&(d="\n"+d),this.la&&
|
||||
(d=String.fromCharCode(this.la)+d));this.C.value+=d;this.C.scrollTop=this.C.scrollHeight;this.L+=a}this.qa=b;a=!0}else if(null!=this.K){if(10==b||1024<=this.K.length)this.O(this.K),this.K="";10!=b&&(this.K+=String.fromCharCode(b));a=!0}a&&(this.G&&Id(this.G,this.wa,1E3/(1843200/((this.I||1)<<7))|0),Ou(this))}};l.io=function(a,b,c){t(this,a,b,c,this.D&Qu?"DLM":"IER");this.D&Qu?this.I=this.I&255|b<<8:this.M=b};l.jo=function(a,b,c){t(this,a,b,c,"LCR");this.D=b};
|
||||
l.ko=function(a,b,c){var d=b^this.aa;t(this,a,b,c,"MCR");this.aa=b;d&(Ru|Su)&&this.U&&(a=0,this.P?(a|=b&Su?32:0,a|=b&Ru?320:0):(a|=b&Su?16:0,a|=b&Ru?1048576:0),this.U.call(this.H,a))};function Ou(a){var b=-1;a.A&Pu&&a.M&Tu?b=Uu:a.A&Eu&&a.M&Vu?b=Wu:a.B&(Mu|Nu)&&a.M&Xu&&(b=Yu);0<=b?(a.F&=~(Ku|Zu),a.F|=b,a.V&&a.N&&Wg(a.V,a.N,100)):(a.F|=Ku,a.V&&a.N&&Ug(a.V,a.N))}
|
||||
var Du="buffer",Ju=384,Tu=1,Vu=2,Xu=8,Ku=1,Uu=4,Wu=2,Yu=0,Zu=6,Qu=128,Ru=1,Su=2,Pu=1,Eu=32,Fu=64,Mu=1,Nu=2,Bu=16,Cu=32,Gu={0:Au.prototype.Im,1:Au.prototype.um,2:Au.prototype.vm,3:Au.prototype.wm,4:Au.prototype.ym,5:Au.prototype.xm,6:Au.prototype.Dm},Hu={0:Au.prototype.vo,1:Au.prototype.io,3:Au.prototype.jo,4:Au.prototype.ko};Xa(function(){for(var a=vb(document,"pcx86","serial"),b=0;b<a.length;b++){var c=a[b],d=wb(c),d=new Au(d);ub(d,c)}});
|
||||
function $u(a){ib.call(this,"Mouse",a,16777216);this.V=a.serial||a.binding;this.aa=a.type||(this.V?av:bv);this.U=this.aa==av?"SerialPort":null;this.F=null;this.K=a.scaleMouse;this.sc=this.P=this.N=!1;this.H=[];this.D=[]}ba($u,ib);l=$u.prototype;l.uc=function(a,b,c,d){this.oa=a;this.na=b;this.G=c;this.ca=d;this.K=ud(a,"scaleMouse")||this.K;for(c=null;c=Vb(a,"Video",c);)this.H.push(c);this.aa==bv&&(Ic(b,this,cv,dv),Mc(b,this,ev,dv));Jb(this)};
|
||||
l.ac=function(a,b){if(!b){if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;if(this.U&&!this.F){for(a=null;(a=Vb(this.oa,this.U,a))&&(!a.Vi||!(this.F=a.Vi(this.V,this,this.ml))););if(this.F)for(this.D=[],a=0;a<this.H.length;a++)b=this.H[a],b.H=this,(b=b.F)&&this.D.push(b);else ab(this.id+": "+this.U+" "+this.V+" unavailable")}this.sc?fv(this):gv(this)}return!0};l.$b=function(a){return a?this.save():!0};l.reset=function(){hv(this)};
|
||||
l.save=function(){var a=new Wf(this),b=0,c=[];c[b++]=this.sc;c[b++]=this.A;c[b++]=this.B;c[b++]=this.I;c[b++]=this.J;c[b++]=this.L;c[b++]=this.M;c[b]=this.C;a.set(0,c);return a.data()};l.restore=function(a){return hv(this,a[0])};function hv(a,b){var c=0;b||(b=[!1,-1,-1,0,0,!1,!1,0]);var d=b[c++];a.sc=d;a.A=b[c++];a.B=b[c++];a.I=b[c++];a.J=b[c++];a.L=b[c++];a.M=b[c++];a.C=b[c];a.C&(Ru|Su)&&(a.C=(a.C&Ru?1048576:0)|(a.C&Su?16:0));return!0}l.Hf=function(a){this.N=a};
|
||||
function fv(a){if(!a.P)for(var b=0;b<a.D.length;b++)iv(a,a.D[b])&&(a.P=!0)}function gv(a){if(a.P)for(var b=0;b<a.D.length;b++){var c=a.D[b];c&&(c.style.cursor="auto")}}function iv(a,b){return b?(b.addEventListener("mousemove",function(b){jv(a,b)},!1),b.addEventListener("mousedown",function(b){jv(a,b,!0)},!1),b.addEventListener("mouseup",function(b){jv(a,b,!1)},!1),b.style.cursor="none",!0):!1}
|
||||
function jv(a,b,c){if(void 0!==c){var d;!(d=!1!==a.N)&&(d=a.H.length)&&(d=a.H[0],d=d.Qd?d.re(!0):!1);d||(a.N=null);a.Yd(b.button,c)}else{if(0>a.A||0>a.B)a.A=b.screenX,a.B=b.screenY;a.N?(c=b.movementX||b.mozMovementX||b.webkitMovementX||0,d=b.movementY||b.mozMovementY||b.webkitMovementY||0):(c=b.screenX-a.A,d=b.screenY-a.B);a.A=b.screenX;a.B=b.screenY;a.tf(c,d,a.A,a.B)}}
|
||||
l.Yd=function(a,b){if(this.sc&&this.G&&this.G.Z.Xa){var c="mouse button"+a+" "+(b?"dn":"up");switch(a){case Ms:if(this.L!=b){this.L=b;kv(this,c);return}break;case lv:if(this.M!=b){this.M=b;kv(this,c);return}}Nb(this,c+": ignored")}};l.tf=function(a,b,c,d){this.sc&&this.G&&this.G.Z.Xa&&(a=Math.round(Math.abs(a)*this.K)*Math.sign(a)||Math.sign(a),b=Math.round(Math.abs(b)*this.K)*Math.sign(b)||Math.sign(b),a||b)&&(r(this,16777216)&&Nb(this,"moveMouse("+a+","+b+")"),this.I=a,this.J=b,kv(this,null,c,d))};
|
||||
function kv(a,b,c,d){var e=64|(a.L?32:0)|(a.M?16:0)|(a.J&192)>>4|(a.I&192)>>6,f=a.I&63,g=a.J&63;r(a,8388608)&&Nb(a,(b?b+": ":"")+(void 0!==d?"mouse ("+c+","+d+"): ":"")+"serial packet ["+na(e)+","+na(f)+","+na(g)+"]",0,!0);a.F.Ze([e,f,g]);a.I=a.J=0}
|
||||
l.ml=function(a){var b=1048592==(a&1048592);if(b){if(!this.sc){var c=!1;this.C&16||(this.reset(),Nb(this,"serial mouse reset"),c=!0);this.C&1048576||(Nb(this,"serial mouse ID requested"),c=!0);c&&(this.F.Ze([mv,mv]),Nb(this,"serial mouse ID sent"));fv(this);this.sc=b}}else this.sc&&(Nb(this,"serial mouse inactive"),gv(this),this.sc=b);this.C=a};l.am=function(a,b){t(this,a,null,b,"DATA",0);return 0};l.bm=function(a,b){t(this,a,null,b,"TPPI",0);return 0};
|
||||
l.$l=function(a,b){t(this,a,null,b,"CTRL",0);return 0};l.Zl=function(a,b){t(this,a,null,b,"CPPI",0);return 0};l.Kn=function(a,b,c){t(this,a,b,c,"DATA")};l.Ln=function(a,b,c){t(this,a,b,c,"TPPI")};l.Jn=function(a,b,c){t(this,a,b,c,"CTRL")};l.In=function(a,b,c){t(this,a,b,c,"CPPI")};var bv="bus",av="serial",Ms=0,lv=2,dv=572,cv={0:$u.prototype.am,1:$u.prototype.bm,2:$u.prototype.$l,3:$u.prototype.Zl},ev={0:$u.prototype.Kn,1:$u.prototype.Ln,2:$u.prototype.Jn,3:$u.prototype.In},mv=77;
|
||||
Xa(function(){for(var a=vb(document,"pcx86","mouse"),b=0;b<a.length;b++){var c=a[b],d=wb(c),d=new $u(d);ub(d,c)}});function nv(a,b,c){ib.call(this,"Disk",{id:a.ee+".disk"+q(++ov,4)},2097152);this.controller=a;this.Da=a.Da;this.O=a.O;this.oa=a.oa;this.ca=a.ca;this.B=b;this.kd=b.name;this.Oe=b.Oe;this.mg=this.D=!1;pv(this,c,b.sb,b.gb,b.Wa,b.Na);this.I=[];this.L=[];this.F=null;this.N=0;this.M=!1;Jb(this)}ba(nv,ib);l=nv.prototype;l.uc=function(a,b,c,d){this.ca=d};
|
||||
l.ac=function(a,b){b||!this.mg||this.D||(Jb(this,!1),this.load(this.kd,this.H,null,this.Cl,this));return!0};l.Cl=function(){Jb(this,!0)};
|
||||
l.$b=function(a,b){if(this.D){var c,d=0;if(this.M&&!pb("Disk writes are still in progress, shut down anyway?"))return!1;for(;c=qv(this,!1);)if(d=c[0]){this.Da('Unable to save "'+this.kd+'" (error '+d+")");break}b&&this.D&&(b="action=close&volume="+this.H,b+="&machine="+rv(this.controller),b+="&user="+sv(this.controller),Fa(Ga()+"/api/v1/disk?"+b,null,!0),this.D=!1);!d&&a&&this.Da(this.kd+" saved")}return!0};
|
||||
function pv(a,b,c,d,e,f){a.mode=b;a.sb=c;a.gb=d;a.Wa=e;a.Na=f;a.A=[];if("preload"!=a.mode){b=Array(a.sb);for(c=0;c<b.length;c++){d=Array(a.gb);for(e=0;e<d.length;e++){f=Array(a.Wa);for(var g=1;g<=f.length;g++)f[g-1]=tv(null,c,e,g,a.Na,"local"==a.mode?0:null);d[e]=f}b[c]=d}a.A=b}a.K=null}
|
||||
l.load=function(a,b,c,d,e){var f=b;if(this.J)return!0;this.kd=a;this.H=b;this.Ig=pa(b);var g=this;this.J=d;this.P=e||this.controller;if(c){var h=new FileReader;h.onload=function(){var a=h.result,b,c=a?a.byteLength:0,d=fa[c];if(d){g.sb=d[0];g.gb=d[1];g.Wa=d[2];g.Na=d[3]||512;b=g.Na>>2;var e=d=0,a=new DataView(a,0,c);g.A=Array(g.sb);for(c=0;c<g.A.length;c++)for(var f=g.A[c]=Array(g.gb),k=0;k<f.length;k++)for(var J=f[k]=Array(g.Wa),P=0;P<J.length;P++){for(var K=tv(null,c,k,P+1,g.Na,0),ka=K.data,Z=0;Z<
|
||||
b;Z++,e+=4)var jb=ka[Z]=a.getInt32(e,!0),d=d+jb&-1;K.Oc=b;J[P]=K}g.K=d;b=g}else g.Da("Unrecognized disk format ("+c+" bytes)");g.J&&(g.J.call(g.controller,g.B,b,g.kd,g.H),g.J=null)};h.readAsArrayBuffer(c);return!0}0>b.indexOf("/api/v1/dump")&&(a=ra(b),"json"==a||"gz"==a?f=encodeURI(b):"demandrw"==this.mode||"demandro"==this.mode?(f=uv(this,b),this.mg=!0):(c="path",d="&mbhd=10",!b.indexOf("http:")||!b.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(a)?(c="disk",d="&mbhd=0"):sa(b,
|
||||
"/")&&(c="dir"),f=Ga()+"/api/v1/dump?"+c+"="+encodeURIComponent(b)+(this.Oe?"":d)+"&format=json"));var k="Loading "+f+"...";return!!Fa(f,null,!0,function(a,b,c){vv(g,a,b,c)},function(){g.O(k,Fb.Ee)})};
|
||||
function vv(a,b,c,d){var e=null;a.Re=!1;var f=!(!(0>d&&a.oa)||a.oa.Z.bc);if(a.mg)d?a.Da('Unable to connect to disk "'+a.H+'" (error '+d+": "+c+")",f):(a.D=!0,wv(a),e=a);else if(d)a.Da('Unable to load disk "'+a.kd+'" (error '+d+": "+b+")",f);else{nb(a.controller.ee,b,c);try{if(0<pa(a.Ig,!0).toLowerCase().indexOf("-readonly"))a.Re=!0;else{var g=c.indexOf("\n");0<g&&1024>g&&0<c.substring(0,g).indexOf("write-protected")&&(a.Re=!0)}var h;"<"==c.substr(0,1)?h=["Missing disk image: "+a.kd]:h=0>c.indexOf("0x")&&
|
||||
'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+c+")");if(h.length)if(1==h.length)ab(h[0]);else{a.sb=h.length;a.gb=h[0].length;a.Wa=h[0][0].length;var k=h[0][0][0];a.Na=k&&k.length||512;for(d=c=0;d<a.sb;d++)for(f=0;f<a.gb;f++)for(g=0;g<a.Wa;g++)if(k=h[d][f][g]){var m=k.length;void 0===m&&(m=k.length=512);var m=m>>2,p=k.pattern;void 0===p&&(p=k.pattern=0);var v=k.data;if(void 0===v){var u=k.bytes;if(void 0!==u&&u.length){for(var D=m<<2,G=u.length;G<
|
||||
D;G++)u[G]=p;sv(k,u,0)}else k.data=v=[],u&&(k.pattern=p|p<<8|p<<16|p<<24);delete k.bytes}ov(k,d,f);for(D=0;D<v.length;D++)c=c+v[D]&-1}a.A=h;a.K=c;rv(a);e=a}else ab("Empty disk image: "+a.kd)}catch(I){ab("Disk image error ("+b+"): "+I.message)}}a.J&&(a.J.call(a.P,a.B,e,a.kd,a.H),a.J=null)}
|
||||
function rv(a){var b,c,d={},e;if(a.C&&a.C.length)for(b=a.A,c=0;c<b.length;c++)for(var f=0;f<b[c].length;f++)for(e=0;e<b[c][f].length;e++){var g=b[c][f][e];g&&(delete g.file,delete g.pn)}a.C=[];d.Jf=d.sf=0;b=a.sb*a.gb*a.Wa*a.Na;a.D&&a.log("ignore any synchronous XMLHttpRequest warnings here (for now)");if(e=tv(a,0)){d.Na=uv(a,e,11,2);if(d.Na!=a.Na){f=!1;d.rf=1;d.ug=12;d.lh=d.rf+2;d.wf=1;d.Na=a.Na;if(163840==b&&254==vv(a,d,0,0))d.sf=320,d.th=64,f=!0;else if(327680==b&&255==vv(a,d,0,0))d.sf=640,d.th=
|
||||
112,d.wf++,f=!0;else for(c=446,b=0;4>b;b++){if(128==uv(a,e,c+0,1)){d.Jf=uv(a,e,c+8,4);(e=tv(a,d.Jf))&&(f=!0);break}c+=16}if(!f)return}d.sf||(d.sf=uv(a,e,19,2)||uv(a,e,32,4),d.rf=uv(a,e,14,2),d.lh=d.rf+uv(a,e,22,2)*uv(a,e,16,1),d.th=uv(a,e,17,2),d.wf=uv(a,e,13,1));d.jh=d.lh+((32*d.th+(d.Na-1))/d.Na|0);d.gn=(d.sf-d.jh)/d.wf|0;d.ug=4084>=d.gn?12:16;d.Il=12==d.ug?4086:65526;b=[];for(e=d.lh;e<d.jh;e++)b.push(d.Jf+e);wv(a,d,a.Ig,"",b);for(b=0;b<a.C.length;b++){d=a.C[b];for(e=c=0;e<d.ie.length;e++){var f=
|
||||
d.ie[e],g=c,h=a.gb*a.Wa,k=f%h,m=k/a.Wa|0,k=k%a.Wa,p=void 0,v=void 0,u=void 0;(p=a.A[f/h|0])&&(v=p[m])&&(u=v[k])&&!u.file&&(u.file=d,u.pn=g);c+=a.Na}e=d;if((sa(e.dc,".EXE")||sa(e.dc,".DLL")||sa(e.dc,".DRV"))&&xv(e,yv)==zv&&xv(e,Av)==Bv&&(c=xv(e,Cv),xv(e,Dv,c)==Ev)){m=xv(e,Fv,c);g=xv(e,Gv,c);h=xv(e,Hv,c);if(g&&m){d=e;f=g+c;g=m;h=h||0;m=1;d.sd=[];for(d.A=[];g--;){if(k=Iv(d,f)<<h)p=Iv(d,f+2)||65536,d.sd[m++]={ei:k,Hk:k+p-1,he:[]};f+=8}d.sd[254]={ei:0,Hk:0,he:[]}}g=xv(e,Jv,c);h=xv(e,Kv,c);if(g&&h)for(d=
|
||||
e,f=g+=c,g+=h,h=1;f<g;){k=Iv(d,f);m=k&255;if(!m)break;k>>=8;f+=2;if(k)for(;m--;)Iv(d,f,1),254>=k?(p=k,v=Iv(d,f+1),f+=3):(p=Iv(d,f+3,1),v=Iv(d,f+4),f+=6),d.sd[p]&&(d.sd[p].he[h]=[v]),d.A[h]=[p,v],h++;else h+=m}(g=xv(e,Lv,c))&&Mv(e,g+c);g=xv(e,Nv,c);h=xv(e,Ov,c);g&&h&&Mv(e,g,g+h)}}}}
|
||||
function wv(a,b,c,d,e){var f,g=a.C.length,h=b.Na/32|0;b.mq=d+"\\";for(var k=0;k<e.length;k++)for(var m=e[k],p=0;p<h;p++){var v=a,u=b;f=p;u.de&&u.gi&&u.gi==m||(u.gi=m,u.de=tv(v,u.gi));if(u.de){f*=32;var D=uv(v,u.de,f,1);if(D){if(229==D)u.dc=null;else{u.dc=wa(Pv(v,u.de,f+0,8));D=wa(Pv(v,u.de,f+8,3));D.length&&(u.dc+="."+D);u.Vg=uv(v,u.de,f+11,1);u.$i=uv(v,u.de,f+28,2);u.Hl=uv(v,u.de,f+26,2);f=u;var D=[],G=u.Hl;if(G){do{if(2>G)break;for(var I=u.jh+(G-2)*u.wf,J=0;J<u.wf;J++)D.push(u.Jf+I++);G=vv(v,u,
|
||||
G,0)|vv(v,u,G,1)}while(G<=u.Il)}f.ie=D}f=!0}else f=!1}else f=!1;if(!f){k=e.length;break}null!=b.dc&&"."!=b.dc&&".."!=b.dc&&(f=new Qv(a,0,b.dc,b.Vg,b.$i,b.ie),a.C.push(f))}for(e=a.C.length;g<e;g++)f=a.C[g],f.Vg&16&&f.ie.length&&wv(a,b,c,d+"\\"+f.dc,f.ie)}function vv(a,b,c,d){var e=0,f=8*b.Na;c=b.ug*c+(d?8:0);var g=c/f|0;b.ji&&b.kh&&b.kh==b.rf+g||(b.kh=b.rf+g,b.ji=tv(a,b.Jf+b.kh));b.ji&&(c=c%f|0,e=uv(a,b.ji,c>>3,1),d?e=16==b.ug?e<<8:c&7?e<<4:(e&15)<<8:c&7&&(e>>=4));return e}
|
||||
function tv(a,b){var c=a.gb*a.Wa,d=b/c|0;return d<a.sb?(b%=c,a.seek(d,b/a.Wa|0,b%a.Wa+1)):null}function uv(a,b,c,d){for(var e=0,f=0;d--;){var g=a.read(b,c++);if(0>g)break;e|=g<<f;f+=8}return e}function Pv(a,b,c,d){for(var e="";d--;){var f=a.read(b,c++);if(0>=f)break;e+=String.fromCharCode(f)}return e}function ov(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.Jl=b;a.Kl=c;a.hd=a.Oc=0;a.Oa=!1;return a}
|
||||
function pv(a,b){b="action=open&volume="+b+("&mode="+a.mode);b+="&chs="+a.sb+":"+a.gb+":"+a.Wa+":"+a.Na;b+="&machine="+mv(a.controller);b+="&user="+nv(a.controller);return Ga()+"/api/v1/disk?"+b}
|
||||
function Rv(a,b,c,d,e,f,g){if(a.D){var h;h="action=read&volume="+a.H;h+="&chs="+a.sb+":"+a.gb+":"+a.Wa+":"+a.Na;h=h+("&addr="+b+":"+c+":"+d+":"+e)+("&machine="+mv(a.controller));h+="&user="+nv(a.controller);Fa(Ga()+"/api/v1/disk?"+h,null,f,function(h,m,p){h=[b,c,d,e,f,g];var k=!1,u=h[0],D=h[1],G=h[2],I=h[3];if(!p){m=JSON.parse(m);for(k=0;I--;){var J=a.seek(u,D,G,!0);if(!J)break;sv(J,m,k);k+=J.length;G++}k=h[4]}(h=h[5])&&h(p,k)})}else g&&g(-1,!1)}
|
||||
function Sv(a,b,c,d,e,f,g){if(a.D){var h={};a.M=!0;h.action="write";h.volume=a.H;h.chs=a.sb+":"+a.gb+":"+a.Wa+":"+a.Na;h.addr=b+":"+c+":"+d+":"+e;h.machine=mv(a.controller);h.user=nv(a.controller);h.data=JSON.stringify(f);Fa(Ga()+"/api/v1/disk",h,g,function(f,h,p){var k=[b,c,d,e,g];f=k[0];h=k[1];var m=k[2],D=k[3],k=k[4];a.M=!1;if(0<=f&&f<a.A.length&&0<=h&&h<a.A[f].length)for(--m;0<D--&&0<=m&&m<a.A[f][h].length;m++){var G=a.A[f][h][m];p?Tv(a,G,!1):G.Oa||(G.hd=G.Oc=0)}k&&Uv(a)})}return!1}
|
||||
function Tv(a,b,c){b.Oa=!0;var d=a.I.indexOf(b);0<=d&&(a.I.splice(d,1),a.L.splice(d,1));a.I.push(b);a.L.push(Ea());c&&Uv(a)}function Uv(a){if(a.I.length){var b=a.L[0]+2E3;a.F&&a.N<b&&(clearTimeout(a.F),a.F=null);if(!a.F){var c=Ea(),b=b-c;0>b&&(b=0);2E3<b&&(b=2E3);a.F=setTimeout(function(){lv(a,!0)},b);a.N=c+b}}else a.F&&(clearTimeout(a.F),a.F=null)}
|
||||
function lv(a,b){b&&(a.F=null);var c=a.I[0];if(c){for(var d=c.Jl,e=c.Kl,c=c.sector,f=0,g=[],h=c-1;h<a.A[d][e].length;h++){var k=a.A[d][e][h];if(!k.Oa)break;var m=a.I.indexOf(k);a.I.splice(m,1);a.L.splice(m,1);g=g.concat(Vv(k));k.Oa=!1;f++}a=Sv(a,d,e,c,f,g,b);return b||a}return!1}l.info=function(){return this.A.length?[this.A.length,this.A[0].length,this.A[0][0].length,this.A[0][0][0].length]:[0,0,0,0]};
|
||||
l.seek=function(a,b,c,d,e){var f=null,g=this.B,h=this.A[a];if(h){var k=h[b];if(!k&&g.Xg&&b<g.gb){k=h[b]=Array(g.Wd);for(h=0;h<k.length;h++)k[h]=ov(null,a,b,h+1,g.yb,0);this.gb<=b&&(this.gb=b+1)}if(k){for(h=0;h<k.length;h++)if(k[h]&&k[h].sector==c){f=k[h];if(null===f.pattern)if(d)f.pattern=0;else{for(d=1;++h<k.length;)null===k[h].pattern&&d++;Rv(this,a,b,c,d,!!e,function(a,b){a&&(f=null);e&&e(f,b)});return e?null:f}break}!f&&g.Xg&&9==g.jb&&(f=k[h]=ov(null,a,b,g.jb,g.yb,0),this.Wa<g.jb&&(this.Wa=g.jb))}}e&&
|
||||
e(f,!1);return f};function sv(a,b,c){for(var d=a.length>>2,e=Array(d),f=0;f<d;f++)e[f]=b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24,c+=4;a.data=e}function Vv(a){var b=a.length,c=Array(b),d=0,b=b>>2,e=a.data;a=a.pattern;for(var f=0;f<b;f++){var g=f<e.length?e[f]:a;c[d++]=g&255;c[d++]=g>>8&255;c[d++]=g>>16&255;c[d++]=g>>24&255}return c}l.read=function(a,b){var c=-1;if(a&&b<a.length)var c=a.data,d=b>>2,c=(d<c.length?c[d]:a.pattern)>>((b&3)<<3)&255;return c};
|
||||
l.write=function(a,b,c){if(this.Re)return!1;if(b<a.length){if(c!=this.read(a,b,!0)){var d=a.data,e=a.pattern,f=b>>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Oc?f<a.hd?(a.Oc+=a.hd-f,a.hd=f):f>=a.hd+a.Oc&&(a.Oc+=f-(a.hd+a.Oc)+1):(a.hd=f,a.Oc=1);d[f]=d[f]&~(255<<b)|c<<b;this.D&&Tv(this,a,!0)}return!0}return null};function Wv(a){for(var b="",c=0,d;d=tv(a,c++);)for(var e=0,f=d.length;e<f;e++)b+=String.fromCharCode(uv(a,d,e,1));return btoa(b)}
|
||||
D;G++)u[G]=p;xv(k,u,0)}else k.data=v=[],u&&(k.pattern=p|p<<8|p<<16|p<<24);delete k.bytes}tv(k,d,f);for(D=0;D<v.length;D++)c=c+v[D]&-1}a.A=h;a.K=c;wv(a);e=a}else ab("Empty disk image: "+a.kd)}catch(I){ab("Disk image error ("+b+"): "+I.message)}}a.J&&(a.J.call(a.P,a.B,e,a.kd,a.H),a.J=null)}
|
||||
function wv(a){var b,c,d={},e;if(a.C&&a.C.length)for(b=a.A,c=0;c<b.length;c++)for(var f=0;f<b[c].length;f++)for(e=0;e<b[c][f].length;e++){var g=b[c][f][e];g&&(delete g.file,delete g.tn)}a.C=[];d.Jf=d.sf=0;b=a.sb*a.gb*a.Wa*a.Na;a.D&&a.log("ignore any synchronous XMLHttpRequest warnings here (for now)");if(e=yv(a,0)){d.Na=zv(a,e,11,2);if(d.Na!=a.Na){f=!1;d.rf=1;d.ug=12;d.lh=d.rf+2;d.wf=1;d.Na=a.Na;if(163840==b&&254==Av(a,d,0,0))d.sf=320,d.th=64,f=!0;else if(327680==b&&255==Av(a,d,0,0))d.sf=640,d.th=
|
||||
112,d.wf++,f=!0;else for(c=446,b=0;4>b;b++){if(128==zv(a,e,c+0,1)){d.Jf=zv(a,e,c+8,4);(e=yv(a,d.Jf))&&(f=!0);break}c+=16}if(!f)return}d.sf||(d.sf=zv(a,e,19,2)||zv(a,e,32,4),d.rf=zv(a,e,14,2),d.lh=d.rf+zv(a,e,22,2)*zv(a,e,16,1),d.th=zv(a,e,17,2),d.wf=zv(a,e,13,1));d.jh=d.lh+((32*d.th+(d.Na-1))/d.Na|0);d.mn=(d.sf-d.jh)/d.wf|0;d.ug=4084>=d.mn?12:16;d.Il=12==d.ug?4086:65526;b=[];for(e=d.lh;e<d.jh;e++)b.push(d.Jf+e);Bv(a,d,a.Ig,"",b);for(b=0;b<a.C.length;b++){d=a.C[b];for(e=c=0;e<d.ie.length;e++){var f=
|
||||
d.ie[e],g=c,h=a.gb*a.Wa,k=f%h,m=k/a.Wa|0,k=k%a.Wa,p=void 0,v=void 0,u=void 0;(p=a.A[f/h|0])&&(v=p[m])&&(u=v[k])&&!u.file&&(u.file=d,u.tn=g);c+=a.Na}e=d;if((sa(e.dc,".EXE")||sa(e.dc,".DLL")||sa(e.dc,".DRV"))&&Cv(e,Dv)==Ev&&Cv(e,Fv)==Gv&&(c=Cv(e,Hv),Cv(e,Iv,c)==Jv)){m=Cv(e,Kv,c);g=Cv(e,Lv,c);h=Cv(e,Mv,c);if(g&&m){d=e;f=g+c;g=m;h=h||0;m=1;d.sd=[];for(d.A=[];g--;){if(k=Nv(d,f)<<h)p=Nv(d,f+2)||65536,d.sd[m++]={ei:k,Hk:k+p-1,he:[]};f+=8}d.sd[254]={ei:0,Hk:0,he:[]}}g=Cv(e,Ov,c);h=Cv(e,Pv,c);if(g&&h)for(d=
|
||||
e,f=g+=c,g+=h,h=1;f<g;){k=Nv(d,f);m=k&255;if(!m)break;k>>=8;f+=2;if(k)for(;m--;)Nv(d,f,1),254>=k?(p=k,v=Nv(d,f+1),f+=3):(p=Nv(d,f+3,1),v=Nv(d,f+4),f+=6),d.sd[p]&&(d.sd[p].he[h]=[v]),d.A[h]=[p,v],h++;else h+=m}(g=Cv(e,Qv,c))&&Rv(e,g+c);g=Cv(e,Sv,c);h=Cv(e,Tv,c);g&&h&&Rv(e,g,g+h)}}}}
|
||||
function Bv(a,b,c,d,e){var f,g=a.C.length,h=b.Na/32|0;b.uq=d+"\\";for(var k=0;k<e.length;k++)for(var m=e[k],p=0;p<h;p++){var v=a,u=b;f=p;u.de&&u.gi&&u.gi==m||(u.gi=m,u.de=yv(v,u.gi));if(u.de){f*=32;var D=zv(v,u.de,f,1);if(D){if(229==D)u.dc=null;else{u.dc=wa(Uv(v,u.de,f+0,8));D=wa(Uv(v,u.de,f+8,3));D.length&&(u.dc+="."+D);u.Vg=zv(v,u.de,f+11,1);u.$i=zv(v,u.de,f+28,2);u.Hl=zv(v,u.de,f+26,2);f=u;var D=[],G=u.Hl;if(G){do{if(2>G)break;for(var I=u.jh+(G-2)*u.wf,J=0;J<u.wf;J++)D.push(u.Jf+I++);G=Av(v,u,
|
||||
G,0)|Av(v,u,G,1)}while(G<=u.Il)}f.ie=D}f=!0}else f=!1}else f=!1;if(!f){k=e.length;break}null!=b.dc&&"."!=b.dc&&".."!=b.dc&&(f=new Vv(a,0,b.dc,b.Vg,b.$i,b.ie),a.C.push(f))}for(e=a.C.length;g<e;g++)f=a.C[g],f.Vg&16&&f.ie.length&&Bv(a,b,c,d+"\\"+f.dc,f.ie)}function Av(a,b,c,d){var e=0,f=8*b.Na;c=b.ug*c+(d?8:0);var g=c/f|0;b.ji&&b.kh&&b.kh==b.rf+g||(b.kh=b.rf+g,b.ji=yv(a,b.Jf+b.kh));b.ji&&(c=c%f|0,e=zv(a,b.ji,c>>3,1),d?e=16==b.ug?e<<8:c&7?e<<4:(e&15)<<8:c&7&&(e>>=4));return e}
|
||||
function yv(a,b){var c=a.gb*a.Wa,d=b/c|0;return d<a.sb?(b%=c,a.seek(d,b/a.Wa|0,b%a.Wa+1)):null}function zv(a,b,c,d){for(var e=0,f=0;d--;){var g=a.read(b,c++);if(0>g)break;e|=g<<f;f+=8}return e}function Uv(a,b,c,d){for(var e="";d--;){var f=a.read(b,c++);if(0>=f)break;e+=String.fromCharCode(f)}return e}function tv(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.Jl=b;a.Kl=c;a.hd=a.Oc=0;a.Oa=!1;return a}
|
||||
function uv(a,b){b="action=open&volume="+b+("&mode="+a.mode);b+="&chs="+a.sb+":"+a.gb+":"+a.Wa+":"+a.Na;b+="&machine="+rv(a.controller);b+="&user="+sv(a.controller);return Ga()+"/api/v1/disk?"+b}
|
||||
function Wv(a,b,c,d,e,f,g){if(a.D){var h;h="action=read&volume="+a.H;h+="&chs="+a.sb+":"+a.gb+":"+a.Wa+":"+a.Na;h=h+("&addr="+b+":"+c+":"+d+":"+e)+("&machine="+rv(a.controller));h+="&user="+sv(a.controller);Fa(Ga()+"/api/v1/disk?"+h,null,f,function(h,m,p){h=[b,c,d,e,f,g];var k=!1,u=h[0],D=h[1],G=h[2],I=h[3];if(!p){m=JSON.parse(m);for(k=0;I--;){var J=a.seek(u,D,G,!0);if(!J)break;xv(J,m,k);k+=J.length;G++}k=h[4]}(h=h[5])&&h(p,k)})}else g&&g(-1,!1)}
|
||||
function Xv(a,b,c,d,e,f,g){if(a.D){var h={};a.M=!0;h.action="write";h.volume=a.H;h.chs=a.sb+":"+a.gb+":"+a.Wa+":"+a.Na;h.addr=b+":"+c+":"+d+":"+e;h.machine=rv(a.controller);h.user=sv(a.controller);h.data=JSON.stringify(f);Fa(Ga()+"/api/v1/disk",h,g,function(f,h,p){var k=[b,c,d,e,g];f=k[0];h=k[1];var m=k[2],D=k[3],k=k[4];a.M=!1;if(0<=f&&f<a.A.length&&0<=h&&h<a.A[f].length)for(--m;0<D--&&0<=m&&m<a.A[f][h].length;m++){var G=a.A[f][h][m];p?Yv(a,G,!1):G.Oa||(G.hd=G.Oc=0)}k&&Zv(a)})}return!1}
|
||||
function Yv(a,b,c){b.Oa=!0;var d=a.I.indexOf(b);0<=d&&(a.I.splice(d,1),a.L.splice(d,1));a.I.push(b);a.L.push(Ea());c&&Zv(a)}function Zv(a){if(a.I.length){var b=a.L[0]+2E3;a.F&&a.N<b&&(clearTimeout(a.F),a.F=null);if(!a.F){var c=Ea(),b=b-c;0>b&&(b=0);2E3<b&&(b=2E3);a.F=setTimeout(function(){qv(a,!0)},b);a.N=c+b}}else a.F&&(clearTimeout(a.F),a.F=null)}
|
||||
function qv(a,b){b&&(a.F=null);var c=a.I[0];if(c){for(var d=c.Jl,e=c.Kl,c=c.sector,f=0,g=[],h=c-1;h<a.A[d][e].length;h++){var k=a.A[d][e][h];if(!k.Oa)break;var m=a.I.indexOf(k);a.I.splice(m,1);a.L.splice(m,1);g=g.concat($v(k));k.Oa=!1;f++}a=Xv(a,d,e,c,f,g,b);return b||a}return!1}l.info=function(){return this.A.length?[this.A.length,this.A[0].length,this.A[0][0].length,this.A[0][0][0].length]:[0,0,0,0]};
|
||||
l.seek=function(a,b,c,d,e){var f=null,g=this.B,h=this.A[a];if(h){var k=h[b];if(!k&&g.Xg&&b<g.gb){k=h[b]=Array(g.Wd);for(h=0;h<k.length;h++)k[h]=tv(null,a,b,h+1,g.yb,0);this.gb<=b&&(this.gb=b+1)}if(k){for(h=0;h<k.length;h++)if(k[h]&&k[h].sector==c){f=k[h];if(null===f.pattern)if(d)f.pattern=0;else{for(d=1;++h<k.length;)null===k[h].pattern&&d++;Wv(this,a,b,c,d,!!e,function(a,b){a&&(f=null);e&&e(f,b)});return e?null:f}break}!f&&g.Xg&&9==g.jb&&(f=k[h]=tv(null,a,b,g.jb,g.yb,0),this.Wa<g.jb&&(this.Wa=g.jb))}}e&&
|
||||
e(f,!1);return f};function xv(a,b,c){for(var d=a.length>>2,e=Array(d),f=0;f<d;f++)e[f]=b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24,c+=4;a.data=e}function $v(a){var b=a.length,c=Array(b),d=0,b=b>>2,e=a.data;a=a.pattern;for(var f=0;f<b;f++){var g=f<e.length?e[f]:a;c[d++]=g&255;c[d++]=g>>8&255;c[d++]=g>>16&255;c[d++]=g>>24&255}return c}l.read=function(a,b){var c=-1;if(a&&b<a.length)var c=a.data,d=b>>2,c=(d<c.length?c[d]:a.pattern)>>((b&3)<<3)&255;return c};
|
||||
l.write=function(a,b,c){if(this.Re)return!1;if(b<a.length){if(c!=this.read(a,b,!0)){var d=a.data,e=a.pattern,f=b>>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Oc?f<a.hd?(a.Oc+=a.hd-f,a.hd=f):f>=a.hd+a.Oc&&(a.Oc+=f-(a.hd+a.Oc)+1):(a.hd=f,a.Oc=1);d[f]=d[f]&~(255<<b)|c<<b;this.D&&Yv(this,a,!0)}return!0}return null};function aw(a){for(var b="",c=0,d;d=yv(a,c++);)for(var e=0,f=d.length;e<f;e++)b+=String.fromCharCode(zv(a,d,e,1));return btoa(b)}
|
||||
l.save=function(){var a=0,b=[];b[a++]=[this.H,this.K,this.sb,this.gb,this.Wa,this.Na];if(!this.D&&!this.Re)for(var c=this.A,d=0;d<c.length;d++)for(var e=0;e<c[d].length;e++)for(var f=0;f<c[d][e].length;f++){var g=c[d][e][f];if(g&&g.Oc){for(var h=[],k=0,m=g.hd,p=g.hd+g.Oc;m<p;)h[k++]=g.data[m++];b[a++]=[d,e,f,g.hd,h]}}return b};
|
||||
l.restore=function(a){var b=0,c="unsupported restore format";if(a&&0<a.length){var d=0,e=a[d++];e&&2<=e.length&&(!this.A.length&&6<=e.length?kv(this,"local",e[2],e[3],e[4],e[5]):null!=e[0]&&null!=e[1]&&null!=this.K&&e[1]!=this.K&&(c="original checksum ("+e[1]+") differs from current checksum ("+this.K+")",b=-2));for(this.A.length||(b=-1);d<a.length&&0<=b;){var f=0,g=a[d++],h=g[f++],k=g[f++],m=g[f++];if(h>=this.A.length||k>=this.A[h].length||m>=this.A[h][k].length){c="sector (CHS="+h+":"+k+":"+m+") out of range ("+
|
||||
b+" changes applied)";b=-1;break}if(this.Re){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.A[h][k][m]){for(k=h.data.length;k<e;)h.data[k++]=h.pattern;k=0;h.hd=e;for(h.Oc=f.length;e<g;)h.data[e++]=f[k++];b++}}}0>b?-2!=b&&this.Da("Unable to restore disk '"+this.kd+": "+c):rv(this);return b};
|
||||
l.toJSON=function(){var a;a=0;for(var b;b=tv(this,a++);)Xv(b);a=JSON.stringify(this.A,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")};
|
||||
function Xv(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}var jv=0;function Qv(a,b,c,d,e,f){this.va=a;this.dc=c;this.Vg=d;this.$i=e;this.ie=f}function Iv(a,b,c){var d;c=c||2;var e=b&511,f=tv(a.va,a.ie[b>>9]);if(f){if(e+c<=f.length)return uv(a.va,f,e,c);for(e=d=0;c--;)d|=Iv(a,b++,1)<<e,e+=8}return d}function xv(a,b,c){return Iv(a,b[0]+(c||0),b[1])}
|
||||
function Mv(a,b,c){for(var d=0;!c||b<c;){var e=Iv(a,b,1);if(!e)break;var f;f=a;var g=b+1,h=e,k="";for(h||(h=-1);h--;){var m=Iv(f,g++,1);if(!m)break;k+=String.fromCharCode(m)}f=k;if(!f)break;b+=1+e;if(d){if(e=Iv(a,b),g=a.A[e])g=g[0],a.sd[g]&&a.sd[g].he[e].push(f)}else c||(a.Of=f);b+=2;d++}}
|
||||
Qv.prototype.uj=function(a,b){var c=null;if(this.sd)for(var d in this.sd){var e=this.sd[d];if(a>=e.ei&&a<=e.Hk){d=a-=e.ei;var f,g;for(g in e.he){var h=e.he[g],k=a-h[0];if(!k){c=this.Of+"!"+h[1];break}b&&0<k&&k<d&&(f=h,d=k)}!c&&f&&(c=this.Of+"!"+f[1]+"+"+q(d,0,!0));break}}return c||this.dc+"+"+q(a,0,!0)};var zv=23117,yv=[0,2],Av=[24,2],Cv=[60,4],Bv=64,Ev=17742,Dv=[0,2],Jv=[4,2],Kv=[6,2],Fv=[28,2],Ov=[32,2],Gv=[34,2],Lv=[38,2],Nv=[44,4],Hv=[50,2];
|
||||
function Yv(a){ib.call(this,"FDC",a,524288);this.dmaRead=Yv.prototype.gl;this.dmaWrite=Yv.prototype.hl;this.dmaFormat=Yv.prototype.yl;this.M=Zv(a.autoMount);this.J=a.sortBy||"name";"none"==this.J&&(this.J=null);this.B=[];this.L=!Ma("Mobi")&&window&&"FileReader"in window;this.exports={loadDisk:this.Dj,wait:this.To}}ba(Yv,ib);l=Yv.prototype;
|
||||
l.Eb=function(a,b,c){var d=this;switch(b){case "listDisks":this.ma[b]=c;if(this.J){b=[];for(a=0;a<c.options.length;a++)b.push(c.options[a]);b.sort(function(a,b){return"path"!=d.J?a.text.localeCompare(b.text):a.value.localeCompare(b.value)});for(a=0;a<b.length;a++)try{c.options[a]=b[a]}catch(e){break}}c.onchange=function(){$v(d)};return!0;case "descDisk":case "listDrives":return this.ma[b]=c,c.onchange=function(){var a=ia(c.value,10);null!=a&&aw(d,a)},!0;case "loadDisk":return this.ma[b]=c,c.onclick=
|
||||
function(){d.Dj()},!0;case "saveDisk":if(!this.L){c.parentNode.removeChild(c);break}this.ma[b]=c;c.onclick=function(){var a=d.ma.listDrives;a&&a.options&&d.A&&((a=d.A[ia(a.value,10)||0])?(a=a.va)?(a=Ta(Wv(a),"octet-stream",!0,a.Ig.replace(".json",".img")),ab(a)):d.Da("No diskette loaded in drive."):d.Da("No diskette drive selected."))};return!0;case "mountDisk":if(this.L)return this.ma[b]=c,c.onchange=function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length},c.onsubmit=function(a){if(a=
|
||||
a.currentTarget[1].files[0]){var b=a.name;bw(d,pa(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};l.uc=function(a,b,c,d){this.na=b;this.G=c;this.ca=d;this.oa=a;this.V=Vb(a,"ChipSet");Zv(ud(this.oa,"autoMount"),this.M);cw(this);Ic(b,this,dw);Mc(b,this,ew);fw(this,"None","",!0);this.L&&fw(this,"Local Disk","?");fw(this,"Remote Disk","??");gw(this)||Jb(this)};
|
||||
function Zv(a,b){if(a){if("string"==typeof a)try{a=eval("("+a+")")}catch(d){ab("FDC auto-mount error: "+d.message+" ("+a+")"),a={}}}else a={};for(var c in a)b&&(b[c]=a[c]);return a}
|
||||
l.ac=function(a,b){if(!b){if(!a){if(this.reset(),this.oa.aa){this.B=[];for(a=0;a<this.A.length;a++)hw(this,a,!0);gw(this,!0)}}else if(!this.restore(a))return!1;if(a=this.ma.listDrives){for(;a.firstChild;)a.removeChild(a.firstChild);a.value="";for(b=0;b<this.N;b++){var c=document.createElement("option");c.value=b;c.text=String.fromCharCode(65+b)+":";a.appendChild(c)}0<this.N&&(a.value="0",aw(this,0))}}return!0};l.$b=function(a){return a?this.save():!0};l.reset=function(){cw(this)};
|
||||
l.save=function(){var a=new Wf(this);a.set(0,iw(this));return a.data()};l.restore=function(a){return cw(this,a[0])};
|
||||
function cw(a,b){var c=0,d,e=!0;b||(b=[0,0,jw,Array(9),0,0,0,[]]);a.Ya=b[c++];c++;a.ga=b[c++];a.F=b[c++];a.D=b[c++];a.C=b[c++];a.I=b[c++];var f=b[c++];d=b[c++];null!=d&&(a.B=d);void 0===a.A&&(a.N=4,a.V&&(a.N=+Tl(a.V,gl,void 0)),a.A=Array(4));for(d=0;d<a.A.length;d++){var g=a.A[d];if(void 0===g){var g=a.A[d]={},h;if(a.V)a:{h=a.V;if(d<+Tl(h,gl,void 0)){if(!h.L){h=360;break a}if(d<h.L.length){h=h.L[d];break a}}h=0}else h=0;switch(h){case 160:case 180:g.gb=1;default:g.sb=40;g.Wa=9;break;case 720:g.sb=
|
||||
80;g.Wa=9;break;case 1200:g.sb=80;g.Wa=15;break;case 1440:g.sb=80,g.Wa=18}}var k=a,m=d,p=f[d],v=0;h=!0;g.Ya=m;g.pe=g.Ne=!1;g.Se=null;p||(p=[kw,!0,0,2,0]);"boolean"==typeof p[1]&&(p[1]=[lw,g.sb||40,g.gb||p[3],g.Wa||9,g.Na||512,p[1],g.tg,g.yf,g.zf]);g.tb=p[v++];var u=p[v++];g.name=u[0];g.sb=u[1];g.gb=u[2];g.Wa=u[3];g.Na=u[4];g.Oe=u[5];(g.tg=u[6])?(g.yf=u[7],g.zf=u[8]):(g.tg=g.sb,g.yf=g.gb,g.zf=g.Wa);g.bb=p[v++];g.Vd=p[v++];g.Ib=p[v++];g.Vd=100<=g.Vd?g.Vd-100:g.Vd-g.Ib;g.jb=p[v++];g.Wd=p[v++];g.yb=p[v++];
|
||||
g.Va=p[v++];g.hb=null;g.va||(g.ye="");var D=p[v++];102==D&&(D=!1);"boolean"==typeof D?(u=p[v++],p=p[v],D?(v=k.A[m],hw(k,m,!0,!0),v.Ne=!0,m=new iv(k,v,"preload"),k.kj(v,m,u,p,!0)):mw(k,m,u,p,!0)?g.va&&p&&nw(k,u,p,g.va):Jb(k,!1)):void 0!==D&&g.va&&0>g.va.restore(D)&&(h=!1);h&&g.va&&void 0!==g.Va&&(g.hb=g.va.seek(g.Ib,g.bb,g.jb));h||(e=!1)}a.H=b[c++]||0;a.cc=b[c]||ow;return e}
|
||||
function iw(a){var b=0,c=[];c[b++]=a.Ya;c[b++]=0;c[b++]=a.ga;c[b++]=a.F;c[b++]=a.D;c[b++]=a.C;c[b++]=a.I;for(var d=b++,e=0,f=[],g=0;g<a.A.length;g++){var h=e++,k=a.A[g],m=0,p=[];p[m++]=k.tb;p[m++]=[k.name,k.sb,k.gb,k.Wa,k.Na,k.Oe,k.tg,k.yf,k.zf];p[m++]=k.bb;p[m++]=k.Vd+100;p[m++]=k.Ib;p[m++]=k.jb;p[m++]=k.Wd;p[m++]=k.yb;p[m++]=k.Va;p[m++]=k.Ne;p[m++]=k.Yk;p[m]=k.ye;f[h]=p}c[d]=f;d=b++;for(e=0;e<a.A.length;e++)f=a.A[e],f.va&&pw(a,f.ye,f.va);c[d]=a.B;c[b++]=a.H;c[b]=a.cc;return c}
|
||||
l.fj=function(a){var b;a=this.A[a];if(void 0!==a){b={};for(var c in a)b[c]=a[c]}return b};l.Zk=function(a,b,c){if(a.va){var d=a.va.info(),e=d[2],f=d[1]*e;if(b+c<=d[0]*f)return a.Ib=Math.floor(b/f),b%=f,a.bb=Math.floor(b/e),a.jb=b%e+1,a.yb=c*d[3],a.tb=qw,!0}return!1};
|
||||
function gw(a,b){b||(a.K=0);for(var c in a.M){var d=a.M[c],e;if(!(e=d.path))a:{if(e=d.name){var f=a.ma.listDisks;if(f&&f.options)for(var g=0;g<f.options.length;g++){var h=f.options[g];if(h.text==e){e=h.value;break a}}}e=""}e&&(f=c.charCodeAt(0)-65,0<=f&&f<a.A.length?!mw(a,f,d.name||rw(a,e)||pa(e,!0),e,!0)&&b&&Jb(a,!1):a.Da("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")"))}return!!a.K}
|
||||
l.Dj=function(){var a=this.ma.listDisks;return a?bw(this,a.options[a.selectedIndex].text,a.value):!1};
|
||||
function bw(a,b,c,d){var e,f=a.ma.listDrives;if(f&&!isNaN(e=ia(f.value,10))&&0<=e&&e<a.A.length){if(!c)return hw(a,e),!0;if("?"==c)return a.Da('Use "Choose File" and "Mount" to select and load a local disk.'),!1;if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return!1;b=pa(c)}for(;0>mw(a,e,b,c,!1,d);){if(!window.confirm("Click OK to reload the original disk and discard any changes."))return!1;var f=a,g=c,h;for(h=0;h<f.B.length;h++)if(f.B[h][1]==g){f.B.splice(h,1);
|
||||
break}hw(a,e,!1,!0)}return!0}a.Da("Unable to load the selected drive");return!1}function mw(a,b,c,d,e,f){var g=a.A[b];if(d&&(d=d.replace("/disks/pc/","/disks/pcx86/"),g.ye.toLowerCase()!=d.toLowerCase())){hw(a,b,e,!0);if(g.pe)return a.Da("Drive "+b+" busy"),0;g.pe=!0;e&&(g.oe=!0,a.K++,r(a)&&Nb(a,"loading diskette '"+c+"'"));g.Ne=!!f;return(new iv(a,g,"preload")).load(c,d,f,a.kj)?1:0}return-1}
|
||||
l.kj=function(a,b,c,d,e){var f;a.pe=!1;b&&(f=b.info(),b&&f[0]>a.sb||f[1]>a.gb)&&(this.Da('Diskette "'+c+'" too large for drive '+String.fromCharCode(65+a.Ya)),b=null);b?(a.va=b,a.Yk=c,a.ye=d,rw(this,d)||fw(this,c,d),nw(this,c,d,b),f=b.info(),this.H|=sw,a.Se||this.Da('Mounted diskette "'+c+'" in drive '+String.fromCharCode(65+a.Ya),a.oe||e),a.tg=f[0],a.yf=f[1],a.zf=f[2],this.oa&&this.oa.dd()):a.Ne=!1;a.oe&&(a.oe=!1,--this.K||Jb(this));aw(this,a.Ya);a.Se&&(a.Se(),a.Se=null)};
|
||||
function fw(a,b,c,d){if((a=a.ma.listDisks)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}function rw(a,b){if((a=a.ma.listDisks)&&a.options)for(var c=0;c<a.options.length;c++){var d=a.options[c];if(d.value==b)return d.text}return null}
|
||||
function aw(a,b){if(0<=b&&b<a.A.length){var c=a.A[b],d=a.ma.listDisks;a=a.ma.listDrives;if(d&&a&&d.options&&a.options&&(a=ia(a.value,10),c=c.Ne?"?":c.ye,!isNaN(a)&&a==b)){for(b=0;b<d.options.length;b++)if(d.options[b].value==c){d.selectedIndex!=b&&(d.selectedIndex=b);break}b==d.options.length&&(d.selectedIndex=0)}}}
|
||||
function $v(a){var b=a.ma.listDisks,c=a.ma.descDisk,d=b.options[b.selectedIndex];if(c&&d){b={};if(d=d.getAttribute("data-value"))try{b=eval("("+d+")")}catch(e){ab(a.type+" option error: "+e.message)}a=b.desc;void 0===a&&(a="");b=b.href;void 0!==b&&(a='<a href="'+b+'" target="_blank">'+a+"</a>");c.innerHTML=a}}l.To=function(a){for(var b=0;b<this.A.length;b++){var c=this.A[b];if(c&&c.pe)return c.Se||(c.Se=a),!1}return!0};
|
||||
function hw(a,b,c,d){var e=a.A[b];e.va&&(pw(a,e.ye,e.va),e.Yk="",e.ye="",e.va=null,e.Ne=!1,a.H|=sw,d||a.Da("Drive "+String.fromCharCode(65+b)+" unloaded",c),c||d||aw(a,b))}function nw(a,b,c,d){var e;for(e=0;e<a.B.length;e++)if(a.B[e][1]==c){d.restore(a.B[e][2]);return}a.B[e]=[b,c,[]]}function pw(a,b,c){var d;for(d=0;d<a.B.length;d++)if(a.B[d][1]==b){a.B[d][2]=c.save();break}}l.Sn=function(a,b,c){t(this,a,b,c,"OUTPUT");b&tw?this.I&tw||this.I&uw&&this.V&&ih(this.V,6):cw(this);this.I=b};
|
||||
l.lm=function(a,b){t(this,a,null,b,"DIAG",80);return 80};l.nm=function(a,b){t(this,a,null,b,"STATUS",this.ga);return this.ga};l.km=function(a,b){var c=0;this.D<this.C&&(c=this.F[this.D]);this.I&uw&&this.V&&Ug(this.V,6);r(this)&&t(this,a,null,b,"DATA["+this.D+"]",c);++this.D>=this.C&&(this.ga&=~(vw|ww),this.D=this.C=0);return c};
|
||||
l.Rn=function(a,b,c){r(this)&&t(this,a,b,c,"DATA["+this.C+"]");this.C<this.F.length&&(this.F[this.C++]=b);a=this.F[0]&xw;if(void 0!==yw[a]&&this.C>=yw[a].Kd){b=!1;this.D=0;a=zw(this);var d,e,f,g,h=a&xw;switch(h){case Aw:zw(this);zw(this);Bw(this);break;case Cw:c=zw(this);this.Ya=c&3;d=this.A[this.Ya];Bw(this);Dw(this,(d.tb&Ew)>>>24);break;case Fw:case Gw:c=zw(this);b=c>>2&1;this.Ya=c&3;d=this.A[this.Ya];d.bb=b;c=d.Ib=zw(this);e=zw(this);f=d.jb=zw(this);g=zw(this);d.yb=128<<g;d.Wd=zw(this);zw(this);
|
||||
zw(this);h==Gw?(h=d,h.tb=Hw|Iw,h.va&&(h.hb=null,h.tb=qw,this.V&&(Mn(this.V,2,this,"dmaRead",h),Dn(this.V,2)))):(h=d,h.tb=Hw|Iw,h.va&&(h.va.Re?h.tb=Jw|Iw:(h.hb=null,h.tb=qw,this.V&&(Mn(this.V,2,this,"dmaWrite",h),Dn(this.V,2)))));Kw(this,d,a,b,c,e,f,g);b=!0;break;case Lw:c=zw(this);this.Ya=c&3;d=this.A[this.Ya];d.Ib=d.Vd=0;d.tb=Mw|Nw;Bw(this);b=!0;break;case Ow:d=this.A[this.Ya];d.bb=0;Bw(this);Dw(this,d.Ya|d.bb<<2|d.tb&Pw);Dw(this,d.Ib);this.Ya=this.Ya+1&3;break;case Qw:c=zw(this);b=c>>2&1;this.Ya=
|
||||
c&3;d=this.A[this.Ya];c=d.Ib;e=d.bb=b;f=d.jb=1;g=0;d.tb=qw;d.va&&(d.hb=d.va.seek(d.Ib,d.bb,d.jb))?g=d.hb.length>>8:d.tb=Hw|Iw;Kw(this,d,a,b,c,e,f,g);b=!0;break;case Rw:c=zw(this);b=c>>2&1;this.Ya=c&3;d=this.A[this.Ya];c=d.Ib;e=d.bb=b;f=1;g=zw(this);d.yb=128<<g;d.Wd=zw(this);zw(this);d.Wi=zw(this);h=d;h.tb=Hw|Iw;h.va&&(h.hb=null,h.tb=qw,this.V&&(h.Je=0,h.Yc=Array(4),h.Xg=!0,h.gg=0,Mn(this.V,2,this,"dmaFormat",h),Dn(this.V,2),h.Xg=!1));Kw(this,d,a,b,c,e,f,g);b=!0;break;case Sw:c=zw(this),this.Ya=c&
|
||||
3,d=this.A[this.Ya],d.bb=c>>2&1,c=zw(this),d.Ib+=c-d.Vd,0>d.Ib&&(d.Ib=0),d.Ib>=d.sb&&(d.Ib=d.sb-1),d.Vd=c,d.tb=Mw,d.Ib||(d.tb|=Nw),Bw(this),b=!0}0<this.C&&(this.ga=this.ga|vw|ww);this.I&uw&&(!d||d.tb&Hw||!b||this.V&&ih(this.V,6))}};l.mm=function(a,b){var c=this.H;this.H&=~sw;t(this,a,null,b,"INPUT",c);return c};l.Qn=function(a,b,c){t(this,a,b,c,"CONTROL");this.cc=b};
|
||||
function Kw(a,b,c,d,e,f,g,h){Bw(a);Dw(a,b.Ya|b.bb<<2|b.tb&Pw);Dw(a,(b.tb&Tw)>>>8);Dw(a,(b.tb&Uw)>>>16);var k=0;if(e!=b.Ib||f!=b.bb)k=g=1;c&Vw&&(f^=k,d||(k=0));Dw(a,e+k);Dw(a,f);Dw(a,g);Dw(a,h)}function zw(a){var b=a.F[a.D];a.D++;return b}function Bw(a){a.D=a.C=0}function Dw(a,b){a.F[a.C++]=b}l.gl=function(a,b,c){void 0===b||0>b?this.xe(a,c):c(-1,!1)};l.hl=function(a,b){return void 0!==b&&0<=b?Ww(a,b):-1};
|
||||
l.yl=function(a,b){if(void 0!==b&&0<=b)a:if(a.tb)a=-1;else{a.Yc[a.Je++]=b;if(a.Je==a.Yc.length){a.Ib=a.Yc[0];a.bb=a.Yc[1];a.jb=a.Yc[2];a.yb=128<<a.Yc[3];for(var c=a.Je=0;c<a.yb;c++)if(0>Ww(a,a.Wi)){a=-1;break a}a.gg++}a.gg>=a.Wd&&(b=-1);a=b}else a=-1;return a};l.xe=function(a,b){var c=-1,d=null,e=0;if(!a.tb&&a.va){do{if(a.hb&&(e=a.Va,0<=(c=a.va.read(a.hb,a.Va++)))){d=a.hb;break}a.hb=a.va.seek(a.Ib,a.bb,a.jb);if(!a.hb){a.tb=Xw|Iw;break}a.Va=0;Yw(a)}while(1)}b(c,!1,d,e)};
|
||||
function Ww(a,b){if(a.tb||!a.va)return-1;do{if(a.hb&&a.va.write(a.hb,a.Va++,b))break;a.hb=a.va.seek(a.Ib,a.bb,a.jb);if(!a.hb){a.tb=Zw|Iw;b=-1;break}a.Va=0;Yw(a)}while(1);return b}function Yw(a){a.jb++;a.jb>=a.zf+1&&(a.jb=1,a.bb++,a.bb>=a.yf&&(a.bb=0,a.Ib++))}var lw="Floppy Drive",tw=4,uw=8,ww=16,vw=64,jw=128,Aw=3,Cw=4,Fw=5,Gw=6,Lw=7,Ow=8,Qw=10,Rw=13,Sw=15,xw=31,Vw=128,qw=0,Hw=8,Mw=32,Iw=64,kw=192,Pw=255,Jw=512,Xw=1024,Zw=8192,Tw=65280,Uw=16711680,Nw=268435456,Ew=-16777216,sw=128,ow=0;aa={};
|
||||
var yw={3:{Kd:3,Xd:0,name:aa.Zp},4:{Kd:2,Xd:1,name:aa.Xp},5:{Kd:9,Xd:7,name:aa.eq},6:{Kd:9,Xd:7,name:aa.Tp},7:{Kd:2,Xd:0,name:aa.Vp},8:{Kd:1,Xd:2,name:aa.Yp},10:{Kd:2,Xd:7,name:aa.Up},13:{Kd:6,Xd:7,name:aa.Pp},15:{Kd:3,Xd:0,name:aa.Wp}},dw={1009:Yv.prototype.lm,1012:Yv.prototype.nm,1013:Yv.prototype.km,1015:Yv.prototype.mm},ew={1010:Yv.prototype.Sn,1013:Yv.prototype.Rn,1015:Yv.prototype.Qn};
|
||||
Xa(function(){for(var a=vb(document,"pcx86","fdc"),b=0;b<a.length;b++){var c=a[b],d=wb(c),d=new Yv(d);ub(d,c)}});function $w(a){ib.call(this,"HDC",a,1048576);this.dmaRead=$w.prototype.il;this.dmaWrite=$w.prototype.jl;this.dmaWriteBuffer=$w.prototype.zl;this.dmaWriteFormat=$w.prototype.Al;this.aa=[];this.ka=a.drives;this.M="at"==a.type;this.wa=!Ma("Mobi")&&window&&"FileReader"in window}ba($w,ib);l=$w.prototype;
|
||||
l.Eb=function(a,b,c){var d=this;switch(b){case "saveHD0":case "saveHD1":if(this.wa)return this.ma[b]=c,c.onclick=function(a){return function(){var b=d.A&&d.A[a];if(b&&b.va){var b=b.va,c=b.Ig||b.kd,e=c.lastIndexOf(".");0<=e&&(c=c.substr(0,e));c+=".img";b=Ta(Wv(b),"octet-stream",!0,c);ab(b)}else d.Da("Hard drive "+a+" is not available.")}}(+b.slice(-1)),!0;c.parentNode.removeChild(c)}return!1};
|
||||
l.uc=function(a,b,c,d){this.na=b;this.G=c;this.ca=d;this.oa=a;if(d=ud(a,"drives"))this.aa=d;else if(this.ka)try{this.aa=eval("("+this.ka+")")}catch(e){ab("HDC drive configuration error: "+e.message+" ("+this.ka+")")}this.V=Vb(a,"ChipSet");this.H=0;this.la=3;Ic(b,this,this.M?ax:bx);Mc(b,this,this.M?cx:dx);this.M&&(this.H++,this.V&&this.V.da==ul&&this.H++,this.la=2,b.V[ex]=2,b.U[ex]=2);Rf(c,19,this.Pm.bind(this));Rf(c,64,this.Qm.bind(this));this.reset();fx(this)||Jb(this)};
|
||||
l.ac=function(a,b){if(!b)if(!a)gx(this),this.oa.aa&&fx(this,!0);else if(!this.restore(a))return!1;return!0};l.$b=function(a){return a?this.save():!0};function mv(a){return a.oa?a.oa.ta:""}function nv(a){return a.oa?a.oa.B||"":""}l.reset=function(){gx(this,null,!0)};l.save=function(){var a=new Wf(this);a.set(0,hx(this));return a.data()};l.restore=function(a){return gx(this,a[0])};
|
||||
function gx(a,b,c){var d=0,e=!0;a.Ya=-1;if(a.M){if(b||(b=[0,0,0,0,0,0,0,ix,0,[0,-1]]),a.I=b[d++],a.ta=b[d++],a.J=b[d++],a.fa=b[d++],a.ea=b[d++],a.ba=b[d++],a.U=b[d++],a.ga=b[d++],a.ha=b[d++],a.L=b[d++],"object"==typeof a.L){var f=a.L;a.L=f[0];a.Ya=f[1]}}else b||(b=[0,jx,Array(14),0,0]),a.P=b[d++],a.ga=b[d++],a.F=b[d++],a.D=b[d++],a.C=b[d++],a.ra=b[d++],a.pa=b[d++],a.qa=b[d++],f=b[d++],void 0!==f?a.N=f:void 0===a.N&&(a.N=-1);void 0===a.A&&(a.A=Array(a.aa.length));b=b[d];void 0===b&&(b=[]);for(d=0;d<
|
||||
a.A.length;d++){void 0===a.A[d]&&(a.A[d]={});var f=a.A[d],g=a,h=d,k=f,m=a.aa[d],p=b[d],v=c,u=0,D=!0;p||(p=[kx,0,!1,Array(8)]);k.Ya=h;k.errorCode=p[u++];k.$k=p[u++];k.Oe=p[u++];k.Ge=p[u++];k.He=p[u++];k.bb=p[u++];k.gb=p[u++];k.Pd=p[u++];k.jb=p[u++];k.Wd=p[u++];k.yb=p[u++];k.fg=g.M?0:1;k.name=m.name;void 0===k.name&&(k.name=lx);k.path=m.path;k.mode=m.mode||(k.path?"preload":"local");"demandro"!=k.mode&&"demandrw"!=k.mode||nv(g)||(k.mode="local");k.type=m.type;if(void 0===k.type||void 0===mx[g.H][k.type])k.type=
|
||||
g.la;m=mx[g.H][k.type];k.Wa=m[2]||17;k.Na=m[3]||512;if(v&&g.V){var m=g.V,G=k.type;if(m.A){var v=null,I=m.A[18];15<G&&(v=G,G=15);h?(I=I&240|G,G=26):(I=I&15|G<<4,G=25);var J=m;J.A&&(J.A[18]=I,km(J));null!=v&&m.A&&(m.A[G]=v,km(m))}}void 0===k.va&&(k.va=null,g.Da("Type "+k.type+' "'+k.name+'" is fixed disk '+h,!0));nx(g,k);k.Va=p[u++];k.hb=null;k.va&&(g=p[u],void 0!==g&&0>k.va.restore(g)&&(D=!1),D&&void 0!==k.Va&&(k.hb=k.va.seek(k.Pd,k.bb,k.jb+k.fg)));D||(e=!1);null!=a.P&&1>=d&&(a.P|=(f.type&3)<<(1-d<<
|
||||
l.restore=function(a){var b=0,c="unsupported restore format";if(a&&0<a.length){var d=0,e=a[d++];e&&2<=e.length&&(!this.A.length&&6<=e.length?pv(this,"local",e[2],e[3],e[4],e[5]):null!=e[0]&&null!=e[1]&&null!=this.K&&e[1]!=this.K&&(c="original checksum ("+e[1]+") differs from current checksum ("+this.K+")",b=-2));for(this.A.length||(b=-1);d<a.length&&0<=b;){var f=0,g=a[d++],h=g[f++],k=g[f++],m=g[f++];if(h>=this.A.length||k>=this.A[h].length||m>=this.A[h][k].length){c="sector (CHS="+h+":"+k+":"+m+") out of range ("+
|
||||
b+" changes applied)";b=-1;break}if(this.Re){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.A[h][k][m]){for(k=h.data.length;k<e;)h.data[k++]=h.pattern;k=0;h.hd=e;for(h.Oc=f.length;e<g;)h.data[e++]=f[k++];b++}}}0>b?-2!=b&&this.Da("Unable to restore disk '"+this.kd+": "+c):wv(this);return b};
|
||||
l.toJSON=function(){var a;a=0;for(var b;b=yv(this,a++);)bw(b);a=JSON.stringify(this.A,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")};
|
||||
function bw(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}var ov=0;function Vv(a,b,c,d,e,f){this.va=a;this.dc=c;this.Vg=d;this.$i=e;this.ie=f}function Nv(a,b,c){var d;c=c||2;var e=b&511,f=yv(a.va,a.ie[b>>9]);if(f){if(e+c<=f.length)return zv(a.va,f,e,c);for(e=d=0;c--;)d|=Nv(a,b++,1)<<e,e+=8}return d}function Cv(a,b,c){return Nv(a,b[0]+(c||0),b[1])}
|
||||
function Rv(a,b,c){for(var d=0;!c||b<c;){var e=Nv(a,b,1);if(!e)break;var f;f=a;var g=b+1,h=e,k="";for(h||(h=-1);h--;){var m=Nv(f,g++,1);if(!m)break;k+=String.fromCharCode(m)}f=k;if(!f)break;b+=1+e;if(d){if(e=Nv(a,b),g=a.A[e])g=g[0],a.sd[g]&&a.sd[g].he[e].push(f)}else c||(a.Of=f);b+=2;d++}}
|
||||
Vv.prototype.uj=function(a,b){var c=null;if(this.sd)for(var d in this.sd){var e=this.sd[d];if(a>=e.ei&&a<=e.Hk){d=a-=e.ei;var f,g;for(g in e.he){var h=e.he[g],k=a-h[0];if(!k){c=this.Of+"!"+h[1];break}b&&0<k&&k<d&&(f=h,d=k)}!c&&f&&(c=this.Of+"!"+f[1]+"+"+q(d,0,!0));break}}return c||this.dc+"+"+q(a,0,!0)};var Ev=23117,Dv=[0,2],Fv=[24,2],Hv=[60,4],Gv=64,Jv=17742,Iv=[0,2],Ov=[4,2],Pv=[6,2],Kv=[28,2],Tv=[32,2],Lv=[34,2],Qv=[38,2],Sv=[44,4],Mv=[50,2];
|
||||
function cw(a){ib.call(this,"FDC",a,524288);this.dmaRead=cw.prototype.gl;this.dmaWrite=cw.prototype.hl;this.dmaFormat=cw.prototype.yl;this.M=dw(a.autoMount);this.J=a.sortBy||"name";"none"==this.J&&(this.J=null);this.B=[];this.L=!Ma("Mobi")&&window&&"FileReader"in window;this.exports={loadDisk:this.Dj,wait:this.ap}}ba(cw,ib);l=cw.prototype;
|
||||
l.Eb=function(a,b,c){var d=this;switch(b){case "listDisks":this.ma[b]=c;if(this.J){b=[];for(a=0;a<c.options.length;a++)b.push(c.options[a]);b.sort(function(a,b){return"path"!=d.J?a.text.localeCompare(b.text):a.value.localeCompare(b.value)});for(a=0;a<b.length;a++)try{c.options[a]=b[a]}catch(e){break}}c.onchange=function(){ew(d)};return!0;case "descDisk":case "listDrives":return this.ma[b]=c,c.onchange=function(){var a=ia(c.value,10);null!=a&&fw(d,a)},!0;case "loadDisk":return this.ma[b]=c,c.onclick=
|
||||
function(){d.Dj()},!0;case "saveDisk":if(!this.L){c.parentNode.removeChild(c);break}this.ma[b]=c;c.onclick=function(){var a=d.ma.listDrives;a&&a.options&&d.A&&((a=d.A[ia(a.value,10)||0])?(a=a.va)?(a=Ta(aw(a),"octet-stream",!0,a.Ig.replace(".json",".img")),ab(a)):d.Da("No diskette loaded in drive."):d.Da("No diskette drive selected."))};return!0;case "mountDisk":if(this.L)return this.ma[b]=c,c.onchange=function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length},c.onsubmit=function(a){if(a=
|
||||
a.currentTarget[1].files[0]){var b=a.name;gw(d,pa(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};l.uc=function(a,b,c,d){this.na=b;this.G=c;this.ca=d;this.oa=a;this.V=Vb(a,"ChipSet");dw(ud(this.oa,"autoMount"),this.M);hw(this);Ic(b,this,iw);Mc(b,this,jw);kw(this,"None","",!0);this.L&&kw(this,"Local Disk","?");kw(this,"Remote Disk","??");lw(this)||Jb(this)};
|
||||
function dw(a,b){if(a){if("string"==typeof a)try{a=eval("("+a+")")}catch(d){ab("FDC auto-mount error: "+d.message+" ("+a+")"),a={}}}else a={};for(var c in a)b&&(b[c]=a[c]);return a}
|
||||
l.ac=function(a,b){if(!b){if(!a){if(this.reset(),this.oa.aa){this.B=[];for(a=0;a<this.A.length;a++)mw(this,a,!0);lw(this,!0)}}else if(!this.restore(a))return!1;if(a=this.ma.listDrives){for(;a.firstChild;)a.removeChild(a.firstChild);a.value="";for(b=0;b<this.N;b++){var c=document.createElement("option");c.value=b;c.text=String.fromCharCode(65+b)+":";a.appendChild(c)}0<this.N&&(a.value="0",fw(this,0))}}return!0};l.$b=function(a){return a?this.save():!0};l.reset=function(){hw(this)};
|
||||
l.save=function(){var a=new Wf(this);a.set(0,nw(this));return a.data()};l.restore=function(a){return hw(this,a[0])};
|
||||
function hw(a,b){var c=0,d,e=!0;b||(b=[0,0,ow,Array(9),0,0,0,[]]);a.Ya=b[c++];c++;a.ga=b[c++];a.F=b[c++];a.D=b[c++];a.C=b[c++];a.I=b[c++];var f=b[c++];d=b[c++];null!=d&&(a.B=d);void 0===a.A&&(a.N=4,a.V&&(a.N=+Tl(a.V,gl,void 0)),a.A=Array(4));for(d=0;d<a.A.length;d++){var g=a.A[d];if(void 0===g){var g=a.A[d]={},h;if(a.V)a:{h=a.V;if(d<+Tl(h,gl,void 0)){if(!h.L){h=360;break a}if(d<h.L.length){h=h.L[d];break a}}h=0}else h=0;switch(h){case 160:case 180:g.gb=1;default:g.sb=40;g.Wa=9;break;case 720:g.sb=
|
||||
80;g.Wa=9;break;case 1200:g.sb=80;g.Wa=15;break;case 1440:g.sb=80,g.Wa=18}}var k=a,m=d,p=f[d],v=0;h=!0;g.Ya=m;g.pe=g.Ne=!1;g.Se=null;p||(p=[pw,!0,0,2,0]);"boolean"==typeof p[1]&&(p[1]=[qw,g.sb||40,g.gb||p[3],g.Wa||9,g.Na||512,p[1],g.tg,g.yf,g.zf]);g.tb=p[v++];var u=p[v++];g.name=u[0];g.sb=u[1];g.gb=u[2];g.Wa=u[3];g.Na=u[4];g.Oe=u[5];(g.tg=u[6])?(g.yf=u[7],g.zf=u[8]):(g.tg=g.sb,g.yf=g.gb,g.zf=g.Wa);g.bb=p[v++];g.Vd=p[v++];g.Ib=p[v++];g.Vd=100<=g.Vd?g.Vd-100:g.Vd-g.Ib;g.jb=p[v++];g.Wd=p[v++];g.yb=p[v++];
|
||||
g.Va=p[v++];g.hb=null;g.va||(g.ye="");var D=p[v++];102==D&&(D=!1);"boolean"==typeof D?(u=p[v++],p=p[v],D?(v=k.A[m],mw(k,m,!0,!0),v.Ne=!0,m=new nv(k,v,"preload"),k.kj(v,m,u,p,!0)):rw(k,m,u,p,!0)?g.va&&p&&sw(k,u,p,g.va):Jb(k,!1)):void 0!==D&&g.va&&0>g.va.restore(D)&&(h=!1);h&&g.va&&void 0!==g.Va&&(g.hb=g.va.seek(g.Ib,g.bb,g.jb));h||(e=!1)}a.H=b[c++]||0;a.cc=b[c]||tw;return e}
|
||||
function nw(a){var b=0,c=[];c[b++]=a.Ya;c[b++]=0;c[b++]=a.ga;c[b++]=a.F;c[b++]=a.D;c[b++]=a.C;c[b++]=a.I;for(var d=b++,e=0,f=[],g=0;g<a.A.length;g++){var h=e++,k=a.A[g],m=0,p=[];p[m++]=k.tb;p[m++]=[k.name,k.sb,k.gb,k.Wa,k.Na,k.Oe,k.tg,k.yf,k.zf];p[m++]=k.bb;p[m++]=k.Vd+100;p[m++]=k.Ib;p[m++]=k.jb;p[m++]=k.Wd;p[m++]=k.yb;p[m++]=k.Va;p[m++]=k.Ne;p[m++]=k.Yk;p[m]=k.ye;f[h]=p}c[d]=f;d=b++;for(e=0;e<a.A.length;e++)f=a.A[e],f.va&&uw(a,f.ye,f.va);c[d]=a.B;c[b++]=a.H;c[b]=a.cc;return c}
|
||||
l.fj=function(a){var b;a=this.A[a];if(void 0!==a){b={};for(var c in a)b[c]=a[c]}return b};l.Zk=function(a,b,c){if(a.va){var d=a.va.info(),e=d[2],f=d[1]*e;if(b+c<=d[0]*f)return a.Ib=Math.floor(b/f),b%=f,a.bb=Math.floor(b/e),a.jb=b%e+1,a.yb=c*d[3],a.tb=vw,!0}return!1};
|
||||
function lw(a,b){b||(a.K=0);for(var c in a.M){var d=a.M[c],e;if(!(e=d.path))a:{if(e=d.name){var f=a.ma.listDisks;if(f&&f.options)for(var g=0;g<f.options.length;g++){var h=f.options[g];if(h.text==e){e=h.value;break a}}}e=""}e&&(f=c.charCodeAt(0)-65,0<=f&&f<a.A.length?!rw(a,f,d.name||ww(a,e)||pa(e,!0),e,!0)&&b&&Jb(a,!1):a.Da("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")"))}return!!a.K}
|
||||
l.Dj=function(){var a=this.ma.listDisks;return a?gw(this,a.options[a.selectedIndex].text,a.value):!1};
|
||||
function gw(a,b,c,d){var e,f=a.ma.listDrives;if(f&&!isNaN(e=ia(f.value,10))&&0<=e&&e<a.A.length){if(!c)return mw(a,e),!0;if("?"==c)return a.Da('Use "Choose File" and "Mount" to select and load a local disk.'),!1;if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return!1;b=pa(c)}for(;0>rw(a,e,b,c,!1,d);){if(!window.confirm("Click OK to reload the original disk and discard any changes."))return!1;var f=a,g=c,h;for(h=0;h<f.B.length;h++)if(f.B[h][1]==g){f.B.splice(h,1);
|
||||
break}mw(a,e,!1,!0)}return!0}a.Da("Unable to load the selected drive");return!1}function rw(a,b,c,d,e,f){var g=a.A[b];if(d&&(d=d.replace("/disks/pc/","/disks/pcx86/"),g.ye.toLowerCase()!=d.toLowerCase())){mw(a,b,e,!0);if(g.pe)return a.Da("Drive "+b+" busy"),0;g.pe=!0;e&&(g.oe=!0,a.K++,r(a)&&Nb(a,"loading diskette '"+c+"'"));g.Ne=!!f;return(new nv(a,g,"preload")).load(c,d,f,a.kj)?1:0}return-1}
|
||||
l.kj=function(a,b,c,d,e){var f;a.pe=!1;b&&(f=b.info(),b&&f[0]>a.sb||f[1]>a.gb)&&(this.Da('Diskette "'+c+'" too large for drive '+String.fromCharCode(65+a.Ya)),b=null);b?(a.va=b,a.Yk=c,a.ye=d,ww(this,d)||kw(this,c,d),sw(this,c,d,b),f=b.info(),this.H|=xw,a.Se||this.Da('Mounted diskette "'+c+'" in drive '+String.fromCharCode(65+a.Ya),a.oe||e),a.tg=f[0],a.yf=f[1],a.zf=f[2],this.oa&&this.oa.dd()):a.Ne=!1;a.oe&&(a.oe=!1,--this.K||Jb(this));fw(this,a.Ya);a.Se&&(a.Se(),a.Se=null)};
|
||||
function kw(a,b,c,d){if((a=a.ma.listDisks)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}function ww(a,b){if((a=a.ma.listDisks)&&a.options)for(var c=0;c<a.options.length;c++){var d=a.options[c];if(d.value==b)return d.text}return null}
|
||||
function fw(a,b){if(0<=b&&b<a.A.length){var c=a.A[b],d=a.ma.listDisks;a=a.ma.listDrives;if(d&&a&&d.options&&a.options&&(a=ia(a.value,10),c=c.Ne?"?":c.ye,!isNaN(a)&&a==b)){for(b=0;b<d.options.length;b++)if(d.options[b].value==c){d.selectedIndex!=b&&(d.selectedIndex=b);break}b==d.options.length&&(d.selectedIndex=0)}}}
|
||||
function ew(a){var b=a.ma.listDisks,c=a.ma.descDisk,d=b.options[b.selectedIndex];if(c&&d){b={};if(d=d.getAttribute("data-value"))try{b=eval("("+d+")")}catch(e){ab(a.type+" option error: "+e.message)}a=b.desc;void 0===a&&(a="");b=b.href;void 0!==b&&(a='<a href="'+b+'" target="_blank">'+a+"</a>");c.innerHTML=a}}l.ap=function(a){for(var b=0;b<this.A.length;b++){var c=this.A[b];if(c&&c.pe)return c.Se||(c.Se=a),!1}return!0};
|
||||
function mw(a,b,c,d){var e=a.A[b];e.va&&(uw(a,e.ye,e.va),e.Yk="",e.ye="",e.va=null,e.Ne=!1,a.H|=xw,d||a.Da("Drive "+String.fromCharCode(65+b)+" unloaded",c),c||d||fw(a,b))}function sw(a,b,c,d){var e;for(e=0;e<a.B.length;e++)if(a.B[e][1]==c){d.restore(a.B[e][2]);return}a.B[e]=[b,c,[]]}function uw(a,b,c){var d;for(d=0;d<a.B.length;d++)if(a.B[d][1]==b){a.B[d][2]=c.save();break}}l.$n=function(a,b,c){t(this,a,b,c,"OUTPUT");b&yw?this.I&yw||this.I&zw&&this.V&&Wg(this.V,6):hw(this);this.I=b};
|
||||
l.pm=function(a,b){t(this,a,null,b,"DIAG",80);return 80};l.rm=function(a,b){t(this,a,null,b,"STATUS",this.ga);return this.ga};l.om=function(a,b){var c=0;this.D<this.C&&(c=this.F[this.D]);this.I&zw&&this.V&&Ug(this.V,6);r(this)&&t(this,a,null,b,"DATA["+this.D+"]",c);++this.D>=this.C&&(this.ga&=~(Aw|Bw),this.D=this.C=0);return c};
|
||||
l.Zn=function(a,b,c){r(this)&&t(this,a,b,c,"DATA["+this.C+"]");this.C<this.F.length&&(this.F[this.C++]=b);a=this.F[0]&Cw;if(void 0!==Dw[a]&&this.C>=Dw[a].Kd){b=!1;this.D=0;a=Ew(this);var d,e,f,g,h=a&Cw;switch(h){case Fw:Ew(this);Ew(this);Gw(this);break;case Hw:c=Ew(this);this.Ya=c&3;d=this.A[this.Ya];Gw(this);Iw(this,(d.tb&Jw)>>>24);break;case Kw:case Lw:c=Ew(this);b=c>>2&1;this.Ya=c&3;d=this.A[this.Ya];d.bb=b;c=d.Ib=Ew(this);e=Ew(this);f=d.jb=Ew(this);g=Ew(this);d.yb=128<<g;d.Wd=Ew(this);Ew(this);
|
||||
Ew(this);h==Lw?(h=d,h.tb=Mw|Nw,h.va&&(h.hb=null,h.tb=vw,this.V&&(Mn(this.V,2,this,"dmaRead",h),Dn(this.V,2)))):(h=d,h.tb=Mw|Nw,h.va&&(h.va.Re?h.tb=Ow|Nw:(h.hb=null,h.tb=vw,this.V&&(Mn(this.V,2,this,"dmaWrite",h),Dn(this.V,2)))));Pw(this,d,a,b,c,e,f,g);b=!0;break;case Qw:c=Ew(this);this.Ya=c&3;d=this.A[this.Ya];d.Ib=d.Vd=0;d.tb=Rw|Sw;Gw(this);b=!0;break;case Tw:d=this.A[this.Ya];d.bb=0;Gw(this);Iw(this,d.Ya|d.bb<<2|d.tb&Uw);Iw(this,d.Ib);this.Ya=this.Ya+1&3;break;case Vw:c=Ew(this);b=c>>2&1;this.Ya=
|
||||
c&3;d=this.A[this.Ya];c=d.Ib;e=d.bb=b;f=d.jb=1;g=0;d.tb=vw;d.va&&(d.hb=d.va.seek(d.Ib,d.bb,d.jb))?g=d.hb.length>>8:d.tb=Mw|Nw;Pw(this,d,a,b,c,e,f,g);b=!0;break;case Ww:c=Ew(this);b=c>>2&1;this.Ya=c&3;d=this.A[this.Ya];c=d.Ib;e=d.bb=b;f=1;g=Ew(this);d.yb=128<<g;d.Wd=Ew(this);Ew(this);d.Wi=Ew(this);h=d;h.tb=Mw|Nw;h.va&&(h.hb=null,h.tb=vw,this.V&&(h.Je=0,h.Yc=Array(4),h.Xg=!0,h.gg=0,Mn(this.V,2,this,"dmaFormat",h),Dn(this.V,2),h.Xg=!1));Pw(this,d,a,b,c,e,f,g);b=!0;break;case Xw:c=Ew(this),this.Ya=c&
|
||||
3,d=this.A[this.Ya],d.bb=c>>2&1,c=Ew(this),d.Ib+=c-d.Vd,0>d.Ib&&(d.Ib=0),d.Ib>=d.sb&&(d.Ib=d.sb-1),d.Vd=c,d.tb=Rw,d.Ib||(d.tb|=Sw),Gw(this),b=!0}0<this.C&&(this.ga=this.ga|Aw|Bw);this.I&zw&&(!d||d.tb&Mw||!b||this.V&&Wg(this.V,6))}};l.qm=function(a,b){var c=this.H;this.H&=~xw;t(this,a,null,b,"INPUT",c);return c};l.Yn=function(a,b,c){t(this,a,b,c,"CONTROL");this.cc=b};
|
||||
function Pw(a,b,c,d,e,f,g,h){Gw(a);Iw(a,b.Ya|b.bb<<2|b.tb&Uw);Iw(a,(b.tb&Yw)>>>8);Iw(a,(b.tb&Zw)>>>16);var k=0;if(e!=b.Ib||f!=b.bb)k=g=1;c&$w&&(f^=k,d||(k=0));Iw(a,e+k);Iw(a,f);Iw(a,g);Iw(a,h)}function Ew(a){var b=a.F[a.D];a.D++;return b}function Gw(a){a.D=a.C=0}function Iw(a,b){a.F[a.C++]=b}l.gl=function(a,b,c){void 0===b||0>b?this.xe(a,c):c(-1,!1)};l.hl=function(a,b){return void 0!==b&&0<=b?ax(a,b):-1};
|
||||
l.yl=function(a,b){if(void 0!==b&&0<=b)a:if(a.tb)a=-1;else{a.Yc[a.Je++]=b;if(a.Je==a.Yc.length){a.Ib=a.Yc[0];a.bb=a.Yc[1];a.jb=a.Yc[2];a.yb=128<<a.Yc[3];for(var c=a.Je=0;c<a.yb;c++)if(0>ax(a,a.Wi)){a=-1;break a}a.gg++}a.gg>=a.Wd&&(b=-1);a=b}else a=-1;return a};l.xe=function(a,b){var c=-1,d=null,e=0;if(!a.tb&&a.va){do{if(a.hb&&(e=a.Va,0<=(c=a.va.read(a.hb,a.Va++)))){d=a.hb;break}a.hb=a.va.seek(a.Ib,a.bb,a.jb);if(!a.hb){a.tb=bx|Nw;break}a.Va=0;cx(a)}while(1)}b(c,!1,d,e)};
|
||||
function ax(a,b){if(a.tb||!a.va)return-1;do{if(a.hb&&a.va.write(a.hb,a.Va++,b))break;a.hb=a.va.seek(a.Ib,a.bb,a.jb);if(!a.hb){a.tb=dx|Nw;b=-1;break}a.Va=0;cx(a)}while(1);return b}function cx(a){a.jb++;a.jb>=a.zf+1&&(a.jb=1,a.bb++,a.bb>=a.yf&&(a.bb=0,a.Ib++))}var qw="Floppy Drive",yw=4,zw=8,Bw=16,Aw=64,ow=128,Fw=3,Hw=4,Kw=5,Lw=6,Qw=7,Tw=8,Vw=10,Ww=13,Xw=15,Cw=31,$w=128,vw=0,Mw=8,Rw=32,Nw=64,pw=192,Uw=255,Ow=512,bx=1024,dx=8192,Yw=65280,Zw=16711680,Sw=268435456,Jw=-16777216,xw=128,tw=0;aa={};
|
||||
var Dw={3:{Kd:3,Xd:0,name:aa.hq},4:{Kd:2,Xd:1,name:aa.fq},5:{Kd:9,Xd:7,name:aa.mq},6:{Kd:9,Xd:7,name:aa.aq},7:{Kd:2,Xd:0,name:aa.cq},8:{Kd:1,Xd:2,name:aa.gq},10:{Kd:2,Xd:7,name:aa.bq},13:{Kd:6,Xd:7,name:aa.Xp},15:{Kd:3,Xd:0,name:aa.eq}},iw={1009:cw.prototype.pm,1012:cw.prototype.rm,1013:cw.prototype.om,1015:cw.prototype.qm},jw={1010:cw.prototype.$n,1013:cw.prototype.Zn,1015:cw.prototype.Yn};
|
||||
Xa(function(){for(var a=vb(document,"pcx86","fdc"),b=0;b<a.length;b++){var c=a[b],d=wb(c),d=new cw(d);ub(d,c)}});function ex(a){ib.call(this,"HDC",a,1048576);this.dmaRead=ex.prototype.il;this.dmaWrite=ex.prototype.jl;this.dmaWriteBuffer=ex.prototype.zl;this.dmaWriteFormat=ex.prototype.Al;this.aa=[];this.ka=a.drives;this.M="at"==a.type;this.wa=!Ma("Mobi")&&window&&"FileReader"in window}ba(ex,ib);l=ex.prototype;
|
||||
l.Eb=function(a,b,c){var d=this;switch(b){case "saveHD0":case "saveHD1":if(this.wa)return this.ma[b]=c,c.onclick=function(a){return function(){var b=d.A&&d.A[a];if(b&&b.va){var b=b.va,c=b.Ig||b.kd,e=c.lastIndexOf(".");0<=e&&(c=c.substr(0,e));c+=".img";b=Ta(aw(b),"octet-stream",!0,c);ab(b)}else d.Da("Hard drive "+a+" is not available.")}}(+b.slice(-1)),!0;c.parentNode.removeChild(c)}return!1};
|
||||
l.uc=function(a,b,c,d){this.na=b;this.G=c;this.ca=d;this.oa=a;if(d=ud(a,"drives"))this.aa=d;else if(this.ka)try{this.aa=eval("("+this.ka+")")}catch(e){ab("HDC drive configuration error: "+e.message+" ("+this.ka+")")}this.V=Vb(a,"ChipSet");this.H=0;this.la=3;Ic(b,this,this.M?fx:gx);Mc(b,this,this.M?hx:ix);this.M&&(this.H++,this.V&&this.V.da==ul&&this.H++,this.la=2,b.V[jx]=2,b.U[jx]=2);Rf(c,19,this.Tm.bind(this));Rf(c,64,this.Um.bind(this));this.reset();kx(this)||Jb(this)};
|
||||
l.ac=function(a,b){if(!b)if(!a)lx(this),this.oa.aa&&kx(this,!0);else if(!this.restore(a))return!1;return!0};l.$b=function(a){return a?this.save():!0};function rv(a){return a.oa?a.oa.ta:""}function sv(a){return a.oa?a.oa.B||"":""}l.reset=function(){lx(this,null,!0)};l.save=function(){var a=new Wf(this);a.set(0,mx(this));return a.data()};l.restore=function(a){return lx(this,a[0])};
|
||||
function lx(a,b,c){var d=0,e=!0;a.Ya=-1;if(a.M){if(b||(b=[0,0,0,0,0,0,0,nx,0,[0,-1]]),a.I=b[d++],a.ta=b[d++],a.J=b[d++],a.fa=b[d++],a.ea=b[d++],a.ba=b[d++],a.U=b[d++],a.ga=b[d++],a.ha=b[d++],a.L=b[d++],"object"==typeof a.L){var f=a.L;a.L=f[0];a.Ya=f[1]}}else b||(b=[0,ox,Array(14),0,0]),a.P=b[d++],a.ga=b[d++],a.F=b[d++],a.D=b[d++],a.C=b[d++],a.ra=b[d++],a.pa=b[d++],a.qa=b[d++],f=b[d++],void 0!==f?a.N=f:void 0===a.N&&(a.N=-1);void 0===a.A&&(a.A=Array(a.aa.length));b=b[d];void 0===b&&(b=[]);for(d=0;d<
|
||||
a.A.length;d++){void 0===a.A[d]&&(a.A[d]={});var f=a.A[d],g=a,h=d,k=f,m=a.aa[d],p=b[d],v=c,u=0,D=!0;p||(p=[px,0,!1,Array(8)]);k.Ya=h;k.errorCode=p[u++];k.$k=p[u++];k.Oe=p[u++];k.Ge=p[u++];k.He=p[u++];k.bb=p[u++];k.gb=p[u++];k.Pd=p[u++];k.jb=p[u++];k.Wd=p[u++];k.yb=p[u++];k.fg=g.M?0:1;k.name=m.name;void 0===k.name&&(k.name=qx);k.path=m.path;k.mode=m.mode||(k.path?"preload":"local");"demandro"!=k.mode&&"demandrw"!=k.mode||sv(g)||(k.mode="local");k.type=m.type;if(void 0===k.type||void 0===rx[g.H][k.type])k.type=
|
||||
g.la;m=rx[g.H][k.type];k.Wa=m[2]||17;k.Na=m[3]||512;if(v&&g.V){var m=g.V,G=k.type;if(m.A){var v=null,I=m.A[18];15<G&&(v=G,G=15);h?(I=I&240|G,G=26):(I=I&15|G<<4,G=25);var J=m;J.A&&(J.A[18]=I,km(J));null!=v&&m.A&&(m.A[G]=v,km(m))}}void 0===k.va&&(k.va=null,g.Da("Type "+k.type+' "'+k.name+'" is fixed disk '+h,!0));sx(g,k);k.Va=p[u++];k.hb=null;k.va&&(g=p[u],void 0!==g&&0>k.va.restore(g)&&(D=!1),D&&void 0!==k.Va&&(k.hb=k.va.seek(k.Pd,k.bb,k.jb+k.fg)));D||(e=!1);null!=a.P&&1>=d&&(a.P|=(f.type&3)<<(1-d<<
|
||||
1))}0<=a.Ya&&(a.B=a.A[a.Ya]);return e}
|
||||
function hx(a){var b=0,c=[];a.M?(c[b++]=a.I,c[b++]=a.ta,c[b++]=a.J,c[b++]=a.fa,c[b++]=a.ea,c[b++]=a.ba,c[b++]=a.U,c[b++]=a.ga,c[b++]=a.ha,c[b++]=[a.L,a.Ya]):(c[b++]=a.P,c[b++]=a.ga,c[b++]=a.F,c[b++]=a.D,c[b++]=a.C,c[b++]=a.ra,c[b++]=a.pa,c[b++]=a.qa,c[b++]=a.N);for(var d=0,e=[],f=0;f<a.A.length;f++){var g=d++,h=a.A[f],k=0,m=[];m[k++]=h.errorCode;m[k++]=h.$k;m[k++]=h.Oe;m[k++]=h.Ge;m[k++]=h.He;m[k++]=h.bb;m[k++]=h.gb;m[k++]=h.Pd;m[k++]=h.jb;m[k++]=h.Wd;m[k++]=h.yb;m[k++]=h.Va;m[k]=h.va?h.va.save():
|
||||
null;e[g]=m}c[b]=e;return c}l.fj=function(a){var b;a=this.A[a];if(void 0!==a){b={};for(var c in a)b[c]=a[c]}return b};function nx(a,b,c){if(b){var d=0,e=0;null==c&&((d=b.Ge[2])?e=b.Ge[0]<<8|b.Ge[1]:c=b.type);null==c||d||(d=mx[a.H][c][1],e=mx[a.H][c][0]);d&&((c=mx[a.H][b.type])&&e!=c[0]&&d!=c[1]&&a.Da("Warning: drive parameters ("+e+","+d+") do not match drive type "+b.type+" ("+c[0]+","+c[1]+")"),b.sb=e,b.gb=d,null==b.va&&(b.va=new iv(a,b,b.mode)))}}
|
||||
l.Zk=function(a,b,c){if(a.va){var d=a.va.info(),e=d[0];if(e){var f=d[2],g=d[1]*f;if(b+c<=e*g)return a.Pd=Math.floor(b/g),b%=g,a.bb=Math.floor(b/f),a.jb=b%f,a.yb=c*d[3],a.errorCode=kx,!0}}return!1};function fx(a,b){b||(a.K=0);for(var c=0;c<a.A.length;c++){var d=a.A[c];d.name&&d.path?b&&d.va&&d.va.mg||!a.an(c,d.name,d.path,!0)&&b&&Jb(a,!1):b&&void 0!==d.type&&(d.va=null,nx(a,d,d.type))}return!!a.K}
|
||||
l.an=function(a,b,c,d){var e=this.A[a];if(e.pe)return this.Da("Drive "+a+" busy"),!0;e.pe=!0;d&&(e.oe=!0,this.K++,r(this)&&Nb(this,"loading "+b));(e.va||new iv(this,e,e.mode)).load(b,c,null,this.Bl);return!1};
|
||||
l.Bl=function(a,b,c){a.pe=!1;if(a.va=b)this.Da('Mounted disk "'+c+'" in drive '+String.fromCharCode(67+a.Ya),a.oe),b=b.info(),b[0]==a.sb&&b[1]==a.gb&&b[2]==a.Wa&&b[3]==a.Na||this.Da("Warning: disk geometry ("+b[0]+":"+b[1]+":"+b[2]+") does not match "+ox[this.H]+" drive type "+a.type+" ("+a.sb+":"+a.gb+":"+a.Wa+")");a.oe&&(a.oe=!1,--this.K||Jb(this))};
|
||||
l.Nm=function(a,b){var c=0;this.D<this.C&&(c=this.F[this.D]);this.V&&Ug(this.V,5);this.ga&=~px;t(this,a,null,b,"DATA["+this.D+"]",c);++this.D>=this.C&&(this.D=this.C=0,this.ga&=~(qx|rx|sx));return c};l.po=function(a,b,c){t(this,a,b,c,"DATA["+this.C+"]");this.C<this.F.length&&(this.F[this.C++]=b);a=this.F[0]!=tx?6:this.F.length;6==this.C&&(this.ga&=~ux);this.C>=a&&(this.ga|=qx,this.ga&=~ux,vx(this))};l.Om=function(a,b){var c=this.ga;t(this,a,null,b,"STATUS",c);this.D<this.C&&(this.ga|=ux);return c};
|
||||
l.so=function(a,b,c){t(this,a,b,c,"RESET");this.ra=b;this.V&&Ug(this.V,5);gx(this)};l.Mm=function(a,b){t(this,a,null,b,"CONFIG",this.P);return this.P};l.ro=function(a,b,c){t(this,a,b,c,"PULSE");this.pa=b;this.ga=ux|rx|sx};l.qo=function(a,b,c){t(this,a,b,c,"PATTERN");this.qa=b};l.fi=function(a,b,c){t(this,a,b,c,"NOISE")};
|
||||
function wx(a,b,c){var d=-1;a.B&&(d=a.xe(a.B,function(){}),1==a.B.Va||a.B.Va==a.B.Na)&&(r(a,1048832)&&t(a,b,null,c,"DATA["+a.B.Va+"]",d),1<a.B.Va&&(a.B.yb-=a.B.Na,a.J=a.J-1&255,a.B.yb>=a.B.Na?(a.ga=xx,a.xe(a.B,function(b){0<=b?(yx(a),a.V&&a.V.da==ul&&(a.ga=0),a.ga=a.ga|ix|zx|Ax):(a.ga=Bx,a.I=Cx)},!1)):a.ga=ix|zx));return d}l.kl=function(a,b){return wx(this,a,b)|wx(this,a,b)<<8};
|
||||
function Dx(a,b,c,d){if(a.B&&a.B.yb>=a.B.Na)if(0>Ex(a.B,c))a.ga=Bx,a.I=Cx;else if(1==a.B.Va||a.B.Va==a.B.Na)r(a,1048832)&&t(a,b,c,d,"DATA["+a.B.Va+"]"),1<a.B.Va&&(a.B.yb-=a.B.Na,a.J=a.J-1&255,yx(a),a.ga=ix|zx,a.B.yb>=a.B.Na&&(a.ga|=Ax))}l.yn=function(a,b,c){Dx(this,a,b&255,c);Dx(this,a,b>>8&255,c)};l.Ul=function(a,b){var c=this.I;t(this,a,null,b,"ERROR",c);return c};l.Dn=function(a,b,c){t(this,a,b,c,"WPREC");this.ta=b};l.Wl=function(a,b){var c=this.J;t(this,a,null,b,"SECCNT",c);return c};
|
||||
l.Bn=function(a,b,c){t(this,a,b,c,"SECCNT");this.J=b};l.Xl=function(a,b){var c=this.fa;t(this,a,null,b,"SECNUM",c);return c};l.Cn=function(a,b,c){t(this,a,b,c,"SECNUM");this.fa=b};l.Sl=function(a,b){var c=this.ea;t(this,a,null,b,"CYLLO",c);return c};l.xn=function(a,b,c){t(this,a,b,c,"CYLLO");this.ea=b};l.Rl=function(a,b){var c=this.ba;t(this,a,null,b,"CYLHI",c);return c};l.wn=function(a,b,c){t(this,a,b,c,"CYLHI");this.ba=b};l.Tl=function(a,b){var c=this.U;t(this,a,null,b,"DRVHD",c);return c};
|
||||
l.zn=function(a,b,c){t(this,a,b,c,"DRVHD");this.U=b;this.ga=this.A[this.U&Fx?1:0]?this.ga|ix|zx:this.ga&~ix};l.Yl=function(a,b){var c=this.ga;t(this,a,null,b,"STATUS",c);this.ga&ix&&(this.ga&=~xx);return c};l.vn=function(a,b,c){t(this,a,b,c,"COMMAND");this.ha=b;this.V&&Ug(this.V,14);Gx(this)};l.An=function(a,b,c){t(this,a,b,c,"FDR");this.L&Hx&&!(b&Hx)&&(this.I=Ix);this.L=b};
|
||||
function Gx(a){var b=!1,c=a.ha,d=a.U&Fx?1:0,e=a.U&Jx,f=a.ea|(a.ba&Kx)<<8,g=a.fa,h=a.J||256;a.Ya=-1;a.B=null;a.I=Lx;a.ga=ix|zx;var k=a.A[d];k?(k.Pd=f,k.bb=e,k.jb=g,k.yb=h*k.Na,c=c>=Mx?c:c&Nx,k.hb=null,k.Va=0,k.errorCode=0,a.Ya=d,a.B=k):c=-1;switch(c&Nx){case Ox:b=!0;break;case Px:a.ga=xx;a.xe(k,function(b){0<=b&&a.V?(yx(a),a.ga=ix|zx|Ax):(a.ga=Bx,a.I=Cx)},!1);break;case Qx:a.ga=Ax;break;case Rx:b=!0;break;case Sx:b=!0;break;case Mx:a.I=Ix;b=!0;break;case Tx:k.gb=e+1,k.Wa=h,b=!0}b&&yx(a)}
|
||||
function yx(a){!a.V||a.L&Ux||ih(a.V,14,120)}
|
||||
function vx(a){a.D=0;var b=Vx(a),c=Vx(a),d=c&32,e=d>>5,f=c&31,g=Vx(a),h=Vx(a),k=g<<2&768|h,m=g&63,p=Vx(a),v=Vx(a),u=a.A[e];u&&(u.Pd=k,u.bb=f,u.jb=m,u.yb=p*u.Na);switch(b){case Wx:Xx(a,u?u.errorCode:Yx);Zx(a,c);Zx(a,g);Zx(a,h);Zx(a,$x|d);b=-1;break;case tx:for(c=0;0<=(b=Vx(a));)u&&c<u.Ge.length&&(u.Ge[c++]=b);u&&nx(a,u);b=$x;u||a.N!=e||(a.N=-1,b=ay);Xx(a,b|d);b=-1;break;case by:case cy:Xx(a,$x|d),b=-1}if(0<=b)switch(void 0===u?b=-1:(u.errorCode=kx,u.$k=0),b){case dy:Xx(a,$x|d);break;case ey:u.lf=v;
|
||||
Xx(a,$x|d);break;case fy:Xx(a,$x|d);break;case gy:hy(a,u,function(b){Xx(a,b|d)});break;case iy:jy(a,u,function(b){Xx(a,b|d)});break;case ky:ly(a,u,function(b){Xx(a,b|d)});break;default:Xx(a,ay|d)}}function Vx(a){var b=-1;a.D<a.C&&(b=a.F[a.D++]);return b}function Xx(a,b){a.D=a.C=0;void 0!==b&&Zx(a,b);a.V&&ih(a.V,5);a.ga|=px}function Zx(a,b){a.F[a.C++]=b}l.il=function(a,b,c){void 0===b||0>b?this.xe(a,c):c(-1,!1)};l.jl=function(a,b){return void 0!==b&&0<=b?Ex(a,b):-1};
|
||||
l.zl=function(a,b){void 0!==b&&0<=b?(a.Va<a.He.length?a.He[a.Va++]=b:(a.errorCode=my,b=-1),a=b):a=-1;return a};l.Al=function(a,b){if(void 0!==b&&0<=b)a:if(a.errorCode)a=-1;else{a.Yc[a.Je++]=b;if(a.Je==a.Yc.length){a.Pd=a.Yc[0];a.bb=a.Yc[1];a.jb=a.Yc[2];a.yb=128<<a.Yc[3];for(var c=a.Je=0;c<a.yb;c++)if(0>Ex(a,a.Wi)){a=-1;break a}a.gg++}a.gg>=a.Wd&&(b=-1);a=b}else a=-1;return a};
|
||||
function hy(a,b,c){b.errorCode=Yx;if(b.va&&(b.hb=null,a.V)){b.errorCode=kx;Mn(a.V,3,a,"dmaRead",b);Dn(a.V,3,function(a){a||b.errorCode!=kx||(b.errorCode=Yx);c(b.errorCode?ay:$x)});return}c(b.errorCode?ay:$x)}function jy(a,b,c){b.errorCode=Yx;if(b.va&&(b.hb=null,a.V)){b.errorCode=kx;Mn(a.V,3,a,"dmaWrite",b);Dn(a.V,3,function(a){a||(b.errorCode==kx&&(b.errorCode=Yx),b.errorCode==my&&(b.errorCode=kx));c(b.errorCode?ay:$x)});return}c(b.errorCode?ay:$x)}
|
||||
function ly(a,b,c){b.errorCode=Yx;b.He&&b.He.length==b.yb||(b.He=Array(b.yb));b.Va=0;a.V?(b.errorCode=kx,Mn(a.V,3,a,"dmaWriteBuffer",b),Dn(a.V,3,function(a){a||b.errorCode!=kx||(b.errorCode=Yx);c(b.errorCode?ay:$x)})):c(b.errorCode?ay:$x)}
|
||||
l.xe=function(a,b,c){var d=-1,e=null,f=0;if(a.errorCode)return b&&b(d,!1,e,f),d;var g=!1!==c?1:0;if(a.hb&&(f=a.Va,d=a.va.read(a.hb,a.Va),a.Va+=g,0<=d))return e=a.hb,b&&b(d,!1,e,f),d;if(b){if(a.va)return a.va.seek(a.Pd,a.bb,a.jb+a.fg,!1,function(c,k){(a.hb=c)?(e=c,f=a.Va=0,ny(a),d=a.va.read(a.hb,a.Va),a.Va+=g):a.errorCode=my;b(d,k,e,f)}),d;a.errorCode=my;b(d,!1,e,f)}return d};
|
||||
function Ex(a,b){if(a.errorCode)return-1;do{if(a.hb&&a.va.write(a.hb,a.Va++,b))break;a.va&&a.va.seek(a.Pd,a.bb,a.jb+a.fg,!0,function(b){a.hb=b});if(!a.hb){a.errorCode=my;b=-1;break}a.Va=0;ny(a)}while(1);return b}function ny(a){a.jb++;var b=1-a.fg;a.jb>=a.Wa+b&&(a.jb=b,a.bb++,a.bb>=a.gb&&(a.bb=0,a.Pd++))}l.Pm=function(){var a=this.G.L&255;!(this.G.D>>8)&&128<a&&(this.N=a-128);return!0};l.Qm=function(){var a;(a=this.G.D>>8||!this.V)||(a=!(this.V.jc[0].ud&64));return a?!0:!1};
|
||||
var lx="Hard Drive",ox=["XTC","ATC","COMPAQ"],mx=[{0:[306,2],1:[375,8],2:[306,6],3:[306,4]},{1:[306,4],2:[615,4],3:[615,6],4:[940,8],5:[940,6],6:[615,4],7:[462,8],8:[733,5],9:[900,15],10:[820,3],11:[855,5],12:[855,7],13:[306,8],14:[733,7],16:[612,4],17:[977,5],18:[977,7],19:[1024,7],20:[733,5],21:[733,7],22:[733,5],23:[306,4]},{1:[306,4],2:[615,4],3:[615,6],4:[1023,8],5:[940,6],6:[697,5],7:[462,8],8:[925,5],9:[900,15],10:[980,5],11:[925,7],12:[925,9],13:[612,8],14:[980,4],16:[612,4],17:[980,5],18:[966,
|
||||
6],19:[1023,8],20:[733,5],21:[733,7],22:[524,4,40],23:[924,8],24:[966,14],25:[966,16],26:[1023,14],27:[832,6,33],28:[1222,15,34],29:[1240,7,34],30:[615,4,25],31:[615,8,25],32:[905,9,25],33:[832,8,33],34:[966,7,34],35:[966,8,34],36:[966,9,34],37:[966,5,34],38:[612,16,63],39:[1023,11,33],40:[1023,15,34],41:[1630,15,52],42:[1023,16,63],43:[805,4,26],44:[805,2,26],45:[748,8,33],46:[748,6,33],47:[966,5,25]}],ex=496,Ix=1,Lx=0,Cx=16,Kx=3,Jx=15,Fx=16,Bx=1,Ax=8,zx=16,ix=64,xx=128,Ox=16,Px=32,Qx=48,Rx=64,Sx=
|
||||
112,Mx=144,Tx=145,Nx=240,Ux=2,Hx=4,$x=0,ay=2,dy=0,ey=1,Wx=3,fy=5,gy=8,iy=10,tx=12,ky=15,by=224,cy=228,kx=0,Yx=4,my=20,jx=0,ux=1,qx=2,rx=4,sx=8,px=32,bx={800:$w.prototype.Nm,801:$w.prototype.Om,802:$w.prototype.Mm},ax={496:$w.prototype.kl,497:$w.prototype.Ul,498:$w.prototype.Wl,499:$w.prototype.Xl,500:$w.prototype.Sl,501:$w.prototype.Rl,502:$w.prototype.Tl,503:$w.prototype.Yl},dx={800:$w.prototype.po,801:$w.prototype.so,802:$w.prototype.ro,803:$w.prototype.qo,807:$w.prototype.fi,811:$w.prototype.fi,
|
||||
815:$w.prototype.fi},cx={496:$w.prototype.yn,497:$w.prototype.Dn,498:$w.prototype.Bn,499:$w.prototype.Cn,500:$w.prototype.xn,501:$w.prototype.wn,502:$w.prototype.zn,503:$w.prototype.vn,1014:$w.prototype.An};Xa(function(){for(var a=vb(document,"pcx86","hdc"),b=0;b<a.length;b++){var c=a[b],d=wb(c),d=new $w(d);ub(d,c)}});function oy(a){ib.call(this,"Debugger",a);this.D=+a.base||16;this.ha=["{","}"];this.Ea=["[","]"];this.ba=this.ka=this.P=0;this.fa=!1;this.A=-1;this.C=[];this.I={}}ba(oy,ib);
|
||||
oy.prototype.fh=function(){return-1};oy.prototype.gh=function(){};oy.prototype.Ok=function(a,b){return a.replace("["+b+"]","unimplemented")};
|
||||
oy.prototype.Bg=function(a,b,c){if(b)if(a){0>this.A&&this.C.length&&(this.A=0);if(0>this.A||a!=this.C[this.A])this.C.splice(0,0,a),this.A=0;this.A--}else this.fa?a="end":a=this.C[this.A+1];b=[];if(a){a=a.replace(/""/g,"'");var d=0,e=null;c=c||";";for(var f=0;f<=a.length;f++){var g=a.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==c&&!e||!g)b.push(wa(a.substring(d,f))),d=f+1}}return b};
|
||||
function py(a,b,c){var d=a;b=b||32;if(c)if(32==b)d=a>>>0;else if(32>b)d=a&(1<<b)-1;else{if(b=Math.pow(2,b),0>a||a>=b)d=a%b,0>d&&(d+=b)}else 32>=b?d=a<<32-b>>32-b:(b=Math.pow(2,b-1),a>=b?(d=a%b,(a/b|0)&1&&(d-=b)):a<-b&&(d=a%b,((-a-1)/b|0)&1?d&&(d+=b):d||(d-=b)));a!=d&&(a=d);return a}
|
||||
function qy(a,b,c){for(c=void 0===c?-1:c;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e,f=a.pop();e=a.pop();switch(d){case "*":e*=f;break;case "/":if(!f)return!1;e=Math.trunc(e/f);break;case "^/":if(!f)return!1;e%=f;break;case "+":e+=f;break;case "-":e-=f;break;case "<<":e<<=f;break;case ">>":e>>=f;break;case ">>>":e>>>=f;break;case "<":e=e<f?1:0;break;case "<=":e=e<=f?1:0;break;case ">":e=e>f?1:0;break;case ">=":e=e>=f?1:0;break;case "==":e=e==f?1:0;break;case "!=":e=e!=f?1:0;break;case "&":e&=
|
||||
f;break;case "!":case "|":e|=f;break;case "^!":e|=f;break;case "&&":e=e&&f?1:0;break;case "||":e=e||f?1:0;break;case ",,":e=py(e,18,!0)*Math.pow(2,18)+py(f,18,!0);break;case "_":case "^_":"^_"==d&&(f=35-(f&255));f&&(e=py(e,0,!0),e=0<f?e*Math.pow(2,f):Math.trunc(e/Math.pow(2,-f)));break;default:return!1}a.push(py(e))}return!0}
|
||||
function ry(a,b,c,d,e,f){var g,h,k,m=!1,p=0,v=[],u=[],D=a.D;for(a.D=e;c<d;){var G;h=b[c++].trim();k=c<d?b[c++]:"";if(h)G=sy(a,h,null,f,p);else if("{"==k){h=1;for(G=c;c<d;)if(c++,k=c<b.length?b[c++]:"","{"==k)h++;else if("}"==k&&!--h)break;G=ry(a,b,G,c-1,a.D,f);null!=G&&p&&(G=ty(G,p));h=c<d?b[c++].trim():"";k=c<d?b[c++]:""}else{if(" "==k)continue;if("^B"==k){a.D=2;continue}if("^O"==k){a.D=8;continue}if("^D"==k){a.D=10;continue}if(!(p&-1073741824)){if("+"==k)continue;if("-"==k){p=p<<2|1;continue}if("~"==
|
||||
k||"^-"==k){p=p<<2|2;continue}if("^L"==k){p=p<<2|3;continue}}m=!0;break}if(void 0===G)if(f)f.push(h),G=0;else{m=!0;f=[];break}v.push(py(G));if(" "==k)if(c<b.length-1&&!b[c])c++,k=b[c++];else{m=!0;break}if(!k)break;p="<"==a.ha[0]?uy:vy;if(!p[k]){m=!0;break}u.length&&p[k]<=p[u[u.length-1]]&&qy(v,u,1);u.push(k);a.D="^_"==k?10:e;p=0}if(m||!qy(v,u)||1!=v.length)m=!0;m?f||a.O("parse error ("+(h||k)+")"):g=v.pop();a.D=D;return g}
|
||||
function wy(a,b,c,d,e){for(var f;0<=(f=b.indexOf(c));){for(var g=0,h=f+1,k=e;h<b.length;){var m=b[h++];if(m==c){k=-1;break}if(!k)break;k--;m=m.charCodeAt(0);7==d?m&=127:m=m-32&63;g=py(g*Math.pow(2,d)+m,d*e,!0)}if(0<=k){a.O("parse error ("+c+b+c+")");return}b=b.substr(0,f)+xy(a,g,-1)+b.substr(h)}return b}
|
||||
function yy(a,b,c){var d=void 0,e=!1===c;c=Array.isArray(c)?c:void 0;if(b){"{"!=a.ha[0]&&(b=b.split(a.ha[0]).join("{").split(a.ha[1]).join("}"));b=wy(a,b,'"',7,5);if(!b)return d;b=wy(a,b,"'",6,6);if(!b)return d;16!=a.D&&(b=b.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/,"$1$2^_").replace(/\s+/g," "));b=b.split(/({|}|\|\||&&|\||\^!|\^B|\^O|\^D|\^L|\^-|~|\^_|_|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|\^\/|\/|\*|,,| )/);d=ry(a,b,0,b.length,a.D,c);void 0!==d&&e&&zy(a,null,d)}return d}
|
||||
function Ay(a,b){var c,d=a.ha[0],e=a.ha[1];c="("==d||"{"==d||"["==d?"\\":"";for(var f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);){var g=yy(a,c[1]);if(void 0===g)return;b=b.replace(d+c[1]+e,null!=g?xy(a,g):"undefined")}if(a.Ea.length)for(d=a.Ea[0],e=a.Ea[1],c="("==d||"{"==d||"["==d?"\\":"",f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);)b=a.Ok(b,c[1]);for(;d=b.match(/\$([a-z]+)/i);){e=null;switch(d[1].toLowerCase()){case "ops":e=a.ba-a.ka}if(null==
|
||||
e)break;b=b.replace(d[0],e.toString())}return b}function ty(a,b){for(;b;){switch(b&3){case 1:a=-py(a);break;case 2:a|=-1;break;case 3:for(var c=35;0<=c&&!(a&Math.pow(2,c));)c--;a=35-c}b>>>=2}return a}
|
||||
function sy(a,b,c,d,e){e=void 0===e?0:e;var f,g=Array.isArray(d)?d:void 0;if(null!=b){f=a.fh(b);if(0<=f)f=a.gh(f);else if(f=b,a.I[f]?f=a.I[f].value:(f=f.substr(0,6),f=a.I[f]&&a.I[f].value),null!=f){var h=a.I[b]&&a.I[b].Po;h&&(g?g.push(h):(g=yy(a,h,d),void 0!==g?f+=g:(d||a.O("undefined "+(c||"value")+": "+b+" ("+h+")"),f=void 0)))}else f=ia(b,1<b.length||10<a.D?a.D:10);null!=f?f=py(ty(f,e)):d||a.O("invalid "+(c||"value")+": "+b)}else d||a.O("missing "+(c||"value"));return f}
|
||||
function zy(a,b,c){var d,e=!1;void 0!==c&&(e=!0,d=8==a.D?xy(a,c,32,8,1)+" "+c+".":xy(a,c,32,16,1)+" "+xy(a,c,32,8,1)+" "+xy(a,c,32,2,8)+" "+c+".",32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'"));a.O((null!=b?b+": ":"")+d);return e}function By(a,b){var c=0;if(a.I){if(b)return zy(a,b,a.I[b]&&a.I[b].value);b=Object.keys(a.I);b.sort();for(var d=0;d<b.length;d++)zy(a,b[d],a.I[b[d]].value),c++}return 0<c}
|
||||
function xy(a,b,c,d,e){c=void 0===c?0:c;e=void 0===e?0:e;switch((void 0===d?0:d)||a.D){case 2:b=la(b,0<c?c:0,e);break;case 8:b=ma(b,0<c?(c+2)/3|0:0,!!e);break;case 10:(a=0<c?Math.ceil(.3*c):0)?11<a&&(a=11):a=99999>=Math.abs(b)?5:11;b=ja(b,10,a);break;default:b=q(b,0<c?c+3>>2:0,!!e)}0>c?c=b.replace(/^0+([0-9A-F]+)$/i,"$1"):c=b;return c}
|
||||
var vy={"||":5,"&&":6,"!":7,"|":7,"^!":8,"&":9,"!=":10,"==":10,">=":11,">":11,"<=":11,"<":11,">>>":12,">>":12,"<<":12,"-":13,"+":13,"^/":14,"/":14,"*":14,_:19,"^_":19,"{":20,"}":20},uy={",,":1,"||":5,"&&":6,"!=":10,"==":10,">=":11,">":11,"<=":11,"<":11,">>>":12,">>":12,"<<":12,"-":13,"+":13,"^/":14,"/":14,"*":14,"!":15,"|":15,"^!":15,"&":15,_:19,"^_":19,"{":20,"}":20};
|
||||
function Cy(a){oy.call(this,a);this.ra=4;this.la=5;this.xa=1048575;this.N=Dy(this,0,0);this.Ca=Dy(this,0,0);this.ea=Dy(this,0,0);this.F=[];this.B=this.V=this.L=[];Ey(this);this.wa=0;Fy(this);this.Fa={};Gy(this,a.messages);this.Ka=a.commands;var b=this;window?void 0===window.pcx86&&(window.pcx86=function(a){return Hy(b,a)}):void 0===global.pcx86&&(global.pcx86=function(a){return Hy(b,a)})}ba(Cy,oy);l=Cy.prototype;
|
||||
l.uc=function(a,b,c,d){this.na=b;this.G=c;this.oa=a;this.cb=Vb(a,"FDC");this.Pa=Vb(a,"HDC");this.Kc=Vb(a,"FPU");this.H=Vb(a,"Mouse");(a=ud(a,"messages"))&&Gy(this,a);this.la=b.I>>2;this.xa=b.N;this.ab=new Sd(this.G,7,"DBG");this.pa=Iy;80186<=this.G.da&&(this.pa=Iy.slice(),this.pa[15]=Jy,80286<=this.G.da&&(this.pa[15]=Ky,80386<=this.G.da&&(this.ra=8)));xl(this,64,function(a){Ly(d,d.G.tc,a[0])});xl(this,4,function(a){if(a=a[0]){var b=sy(d,a);if(void 0===b)d.O("invalid selector: "+a);else if(a=My(d,
|
||||
b,Ny),d.O("dumpSel("+oa(a?a.T:b)+"): %"+q(a?a.Ob:null,d.la)),a){var c,b=!1;if(a.type&4096)a.type&2048?(c="code"+(a.type&512?",readable":",execonly"),a.type&1024&&(c+=",conforming")):(c="data"+(a.type&512?",writable":",readonly"),a.type&1024&&(c+=",expdown")),a.type&256&&(c+=",accessed");else{var e=Oy[a.type];e&&(c=e[0],b=e[1])}!c||a.ob&32768||(c+=",not present");d.O((b?"seg="+oa(a.ua&65535)+" off="+oa(a.Sa):"base="+q(a.ua,d.la)+" limit="+Py(a.Sa))+" type="+na(a.type>>8)+" ("+c+") ext="+oa(a.ext&-65296)+
|
||||
" dpl="+na(a.rc))}}else d.O("no selector")});xl(this,134217728,function(a){var b;(a=a[0])&&(b=sy(d,a));if(void 0===b)d.O("invalid MCB");else for(d.O("dumpMCB("+oa(b)+")");b;){a=Dy(d,0,b);var c=d.ya(a,1),e=d.Wc(a,2),k=d.Wc(a,5);if(77!=c&&90!=c)break;d.O(Qy(0,b)+": '"+String.fromCharCode(c)+"' PID="+oa(e)+" LEN="+oa(k)+' "'+Ry(d,a,8)+'"');b+=1+k}});xl(this,128,function(a){Ly(d,d.G.aa,a[0],d.G.aa!==d.G.tc)});xl(this,8,function(a){a:{if(a=a[0]){var b=sy(d,a);if(void 0===b){d.O("invalid task selector: "+
|
||||
a);break a}a=My(d,b,Ny)}else a=d.G.ka;d.O("dumpTSS("+oa(a?a.T:b)+"): %"+q(a?a.ua:null,d.la));if(a){var b="",c=a.type&-513,e=256==c?4:8,k=256==c?Sy:Ty,m,p,v,u;for(u in k)m=k[u],p=a.ua+m,v=vg(d.G,p,2),2304==c&&(v|=vg(d.G,p+2,2)<<16),b&&(b+="\n"),b+=oa(m)+" "+va(u+":",11)+q(v,e);if(2304==c)for(u=0,m=v>>>16;m<a.Nb&&1023>u;){p=a.ua+m;v=vg(d.G,p,2);p=2;c="";if(!p||4<p)p=4;for(e=0;e<p;e++)c&&(c=","+c),c=la(v&255,8)+c,v>>=8;b+="\n"+oa(m)+" ports "+oa(u)+"-"+oa(u+15)+": "+(""+c);u+=16;m+=2}d.O(b)}}});this.J=
|
||||
null;this.La=0;this.Ga=!1;Rf(this.G,48,this.Tm.bind(this));Rf(this.G,65,this.Um.bind(this));this.aa=null;Rf(this.G,104,this.Vm.bind(this));Jb(this)};function Uy(a,b,c,d,e,f){b=Ry(a,b);var g=My(a,d),g=g?g.Sa+1:0,h=(e?"_CODE":"_DATA")+q(c,2);f&&r(a,128)&&a.message(b+" "+(e?"code":"data")+"("+q(c,4)+")=#"+q(d,4)+" len "+q(g));e=Vy(a,b,c);e[b+h]=0;dq(a,b,c,d,0,null,g,e)}
|
||||
function Wy(a,b,c,d){var e=a.Wc(b,2),f=a.Wc(b,2),g=Xy(a,b,4),h=Xy(a,b,4),k=Dy(a,Xy(a,b,4),a.Wc(b,2));b=Dy(a,Xy(a,b,4),a.Wc(b,2));b=Ry(a,b).toUpperCase();var k=Ry(a,k).toUpperCase(),m=(c?"_CODE":"_DATA")+q(e,2);d&&r(a,128)&&a.message((b==k?"":b+"!")+k+" "+(c?"code":"data")+"("+q(e,4)+")="+q(f,4)+":"+q(g)+" len "+q(h));c=Vy(a,k,e);c[k+m]=g;dq(a,k,e,f,g,null,h,c)}function Yy(a,b,c){c=Ry(a,c).toUpperCase();Zy(a,c,b)}
|
||||
l.Tm=function(){var a=this.G;if(null!=this.J&&2752554==a.D){var b=a.L&65535,c=a.K&65535,d=Dy(this,y(a)+12,a.U.T);switch(Xy(this,d)){case 336:Wy(this,Dy(this,a.H,b),!c,!!this.J)}}return!0};
|
||||
l.Um=function(a){var b=this.G,c=b.D&65535,d=b.H&65535,e=b.I&65535,f=b.L&65535,g=b.K&65535,h=b.J&65535,k=b.pa.T;if(null==this.J)return 79==c&&Sf(b,a,function(a){return function(){62342!=(b.D&65535)?(b.D=b.D&-65536|62342,Nb(a,"INT 0x41 handling enabled",128),a.J=!0):(Nb(a,"INT 0x41 monitoring enabled",128),a.J=!1)}}(this)),!0;switch(c){case 79:this.J&&(b.D=b.D&-65536|62342,Nb(this,"INT 0x41 handling enabled",128));break;case 80:Uy(this,Dy(this,h,k),d+1,e,!(g&1),!!this.J);break;case 82:Zy(this,null,
|
||||
d);break;case 127:this.J&&(b.D=b.D&-65536|(this.Ga?0:1));break;case 131:this.J&&(a=Dy(this,b.L,e),this.La++?(this.O("TRAPFAULT failed"),$y(this,this.B,a,!0,!0),this.La=0,this.Ub()):(this.O("INT 0x41 TRAPFAULT: fault="+oa(d)+" error="+q(b.K,8,!0)+" addr="+az(a)),this.td(this.B,a,!0),Fy(this,!0)));break;case 141:this.J&&(b.D=b.D&-65536|1);break;case 336:Wy(this,Dy(this,b.H,f),!g,!!this.J);break;case 338:Yy(this,d,Dy(this,b.J,f))}this.Ga=!1;return!this.J};
|
||||
l.Vm=function(a){var b=this.G,c=b.D&255,d=b.D>>8&255,e=b.H&65535,f=b.I&65535,g=b.L&65535,h=b.J&65535,k=b.pa.T;if(null==this.aa){if(67==d){if(609437257==b.ia((b.ba.T<<4)+10)||1111835735==b.ia((b.ba.T<<4)+95))return!0;Sf(b,a,function(a){return function(){62342!=(b.D&65535)?(b.D=b.D&-65536|62342,Nb(a,"INT 0x68 handling enabled",128),a.J=a.aa=!0):(Nb(a,"INT 0x68 monitoring enabled",128),a.aa=!1)}}(this))}return!0}switch(d){case 67:this.aa&&(b.D=b.D&-65536|62342);break;case 68:this.aa&&(a=Ud(b.ba,this.vl.bind(this)))&&
|
||||
(b.J=a[0],ne(b,a[1]));break;case 72:Zy(this,null,e);break;case 80:32==c?Uy(this,Dy(this,h,k),0,f,!0,!!this.aa):128>c?Uy(this,Dy(this,h,k),e+1,c&64?g:f,!(c&1),!!this.aa):Wy(this,Dy(this,h,k),!(c&1),!!this.aa),this.aa&&(b.D=b.D&-256|1)}return!this.aa};l.vl=function(){var a=this.G;5==(a.D&255)&&(a.I=a.K=0,a.D=a.D&-256|1);return!1};
|
||||
l.Eb=function(a,b,c){var d=this;switch(b){case "debugInput":return this.ta=this.ma[b]=c,c.onkeydown=function(a){var b;if(13==a.keyCode)b=c.value,c.value="",Hy(d,b,!0);else if(27==a.keyCode)c.value=b="";else if(38==a.keyCode?(b=null,d.A<d.C.length-1&&(b=d.C[++d.A])):40==a.keyCode&&(0<d.A?b=d.C[--d.A]:(b="",d.A=-1)),null!=b){var e=b.length;c.value=b;c.setSelectionRange(e,e)}null!=b&&a.preventDefault&&a.preventDefault()},!0;case "debugEnter":return this.ma[b]=c,Va(c,function(){if(d.ta){var a=d.ta.value;
|
||||
d.ta.value="";Hy(d,a,!0);return!0}return!1}),!0;case "step":return this.ma[b]=c,Va(c,function(a){var b=!1;Lb(d,!0)||(Mb(d,!0),b=bz(d,a?1:0),Mb(d,!1));return b}),!0}return!1};l.dd=function(){this.ta&&this.ta.focus()};function cz(a){return!(!(a.G&&a.G.ra&1)||a.G.P&131072)}
|
||||
function My(a,b,c){var d=cz(a)?Ny:dz;c||(c=d);if(c==d){if(b===a.G.ba.T)return a.G.ba;if(b===a.G.Fa.T)return a.G.Fa;if(b===a.G.pa.T)return a.G.pa;if(b===a.G.U.T)return a.G.U;if(80386<=a.G.da){if(b===a.G.Ka.T)return a.G.Ka;if(b===a.G.La.T)return a.G.La}if(a.Ia&&c==Ny||!a.ab)return null}a=a.ab;if(c!=Ny)a.mh(b),a.Sa=65535,a.Nb=65536;else{var e;c=a.Lb;b&=65535;b&4?(d=c.Gb.ua,e=d+c.Gb.Sa|0):(d=c.Kb,e=c.Ic);d=d+(b&65528)|0;if(e-d|0){e=vg(c,d+0,2);var f=vg(c,d+4,2),g=f&7936,h=vg(c,d+2,2)|(f&255)<<16,k=vg(c,
|
||||
d+6,2);80386<=c.da&&(h|=(k&65280)<<16,e|=(k&15)<<16,k&128&&(e=e<<12|4095));a.T=b;a.ua=h;a.Sa=e;a.Nb=(e>>>0)+1;a.ob=f;a.type=g;a.ext=k;a.Ob=d;Td(a,!0,!0,!1)}}return a}l.Wb=function(a,b,c){var d=a&&a.za;if(null==d&&(d=-1,a)){var e=My(this,a.T,a.type);e&&(b=a.Ja||0,c=c||1,d=e=-1===e.Ob||e.fd&&(b>>>0)+c>e.Nb||!e.fd&&(b>>>0)+c<=e.Nb?e.ua+b|0:-1,a.za=d)}return d};l.ya=function(a,b){var c=255,d=this.Wb(a,!1,1);-1!==d&&(c=vg(this.G,d,1,a.type==ez)|0,b&&fz(this,a,b));return c};
|
||||
l.nb=function(a,b){return a.Jb?Xy(this,a,b?4:0):this.Wc(a,b?2:0)};l.Wc=function(a,b){var c=65535,d=this.Wb(a,!1,2);-1!==d&&(c=vg(this.G,d,2,a.type==ez)|0,b&&fz(this,a,b));return c};function Xy(a,b,c){var d=-1,e=a.Wb(b,!1,4);-1!==e&&(d=vg(a.G,e,4,b.type==ez)|0,c&&fz(a,b,c));return d}l.ub=function(a,b,c,d){var e=this.Wb(a,!0,1);if(-1!==e){if(a.type!=ez)this.G.ub(e,b);else{var f=this.na;f.aa[(e&f.C)>>>f.A].df(e&f.D,b&255,e)}c&&fz(this,a,c);d||zd(this.G,!0)}};
|
||||
l.fl=function(a,b,c){var d=this.Wb(a,!0,2);-1!==d&&(a.type!=ez?this.G.ib(d,b):Fc(this.na,d,b),c&&fz(this,a,c),zd(this.G,!0))};function Dy(a,b,c,d,e,f,g){return gz(a,{},b,c,d,e,f,g)}function gz(a,b,c,d,e,f,g,h){b.Ja=c||0;b.T=d;b.za=e;b.type=f||(cz(a)?Ny:dz);b.Jb=null!=g?g:!(!a.G||4!=a.G.ba.X);b.gc=null!=h?h:!(!a.G||4!=a.G.ba.Mc);b.yd=!1;return b}function hz(a){return[a.Ja,a.T,a.za,a.yd,a.Jb,a.gc,a.Ie,a.ah]}function iz(a){return{Ja:a[0],T:a[1],za:a[2],yd:a[3],Jb:a[4],gc:a[5],Ie:a[6],ah:a[7]}}
|
||||
function jz(a,b,c){if(null!=b.T&&(a=My(a,b.T,b.type))){var d=b.Ja&a.xa;if(!a.fd){if(d>>>0>=a.Nb)return!1}else if(d>>>0<a.Nb)return!1;c&&(b.Ja=d,b.Jb=4==a.X,b.gc=4==a.Mc)}return!0}
|
||||
function kz(a,b,c,d){var e,f=c?a.N:a.Ca;c=d?lz:f.type;var g=f.Ja,h=f.T,f=f.za;if(void 0!==b){b=Ay(a,b);e=b.charAt(0);f=b.indexOf(":");switch(e){case "&":c=dz;break;case "#":c=Ny;break;case "%":c=mz;e=b.charAt(1);"%"==e&&(c=ez,e+=e);g=0;h=null;break;default:0<=f&&(c=lz),e=""}e&&(b=b.substr(e.length),f-=e.length);e=b;var k;if(e.match(/^[a-z_][a-z0-9_]*$/i))for(var m=e.toUpperCase(),p=0;p<a.F.length;p++){e=a.F[p];var v=e.Jd[m];if(void 0!==v){m=v.o;void 0!==m&&(k=v.s,void 0===k&&(k=e.T),k=Dy(a,m,k,v.p));
|
||||
break}}if(e=k)return e;0>f?null!=h?(g=yy(a,b,void 0),f=null):(f=yy(a,b,void 0),null==f&&(g=null)):(h=yy(a,b.substring(0,f),void 0),g=yy(a,b.substring(f+1),void 0),f=null)}null!=g&&(e=Dy(a,g,h,f,c),d||jz(a,e,!0)||(a.O("invalid offset: "+az(e)),e=null));return e}function nz(a,b,c){c&&(c=c.match(/(['"])(.*?)\1/))&&(b.pl=a.Bg(b.Xk=c[2]))}l.Ok=function(a,b){var c=kz(this,b);return a.replace("["+b+"]",c?q(this.nb(c),c.Jb?8:4):"undefined")};
|
||||
function fz(a,b,c){c=c||1;null!=b.za&&(b.za+=c);null!=b.T&&(b.Ja+=c,jz(a,b)||(b.Ja=0,b.za=null))}function Qy(a,b,c){return null!=b?q(b,4)+":"+q(a,a&-65536||c?8:4):q(a)}function az(a){var b;switch(a.type){case dz:case oz:b="&";break;case Ny:b="#";break;case mz:b="%";break;case ez:b="%%";break;default:b=a.T?"":"%"}return a.type>=mz||null==a.T?b+q(a.za):b+Qy(a.Ja,a.T,a.gc)}
|
||||
function Ry(a,b,c){var d="";for(c=c||256;d.length<c;){var e=a.ya(b,1);if(!e||36==e||127<=e)break;d+=32<=e?String.fromCharCode(e):"."}return d}
|
||||
function Ly(a,b,c,d){var e=0,f=0,g=b.length;if(c){e=a.Wb(kz(a,c));if(-1===e){a.O("invalid address: "+c);return}f=e>>>a.G.lb;g=1}a.O("blockid "+(d?"linear ":"physical")+" blockaddr used size type");a.O("-------- --------- ---------- ------ ------ ----");c=-1;for(var h=0;g--;)(d=b[f])&&d.type==Yc&&(d=kd(a.G,e,!1,!0)),d.type==c?h++||a.O("..."):(c=d.type,h=oc[c],c==$c&&(d=d.vd,h+=" -> "+oc[d.type]),d&&a.O(q(d.id,8)+" %"+q(f<<a.G.lb,8)+" %%"+q(d.za,8)+" "+oa(d.Be)+" "+oa(d.size)+
|
||||
" "+h),c!=Xc&&c!=Yc&&(c=-1),h=0),e+=a.G.Mg,f++}function pz(a,b,c){a=q(a)+" "+q(b)+" ";a=a+(c&&b&64?"D":"-")+(b&32?"A":"-")+(b&4?"U":"S");a+=b&2?"W":"R";return a+=b&1?"P":"N"}function Vy(a,b,c){var d=[],e;for(e=null;e=Vb(a.oa,"Disk",e);){var f=e,g=b,h=c,d={};if(f.C)for(var k=0;k<f.C.length;k++){var m=f.C[k];if(m.Of==g&&(m=m.sd[h])){for(var p in m.he)f=m.he[p],d[f[1]]=f[0];break}}if(d.length)break}return d}
|
||||
function Gy(a,b){a.ca=a;a.fc=a.tl=1073741824;a.Aa=null;a.Ba=[];b=a.Bg(b.replace("keys","key").replace("kbd","keyboard"),!1,"|");if(b.length)for(var c in Tb)0<=Ca(b,c)&&(a.fc|=Tb[c],a.O(c+" messages enabled"));Fy(a)}function xl(a,b,c){for(var d in Tb)if(b==Tb[d]){a.Fa[d]=c;break}}l.fh=function(a,b){var c;a=a.toUpperCase();null==b?c=Ca(qz,a):(c=Ca(qz,a.substr(b,3)),0>c&&(c=Ca(qz,a.substr(b,2))));return c};
|
||||
function rz(a,b){var c=0,d=a.gh(b);if(null!=d)switch(b){case sz:case tz:case uz:case vz:case wz:case xz:case yz:case zz:c=2;break;case Az:case Bz:case Cz:case Dz:case Ez:case Fz:case Gz:case Hz:case Iz:case Jz+Kz:case Jz+Lz:case Jz+Mz:case Jz+Nz:case Jz+Oz:case Jz+Pz:c=4;break;case Qz:case Rz:case Sz:case Tz:case Uz:case Vz:case Wz:case Xz:case Yz:case Zz:case $z:case aA:case bA:c=8;break;case cA:c=a.ra}return c?q(d,c):"??"}
|
||||
l.gh=function(a){var b;if(0<=a){var c=this.G;switch(a){case sz:b=c.D&255;break;case tz:b=c.I&255;break;case uz:b=c.L&255;break;case vz:b=c.H&255;break;case wz:b=c.D>>8&255;break;case xz:b=c.I>>8&255;break;case yz:b=c.L>>8&255;break;case zz:b=c.H>>8&255;break;case Az:b=c.D&65535;break;case Bz:b=c.I&65535;break;case Cz:b=c.L&65535;break;case Dz:b=c.H&65535;break;case Ez:b=y(c)&65535;break;case Fz:b=c.N&65535;break;case Gz:b=c.K&65535;break;case Hz:b=c.J&65535;break;case Iz:b=z(c)&65535;break;case cA:b=
|
||||
qe(c);break;case Jz+Kz:b=c.pa.T;break;case Jz+Lz:b=c.ba.T;break;case Jz+Mz:b=c.U.T;break;case Jz+Nz:b=c.Fa.T;break;default:if(80286==this.G.da)a==Yz&&(b=c.ra);else if(80386<=this.G.da)switch(a){case Qz:b=c.D;break;case Rz:b=c.I;break;case Sz:b=c.L;break;case Tz:b=c.H;break;case Uz:b=y(c);break;case Vz:b=c.N;break;case Wz:b=c.K;break;case Xz:b=c.J;break;case Yz:b=c.ra;break;case Zz:b=c.Ng;break;case $z:b=c.qd;break;case aA:b=c.Uc;break;case Jz+Oz:b=c.Ka.T;break;case Jz+Pz:b=c.La.T;break;case bA:b=
|
||||
function mx(a){var b=0,c=[];a.M?(c[b++]=a.I,c[b++]=a.ta,c[b++]=a.J,c[b++]=a.fa,c[b++]=a.ea,c[b++]=a.ba,c[b++]=a.U,c[b++]=a.ga,c[b++]=a.ha,c[b++]=[a.L,a.Ya]):(c[b++]=a.P,c[b++]=a.ga,c[b++]=a.F,c[b++]=a.D,c[b++]=a.C,c[b++]=a.ra,c[b++]=a.pa,c[b++]=a.qa,c[b++]=a.N);for(var d=0,e=[],f=0;f<a.A.length;f++){var g=d++,h=a.A[f],k=0,m=[];m[k++]=h.errorCode;m[k++]=h.$k;m[k++]=h.Oe;m[k++]=h.Ge;m[k++]=h.He;m[k++]=h.bb;m[k++]=h.gb;m[k++]=h.Pd;m[k++]=h.jb;m[k++]=h.Wd;m[k++]=h.yb;m[k++]=h.Va;m[k]=h.va?h.va.save():
|
||||
null;e[g]=m}c[b]=e;return c}l.fj=function(a){var b;a=this.A[a];if(void 0!==a){b={};for(var c in a)b[c]=a[c]}return b};function sx(a,b,c){if(b){var d=0,e=0;null==c&&((d=b.Ge[2])?e=b.Ge[0]<<8|b.Ge[1]:c=b.type);null==c||d||(d=rx[a.H][c][1],e=rx[a.H][c][0]);d&&((c=rx[a.H][b.type])&&e!=c[0]&&d!=c[1]&&a.Da("Warning: drive parameters ("+e+","+d+") do not match drive type "+b.type+" ("+c[0]+","+c[1]+")"),b.sb=e,b.gb=d,null==b.va&&(b.va=new nv(a,b,b.mode)))}}
|
||||
l.Zk=function(a,b,c){if(a.va){var d=a.va.info(),e=d[0];if(e){var f=d[2],g=d[1]*f;if(b+c<=e*g)return a.Pd=Math.floor(b/g),b%=g,a.bb=Math.floor(b/f),a.jb=b%f,a.yb=c*d[3],a.errorCode=px,!0}}return!1};function kx(a,b){b||(a.K=0);for(var c=0;c<a.A.length;c++){var d=a.A[c];d.name&&d.path?b&&d.va&&d.va.mg||!a.en(c,d.name,d.path,!0)&&b&&Jb(a,!1):b&&void 0!==d.type&&(d.va=null,sx(a,d,d.type))}return!!a.K}
|
||||
l.en=function(a,b,c,d){var e=this.A[a];if(e.pe)return this.Da("Drive "+a+" busy"),!0;e.pe=!0;d&&(e.oe=!0,this.K++,r(this)&&Nb(this,"loading "+b));(e.va||new nv(this,e,e.mode)).load(b,c,null,this.Bl);return!1};
|
||||
l.Bl=function(a,b,c){a.pe=!1;if(a.va=b)this.Da('Mounted disk "'+c+'" in drive '+String.fromCharCode(67+a.Ya),a.oe),b=b.info(),b[0]==a.sb&&b[1]==a.gb&&b[2]==a.Wa&&b[3]==a.Na||this.Da("Warning: disk geometry ("+b[0]+":"+b[1]+":"+b[2]+") does not match "+tx[this.H]+" drive type "+a.type+" ("+a.sb+":"+a.gb+":"+a.Wa+")");a.oe&&(a.oe=!1,--this.K||Jb(this))};
|
||||
l.Rm=function(a,b){var c=0;this.D<this.C&&(c=this.F[this.D]);this.V&&Ug(this.V,5);this.ga&=~ux;t(this,a,null,b,"DATA["+this.D+"]",c);++this.D>=this.C&&(this.D=this.C=0,this.ga&=~(vx|wx|xx));return c};l.xo=function(a,b,c){t(this,a,b,c,"DATA["+this.C+"]");this.C<this.F.length&&(this.F[this.C++]=b);a=this.F[0]!=yx?6:this.F.length;6==this.C&&(this.ga&=~zx);this.C>=a&&(this.ga|=vx,this.ga&=~zx,Ax(this))};l.Sm=function(a,b){var c=this.ga;t(this,a,null,b,"STATUS",c);this.D<this.C&&(this.ga|=zx);return c};
|
||||
l.Ao=function(a,b,c){t(this,a,b,c,"RESET");this.ra=b;this.V&&Ug(this.V,5);lx(this)};l.Qm=function(a,b){t(this,a,null,b,"CONFIG",this.P);return this.P};l.zo=function(a,b,c){t(this,a,b,c,"PULSE");this.pa=b;this.ga=zx|wx|xx};l.yo=function(a,b,c){t(this,a,b,c,"PATTERN");this.qa=b};l.fi=function(a,b,c){t(this,a,b,c,"NOISE")};
|
||||
function Bx(a,b,c){var d=-1;a.B&&(d=a.xe(a.B,function(){}),1==a.B.Va||a.B.Va==a.B.Na)&&(r(a,1048832)&&t(a,b,null,c,"DATA["+a.B.Va+"]",d),1<a.B.Va&&(a.B.yb-=a.B.Na,a.J=a.J-1&255,a.B.yb>=a.B.Na?(a.ga=Cx,a.xe(a.B,function(b){0<=b?(Dx(a),a.V&&a.V.da==ul&&(a.ga=0),a.ga=a.ga|nx|Ex|Fx):(a.ga=Gx,a.I=Hx)},!1)):a.ga=nx|Ex));return d}l.kl=function(a,b){return Bx(this,a,b)|Bx(this,a,b)<<8};
|
||||
function Ix(a,b,c,d){if(a.B&&a.B.yb>=a.B.Na)if(0>Jx(a.B,c))a.ga=Gx,a.I=Hx;else if(1==a.B.Va||a.B.Va==a.B.Na)r(a,1048832)&&t(a,b,c,d,"DATA["+a.B.Va+"]"),1<a.B.Va&&(a.B.yb-=a.B.Na,a.J=a.J-1&255,Dx(a),a.ga=nx|Ex,a.B.yb>=a.B.Na&&(a.ga|=Fx))}l.Cn=function(a,b,c){Ix(this,a,b&255,c);Ix(this,a,b>>8&255,c)};l.Ul=function(a,b){var c=this.I;t(this,a,null,b,"ERROR",c);return c};l.Hn=function(a,b,c){t(this,a,b,c,"WPREC");this.ta=b};l.Wl=function(a,b){var c=this.J;t(this,a,null,b,"SECCNT",c);return c};
|
||||
l.Fn=function(a,b,c){t(this,a,b,c,"SECCNT");this.J=b};l.Xl=function(a,b){var c=this.fa;t(this,a,null,b,"SECNUM",c);return c};l.Gn=function(a,b,c){t(this,a,b,c,"SECNUM");this.fa=b};l.Sl=function(a,b){var c=this.ea;t(this,a,null,b,"CYLLO",c);return c};l.Bn=function(a,b,c){t(this,a,b,c,"CYLLO");this.ea=b};l.Rl=function(a,b){var c=this.ba;t(this,a,null,b,"CYLHI",c);return c};l.An=function(a,b,c){t(this,a,b,c,"CYLHI");this.ba=b};l.Tl=function(a,b){var c=this.U;t(this,a,null,b,"DRVHD",c);return c};
|
||||
l.Dn=function(a,b,c){t(this,a,b,c,"DRVHD");this.U=b;this.ga=this.A[this.U&Kx?1:0]?this.ga|nx|Ex:this.ga&~nx};l.Yl=function(a,b){var c=this.ga;t(this,a,null,b,"STATUS",c);this.ga&nx&&(this.ga&=~Cx);return c};l.zn=function(a,b,c){t(this,a,b,c,"COMMAND");this.ha=b;this.V&&Ug(this.V,14);Lx(this)};l.En=function(a,b,c){t(this,a,b,c,"FDR");this.L&Mx&&!(b&Mx)&&(this.I=Nx);this.L=b};
|
||||
function Lx(a){var b=!1,c=a.ha,d=a.U&Kx?1:0,e=a.U&Ox,f=a.ea|(a.ba&Px)<<8,g=a.fa,h=a.J||256;a.Ya=-1;a.B=null;a.I=Qx;a.ga=nx|Ex;var k=a.A[d];k?(k.Pd=f,k.bb=e,k.jb=g,k.yb=h*k.Na,c=c>=Rx?c:c&Sx,k.hb=null,k.Va=0,k.errorCode=0,a.Ya=d,a.B=k):c=-1;switch(c&Sx){case Tx:b=!0;break;case Ux:a.ga=Cx;a.xe(k,function(b){0<=b&&a.V?(Dx(a),a.ga=nx|Ex|Fx):(a.ga=Gx,a.I=Hx)},!1);break;case Vx:a.ga=Fx;break;case Wx:b=!0;break;case Xx:b=!0;break;case Rx:a.I=Nx;b=!0;break;case Yx:k.gb=e+1,k.Wa=h,b=!0}b&&Dx(a)}
|
||||
function Dx(a){!a.V||a.L&Zx||Wg(a.V,14,120)}
|
||||
function Ax(a){a.D=0;var b=$x(a),c=$x(a),d=c&32,e=d>>5,f=c&31,g=$x(a),h=$x(a),k=g<<2&768|h,m=g&63,p=$x(a),v=$x(a),u=a.A[e];u&&(u.Pd=k,u.bb=f,u.jb=m,u.yb=p*u.Na);switch(b){case ay:by(a,u?u.errorCode:cy);dy(a,c);dy(a,g);dy(a,h);dy(a,ey|d);b=-1;break;case yx:for(c=0;0<=(b=$x(a));)u&&c<u.Ge.length&&(u.Ge[c++]=b);u&&sx(a,u);b=ey;u||a.N!=e||(a.N=-1,b=fy);by(a,b|d);b=-1;break;case gy:case hy:by(a,ey|d),b=-1}if(0<=b)switch(void 0===u?b=-1:(u.errorCode=px,u.$k=0),b){case iy:by(a,ey|d);break;case jy:u.lf=v;
|
||||
by(a,ey|d);break;case ky:by(a,ey|d);break;case ly:my(a,u,function(b){by(a,b|d)});break;case ny:oy(a,u,function(b){by(a,b|d)});break;case py:qy(a,u,function(b){by(a,b|d)});break;default:by(a,fy|d)}}function $x(a){var b=-1;a.D<a.C&&(b=a.F[a.D++]);return b}function by(a,b){a.D=a.C=0;void 0!==b&&dy(a,b);a.V&&Wg(a.V,5);a.ga|=ux}function dy(a,b){a.F[a.C++]=b}l.il=function(a,b,c){void 0===b||0>b?this.xe(a,c):c(-1,!1)};l.jl=function(a,b){return void 0!==b&&0<=b?Jx(a,b):-1};
|
||||
l.zl=function(a,b){void 0!==b&&0<=b?(a.Va<a.He.length?a.He[a.Va++]=b:(a.errorCode=ry,b=-1),a=b):a=-1;return a};l.Al=function(a,b){if(void 0!==b&&0<=b)a:if(a.errorCode)a=-1;else{a.Yc[a.Je++]=b;if(a.Je==a.Yc.length){a.Pd=a.Yc[0];a.bb=a.Yc[1];a.jb=a.Yc[2];a.yb=128<<a.Yc[3];for(var c=a.Je=0;c<a.yb;c++)if(0>Jx(a,a.Wi)){a=-1;break a}a.gg++}a.gg>=a.Wd&&(b=-1);a=b}else a=-1;return a};
|
||||
function my(a,b,c){b.errorCode=cy;if(b.va&&(b.hb=null,a.V)){b.errorCode=px;Mn(a.V,3,a,"dmaRead",b);Dn(a.V,3,function(a){a||b.errorCode!=px||(b.errorCode=cy);c(b.errorCode?fy:ey)});return}c(b.errorCode?fy:ey)}function oy(a,b,c){b.errorCode=cy;if(b.va&&(b.hb=null,a.V)){b.errorCode=px;Mn(a.V,3,a,"dmaWrite",b);Dn(a.V,3,function(a){a||(b.errorCode==px&&(b.errorCode=cy),b.errorCode==ry&&(b.errorCode=px));c(b.errorCode?fy:ey)});return}c(b.errorCode?fy:ey)}
|
||||
function qy(a,b,c){b.errorCode=cy;b.He&&b.He.length==b.yb||(b.He=Array(b.yb));b.Va=0;a.V?(b.errorCode=px,Mn(a.V,3,a,"dmaWriteBuffer",b),Dn(a.V,3,function(a){a||b.errorCode!=px||(b.errorCode=cy);c(b.errorCode?fy:ey)})):c(b.errorCode?fy:ey)}
|
||||
l.xe=function(a,b,c){var d=-1,e=null,f=0;if(a.errorCode)return b&&b(d,!1,e,f),d;var g=!1!==c?1:0;if(a.hb&&(f=a.Va,d=a.va.read(a.hb,a.Va),a.Va+=g,0<=d))return e=a.hb,b&&b(d,!1,e,f),d;if(b){if(a.va)return a.va.seek(a.Pd,a.bb,a.jb+a.fg,!1,function(c,k){(a.hb=c)?(e=c,f=a.Va=0,sy(a),d=a.va.read(a.hb,a.Va),a.Va+=g):a.errorCode=ry;b(d,k,e,f)}),d;a.errorCode=ry;b(d,!1,e,f)}return d};
|
||||
function Jx(a,b){if(a.errorCode)return-1;do{if(a.hb&&a.va.write(a.hb,a.Va++,b))break;a.va&&a.va.seek(a.Pd,a.bb,a.jb+a.fg,!0,function(b){a.hb=b});if(!a.hb){a.errorCode=ry;b=-1;break}a.Va=0;sy(a)}while(1);return b}function sy(a){a.jb++;var b=1-a.fg;a.jb>=a.Wa+b&&(a.jb=b,a.bb++,a.bb>=a.gb&&(a.bb=0,a.Pd++))}l.Tm=function(){var a=this.G.L&255;!(this.G.D>>8)&&128<a&&(this.N=a-128);return!0};l.Um=function(){var a;(a=this.G.D>>8||!this.V)||(a=!(this.V.jc[0].ud&64));return a?!0:!1};
|
||||
var qx="Hard Drive",tx=["XTC","ATC","COMPAQ"],rx=[{0:[306,2],1:[375,8],2:[306,6],3:[306,4]},{1:[306,4],2:[615,4],3:[615,6],4:[940,8],5:[940,6],6:[615,4],7:[462,8],8:[733,5],9:[900,15],10:[820,3],11:[855,5],12:[855,7],13:[306,8],14:[733,7],16:[612,4],17:[977,5],18:[977,7],19:[1024,7],20:[733,5],21:[733,7],22:[733,5],23:[306,4]},{1:[306,4],2:[615,4],3:[615,6],4:[1023,8],5:[940,6],6:[697,5],7:[462,8],8:[925,5],9:[900,15],10:[980,5],11:[925,7],12:[925,9],13:[612,8],14:[980,4],16:[612,4],17:[980,5],18:[966,
|
||||
6],19:[1023,8],20:[733,5],21:[733,7],22:[524,4,40],23:[924,8],24:[966,14],25:[966,16],26:[1023,14],27:[832,6,33],28:[1222,15,34],29:[1240,7,34],30:[615,4,25],31:[615,8,25],32:[905,9,25],33:[832,8,33],34:[966,7,34],35:[966,8,34],36:[966,9,34],37:[966,5,34],38:[612,16,63],39:[1023,11,33],40:[1023,15,34],41:[1630,15,52],42:[1023,16,63],43:[805,4,26],44:[805,2,26],45:[748,8,33],46:[748,6,33],47:[966,5,25]}],jx=496,Nx=1,Qx=0,Hx=16,Px=3,Ox=15,Kx=16,Gx=1,Fx=8,Ex=16,nx=64,Cx=128,Tx=16,Ux=32,Vx=48,Wx=64,Xx=
|
||||
112,Rx=144,Yx=145,Sx=240,Zx=2,Mx=4,ey=0,fy=2,iy=0,jy=1,ay=3,ky=5,ly=8,ny=10,yx=12,py=15,gy=224,hy=228,px=0,cy=4,ry=20,ox=0,zx=1,vx=2,wx=4,xx=8,ux=32,gx={800:ex.prototype.Rm,801:ex.prototype.Sm,802:ex.prototype.Qm},fx={496:ex.prototype.kl,497:ex.prototype.Ul,498:ex.prototype.Wl,499:ex.prototype.Xl,500:ex.prototype.Sl,501:ex.prototype.Rl,502:ex.prototype.Tl,503:ex.prototype.Yl},ix={800:ex.prototype.xo,801:ex.prototype.Ao,802:ex.prototype.zo,803:ex.prototype.yo,807:ex.prototype.fi,811:ex.prototype.fi,
|
||||
815:ex.prototype.fi},hx={496:ex.prototype.Cn,497:ex.prototype.Hn,498:ex.prototype.Fn,499:ex.prototype.Gn,500:ex.prototype.Bn,501:ex.prototype.An,502:ex.prototype.Dn,503:ex.prototype.zn,1014:ex.prototype.En};Xa(function(){for(var a=vb(document,"pcx86","hdc"),b=0;b<a.length;b++){var c=a[b],d=wb(c),d=new ex(d);ub(d,c)}});function ty(a){ib.call(this,"Debugger",a);this.D=+a.base||16;this.ha=["{","}"];this.Ea=["[","]"];this.ba=this.ka=this.P=0;this.fa=!1;this.A=-1;this.C=[];this.I={}}ba(ty,ib);
|
||||
ty.prototype.fh=function(){return-1};ty.prototype.gh=function(){};ty.prototype.Ok=function(a,b){return a.replace("["+b+"]","unimplemented")};
|
||||
ty.prototype.Bg=function(a,b,c){if(b)if(a){0>this.A&&this.C.length&&(this.A=0);if(0>this.A||a!=this.C[this.A])this.C.splice(0,0,a),this.A=0;this.A--}else this.fa?a="end":a=this.C[this.A+1];b=[];if(a){a=a.replace(/""/g,"'");var d=0,e=null;c=c||";";for(var f=0;f<=a.length;f++){var g=a.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==c&&!e||!g)b.push(wa(a.substring(d,f))),d=f+1}}return b};
|
||||
function uy(a,b,c){var d=a;b=b||32;if(c)if(32==b)d=a>>>0;else if(32>b)d=a&(1<<b)-1;else{if(b=Math.pow(2,b),0>a||a>=b)d=a%b,0>d&&(d+=b)}else 32>=b?d=a<<32-b>>32-b:(b=Math.pow(2,b-1),a>=b?(d=a%b,(a/b|0)&1&&(d-=b)):a<-b&&(d=a%b,((-a-1)/b|0)&1?d&&(d+=b):d||(d-=b)));a!=d&&(a=d);return a}
|
||||
function vy(a,b,c){for(c=void 0===c?-1:c;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e,f=a.pop();e=a.pop();switch(d){case "*":e*=f;break;case "/":if(!f)return!1;e=Math.trunc(e/f);break;case "^/":if(!f)return!1;e%=f;break;case "+":e+=f;break;case "-":e-=f;break;case "<<":e<<=f;break;case ">>":e>>=f;break;case ">>>":e>>>=f;break;case "<":e=e<f?1:0;break;case "<=":e=e<=f?1:0;break;case ">":e=e>f?1:0;break;case ">=":e=e>=f?1:0;break;case "==":e=e==f?1:0;break;case "!=":e=e!=f?1:0;break;case "&":e&=
|
||||
f;break;case "!":case "|":e|=f;break;case "^!":e|=f;break;case "&&":e=e&&f?1:0;break;case "||":e=e||f?1:0;break;case ",,":e=uy(e,18,!0)*Math.pow(2,18)+uy(f,18,!0);break;case "_":case "^_":"^_"==d&&(f=35-(f&255));f&&(e=uy(e,0,!0),e=0<f?e*Math.pow(2,f):Math.trunc(e/Math.pow(2,-f)));break;default:return!1}a.push(uy(e))}return!0}
|
||||
function wy(a,b,c,d,e,f){var g,h,k,m=!1,p=0,v=[],u=[],D=a.D;for(a.D=e;c<d;){var G;h=b[c++].trim();k=c<d?b[c++]:"";if(h)G=xy(a,h,null,f,p);else if("{"==k){h=1;for(G=c;c<d;)if(c++,k=c<b.length?b[c++]:"","{"==k)h++;else if("}"==k&&!--h)break;G=wy(a,b,G,c-1,a.D,f);null!=G&&p&&(G=yy(G,p));h=c<d?b[c++].trim():"";k=c<d?b[c++]:""}else{if(" "==k)continue;if("^B"==k){a.D=2;continue}if("^O"==k){a.D=8;continue}if("^D"==k){a.D=10;continue}if(!(p&-1073741824)){if("+"==k)continue;if("-"==k){p=p<<2|1;continue}if("~"==
|
||||
k||"^-"==k){p=p<<2|2;continue}if("^L"==k){p=p<<2|3;continue}}m=!0;break}if(void 0===G)if(f)f.push(h),G=0;else{m=!0;f=[];break}v.push(uy(G));if(" "==k)if(c<b.length-1&&!b[c])c++,k=b[c++];else{m=!0;break}if(!k)break;p="<"==a.ha[0]?zy:Ay;if(!p[k]){m=!0;break}u.length&&p[k]<=p[u[u.length-1]]&&vy(v,u,1);u.push(k);a.D="^_"==k?10:e;p=0}if(m||!vy(v,u)||1!=v.length)m=!0;m?f||a.O("parse error ("+(h||k)+")"):g=v.pop();a.D=D;return g}
|
||||
function By(a,b,c,d,e){for(var f;0<=(f=b.indexOf(c));){for(var g=0,h=f+1,k=e;h<b.length;){var m=b[h++];if(m==c){k=-1;break}if(!k)break;k--;m=m.charCodeAt(0);7==d?m&=127:m=m-32&63;g=uy(g*Math.pow(2,d)+m,d*e,!0)}if(0<=k){a.O("parse error ("+c+b+c+")");return}b=b.substr(0,f)+Cy(a,g,-1)+b.substr(h)}return b}
|
||||
function Dy(a,b,c){var d=void 0,e=!1===c;c=Array.isArray(c)?c:void 0;if(b){"{"!=a.ha[0]&&(b=b.split(a.ha[0]).join("{").split(a.ha[1]).join("}"));b=By(a,b,'"',7,5);if(!b)return d;b=By(a,b,"'",6,6);if(!b)return d;16!=a.D&&(b=b.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/,"$1$2^_").replace(/\s+/g," "));b=b.split(/({|}|\|\||&&|\||\^!|\^B|\^O|\^D|\^L|\^-|~|\^_|_|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|\^\/|\/|\*|,,| )/);d=wy(a,b,0,b.length,a.D,c);void 0!==d&&e&&Ey(a,null,d)}return d}
|
||||
function Fy(a,b){var c,d=a.ha[0],e=a.ha[1];c="("==d||"{"==d||"["==d?"\\":"";for(var f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);){var g=Dy(a,c[1]);if(void 0===g)return;b=b.replace(d+c[1]+e,null!=g?Cy(a,g):"undefined")}if(a.Ea.length)for(d=a.Ea[0],e=a.Ea[1],c="("==d||"{"==d||"["==d?"\\":"",f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);)b=a.Ok(b,c[1]);for(;d=b.match(/\$([a-z]+)/i);){e=null;switch(d[1].toLowerCase()){case "ops":e=a.ba-a.ka}if(null==
|
||||
e)break;b=b.replace(d[0],e.toString())}return b}function yy(a,b){for(;b;){switch(b&3){case 1:a=-uy(a);break;case 2:a|=-1;break;case 3:for(var c=35;0<=c&&!(a&Math.pow(2,c));)c--;a=35-c}b>>>=2}return a}
|
||||
function xy(a,b,c,d,e){e=void 0===e?0:e;var f,g=Array.isArray(d)?d:void 0;if(null!=b){f=a.fh(b);if(0<=f)f=a.gh(f);else if(f=b,a.I[f]?f=a.I[f].value:(f=f.substr(0,6),f=a.I[f]&&a.I[f].value),null!=f){var h=a.I[b]&&a.I[b].Xo;h&&(g?g.push(h):(g=Dy(a,h,d),void 0!==g?f+=g:(d||a.O("undefined "+(c||"value")+": "+b+" ("+h+")"),f=void 0)))}else f=ia(b,1<b.length||10<a.D?a.D:10);null!=f?f=uy(yy(f,e)):d||a.O("invalid "+(c||"value")+": "+b)}else d||a.O("missing "+(c||"value"));return f}
|
||||
function Ey(a,b,c){var d,e=!1;void 0!==c&&(e=!0,d=8==a.D?Cy(a,c,32,8,1)+" "+c+".":Cy(a,c,32,16,1)+" "+Cy(a,c,32,8,1)+" "+Cy(a,c,32,2,8)+" "+c+".",32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'"));a.O((null!=b?b+": ":"")+d);return e}function Gy(a,b){var c=0;if(a.I){if(b)return Ey(a,b,a.I[b]&&a.I[b].value);b=Object.keys(a.I);b.sort();for(var d=0;d<b.length;d++)Ey(a,b[d],a.I[b[d]].value),c++}return 0<c}
|
||||
function Cy(a,b,c,d,e){c=void 0===c?0:c;e=void 0===e?0:e;switch((void 0===d?0:d)||a.D){case 2:b=la(b,0<c?c:0,e);break;case 8:b=ma(b,0<c?(c+2)/3|0:0,!!e);break;case 10:(a=0<c?Math.ceil(.3*c):0)?11<a&&(a=11):a=99999>=Math.abs(b)?5:11;b=ja(b,10,a);break;default:b=q(b,0<c?c+3>>2:0,!!e)}0>c?c=b.replace(/^0+([0-9A-F]+)$/i,"$1"):c=b;return c}
|
||||
var Ay={"||":5,"&&":6,"!":7,"|":7,"^!":8,"&":9,"!=":10,"==":10,">=":11,">":11,"<=":11,"<":11,">>>":12,">>":12,"<<":12,"-":13,"+":13,"^/":14,"/":14,"*":14,_:19,"^_":19,"{":20,"}":20},zy={",,":1,"||":5,"&&":6,"!=":10,"==":10,">=":11,">":11,"<=":11,"<":11,">>>":12,">>":12,"<<":12,"-":13,"+":13,"^/":14,"/":14,"*":14,"!":15,"|":15,"^!":15,"&":15,_:19,"^_":19,"{":20,"}":20};
|
||||
function Hy(a){ty.call(this,a);this.ra=4;this.la=5;this.xa=1048575;this.N=Iy(this,0,0);this.Ca=Iy(this,0,0);this.ea=Iy(this,0,0);this.F=[];this.B=this.V=this.L=[];Jy(this);this.wa=0;Ky(this);this.Fa={};Ly(this,a.messages);this.Ka=a.commands;var b=this;window?void 0===window.pcx86&&(window.pcx86=function(a){return My(b,a)}):void 0===global.pcx86&&(global.pcx86=function(a){return My(b,a)})}ba(Hy,ty);l=Hy.prototype;
|
||||
l.uc=function(a,b,c,d){this.na=b;this.G=c;this.oa=a;this.cb=Vb(a,"FDC");this.Pa=Vb(a,"HDC");this.Kc=Vb(a,"FPU");this.H=Vb(a,"Mouse");(a=ud(a,"messages"))&&Ly(this,a);this.la=b.I>>2;this.xa=b.N;this.ab=new Sd(this.G,7,"DBG");this.pa=Ny;80186<=this.G.da&&(this.pa=Ny.slice(),this.pa[15]=Oy,80286<=this.G.da&&(this.pa[15]=Py,80386<=this.G.da&&(this.ra=8)));xl(this,64,function(a){Qy(d,d.G.tc,a[0])});xl(this,4,function(a){if(a=a[0]){var b=xy(d,a);if(void 0===b)d.O("invalid selector: "+a);else if(a=Ry(d,
|
||||
b,Sy),d.O("dumpSel("+oa(a?a.T:b)+"): %"+q(a?a.Ob:null,d.la)),a){var c,b=!1;if(a.type&4096)a.type&2048?(c="code"+(a.type&512?",readable":",execonly"),a.type&1024&&(c+=",conforming")):(c="data"+(a.type&512?",writable":",readonly"),a.type&1024&&(c+=",expdown")),a.type&256&&(c+=",accessed");else{var e=Ty[a.type];e&&(c=e[0],b=e[1])}!c||a.ob&32768||(c+=",not present");d.O((b?"seg="+oa(a.ua&65535)+" off="+oa(a.Sa):"base="+q(a.ua,d.la)+" limit="+Uy(a.Sa))+" type="+na(a.type>>8)+" ("+c+") ext="+oa(a.ext&-65296)+
|
||||
" dpl="+na(a.rc))}}else d.O("no selector")});xl(this,134217728,function(a){var b;(a=a[0])&&(b=xy(d,a));if(void 0===b)d.O("invalid MCB");else for(d.O("dumpMCB("+oa(b)+")");b;){a=Iy(d,0,b);var c=d.ya(a,1),e=d.Wc(a,2),k=d.Wc(a,5);if(77!=c&&90!=c)break;d.O(Vy(0,b)+": '"+String.fromCharCode(c)+"' PID="+oa(e)+" LEN="+oa(k)+' "'+Wy(d,a,8)+'"');b+=1+k}});xl(this,128,function(a){Qy(d,d.G.aa,a[0],d.G.aa!==d.G.tc)});xl(this,8,function(a){a:{if(a=a[0]){var b=xy(d,a);if(void 0===b){d.O("invalid task selector: "+
|
||||
a);break a}a=Ry(d,b,Sy)}else a=d.G.ka;d.O("dumpTSS("+oa(a?a.T:b)+"): %"+q(a?a.ua:null,d.la));if(a){var b="",c=a.type&-513,e=256==c?4:8,k=256==c?Xy:Yy,m,p,v,u;for(u in k)m=k[u],p=a.ua+m,v=vg(d.G,p,2),2304==c&&(v|=vg(d.G,p+2,2)<<16),b&&(b+="\n"),b+=oa(m)+" "+va(u+":",11)+q(v,e);if(2304==c)for(u=0,m=v>>>16;m<a.Nb&&1023>u;){p=a.ua+m;v=vg(d.G,p,2);p=2;c="";if(!p||4<p)p=4;for(e=0;e<p;e++)c&&(c=","+c),c=la(v&255,8)+c,v>>=8;b+="\n"+oa(m)+" ports "+oa(u)+"-"+oa(u+15)+": "+(""+c);u+=16;m+=2}d.O(b)}}});this.J=
|
||||
null;this.La=0;this.Ga=!1;Rf(this.G,48,this.Xm.bind(this));Rf(this.G,65,this.Ym.bind(this));this.aa=null;Rf(this.G,104,this.Zm.bind(this));Jb(this)};function Zy(a,b,c,d,e,f){b=Wy(a,b);var g=Ry(a,d),g=g?g.Sa+1:0,h=(e?"_CODE":"_DATA")+q(c,2);f&&r(a,128)&&a.message(b+" "+(e?"code":"data")+"("+q(c,4)+")=#"+q(d,4)+" len "+q(g));e=$y(a,b,c);e[b+h]=0;dq(a,b,c,d,0,null,g,e)}
|
||||
function az(a,b,c,d){var e=a.Wc(b,2),f=a.Wc(b,2),g=bz(a,b,4),h=bz(a,b,4),k=Iy(a,bz(a,b,4),a.Wc(b,2));b=Iy(a,bz(a,b,4),a.Wc(b,2));b=Wy(a,b).toUpperCase();var k=Wy(a,k).toUpperCase(),m=(c?"_CODE":"_DATA")+q(e,2);d&&r(a,128)&&a.message((b==k?"":b+"!")+k+" "+(c?"code":"data")+"("+q(e,4)+")="+q(f,4)+":"+q(g)+" len "+q(h));c=$y(a,k,e);c[k+m]=g;dq(a,k,e,f,g,null,h,c)}function cz(a,b,c){c=Wy(a,c).toUpperCase();dz(a,c,b)}
|
||||
l.Xm=function(){var a=this.G;if(null!=this.J&&2752554==a.D){var b=a.L&65535,c=a.K&65535,d=Iy(this,y(a)+12,a.U.T);switch(bz(this,d)){case 336:az(this,Iy(this,a.H,b),!c,!!this.J)}}return!0};
|
||||
l.Ym=function(a){var b=this.G,c=b.D&65535,d=b.H&65535,e=b.I&65535,f=b.L&65535,g=b.K&65535,h=b.J&65535,k=b.pa.T;if(null==this.J)return 79==c&&Sf(b,a,function(a){return function(){62342!=(b.D&65535)?(b.D=b.D&-65536|62342,Nb(a,"INT 0x41 handling enabled",128),a.J=!0):(Nb(a,"INT 0x41 monitoring enabled",128),a.J=!1)}}(this)),!0;switch(c){case 79:this.J&&(b.D=b.D&-65536|62342,Nb(this,"INT 0x41 handling enabled",128));break;case 80:Zy(this,Iy(this,h,k),d+1,e,!(g&1),!!this.J);break;case 82:dz(this,null,
|
||||
d);break;case 127:this.J&&(b.D=b.D&-65536|(this.Ga?0:1));break;case 131:this.J&&(a=Iy(this,b.L,e),this.La++?(this.O("TRAPFAULT failed"),ez(this,this.B,a,!0,!0),this.La=0,this.Ub()):(this.O("INT 0x41 TRAPFAULT: fault="+oa(d)+" error="+q(b.K,8,!0)+" addr="+fz(a)),this.td(this.B,a,!0),Ky(this,!0)));break;case 141:this.J&&(b.D=b.D&-65536|1);break;case 336:az(this,Iy(this,b.H,f),!g,!!this.J);break;case 338:cz(this,d,Iy(this,b.J,f))}this.Ga=!1;return!this.J};
|
||||
l.Zm=function(a){var b=this.G,c=b.D&255,d=b.D>>8&255,e=b.H&65535,f=b.I&65535,g=b.L&65535,h=b.J&65535,k=b.pa.T;if(null==this.aa){if(67==d){if(609437257==b.ia((b.ba.T<<4)+10)||1111835735==b.ia((b.ba.T<<4)+95))return!0;Sf(b,a,function(a){return function(){62342!=(b.D&65535)?(b.D=b.D&-65536|62342,Nb(a,"INT 0x68 handling enabled",128),a.J=a.aa=!0):(Nb(a,"INT 0x68 monitoring enabled",128),a.aa=!1)}}(this))}return!0}switch(d){case 67:this.aa&&(b.D=b.D&-65536|62342);break;case 68:this.aa&&(a=Ud(b.ba,this.vl.bind(this)))&&
|
||||
(b.J=a[0],ne(b,a[1]));break;case 72:dz(this,null,e);break;case 80:32==c?Zy(this,Iy(this,h,k),0,f,!0,!!this.aa):128>c?Zy(this,Iy(this,h,k),e+1,c&64?g:f,!(c&1),!!this.aa):az(this,Iy(this,h,k),!(c&1),!!this.aa),this.aa&&(b.D=b.D&-256|1)}return!this.aa};l.vl=function(){var a=this.G;5==(a.D&255)&&(a.I=a.K=0,a.D=a.D&-256|1);return!1};
|
||||
l.Eb=function(a,b,c){var d=this;switch(b){case "debugInput":return this.ta=this.ma[b]=c,c.onkeydown=function(a){var b;if(13==a.keyCode)b=c.value,c.value="",My(d,b,!0);else if(27==a.keyCode)c.value=b="";else if(38==a.keyCode?(b=null,d.A<d.C.length-1&&(b=d.C[++d.A])):40==a.keyCode&&(0<d.A?b=d.C[--d.A]:(b="",d.A=-1)),null!=b){var e=b.length;c.value=b;c.setSelectionRange(e,e)}null!=b&&a.preventDefault&&a.preventDefault()},!0;case "debugEnter":return this.ma[b]=c,Va(c,function(){if(d.ta){var a=d.ta.value;
|
||||
d.ta.value="";My(d,a,!0);return!0}return!1}),!0;case "step":return this.ma[b]=c,Va(c,function(a){var b=!1;Kb(d,!0)||(Lb(d,!0),b=gz(d,a?1:0),Lb(d,!1));return b}),!0}return!1};l.dd=function(){this.ta&&this.ta.focus()};function hz(a){return!(!(a.G&&a.G.ra&1)||a.G.P&131072)}
|
||||
function Ry(a,b,c){var d=hz(a)?Sy:iz;c||(c=d);if(c==d){if(b===a.G.ba.T)return a.G.ba;if(b===a.G.Fa.T)return a.G.Fa;if(b===a.G.pa.T)return a.G.pa;if(b===a.G.U.T)return a.G.U;if(80386<=a.G.da){if(b===a.G.Ka.T)return a.G.Ka;if(b===a.G.La.T)return a.G.La}if(a.Ia&&c==Sy||!a.ab)return null}a=a.ab;if(c!=Sy)a.mh(b),a.Sa=65535,a.Nb=65536;else{var e;c=a.Lb;b&=65535;b&4?(d=c.Gb.ua,e=d+c.Gb.Sa|0):(d=c.Kb,e=c.Ic);d=d+(b&65528)|0;if(e-d|0){e=vg(c,d+0,2);var f=vg(c,d+4,2),g=f&7936,h=vg(c,d+2,2)|(f&255)<<16,k=vg(c,
|
||||
d+6,2);80386<=c.da&&(h|=(k&65280)<<16,e|=(k&15)<<16,k&128&&(e=e<<12|4095));a.T=b;a.ua=h;a.Sa=e;a.Nb=(e>>>0)+1;a.ob=f;a.type=g;a.ext=k;a.Ob=d;Td(a,!0,!0,!1)}}return a}l.Wb=function(a,b,c){var d=a&&a.za;if(null==d&&(d=-1,a)){var e=Ry(this,a.T,a.type);e&&(b=a.Ja||0,c=c||1,d=e=-1===e.Ob||e.fd&&(b>>>0)+c>e.Nb||!e.fd&&(b>>>0)+c<=e.Nb?e.ua+b|0:-1,a.za=d)}return d};l.ya=function(a,b){var c=255,d=this.Wb(a,!1,1);-1!==d&&(c=vg(this.G,d,1,a.type==jz)|0,b&&kz(this,a,b));return c};
|
||||
l.nb=function(a,b){return a.Jb?bz(this,a,b?4:0):this.Wc(a,b?2:0)};l.Wc=function(a,b){var c=65535,d=this.Wb(a,!1,2);-1!==d&&(c=vg(this.G,d,2,a.type==jz)|0,b&&kz(this,a,b));return c};function bz(a,b,c){var d=-1,e=a.Wb(b,!1,4);-1!==e&&(d=vg(a.G,e,4,b.type==jz)|0,c&&kz(a,b,c));return d}l.ub=function(a,b,c,d){var e=this.Wb(a,!0,1);if(-1!==e){if(a.type!=jz)this.G.ub(e,b);else{var f=this.na;f.aa[(e&f.C)>>>f.A].df(e&f.D,b&255,e)}c&&kz(this,a,c);d||zd(this.G,!0)}};
|
||||
l.fl=function(a,b,c){var d=this.Wb(a,!0,2);-1!==d&&(a.type!=jz?this.G.ib(d,b):Fc(this.na,d,b),c&&kz(this,a,c),zd(this.G,!0))};function Iy(a,b,c,d,e,f,g){return lz(a,{},b,c,d,e,f,g)}function lz(a,b,c,d,e,f,g,h){b.Ja=c||0;b.T=d;b.za=e;b.type=f||(hz(a)?Sy:iz);b.Jb=null!=g?g:!(!a.G||4!=a.G.ba.X);b.gc=null!=h?h:!(!a.G||4!=a.G.ba.Mc);b.yd=!1;return b}function mz(a){return[a.Ja,a.T,a.za,a.yd,a.Jb,a.gc,a.Ie,a.ah]}function nz(a){return{Ja:a[0],T:a[1],za:a[2],yd:a[3],Jb:a[4],gc:a[5],Ie:a[6],ah:a[7]}}
|
||||
function oz(a,b,c){if(null!=b.T&&(a=Ry(a,b.T,b.type))){var d=b.Ja&a.xa;if(!a.fd){if(d>>>0>=a.Nb)return!1}else if(d>>>0<a.Nb)return!1;c&&(b.Ja=d,b.Jb=4==a.X,b.gc=4==a.Mc)}return!0}
|
||||
function pz(a,b,c,d){var e,f=c?a.N:a.Ca;c=d?qz:f.type;var g=f.Ja,h=f.T,f=f.za;if(void 0!==b){b=Fy(a,b);e=b.charAt(0);f=b.indexOf(":");switch(e){case "&":c=iz;break;case "#":c=Sy;break;case "%":c=rz;e=b.charAt(1);"%"==e&&(c=jz,e+=e);g=0;h=null;break;default:0<=f&&(c=qz),e=""}e&&(b=b.substr(e.length),f-=e.length);e=b;var k;if(e.match(/^[a-z_][a-z0-9_]*$/i))for(var m=e.toUpperCase(),p=0;p<a.F.length;p++){e=a.F[p];var v=e.Jd[m];if(void 0!==v){m=v.o;void 0!==m&&(k=v.s,void 0===k&&(k=e.T),k=Iy(a,m,k,v.p));
|
||||
break}}if(e=k)return e;0>f?null!=h?(g=Dy(a,b,void 0),f=null):(f=Dy(a,b,void 0),null==f&&(g=null)):(h=Dy(a,b.substring(0,f),void 0),g=Dy(a,b.substring(f+1),void 0),f=null)}null!=g&&(e=Iy(a,g,h,f,c),d||oz(a,e,!0)||(a.O("invalid offset: "+fz(e)),e=null));return e}function sz(a,b,c){c&&(c=c.match(/(['"])(.*?)\1/))&&(b.pl=a.Bg(b.Xk=c[2]))}l.Ok=function(a,b){var c=pz(this,b);return a.replace("["+b+"]",c?q(this.nb(c),c.Jb?8:4):"undefined")};
|
||||
function kz(a,b,c){c=c||1;null!=b.za&&(b.za+=c);null!=b.T&&(b.Ja+=c,oz(a,b)||(b.Ja=0,b.za=null))}function Vy(a,b,c){return null!=b?q(b,4)+":"+q(a,a&-65536||c?8:4):q(a)}function fz(a){var b;switch(a.type){case iz:case tz:b="&";break;case Sy:b="#";break;case rz:b="%";break;case jz:b="%%";break;default:b=a.T?"":"%"}return a.type>=rz||null==a.T?b+q(a.za):b+Vy(a.Ja,a.T,a.gc)}
|
||||
function Wy(a,b,c){var d="";for(c=c||256;d.length<c;){var e=a.ya(b,1);if(!e||36==e||127<=e)break;d+=32<=e?String.fromCharCode(e):"."}return d}
|
||||
function Qy(a,b,c,d){var e=0,f=0,g=b.length;if(c){e=a.Wb(pz(a,c));if(-1===e){a.O("invalid address: "+c);return}f=e>>>a.G.lb;g=1}a.O("blockid "+(d?"linear ":"physical")+" blockaddr used size type");a.O("-------- --------- ---------- ------ ------ ----");c=-1;for(var h=0;g--;)(d=b[f])&&d.type==Yc&&(d=kd(a.G,e,!1,!0)),d.type==c?h++||a.O("..."):(c=d.type,h=oc[c],c==$c&&(d=d.vd,h+=" -> "+oc[d.type]),d&&a.O(q(d.id,8)+" %"+q(f<<a.G.lb,8)+" %%"+q(d.za,8)+" "+oa(d.Be)+" "+oa(d.size)+
|
||||
" "+h),c!=Xc&&c!=Yc&&(c=-1),h=0),e+=a.G.Mg,f++}function uz(a,b,c){a=q(a)+" "+q(b)+" ";a=a+(c&&b&64?"D":"-")+(b&32?"A":"-")+(b&4?"U":"S");a+=b&2?"W":"R";return a+=b&1?"P":"N"}function $y(a,b,c){var d=[],e;for(e=null;e=Vb(a.oa,"Disk",e);){var f=e,g=b,h=c,d={};if(f.C)for(var k=0;k<f.C.length;k++){var m=f.C[k];if(m.Of==g&&(m=m.sd[h])){for(var p in m.he)f=m.he[p],d[f[1]]=f[0];break}}if(d.length)break}return d}
|
||||
function Ly(a,b){a.ca=a;a.fc=a.tl=1073741824;a.Aa=null;a.Ba=[];b=a.Bg(b.replace("keys","key").replace("kbd","keyboard"),!1,"|");if(b.length)for(var c in Tb)0<=Ca(b,c)&&(a.fc|=Tb[c],a.O(c+" messages enabled"));Ky(a)}function xl(a,b,c){for(var d in Tb)if(b==Tb[d]){a.Fa[d]=c;break}}l.fh=function(a,b){var c;a=a.toUpperCase();null==b?c=Ca(vz,a):(c=Ca(vz,a.substr(b,3)),0>c&&(c=Ca(vz,a.substr(b,2))));return c};
|
||||
function wz(a,b){var c=0,d=a.gh(b);if(null!=d)switch(b){case xz:case yz:case zz:case Az:case Bz:case Cz:case Dz:case Ez:c=2;break;case Fz:case Gz:case Hz:case Iz:case Jz:case Kz:case Lz:case Mz:case Nz:case Oz+Pz:case Oz+Qz:case Oz+Rz:case Oz+Sz:case Oz+Tz:case Oz+Uz:c=4;break;case Vz:case Wz:case Xz:case Yz:case Zz:case $z:case aA:case bA:case cA:case dA:case eA:case fA:case gA:c=8;break;case hA:c=a.ra}return c?q(d,c):"??"}
|
||||
l.gh=function(a){var b;if(0<=a){var c=this.G;switch(a){case xz:b=c.D&255;break;case yz:b=c.I&255;break;case zz:b=c.L&255;break;case Az:b=c.H&255;break;case Bz:b=c.D>>8&255;break;case Cz:b=c.I>>8&255;break;case Dz:b=c.L>>8&255;break;case Ez:b=c.H>>8&255;break;case Fz:b=c.D&65535;break;case Gz:b=c.I&65535;break;case Hz:b=c.L&65535;break;case Iz:b=c.H&65535;break;case Jz:b=y(c)&65535;break;case Kz:b=c.N&65535;break;case Lz:b=c.K&65535;break;case Mz:b=c.J&65535;break;case Nz:b=z(c)&65535;break;case hA:b=
|
||||
qe(c);break;case Oz+Pz:b=c.pa.T;break;case Oz+Qz:b=c.ba.T;break;case Oz+Rz:b=c.U.T;break;case Oz+Sz:b=c.Fa.T;break;default:if(80286==this.G.da)a==cA&&(b=c.ra);else if(80386<=this.G.da)switch(a){case Vz:b=c.D;break;case Wz:b=c.I;break;case Xz:b=c.L;break;case Yz:b=c.H;break;case Zz:b=y(c);break;case $z:b=c.N;break;case aA:b=c.K;break;case bA:b=c.J;break;case cA:b=c.ra;break;case dA:b=c.Ng;break;case eA:b=c.qd;break;case fA:b=c.Uc;break;case Oz+Tz:b=c.Ka.T;break;case Oz+Uz:b=c.La.T;break;case gA:b=
|
||||
z(c)}}}return b};
|
||||
function dA(a,b){b=Ay(a,b)||b;for(var c=0,d,e;0<=(c=b.indexOf("@",c));)e=a.fh(b,c+1),0<=e&&(b=b.substr(0,c)+rz(a,e)+b.substr(c+1+qz[e].length)),c++;for(c=0;0<=(c=b.indexOf("#",c));)e=b.substr(c+1,2),d=ia(e,16),null!=d&&32<=d&&128>d?(d=e+" '"+String.fromCharCode(d)+"'",b=b.replace("#"+e,d),c+=d.length):c++;for(c=0;0<=(c=b.indexOf("$",c));)e=b.substr(c+1,9),(d=kz(a,e))?(d=e+' "'+Ry(a,d)+'"',b=b.replace("$"+e,d),c+=d.length):c++;for(c=0;0<=(c=b.indexOf("^",c));)e=b.substr(c+1,9),(d=kz(a,e))?(fz(a,d),
|
||||
d=e+' "'+Ry(a,d,11)+'"',b=b.replace("^"+e,d),c+=d.length):c++;return b}l.message=function(a,b){b&&(a+=" at "+az(Dy(this,z(this.G),this.G.ba.T))+" (%"+q(this.G.ea)+")");this.fc&536870912?this.Ba.push(a):this.Aa&&a==this.Aa||(this.Aa=a,this.fc&-2147483648&&(this.Ub(),a+=" (cpu halted)"),this.O(a),this.G&&(a=this.G,a.Z.Rf=!0,zd(a)))};
|
||||
function Wk(a,b,c,d){var e,f;if(!d&&(d=r(a,1)&&0>eA.indexOf(b),!d)){var g=fA[b];g&&(d=r(a,g)?!0:524288==g&&r(a,g=1048576))}d&&(e=a.G.D>>8&255,f=a.G.L&255,33==b&&11==e||524288==g&&128<=f||1048576==g&&128>f)&&(d=!1);d&&((g=(g=Sb[b])&&g[e]||"")&&(g=" "+dA(a,g)),a.message("INT "+na(b)+": AH="+na(e)+" at "+Qy(c-2-a.G.ba.ua,a.G.ba.T)+g));return d}
|
||||
function Ob(a,b,c,d,e,f,g,h){h|=256;if(null==e||(a.fc&h)==h)h=null,null!=e&&(h=a.G.ba.T,e-=a.G.ba.ua),a.message(b.Ce+"."+(null!=d?"outPort":"inPort")+"("+oa(c)+","+(f?f:"unknown")+(null!=d?","+na(d):"")+")"+(null!=g?": "+na(g):"")+(null!=e?" at "+Qy(e,h):""))}l.hh=function(){this.O("Type ? for help with PCx86 Debugger commands");gA(this);if(this.Ka){var a=this.Ka;this.Ka=null;Hy(this,a)}};
|
||||
function Fy(a,b){var c;if(Jg(a)){if(!a.U||!a.U.length){a.U=Array(hA);for(c=0;c<a.U.length;c++)a.U[c]=Dy(a);a.qa=0;b||a.O("instruction history buffer allocated")}if(!a.M||!a.M.length)for(a.M=Array(256),c=0;c<a.M.length;c++)a.M[c]=[c,0]}else a.U&&a.U.length&&!b&&a.O("instruction history buffer freed"),a.qa=0,a.U=[],a.M=[]}
|
||||
function bz(a,b,c,d){if(!iA(a))return!1;a.P=0;do{b||Jg(a)&&Mg(a,a.G.ea,0);try{var e=a.G.Kg(b);0<e&&(a.P+=e,Gd(a.G,e,!0),Bd(a.G,e),a.ba++)}catch(g){if("number"!=typeof g){var f=g;a.P=0;Gb(a.G,f.stack||f.message)}}}while(a.G.M&3312);!1!==d&&zd(a.G);gA(a,c||!1);return 0<a.P}l.Ub=function(a){return this.G&&this.G.Ub(a)||!1};function gA(a,b){void 0===b&&(b=!0);a.N=Dy(a,z(a.G),a.G.ba.T);b&&1!=a.K?jA(a):kA(a)}
|
||||
function iA(a,b){var c;(c=!a.G||!Ib(a.G))||(c=a.G,c.Z.bc?c=!0:(c.O(c.toString()+" not powered"),c=!1),c=!c);return c||a.G.Z.Xa?(b||a.O("cpu busy or unavailable, command ignored"),!1):!Hb(a.G)}l.ac=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0};l.$b=function(a,b){b&&this.O(a?"suspending":"shutting down");return a?this.save():!0};l.reset=function(a){Fy(this);this.ba=this.ka=0;this.Aa=null;this.P=0;this.N=Dy(this,z(this.G),this.G.ba.T);lA(this);a||this.Z.Xa||gA(this)};
|
||||
l.save=function(){var a=new Wf(this);a.set(0,hz(this.N));a.set(1,hz(this.Ca));a.set(2,hz(this.ea));a.set(3,[this.C,this.fa,this.fc]);a.set(4,this.F);a.set(5,[this.B,this.V,this.L]);return a.data()};
|
||||
l.restore=function(a){var b=0;a[b]&&(this.N=iz(a[b++]));a[5]&&(this.Ca=iz(a[b++]));a[b]&&(this.ea=iz(a[b++]));a[b]&&(this.C=a[b][0],"string"==typeof this.C&&(this.C=[this.C]),this.fa=a[b][1],this.fc|=a[b][2],b++);a[b]&&(this.F=a[b++]);a[b]&&(mA(this,this.B,a[b][0]),mA(this,this.V,a[b][1]),mA(this,this.L,a[b][2]));return!0};l.start=function(a,b){this.K||this.O("running");this.Z.Xa=!0;this.lb=a;this.jd=b};
|
||||
l.stop=function(a,b){if(this.Z.Xa){this.Z.Xa=!1;this.P=b-this.jd;if(!this.K){b="stopped";if(this.P){a-=this.lb;var c=0<a?Math.round(1E3*this.P/a):0;b+=" (";Jg(this)&&(b+=this.ba+" opcodes, ",this.ka-=this.ba,this.ba=0);b+=this.P+" cycles, "+a+" ms, "+c+" hz)"}else r(this,-2147483648)&&(b+=" (use the 't' command to execute blocked faults)");this.O(b)}gA(this,!0);this.dd();lA(this,this.G.ea)}};function Jg(a){return 1<a.B.length||!!a.wa||r(a,16)}
|
||||
function Mg(a,b,c){var d=a.G;if(0<c&&(a.wa&&!--a.wa||nA(a,b,1,a.B)))return!0;0<=c&&a.M.length&&(a.ba++,b=vg(d,b),null!=b&&(a.M[b][1]++,b=a.U[a.qa],gz(a,b,z(d),d.ba.T),b.gj=Cd(d),++a.qa==a.U.length&&(a.qa=0)));return!1}function hd(a,b,c){return nA(a,b,c||1,a.V)?(a.Ub(!0),!0):!1}function jd(a,b,c){return nA(a,b,c||1,a.L)?(a.Ub(!0),!0):!1}function Kc(a,b,c){a.O("break on input from port "+oa(b)+": "+q(c));a.Ub(!0)}function Pc(a,b,c){a.O("break on output to port "+oa(b)+": "+q(c));a.Ub(!0)}
|
||||
function Ey(a){var b,c;a.B=["bp"];if(a.V)for(b=1;b<a.V.length;b++)c=a.V[b],kf(a.G,a.Wb(c),!1,c.type==ez);a.V=["br"];if(a.L)for(b=1;b<a.L.length;b++)c=a.L[b],kf(a.G,a.Wb(c),!0,c.type==ez);a.L=["bw"];a.Ia=0}
|
||||
l.td=function(a,b,c,d){var e=!0;c||$y(this,a,b,!1,!0);if(a!=this.B){var f=this.Wb(b);if(-1===f)this.O("invalid address: "+az(b)),e=!1;else{var g=this.G,h=b.type==ez;(h?g.tc:g.aa)[f>>>g.lb].td(f&g.Fb,a==this.L);h&&nc(g)}}e&&(a.push(b),c?(null!=b.za&&(b.T=null),b.yd=!0):(d||oA(this,a,a.length-1,"set"),Fy(this)));return e};
|
||||
function $y(a,b,c,d,e){for(var f=!1,g=pA(a,a.Wb(c)),h=1;h<b.length;h++){var k=b[h];if(-1!==g&&g==pA(a,a.Wb(k))||-1===g&&c.T==k.T&&c.Ja==k.Ja)if(!d||k.yd){f=!0;k.yd||e||oA(a,b,h,"cleared");b.splice(h,1);b!=a.B&&kf(a.G,g,b==a.L,k.type==ez);k.yd||Fy(a);break}}return f}function qA(a,b){for(var c=1;c<b.length;c++)oA(a,b,c);return b.length-1}function oA(a,b,c,d){c=b[c];a.O(b[0]+" "+az(c)+(d?" "+d:c.Xk?' "'+c.Xk+'"':""))}
|
||||
function mA(a,b,c){if(c[0]==b[0])for(var d=1;d<c.length;d++){var e=c[d];a.td(b,e,e.yd,!0)}}function lA(a,b){if(void 0!==b)nA(a,b,1,a.B,!0),a.K=0;else for(b=1;b<a.B.length;b++){var c=a.B[b];if(c.yd){if(!$y(a,a.B,c,!0))break;b=0}}}function pA(a,b){-1!==b&&(a=a.xa&-65536,(b&a)==a&&(b&=1048575));return b}
|
||||
function nA(a,b,c,d,e){var f=!1;if(!a.Ia++){b=pA(a,b);r(a,-2147483632)&&204==vg(a.G,b)&&(f=!0);for(var g=1;!f&&g<d.length;g++){var h=d[g];if(!e||h.yd){null!=h.T&&(h.za=null);for(var k=pA(a,a.Wb(h)),m=0;m<c;m++)if(b+m==k){var p,f=!0;h.yd&&($y(a,d,h,!0),e=!0);if(p=h.pl){for(var f=!1,v=0;v<p.length;v++)if(!rA(a,p[v],!0)){if(p[v].indexOf("if")){f=!0;break}for(var u=v+1;u<p.length&&p[u].indexOf("else");u++)v++;if(u==p.length){f=!0;break}}a.G.Z.Xa||(f=!0)}if(f){e||oA(a,d,g,"hit");break}}}}}a.Ia--;return f}
|
||||
function sA(a,b,c,d){for(var e=Dy(a,b.Ja,b.T,b.za,b.type),f=a.ya(b,1),g=4,h=0,k=!1,m=!1;(102==f||103==f)&&g--;)102==f?k||(b.Jb=!b.Jb,k=!0):m||(b.gc=!b.gc,m=!0),h++,f=a.ya(b,1);var g=-1,p=tA,k=a.pa[f],m=k[0];m==uA&&(m=a.ya(b,1),k=vA[m]||Jy,f|=m<<8,m=k[0]);if(m==wA){var g=a.ya(b,1),v;v=null;var u=g>>3&7,D=(3>(g>>6&3)?0:48)+u;(217==f||219==f)&&52<=D&&(D=u<<4|g&7);(u=xA[f])&&(v=u[D]);v&&(p=yA,k=v,m=k[0])}m>=p.length&&(g=a.ya(b,1),k=zA[m-p.length][g>>3&7],m=k[0]);p=p[m];u=k.length-1;v="";b.Jb&&(m==AA?
|
||||
p="CWDE":m==BA?p="CDQ":m>=CA&&m<=DA&&(p+="D"));if(164<=f&&167>=f||170<=f&&175>=f)u=0,b.Jb&&"W"==p.slice(-1)&&(p=p.slice(0,-1)+"D");for(var f=-1,D=!0,G=1;G<=u;G++){var I,J;I="";J=k[G];if(void 0!==J){0>f&&(f=J>>EA);m==FA&&(f==GA?v="[%800]":f==HA&&(v="ES:["+(b.gc?"E":"")+"DI]"));var P=J&IA;if(P!=JA)if(P==KA)D=!1;else{var K=J&LA;if(K>=R)if(0>g&&(g=a.ya(b,1)),K<MA){K=a;I=J;var ka=u;J=b;var Z="",jb=g>>6,qa=g&7;if(3>jb){P=!p.indexOf("FI");if(!jb&&(!J.gc&&6==qa||J.gc&&5==qa))jb=2;else{if(J.gc)if(4!=qa)qa+=
|
||||
8;else{var Z=K,db=jb,Oa=J,kb=Z.ya(Oa,1),eb=kb>>6,uc=kb>>3&7,kb=kb&7,lb="";if(db||5!=kb)lb=NA[kb+8];4!=uc&&(lb&&(lb+="+"),lb+=NA[uc+8],eb&&(lb+="*"+(1<<eb)));db||5!=kb||(lb&&(lb+="+"),lb+=q(Xy(Z,Oa,4)));Z=lb}Z||(Z=NA[qa])}1==jb?(K=K.ya(J,1),Z=K&128?Z+("-"+q(-(K<<24>>24),2)):Z+("+"+q(K,2))):2==jb&&(Z&&(Z+="+"),J.gc?(K=Xy(K,J,4),Z+=q(K)):(K=K.Wc(J,2),Z+=q(K,4)));Z="["+Z+"]";if(1==ka){K="";I&=IA;I==S&&(I=J.Jb?OA:T);switch(I){case PA:K="FAR";break;case U:K="BYTE";break;case T:if(P){K="INT16";break}K="WORD";
|
||||
break;case OA:K="DWORD";break;case QA:if(P){K="INT32";break}case RA:K="REAL32";break;case SA:if(P){K="INT64";break}case TA:K="REAL64";break;case UA:K="REAL80";break;case VA:K="BCD80"}K&&(Z=K+" "+Z)}}else Z=WA(K,qa,I,J);I=Z}else I=K==MA?WA(a,g&7,J,b):WA(a,g>>3&7,J,b);else if(K==XA)I="1";else if(K==V){I=a;P=J;K=b;J=" ";switch(P&IA){case U:P&W&&(J=q(I.ya(K,1),2));break;case YA:J=q(I.ya(K,1)<<24>>24,K.Jb?8:4);break;case S:if(K.Jb){J=q(Xy(I,K,4));break}case T:J=q(I.Wc(K,2),4);break;case PA:K=Dy(I,I.nb(K,
|
||||
!0),I.Wc(K,2),null,K.type,K.Jb,K.gc);J=az(K);I=ZA(I,K);I[0]&&(J+=" ("+I[0]+")");break;default:J="imm("+oa(P)+")"}I=J}else K==$A?(b.gc?(I=8,J=Xy(a,b,4)):(I=4,J=a.Wc(b,2)),I="["+q(J,I)+"]"):K==aB?(I=P==U?a.ya(b,1)<<24>>24:a.nb(b,!0),J=b.Ja+I&(b.Jb?-1:65535),I=q(J,b.Jb?8:4),J=ZA(a,Dy(a,J,b.T)),J[0]&&(I+=" ("+J[0]+")")):K==X?I=P==bB?"ST":P==cB?"ST("+(g&7)+")":WA(a,(J&dB)>>8,J,b):K==eB?I=WA(a,(J&dB)>>8,fB,b):K==gB?I="DS:[SI]":K==hB&&(I="ES:[DI]");if(!I||!I.length){v="INVALID";break}0<v.length&&(v+=",");
|
||||
v+=I||"???"}}}g="";k=az(e)+" ";if(-1!==e.za&&-1!==b.za){do if(g+=q(a.ya(e,1),2),null==e.za)break;while(e.za!=b.za)}k+=va(g,e.gc?25:17);k+=va(p,8);v&&(k+=" "+v);a.G.da<iB[f]&&(c=iB[f]+" CPU only");c&&D&&(k=va(k,e.gc?74:62)+";"+c,k=a.G.Z.Ke?k+("cycles="+Cd(a.G).toString()+" cs="+q(a.G.Y.vf)):k+(null!=d?"="+d.toString():""));jB(b,D,h);return k}
|
||||
function WA(a,b,c,d){var e=c&LA;if(e==fB){if(b>Pz||b>=Oz&&80386>a.G.da)return"??";b+=Jz}else if(e==kB)b+=Yz;else if(e==lB)b+=mB;else if(e==nB)b+=oB;else if(a=c&IA,a>=T&&(b<Az&&(b+=Az-sz),a==OA||a==S&&d.Jb))b+=Qz-Az;return qz[b]}
|
||||
function pB(a,b){switch(b){case "V":a=hg(a.G);break;case "D":a=a.G.P&1024;break;case "I":a=a.G.P&512;break;case "T":a=a.G.P&256;break;case "S":a=gg(a.G);break;case "Z":a=fg(a.G);break;case "A":a=eg(a.G);break;case "P":a=dg(a.G);break;case "C":a=cg(a.G);break;default:a=0}return b+(a?"1":"0")+" "}function Py(a){return q(a,a&-65536?8:4)}function qB(a,b){b>=Az&&b<=Hz&&4<a.ra&&(b+=Qz-Az);var c=qz[b];b==Yz&&80286==a.G.da&&(c="MS");return c+"="+rz(a,b)+" "}
|
||||
function rB(a,b,c){return b.dc+"="+q(b.T,4)+(c?"["+q(b.ua,a.la)+","+Py(b.Sa)+"]":"")}function sB(a,b,c,d,e){return b+"="+(null!=c?q(c,4):"")+"["+q(d,a.la)+","+q(e-d,4)+"]"}
|
||||
function tB(a,b){var c;void 0===b&&(b=cz(a));c=qB(a,Az)+qB(a,Dz)+qB(a,Bz)+qB(a,Cz)+(4<a.ra?"\n":"")+qB(a,Ez)+qB(a,Fz)+qB(a,Gz)+qB(a,Hz)+"\n"+rB(a,a.G.U,b)+" "+rB(a,a.G.Fa,b)+" "+rB(a,a.G.pa,b)+" ";if(b){var d="TR="+q(a.G.ka.T,4),e=a.na,e="A20="+(e.J||e.N!=e.C?"OFF ":"ON ");80386>a.G.da&&(d="\n"+d,c+=e,e="");c+="\n"+rB(a,a.G.ba,b)+" ";80386<=a.G.da&&(e+="\n",c+=rB(a,a.G.Ka,b)+" "+rB(a,a.G.La,b)+"\n");c+=sB(a,"LD",a.G.Gb.T,a.G.Gb.ua,a.G.Gb.ua+a.G.Gb.Sa)+" "+sB(a,"GD",null,a.G.Kb,a.G.Ic)+" "+sB(a,"ID",
|
||||
null,a.G.Qb,a.G.ad)+" ";c=c+(d+" "+e)+qB(a,Yz);80386<=a.G.da&&(c+=qB(a,$z)+qB(a,aA))}else 80386<=a.G.da&&(c+=rB(a,a.G.Ka,b)+" "+rB(a,a.G.La,b)+" ");return c+=qB(a,cA)+pB(a,"V")+pB(a,"D")+pB(a,"I")+pB(a,"T")+pB(a,"S")+pB(a,"Z")+pB(a,"A")+pB(a,"P")+pB(a,"C")}l.ej=function(a,b){return a[0]>b[0]?1:a[0]<b[0]?-1:0};
|
||||
function dq(a,b,c,d,e,f,g,h){var k={},m=[],p;for(p in h){var v=h[p];"number"==typeof v&&(h[p]=v={o:v});var u=v.o,D=v.s,G=v.a;if(void 0!==u){void 0!==D&&(k.Ja=u,k.T=D,k.za=null,a.Wb(k),(k.za&-65536)==(a.na.N&-65536)&&(k.za&=1048575),v.p=k.za);var D=m,u=[u>>>0,p],I=ya(D,u,a.ej);0>I&&D.splice(-(I+1),0,u)}G&&(v.a=G.replace(/''/g,'"'))}a.F.push({Of:b,mn:c,T:d,Ja:e,za:f,$m:g,Jd:h,Oi:m})}
|
||||
function Zy(a,b,c){for(var d=0;d<a.F.length;d++){var e=a.F[d];if(!b||e.Of==b)if(b&&c==e.mn||!b&&c==e.T){a.F.splice(d,1);break}}}function ZA(a,b,c){for(var d=[],e=b.Ja>>>0,f=a.Wb(b)>>>0,g=0;g<a.F.length;g++){var h=a.F[g],k=h.T,m=h.Ja>>>0,p=h.za;null!=p&&(p>>>=0);var v=h.$m;48==k&&(k=40);if(k==b.T&&e>=m&&e<m+v||null!=p&&f>=p&&f<p+v){b=ya(h.Oi,[e],a.ej);0<=b?uB(a,g,b,d):c&&(b=~b,uB(a,g,b-1,d),uB(a,g,b,d));break}}!d.length&&(a=a.na.uj(f,!0))&&(d.push(a),d.push(f));return d}
|
||||
function uB(a,b,c,d){var e={},f=a.F[b].Oi,g=0,h=null;0<=c&&c<f.length&&(g=f[c][0],h=f[c][1]);h&&(e=a.F[b].Jd[h],h="."==h.charAt(0)?null:e.l||h);d.push(h);d.push(g);d.push(e.a);d.push(e.c)}
|
||||
function vB(a,b){if("?"==b)a.O("frequency commands:"),a.O("\tclear\tclear all frequency counts");else{var c=0;if(a.M)if("clear"==b){for(b=0;b<a.M.length;b++)a.M[b]=[b,0];a.O("frequency data cleared");c++}else if(void 0!==b)a.O("unknown frequency command: "+b),c++;else{var d=a.M.slice();d.sort(function(a,b){return b[1]-a[1]});for(b=0;b<d.length;b++){var e=d[b][0],f=d[b][1];f&&(a.O((tA[a.pa[e][0]]+" ").substr(0,5)+" ("+na(e)+"): "+f+" times"),c++)}}c||a.O("no frequency data available")}}
|
||||
function wB(a,b){var c=b.match(/^\s*([A-Z_]?[A-Z0-9_]*)\s*(=?)\s*(.*)$/i);if(c){if(!c[1])return By(a)||a.O("no variables"),!0;if(!c[2])return By(a,c[1]);if(!c[3])return delete a.I[c[1]],!0;b=yy(a,c[3]);return void 0!==b?(a.I[c[1]]={value:b,Po:void 0},!0):!1}a.O("invalid assignment:"+b);return!1}
|
||||
function xB(a,b,c){var d=null;if(b=kz(a,b,!0)){a.Wb(b);var e=ZA(a,b,!0);if(e.length){var f,g;e[0]&&(g="",(f=b.Ja-e[1])&&(g=" + "+oa(f)),f=e[0]+" ("+Qy(e[1],b.T)+")"+g,c&&a.O(f),d=f);4<e.length&&e[4]&&(g="",(f=e[5]-b.Ja)&&(g=" - "+oa(f)),f=e[4]+" ("+Qy(e[5],b.T)+")"+g,c&&a.O(f),d||(d=f))}else c&&a.O("no symbols")}return d}
|
||||
function yB(a,b){if(b[1]&&"?"!=b[1]){var c="json"==b[1],d,e=0,f=0,g=c?{}:kz(a,b[1]);if(g&&(d=sy(a,b[2],"drive #"),void 0!==d)){if(!c){e=sy(a,b[3],"sector #");if(void 0===e)return;f=sy(a,b[4],"# of sectors");void 0===f&&(f=1)}var h=a.cb;2<=d&&a.Pa&&(d-=2,h=a.Pa);if(h){var k=h.fj(d);if(k)if(k.va)if(c)zB(a.oa),a.O(k.va.toJSON());else if(h.Zk(k,e,f)){var m=0,p=!1;for(b=az(g);!p&&0<k.yb--;)(function(a,b){h.xe(k,function(c){0>c?(a.O("out of data at address "+az(b)),p=!0):(a.ub(b,c,1,!0),m++)})})(a,g);zd(a.G,
|
||||
function iA(a,b){b=Fy(a,b)||b;for(var c=0,d,e;0<=(c=b.indexOf("@",c));)e=a.fh(b,c+1),0<=e&&(b=b.substr(0,c)+wz(a,e)+b.substr(c+1+vz[e].length)),c++;for(c=0;0<=(c=b.indexOf("#",c));)e=b.substr(c+1,2),d=ia(e,16),null!=d&&32<=d&&128>d?(d=e+" '"+String.fromCharCode(d)+"'",b=b.replace("#"+e,d),c+=d.length):c++;for(c=0;0<=(c=b.indexOf("$",c));)e=b.substr(c+1,9),(d=pz(a,e))?(d=e+' "'+Wy(a,d)+'"',b=b.replace("$"+e,d),c+=d.length):c++;for(c=0;0<=(c=b.indexOf("^",c));)e=b.substr(c+1,9),(d=pz(a,e))?(kz(a,d),
|
||||
d=e+' "'+Wy(a,d,11)+'"',b=b.replace("^"+e,d),c+=d.length):c++;return b}l.message=function(a,b){b&&(a+=" at "+fz(Iy(this,z(this.G),this.G.ba.T))+" (%"+q(this.G.ea)+")");this.fc&536870912?this.Ba.push(a):this.Aa&&a==this.Aa||(this.Aa=a,this.fc&-2147483648&&(this.Ub(),a+=" (cpu halted)"),this.O(a),this.G&&(a=this.G,a.Z.Rf=!0,zd(a)))};
|
||||
function Wk(a,b,c,d){var e,f;if(!d&&(d=r(a,1)&&0>jA.indexOf(b),!d)){var g=kA[b];g&&(d=r(a,g)?!0:524288==g&&r(a,g=1048576))}d&&(e=a.G.D>>8&255,f=a.G.L&255,33==b&&11==e||524288==g&&128<=f||1048576==g&&128>f)&&(d=!1);d&&((g=(g=Sb[b])&&g[e]||"")&&(g=" "+iA(a,g)),a.message("INT "+na(b)+": AH="+na(e)+" at "+Vy(c-2-a.G.ba.ua,a.G.ba.T)+g));return d}
|
||||
function Ob(a,b,c,d,e,f,g,h){h|=256;if(null==e||(a.fc&h)==h)h=null,null!=e&&(h=a.G.ba.T,e-=a.G.ba.ua),a.message(b.Ce+"."+(null!=d?"outPort":"inPort")+"("+oa(c)+","+(f?f:"unknown")+(null!=d?","+na(d):"")+")"+(null!=g?": "+na(g):"")+(null!=e?" at "+Vy(e,h):""))}l.hh=function(){this.O("Type ? for help with PCx86 Debugger commands");lA(this);if(this.Ka){var a=this.Ka;this.Ka=null;My(this,a)}};
|
||||
function Ky(a,b){var c;if(Jg(a)){if(!a.U||!a.U.length){a.U=Array(mA);for(c=0;c<a.U.length;c++)a.U[c]=Iy(a);a.qa=0;b||a.O("instruction history buffer allocated")}if(!a.M||!a.M.length)for(a.M=Array(256),c=0;c<a.M.length;c++)a.M[c]=[c,0]}else a.U&&a.U.length&&!b&&a.O("instruction history buffer freed"),a.qa=0,a.U=[],a.M=[]}
|
||||
function gz(a,b,c,d){if(!nA(a))return!1;a.P=0;do{b||Jg(a)&&Mg(a,a.G.ea,0);try{var e=a.G.Kg(b);0<e&&(a.P+=e,Gd(a.G,e,!0),Bd(a.G,e),a.ba++)}catch(g){if("number"!=typeof g){var f=g;a.P=0;Gb(a.G,f.stack||f.message)}}}while(a.G.M&3312);!1!==d&&zd(a.G);lA(a,c||!1);return 0<a.P}l.Ub=function(a){return this.G&&this.G.Ub(a)||!1};function lA(a,b){void 0===b&&(b=!0);a.N=Iy(a,z(a.G),a.G.ba.T);b&&1!=a.K?oA(a):pA(a)}
|
||||
function nA(a,b){var c;(c=!a.G||!Ib(a.G))||(c=a.G,c.Z.bc?c=!0:(c.O(c.toString()+" not powered"),c=!1),c=!c);return c||a.G.Z.Xa?(b||a.O("cpu busy or unavailable, command ignored"),!1):!Hb(a.G)}l.ac=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0};l.$b=function(a,b){b&&this.O(a?"suspending":"shutting down");return a?this.save():!0};l.reset=function(a){Ky(this);this.ba=this.ka=0;this.Aa=null;this.P=0;this.N=Iy(this,z(this.G),this.G.ba.T);qA(this);a||this.Z.Xa||lA(this)};
|
||||
l.save=function(){var a=new Wf(this);a.set(0,mz(this.N));a.set(1,mz(this.Ca));a.set(2,mz(this.ea));a.set(3,[this.C,this.fa,this.fc]);a.set(4,this.F);a.set(5,[this.B,this.V,this.L]);return a.data()};
|
||||
l.restore=function(a){var b=0;a[b]&&(this.N=nz(a[b++]));a[5]&&(this.Ca=nz(a[b++]));a[b]&&(this.ea=nz(a[b++]));a[b]&&(this.C=a[b][0],"string"==typeof this.C&&(this.C=[this.C]),this.fa=a[b][1],this.fc|=a[b][2],b++);a[b]&&(this.F=a[b++]);a[b]&&(rA(this,this.B,a[b][0]),rA(this,this.V,a[b][1]),rA(this,this.L,a[b][2]));return!0};l.start=function(a,b){this.K||this.O("running");this.Z.Xa=!0;this.lb=a;this.jd=b};
|
||||
l.stop=function(a,b){if(this.Z.Xa){this.Z.Xa=!1;this.P=b-this.jd;if(!this.K){b="stopped";if(this.P){a-=this.lb;var c=0<a?Math.round(1E3*this.P/a):0;b+=" (";Jg(this)&&(b+=this.ba+" opcodes, ",this.ka-=this.ba,this.ba=0);b+=this.P+" cycles, "+a+" ms, "+c+" hz)"}else r(this,-2147483648)&&(b+=" (use the 't' command to execute blocked faults)");this.O(b)}lA(this,!0);this.dd();qA(this,this.G.ea)}};function Jg(a){return 1<a.B.length||!!a.wa||r(a,16)}
|
||||
function Mg(a,b,c){var d=a.G;if(0<c&&(a.wa&&!--a.wa||sA(a,b,1,a.B)))return!0;0<=c&&a.M.length&&(a.ba++,b=vg(d,b),null!=b&&(a.M[b][1]++,b=a.U[a.qa],lz(a,b,z(d),d.ba.T),b.gj=Cd(d),++a.qa==a.U.length&&(a.qa=0)));return!1}function hd(a,b,c){return sA(a,b,c||1,a.V)?(a.Ub(!0),!0):!1}function jd(a,b,c){return sA(a,b,c||1,a.L)?(a.Ub(!0),!0):!1}function Kc(a,b,c){a.O("break on input from port "+oa(b)+": "+q(c));a.Ub(!0)}function Oc(a,b,c){a.O("break on output to port "+oa(b)+": "+q(c));a.Ub(!0)}
|
||||
function Jy(a){var b,c;a.B=["bp"];if(a.V)for(b=1;b<a.V.length;b++)c=a.V[b],kf(a.G,a.Wb(c),!1,c.type==jz);a.V=["br"];if(a.L)for(b=1;b<a.L.length;b++)c=a.L[b],kf(a.G,a.Wb(c),!0,c.type==jz);a.L=["bw"];a.Ia=0}
|
||||
l.td=function(a,b,c,d){var e=!0;c||ez(this,a,b,!1,!0);if(a!=this.B){var f=this.Wb(b);if(-1===f)this.O("invalid address: "+fz(b)),e=!1;else{var g=this.G,h=b.type==jz;(h?g.tc:g.aa)[f>>>g.lb].td(f&g.Fb,a==this.L);h&&nc(g)}}e&&(a.push(b),c?(null!=b.za&&(b.T=null),b.yd=!0):(d||tA(this,a,a.length-1,"set"),Ky(this)));return e};
|
||||
function ez(a,b,c,d,e){for(var f=!1,g=uA(a,a.Wb(c)),h=1;h<b.length;h++){var k=b[h];if(-1!==g&&g==uA(a,a.Wb(k))||-1===g&&c.T==k.T&&c.Ja==k.Ja)if(!d||k.yd){f=!0;k.yd||e||tA(a,b,h,"cleared");b.splice(h,1);b!=a.B&&kf(a.G,g,b==a.L,k.type==jz);k.yd||Ky(a);break}}return f}function vA(a,b){for(var c=1;c<b.length;c++)tA(a,b,c);return b.length-1}function tA(a,b,c,d){c=b[c];a.O(b[0]+" "+fz(c)+(d?" "+d:c.Xk?' "'+c.Xk+'"':""))}
|
||||
function rA(a,b,c){if(c[0]==b[0])for(var d=1;d<c.length;d++){var e=c[d];a.td(b,e,e.yd,!0)}}function qA(a,b){if(void 0!==b)sA(a,b,1,a.B,!0),a.K=0;else for(b=1;b<a.B.length;b++){var c=a.B[b];if(c.yd){if(!ez(a,a.B,c,!0))break;b=0}}}function uA(a,b){-1!==b&&(a=a.xa&-65536,(b&a)==a&&(b&=1048575));return b}
|
||||
function sA(a,b,c,d,e){var f=!1;if(!a.Ia++){b=uA(a,b);r(a,-2147483632)&&204==vg(a.G,b)&&(f=!0);for(var g=1;!f&&g<d.length;g++){var h=d[g];if(!e||h.yd){null!=h.T&&(h.za=null);for(var k=uA(a,a.Wb(h)),m=0;m<c;m++)if(b+m==k){var p,f=!0;h.yd&&(ez(a,d,h,!0),e=!0);if(p=h.pl){for(var f=!1,v=0;v<p.length;v++)if(!wA(a,p[v],!0)){if(p[v].indexOf("if")){f=!0;break}for(var u=v+1;u<p.length&&p[u].indexOf("else");u++)v++;if(u==p.length){f=!0;break}}a.G.Z.Xa||(f=!0)}if(f){e||tA(a,d,g,"hit");break}}}}}a.Ia--;return f}
|
||||
function xA(a,b,c,d){for(var e=Iy(a,b.Ja,b.T,b.za,b.type),f=a.ya(b,1),g=4,h=0,k=!1,m=!1;(102==f||103==f)&&g--;)102==f?k||(b.Jb=!b.Jb,k=!0):m||(b.gc=!b.gc,m=!0),h++,f=a.ya(b,1);var g=-1,p=yA,k=a.pa[f],m=k[0];m==zA&&(m=a.ya(b,1),k=AA[m]||Oy,f|=m<<8,m=k[0]);if(m==BA){var g=a.ya(b,1),v;v=null;var u=g>>3&7,D=(3>(g>>6&3)?0:48)+u;(217==f||219==f)&&52<=D&&(D=u<<4|g&7);(u=CA[f])&&(v=u[D]);v&&(p=DA,k=v,m=k[0])}m>=p.length&&(g=a.ya(b,1),k=EA[m-p.length][g>>3&7],m=k[0]);p=p[m];u=k.length-1;v="";b.Jb&&(m==FA?
|
||||
p="CWDE":m==GA?p="CDQ":m>=HA&&m<=IA&&(p+="D"));if(164<=f&&167>=f||170<=f&&175>=f)u=0,b.Jb&&"W"==p.slice(-1)&&(p=p.slice(0,-1)+"D");for(var f=-1,D=!0,G=1;G<=u;G++){var I,J;I="";J=k[G];if(void 0!==J){0>f&&(f=J>>JA);m==KA&&(f==LA?v="[%800]":f==MA&&(v="ES:["+(b.gc?"E":"")+"DI]"));var P=J&NA;if(P!=OA)if(P==PA)D=!1;else{var K=J&QA;if(K>=R)if(0>g&&(g=a.ya(b,1)),K<RA){K=a;I=J;var ka=u;J=b;var Z="",jb=g>>6,qa=g&7;if(3>jb){P=!p.indexOf("FI");if(!jb&&(!J.gc&&6==qa||J.gc&&5==qa))jb=2;else{if(J.gc)if(4!=qa)qa+=
|
||||
8;else{var Z=K,db=jb,Oa=J,kb=Z.ya(Oa,1),eb=kb>>6,uc=kb>>3&7,kb=kb&7,lb="";if(db||5!=kb)lb=SA[kb+8];4!=uc&&(lb&&(lb+="+"),lb+=SA[uc+8],eb&&(lb+="*"+(1<<eb)));db||5!=kb||(lb&&(lb+="+"),lb+=q(bz(Z,Oa,4)));Z=lb}Z||(Z=SA[qa])}1==jb?(K=K.ya(J,1),Z=K&128?Z+("-"+q(-(K<<24>>24),2)):Z+("+"+q(K,2))):2==jb&&(Z&&(Z+="+"),J.gc?(K=bz(K,J,4),Z+=q(K)):(K=K.Wc(J,2),Z+=q(K,4)));Z="["+Z+"]";if(1==ka){K="";I&=NA;I==S&&(I=J.Jb?TA:T);switch(I){case UA:K="FAR";break;case U:K="BYTE";break;case T:if(P){K="INT16";break}K="WORD";
|
||||
break;case TA:K="DWORD";break;case VA:if(P){K="INT32";break}case WA:K="REAL32";break;case XA:if(P){K="INT64";break}case YA:K="REAL64";break;case ZA:K="REAL80";break;case $A:K="BCD80"}K&&(Z=K+" "+Z)}}else Z=aB(K,qa,I,J);I=Z}else I=K==RA?aB(a,g&7,J,b):aB(a,g>>3&7,J,b);else if(K==bB)I="1";else if(K==V){I=a;P=J;K=b;J=" ";switch(P&NA){case U:P&W&&(J=q(I.ya(K,1),2));break;case cB:J=q(I.ya(K,1)<<24>>24,K.Jb?8:4);break;case S:if(K.Jb){J=q(bz(I,K,4));break}case T:J=q(I.Wc(K,2),4);break;case UA:K=Iy(I,I.nb(K,
|
||||
!0),I.Wc(K,2),null,K.type,K.Jb,K.gc);J=fz(K);I=dB(I,K);I[0]&&(J+=" ("+I[0]+")");break;default:J="imm("+oa(P)+")"}I=J}else K==eB?(b.gc?(I=8,J=bz(a,b,4)):(I=4,J=a.Wc(b,2)),I="["+q(J,I)+"]"):K==fB?(I=P==U?a.ya(b,1)<<24>>24:a.nb(b,!0),J=b.Ja+I&(b.Jb?-1:65535),I=q(J,b.Jb?8:4),J=dB(a,Iy(a,J,b.T)),J[0]&&(I+=" ("+J[0]+")")):K==X?I=P==gB?"ST":P==hB?"ST("+(g&7)+")":aB(a,(J&iB)>>8,J,b):K==jB?I=aB(a,(J&iB)>>8,kB,b):K==lB?I="DS:[SI]":K==mB&&(I="ES:[DI]");if(!I||!I.length){v="INVALID";break}0<v.length&&(v+=",");
|
||||
v+=I||"???"}}}g="";k=fz(e)+" ";if(-1!==e.za&&-1!==b.za){do if(g+=q(a.ya(e,1),2),null==e.za)break;while(e.za!=b.za)}k+=va(g,e.gc?25:17);k+=va(p,8);v&&(k+=" "+v);a.G.da<nB[f]&&(c=nB[f]+" CPU only");c&&D&&(k=va(k,e.gc?74:62)+";"+c,k=a.G.Z.Ke?k+("cycles="+Cd(a.G).toString()+" cs="+q(a.G.Y.vf)):k+(null!=d?"="+d.toString():""));oB(b,D,h);return k}
|
||||
function aB(a,b,c,d){var e=c&QA;if(e==kB){if(b>Uz||b>=Tz&&80386>a.G.da)return"??";b+=Oz}else if(e==pB)b+=cA;else if(e==qB)b+=rB;else if(e==sB)b+=tB;else if(a=c&NA,a>=T&&(b<Fz&&(b+=Fz-xz),a==TA||a==S&&d.Jb))b+=Vz-Fz;return vz[b]}
|
||||
function uB(a,b){switch(b){case "V":a=hg(a.G);break;case "D":a=a.G.P&1024;break;case "I":a=a.G.P&512;break;case "T":a=a.G.P&256;break;case "S":a=gg(a.G);break;case "Z":a=fg(a.G);break;case "A":a=eg(a.G);break;case "P":a=dg(a.G);break;case "C":a=cg(a.G);break;default:a=0}return b+(a?"1":"0")+" "}function Uy(a){return q(a,a&-65536?8:4)}function vB(a,b){b>=Fz&&b<=Mz&&4<a.ra&&(b+=Vz-Fz);var c=vz[b];b==cA&&80286==a.G.da&&(c="MS");return c+"="+wz(a,b)+" "}
|
||||
function wB(a,b,c){return b.dc+"="+q(b.T,4)+(c?"["+q(b.ua,a.la)+","+Uy(b.Sa)+"]":"")}function xB(a,b,c,d,e){return b+"="+(null!=c?q(c,4):"")+"["+q(d,a.la)+","+q(e-d,4)+"]"}
|
||||
function yB(a,b){var c;void 0===b&&(b=hz(a));c=vB(a,Fz)+vB(a,Iz)+vB(a,Gz)+vB(a,Hz)+(4<a.ra?"\n":"")+vB(a,Jz)+vB(a,Kz)+vB(a,Lz)+vB(a,Mz)+"\n"+wB(a,a.G.U,b)+" "+wB(a,a.G.Fa,b)+" "+wB(a,a.G.pa,b)+" ";if(b){var d="TR="+q(a.G.ka.T,4),e=a.na,e="A20="+(e.J||e.N!=e.C?"OFF ":"ON ");80386>a.G.da&&(d="\n"+d,c+=e,e="");c+="\n"+wB(a,a.G.ba,b)+" ";80386<=a.G.da&&(e+="\n",c+=wB(a,a.G.Ka,b)+" "+wB(a,a.G.La,b)+"\n");c+=xB(a,"LD",a.G.Gb.T,a.G.Gb.ua,a.G.Gb.ua+a.G.Gb.Sa)+" "+xB(a,"GD",null,a.G.Kb,a.G.Ic)+" "+xB(a,"ID",
|
||||
null,a.G.Qb,a.G.ad)+" ";c=c+(d+" "+e)+vB(a,cA);80386<=a.G.da&&(c+=vB(a,eA)+vB(a,fA))}else 80386<=a.G.da&&(c+=wB(a,a.G.Ka,b)+" "+wB(a,a.G.La,b)+" ");return c+=vB(a,hA)+uB(a,"V")+uB(a,"D")+uB(a,"I")+uB(a,"T")+uB(a,"S")+uB(a,"Z")+uB(a,"A")+uB(a,"P")+uB(a,"C")}l.ej=function(a,b){return a[0]>b[0]?1:a[0]<b[0]?-1:0};
|
||||
function dq(a,b,c,d,e,f,g,h){var k={},m=[],p;for(p in h){var v=h[p];"number"==typeof v&&(h[p]=v={o:v});var u=v.o,D=v.s,G=v.a;if(void 0!==u){void 0!==D&&(k.Ja=u,k.T=D,k.za=null,a.Wb(k),(k.za&-65536)==(a.na.N&-65536)&&(k.za&=1048575),v.p=k.za);var D=m,u=[u>>>0,p],I=ya(D,u,a.ej);0>I&&D.splice(-(I+1),0,u)}G&&(v.a=G.replace(/''/g,'"'))}a.F.push({Of:b,qn:c,T:d,Ja:e,za:f,dn:g,Jd:h,Oi:m})}
|
||||
function dz(a,b,c){for(var d=0;d<a.F.length;d++){var e=a.F[d];if(!b||e.Of==b)if(b&&c==e.qn||!b&&c==e.T){a.F.splice(d,1);break}}}function dB(a,b,c){for(var d=[],e=b.Ja>>>0,f=a.Wb(b)>>>0,g=0;g<a.F.length;g++){var h=a.F[g],k=h.T,m=h.Ja>>>0,p=h.za;null!=p&&(p>>>=0);var v=h.dn;48==k&&(k=40);if(k==b.T&&e>=m&&e<m+v||null!=p&&f>=p&&f<p+v){b=ya(h.Oi,[e],a.ej);0<=b?zB(a,g,b,d):c&&(b=~b,zB(a,g,b-1,d),zB(a,g,b,d));break}}!d.length&&(a=a.na.uj(f,!0))&&(d.push(a),d.push(f));return d}
|
||||
function zB(a,b,c,d){var e={},f=a.F[b].Oi,g=0,h=null;0<=c&&c<f.length&&(g=f[c][0],h=f[c][1]);h&&(e=a.F[b].Jd[h],h="."==h.charAt(0)?null:e.l||h);d.push(h);d.push(g);d.push(e.a);d.push(e.c)}
|
||||
function AB(a,b){if("?"==b)a.O("frequency commands:"),a.O("\tclear\tclear all frequency counts");else{var c=0;if(a.M)if("clear"==b){for(b=0;b<a.M.length;b++)a.M[b]=[b,0];a.O("frequency data cleared");c++}else if(void 0!==b)a.O("unknown frequency command: "+b),c++;else{var d=a.M.slice();d.sort(function(a,b){return b[1]-a[1]});for(b=0;b<d.length;b++){var e=d[b][0],f=d[b][1];f&&(a.O((yA[a.pa[e][0]]+" ").substr(0,5)+" ("+na(e)+"): "+f+" times"),c++)}}c||a.O("no frequency data available")}}
|
||||
function BB(a,b){var c=b.match(/^\s*([A-Z_]?[A-Z0-9_]*)\s*(=?)\s*(.*)$/i);if(c){if(!c[1])return Gy(a)||a.O("no variables"),!0;if(!c[2])return Gy(a,c[1]);if(!c[3])return delete a.I[c[1]],!0;b=Dy(a,c[3]);return void 0!==b?(a.I[c[1]]={value:b,Xo:void 0},!0):!1}a.O("invalid assignment:"+b);return!1}
|
||||
function CB(a,b,c){var d=null;if(b=pz(a,b,!0)){a.Wb(b);var e=dB(a,b,!0);if(e.length){var f,g;e[0]&&(g="",(f=b.Ja-e[1])&&(g=" + "+oa(f)),f=e[0]+" ("+Vy(e[1],b.T)+")"+g,c&&a.O(f),d=f);4<e.length&&e[4]&&(g="",(f=e[5]-b.Ja)&&(g=" - "+oa(f)),f=e[4]+" ("+Vy(e[5],b.T)+")"+g,c&&a.O(f),d||(d=f))}else c&&a.O("no symbols")}return d}
|
||||
function DB(a,b){if(b[1]&&"?"!=b[1]){var c="json"==b[1],d,e=0,f=0,g=c?{}:pz(a,b[1]);if(g&&(d=xy(a,b[2],"drive #"),void 0!==d)){if(!c){e=xy(a,b[3],"sector #");if(void 0===e)return;f=xy(a,b[4],"# of sectors");void 0===f&&(f=1)}var h=a.cb;2<=d&&a.Pa&&(d-=2,h=a.Pa);if(h){var k=h.fj(d);if(k)if(k.va)if(c)EB(a.oa),a.O(k.va.toJSON());else if(h.Zk(k,e,f)){var m=0,p=!1;for(b=fz(g);!p&&0<k.yb--;)(function(a,b){h.xe(k,function(c){0>c?(a.O("out of data at address "+fz(b)),p=!0):(a.ub(b,c,1,!0),m++)})})(a,g);zd(a.G,
|
||||
!0);a.O(m+" bytes read at "+b)}else a.O("sector "+e+" request out of range");else a.O("drive "+d+" not loaded");else a.O("invalid drive: "+d)}else a.O("disk controller not present")}}else a.O("load commands:"),a.O("\tl [address] [drive #] [sector #] [# sectors]")}
|
||||
function jA(a,b){var c;if(b&&"?"==b[1])a.O("register commands:"),a.O("\tr\tdump registers"),a.Kc&&a.O("\trfp\tdump floating-point registers"),a.O("\trp\tdump all registers"),a.O("\trx [#]\tset flag or register x to [#]");else{var d;null==c&&(c=!0);if(b&&1<b.length){var e=b[1];if(a.Kc&&"fp"==e){c=a.Kc;d=Pg(c);b=c.cc;for(var f=0;8>f;f++){var g=c,e=null;if(f<g.F.length){var e=[],h=g.B+f&7;e[0]=h;e[1]=sh(g,h);e[2]=g.F[h];h<<=1;e[3]=g.L[h];e[4]=g.L[h+1];g=wh(g,e[3],e[4]);e[5]=g[0];e[6]=g[1];e[7]=g[2]}if(!e)break;
|
||||
a.O("ST"+f+": "+va(e[2].toFixed(15),24,!0)+" "+q(e[4])+","+q(e[3])+" ["+e[0]+":"+AB[e[1]]+"]")}a.O(" B3SSS210ESPUOZDI xxxIRRPPIxPUOZDI");a.O("SW: "+la(d,16)+" ("+oa(d)+") CW: "+la(b,16)+" ("+oa(b)+")");return}if("p"==e)d=80286<=a.G.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=yy(a,b);if(void 0===g)return;f=!0;h=e.toUpperCase();"E"==h.charAt(0)&&4>=a.ra&&(h=null);switch(h){case "AL":a.G.D=
|
||||
function oA(a,b){var c;if(b&&"?"==b[1])a.O("register commands:"),a.O("\tr\tdump registers"),a.Kc&&a.O("\trfp\tdump floating-point registers"),a.O("\trp\tdump all registers"),a.O("\trx [#]\tset flag or register x to [#]");else{var d;null==c&&(c=!0);if(b&&1<b.length){var e=b[1];if(a.Kc&&"fp"==e){c=a.Kc;d=Pg(c);b=c.cc;for(var f=0;8>f;f++){var g=c,e=null;if(f<g.F.length){var e=[],h=g.B+f&7;e[0]=h;e[1]=sh(g,h);e[2]=g.F[h];h<<=1;e[3]=g.L[h];e[4]=g.L[h+1];g=wh(g,e[3],e[4]);e[5]=g[0];e[6]=g[1];e[7]=g[2]}if(!e)break;
|
||||
a.O("ST"+f+": "+va(e[2].toFixed(15),24,!0)+" "+q(e[4])+","+q(e[3])+" ["+e[0]+":"+FB[e[1]]+"]")}a.O(" B3SSS210ESPUOZDI xxxIRRPPIxPUOZDI");a.O("SW: "+la(d,16)+" ("+oa(d)+") CW: "+la(b,16)+" ("+oa(b)+")");return}if("p"==e)d=80286<=a.G.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=Dy(a,b);if(void 0===g)return;f=!0;h=e.toUpperCase();"E"==h.charAt(0)&&4>=a.ra&&(h=null);switch(h){case "AL":a.G.D=
|
||||
a.G.D&-256|g&255;break;case "AH":a.G.D=a.G.D&-65281|g<<8&255;break;case "AX":a.G.D=a.G.D&-65536|g&65535;break;case "BL":a.G.H=a.G.H&-256|g&255;break;case "BH":a.G.H=a.G.H&-65281|g<<8&255;break;case "BX":a.G.H=a.G.H&-65536|g&65535;break;case "CL":a.G.I=a.G.I&-256|g&255;break;case "CH":a.G.I=a.G.I&-65281|g<<8&255;break;case "CX":a.G.I=a.G.I&-65536|g&65535;break;case "DL":a.G.L=a.G.L&-256|g&255;break;case "DH":a.G.L=a.G.L&-65281|g<<8&255;break;case "DX":a.G.L=a.G.L&-65536|g&65535;break;case "SP":ge(a.G,
|
||||
y(a.G)&-65536|g&65535);break;case "BP":a.G.N=a.G.N&-65536|g&65535;break;case "SI":a.G.K=a.G.K&-65536|g&65535;break;case "DI":a.G.J=a.G.J&-65536|g&65535;break;case "DS":me(a.G,g);break;case "ES":ne(a.G,g);break;case "SS":fe(a.G,g);break;case "CS":Yf(a.G,g);a.N=Dy(a,z(a.G),a.G.ba.T);break;case "IP":case "EIP":B(a.G,g);a.N=Dy(a,z(a.G),a.G.ba.T);break;case "PC":case "PS":re(a.G,g);break;case "C":g?jg(a.G):kg(a.G);break;case "P":g?(e=a.G,e.resultType&=-3,e.P|=4):(e=a.G,e.resultType&=-3,e.P&=-5);break;
|
||||
y(a.G)&-65536|g&65535);break;case "BP":a.G.N=a.G.N&-65536|g&65535;break;case "SI":a.G.K=a.G.K&-65536|g&65535;break;case "DI":a.G.J=a.G.J&-65536|g&65535;break;case "DS":me(a.G,g);break;case "ES":ne(a.G,g);break;case "SS":fe(a.G,g);break;case "CS":Yf(a.G,g);a.N=Iy(a,z(a.G),a.G.ba.T);break;case "IP":case "EIP":B(a.G,g);a.N=Iy(a,z(a.G),a.G.ba.T);break;case "PC":case "PS":re(a.G,g);break;case "C":g?jg(a.G):kg(a.G);break;case "P":g?(e=a.G,e.resultType&=-3,e.P|=4):(e=a.G,e.resultType&=-3,e.P&=-5);break;
|
||||
case "A":g?rg(a.G):pg(a.G);break;case "Z":g?sg(a.G):qg(a.G);break;case "S":g?(e=a.G,e.resultType&=-17,e.P|=128):(e=a.G,e.resultType&=-17,e.P&=-129);break;case "I":g?(e=a.G,e.P|=512):(e=a.G,e.P&=-513);break;case "D":g?(e=a.G,e.P|=1024):(e=a.G,e.P&=-1025);break;case "V":g?lg(a.G):mg(a.G);break;default:var k=!0;if(80286<=a.G.da)switch(k=!1,h){case "MS":tg(a.G,g);break;case "TR":-1===a.G.ka.load(g)&&(f=!1);break;default:if(k=!0,80386<=a.G.da)switch(k=!1,h){case "EAX":a.G.D=g;break;case "EBX":a.G.H=g;
|
||||
break;case "ECX":a.G.I=g;break;case "EDX":a.G.L=g;break;case "ESP":ge(a.G,g);break;case "EBP":a.G.N=g;break;case "ESI":a.G.K=g;break;case "EDI":a.G.J=g;break;case "FS":a.G.Ka.load(g);break;case "GS":a.G.La.load(g);break;case "CR0":a.G.ra=g;bk.call(a.G,g);break;case "CR2":a.G.qd=g;break;case "CR3":a.G.Uc=g;te.call(a.G,g);break;default:k=!0}}if(k){a.O("unknown register: "+e);return}}if(!f){a.O("invalid value: "+b);return}zd(a.G);a.O("updated registers:")}}a.O(tB(a,d));c&&(a.N=Dy(a,z(a.G),a.G.ba.T),
|
||||
kA(a,az(a.N)))}}function BB(a,b){b=wa(b);var c=b.match(/^(['"])(.*?)\1$/);c?a.O(dA(a,c[2])):yy(a,b,!1)}function CB(a,b,c){for(var d=null,e=b.Ja,f=e,g=1;6>=g&&e;g++){if(2<g){b.Ja=e;b.za=null;var h=sA(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.Ja=f;return d}
|
||||
function DB(a,b,c){var d="t"!=b;c=sy(a,c,null,!0)||1;var e=1==c?0:1;"tc"==b&&(e=c,c=1);Ua(c,function(){return Mb(a,!0)&&bz(a,e,d,!1)},function(){zd(a.G);Mb(a,!1)})}function jB(a,b,c){if(a.ah=b)null!=a.nj&&(a.Jb=a.nj),null!=a.mj&&(a.gc=a.mj),a.nj=a.Jb,a.mj=a.gc;a.Ie=c||0}
|
||||
function kA(a,b,c,d){if(b=kz(a,b,!0)){void 0===d&&(d=1);var e=256;if(void 0!==c){d=kz(a,c,!0);if(!d||d.Ja<b.Ja)return;e=d.Ja-b.Ja+1;0>e&&(e=1);4096<e&&(e=4096);d=-1}c=0;var f;for(jB(b,!0);0<e&&d--;){f=Lb(a,!1)||a.K?a.P:null;var g=null!=f?"cycles":null,h=ZA(a,b),k=b.za;if(h[0]&&d&&(!c&&d||0>h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.O(m)}h[3]&&(g=h[3],f=null);f=sA(a,b,g,f);b.ah||d||d++;a.O(f);a.N=b;e-=b.za-k;c++}}}
|
||||
break;case "ECX":a.G.I=g;break;case "EDX":a.G.L=g;break;case "ESP":ge(a.G,g);break;case "EBP":a.G.N=g;break;case "ESI":a.G.K=g;break;case "EDI":a.G.J=g;break;case "FS":a.G.Ka.load(g);break;case "GS":a.G.La.load(g);break;case "CR0":a.G.ra=g;bk.call(a.G,g);break;case "CR2":a.G.qd=g;break;case "CR3":a.G.Uc=g;te.call(a.G,g);break;default:k=!0}}if(k){a.O("unknown register: "+e);return}}if(!f){a.O("invalid value: "+b);return}zd(a.G);a.O("updated registers:")}}a.O(yB(a,d));c&&(a.N=Iy(a,z(a.G),a.G.ba.T),
|
||||
pA(a,fz(a.N)))}}function GB(a,b){b=wa(b);var c=b.match(/^(['"])(.*?)\1$/);c?a.O(iA(a,c[2])):Dy(a,b,!1)}function HB(a,b,c){for(var d=null,e=b.Ja,f=e,g=1;6>=g&&e;g++){if(2<g){b.Ja=e;b.za=null;var h=xA(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.Ja=f;return d}
|
||||
function IB(a,b,c){var d="t"!=b;c=xy(a,c,null,!0)||1;var e=1==c?0:1;"tc"==b&&(e=c,c=1);Ua(c,function(){return Lb(a,!0)&&gz(a,e,d,!1)},function(){zd(a.G);Lb(a,!1)})}function oB(a,b,c){if(a.ah=b)null!=a.nj&&(a.Jb=a.nj),null!=a.mj&&(a.gc=a.mj),a.nj=a.Jb,a.mj=a.gc;a.Ie=c||0}
|
||||
function pA(a,b,c,d){if(b=pz(a,b,!0)){void 0===d&&(d=1);var e=256;if(void 0!==c){d=pz(a,c,!0);if(!d||d.Ja<b.Ja)return;e=d.Ja-b.Ja+1;0>e&&(e=1);4096<e&&(e=4096);d=-1}c=0;var f;for(oB(b,!0);0<e&&d--;){f=Kb(a,!1)||a.K?a.P:null;var g=null!=f?"cycles":null,h=dB(a,b),k=b.za;if(h[0]&&d&&(!c&&d||0>h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.O(m)}h[3]&&(g=h[3],f=null);f=xA(a,b,g,f);b.ah||d||d++;a.O(f);a.N=b;e-=b.za-k;c++}}}
|
||||
l.Bg=function(a,b,c){if(b)if(a){0>this.A&&this.C.length&&(this.A=0);if(0>this.A||a!=this.C[this.A])this.C.splice(0,0,a),this.A=0;this.A--}else a=this.C[this.A+1];b=[];if(a){a=a.toLowerCase().replace(/""/g,"'");var d=0,e=null;c=c||";";for(var f=0;f<=a.length;f++){var g=a.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==c&&!e||!g)b.push(wa(a.substring(d,f))),d=f+1}}return b};
|
||||
function rA(a,b,c){var d=!0;try{if(!b.length||"end"==b)a.fa&&(a.O("ended assemble at "+az(a.ea)),a.N=a.ea,a.fa=!1),b="";else if(!c){var e=">> ";a.G.ra&1&&(e=a.G.P&131072?"-- ":"## ");a.O(e+b)}var f=b.charAt(0);if('"'==f||"'"==f)return!0;a.Aa=null;if(Ib(a)&&0<b.length){a.fa&&(b="a "+az(a.ea)+" "+b);var g=b.replace(/ +/g," ").split(" ");if(g&&g.length)for(var h=g[0],k=h.charAt(0),m=1;m<h.length;m++){var p=h.charAt(m);if("?"==k||"r"==k||"a">p||"z"<p){g[0]=h.substr(m);g.unshift(h.substr(0,m));break}}switch(g[0].charAt(0)){case "a":var v=
|
||||
kz(a,g[1],!0);if(v)if(a.ea=v,void 0===g[2])a.O("begin assemble at "+az(v)),a.fa=!0,zd(a.G);else{var u;a.O("not supported yet");u=[];if(u.length){for(var D=0;D<u.length;D++)a.ub(v,u[D],1);a.O(sA(a,a.ea))}}break;case "b":a:{var G=g[0],I=g[1],J=b;if("?"==I)a.O("breakpoint commands:"),a.O("\tbi [p]\ttoggle break on input port [p]"),a.O("\tbo [p]\ttoggle break on output port [p]"),a.O("\tbp [a]\tset exec breakpoint at addr [a]"),a.O("\tbr [a]\tset read breakpoint at addr [a]"),a.O("\tbw [a]\tset write breakpoint at addr [a]"),
|
||||
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=G.charAt(1);if("l"==P){var K;K=0+qA(a,a.B);K+=qA(a,a.V);(K+=qA(a,a.L))||a.O("no breakpoints")}else if("n"==P)a.wa=sy(a,I),a.O("break after "+a.wa+" instruction(s)");else if(void 0===I)a.O("missing breakpoint address");else{var ka={};if("*"!=I&&(ka=kz(a,I,!0,!0),!ka))break a;I=null==ka.Ja?I:oa(ka.Ja);"c"==P?null==ka.Ja?(Ey(a),a.O("all breakpoints cleared")):$y(a,
|
||||
a.B,ka)||$y(a,a.V,ka)||$y(a,a.L,ka)||a.O("breakpoint missing: "+az(ka)):"i"==P?a.O("breakpoint "+(Hc(a.na,ka.Ja)?"enabled":"cleared")+": port "+I+" (input)"):"o"==P?a.O("breakpoint "+(Lc(a.na,ka.Ja)?"enabled":"cleared")+": port "+I+" (output)"):null!=ka.Ja&&(nz(a,ka,J),"p"==P?a.td(a.B,ka):"r"==P?a.td(a.V,ka):"w"==P?a.td(a.L,ka):a.O("unknown breakpoint command: "+P))}}}break;case "c":zB(a.oa);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 Tb)a.Fa[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 uc=EB(a.oa,!0);uc?"console"==Oa?console.log(uc):
|
||||
(zB(a.oa),a.O(uc)):a.O("powerOff() error")}else if("symbols"==db)for(var lb=0;lb<a.F.length;lb++){var cf=a.F[lb],Od;for(Od in cf.Jd)if("."!=Od.charAt(0)){var df=cf.Jd[Od],Bg=df.o;if(void 0!==Bg){var ef=df.s;void 0===ef&&(ef=cf.T);var Cg=cf.Jd[Od].l;Cg&&(Od=Cg);a.O(Qy(Bg,ef)+" "+Od)}}}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 Am=Z[0];if(Am){var Wg=a.Wb(kz(a,Am));if(-1===Wg)a.O("invalid address: "+Am);else{var pf,
|
||||
Ra=null;if(80386<=a.G.da){var qf=a.na,Ra={};Ra.Ik=(Wg&-4194304)>>>20;Ra.Ti=a.G.Uc+Ra.Ik;Ra.pb=qf.aa[(Ra.Ti&qf.C)>>>qf.A];Ra.Aj=Ra.pb.Od(Ra.Ik);Ra.Jk=(Wg&4190208)>>>10;Ra.Ui=(Ra.Aj&-4096)+Ra.Jk;Ra.qb=qf.aa[(Ra.Ui&qf.C)>>>qf.A];Ra.Bj=Ra.qb.Od(Ra.Jk);Ra.rl=(Ra.Bj&-4096)+(Wg&4095)}if(pf=Ra){a.O("linear PDE addr PDE PTE addr PTE physical");a.O("--------- ---------- -------- ---------- -------- ----------");var Ae="%"+q(Wg),Ae=Ae+(" %%"+pz(pf.Ti,pf.Aj)),Ae=
|
||||
Ae+(" %%"+pz(pf.Ui,pf.Bj,!0)),Ae=Ae+(" %%"+q(pf.rl));a.O(Ae)}else a.O("unsupported operation")}}else a.O("missing address")}else{if("d"==qa){if("disk"==db){Z[0]="l";Z[1]="json";yB(a,Z);break a}for(jb in Tb)if(Z[1]==jb){var Ht=a.Fa[jb];Ht?(Z.shift(),Z.shift(),Ht(Z)):a.O("no dump registered for "+db);break a}db||(qa=a.mb||"db")}if("dh"==qa){var It=db,Jt=Oa,Xg=kb,Xg=void 0===Xg?"history":Xg,Kt="",Lt=0,Oc=a.qa,nd=a.U;if(nd.length){var yc=+It||a.Ra,Yg=+Jt||10;isNaN(yc)?yc=Yg:Kt="more ";yc>nd.length&&
|
||||
(a.O("note: only "+nd.length+" available"),yc=nd.length);Oc-=yc;0>Oc&&(null==nd[nd.length-1].T?(yc=Oc+yc,Oc=0):Oc+=nd.length);var Bm=[];"call"==Jt&&(Yg=1E5,Bm=["CALL"]);for(void 0!==It&&a.O(yc+" instructions earlier:");0<Yg&&Oc!=a.qa;){var od=nd[Oc++];if(null==od.T)break;var Zg=Dy(a,od.Ja,od.T,od.za,od.type,od.Jb,od.gc),Mt=yc--;null!=od.gj&&"cycles"==Xg&&(Mt=od.gj);var Nt=sA(a,Zg,Xg,Mt);(!Bm.length||0<=Nt.indexOf(Bm[0]))&&a.O(Nt);Zg.Ie&&(Oc+=Zg.Ie,Yg-=Zg.Ie,yc-=Zg.Ie);Oc>=nd.length&&(Oc=0);a.Ra=yc;
|
||||
Lt++;Yg--}}Lt||(a.O("no "+Kt+"history available"),a.Ra=void 0)}else if("di"==qa){Z.shift();var Cm=Z[0];if(Cm){var $g=sy(a,Cm);if(void 0===$g||0>$g||255<$g)a.O("invalid vector: "+Cm);else{var Ot="&",Pt=!!(a.G.ra&1),Qt=!1,gj=a.G.Qb+($g<<(Pt?3:2)),Rt=a.G.ja(gj+0),tC=a.G.ja(gj+2);Pt&&(Ot="#",a.G.ja(gj+4)&2048&&(Qt=!0,Rt|=a.G.ja(gj+6)<<16));a.O("dumpIDT("+oa($g)+"): "+Ot+q(tC,4)+":"+q(Rt,Qt?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.mb=qa;var Be=kz(a,db);if(Be&&(null!=Be.T||null!=Be.za)){var rf=0;if(Oa){if("l"==Oa.charAt(0))Oa=Oa.substr(1)||kb,rf=sy(a,Oa);else{var St=kz(a,Oa);if(!St)break a;rf=St.Ja-Be.Ja+1}if(0>rf||65536<rf)rf=0}var Ce="",Dm=!1,sf="dd"==qa?4:"dw"==qa?2:1,ah=sf*rf||128,Em=ah+15>>4||1,Fm=4==sf?16:a.D;"a"==qa[1]&&(Dm=!0,Em=25,Fm=160,ah=Em*Fm);for(;Em--&&0<ah;){var bh=0,Gm=0,ch,Hm="",hj="",db=az(Be);for(ch=Fm;0<ch&&0<ah;ch--){var ij=a.ya(Be,1),bh=bh|ij<<(Gm++<<3);Gm==sf&&(Hm+=8==a.D?ma(bh,3*sf):q(bh,2*sf),
|
||||
Hm+=1==sf?9==ch?"-":" ":" ",bh=Gm=0);hj+=32<=ij&&128>ij?String.fromCharCode(ij):Dm?"":".";ah--}Ce&&(Ce+="\n");Ce=Dm?Ce+hj:Ce+(db+" "+Hm+va(hj,hj.length+3*ch+1,!0))}Ce&&a.O(Ce.replace(/\s*$/,""));a.Ca=Be}}}}}break;case "e":if("else"==g[0])break;var jj=1,Tt=255,Ut=a.ya,Vt=a.ub;"ew"==g[0]&&(jj=2,Tt=65535,Ut=a.Wc,Vt=a.fl);var Wt=jj<<1,Xt=g[1];if(null==Xt)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 kj=kz(a,Xt);if(kj)for(var lj=
|
||||
2;lj<g.length;lj++){var dh=yy(a,g[lj]);if(void 0===dh){a.O("unrecognized value: "+g[lj]);break}dh&~Tt&&a.O("warning: "+q(dh)+" exceeds "+jj+"-byte value");var uC=Ut.call(a,kj);a.O("changing "+az(kj)+" from "+q(uC,Wt,!0)+" to "+q(dh,Wt,!0));Vt.call(a,kj,dh,jj)}}break;case "f":vB(a,g[1]);break;case "g":a:{var Yt=g[1],vC=b;"gt"==g[0]&&(a.Ga=!0);if(void 0!==Yt){var Im=kz(a,Yt,!0);if(!Im)break a;nz(a,Im,vC);a.td(a.B,Im,!0)}iA(a,c)&&Ad(a.G,!0,c)}break;case "h":a.Ub()||Lb(a,!0)||c||a.O("already halted");
|
||||
break;case "i":if("if"==g[0]){var Jm;var eh=b.substr(2),eh=wa(eh);yy(a,eh)?(c||a.O("true: "+eh),Jm=!0):(c||a.O("false: "+eh),Jm=!1);Jm||(d=!1);break}if("int"==g[0]){var mj;a:switch(sy(a,g[1])){case 19:Wk(a,19,a.G.ea,!0);a.ka=a.ba;mj=!0;break a;case 33:Wk(a,33,a.G.ea,!0);a.ka=a.ba;mj=!0;break a;default:mj=!1}mj||(d=!1);break}var Km=g[1];if(Km&&"?"!=Km){var Lm=sy(a,Km);if(void 0!==Lm){var wC=Jc(a.na,Lm,1);a.O(oa(Lm)+": "+na(wC))}}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 xC=g[0];if("?"==g[1])a.O("stack trace commands:"),a.O("\tk\tshow frame addresses"),a.O("\tks\tshow symbol information");else{var Mm=0,Zt=a.G.ba.T,fh=Dy(a),Wd=Dy(a,y(a.G),a.G.U.T);for(a.O("stack trace for "+az(Wd));10>Mm;){for(var pd=null,yC=256;Wd.Ja>>>0<a.G.Pg>>>0;){fh.Ja=a.nb(Wd,!0);if(null==Wd.za||!yC--)break;fh.T=Zt;if(pd=CB(a,fh))break;fh.T=a.nb(Wd);if(pd=CB(a,fh,!0)){Zt=a.nb(Wd,!0);0<pd.indexOf("INT")&&a.nb(Wd,!0);break}}if(!pd||null==pd)break;var $t=null;if("ks"==xC){var au=
|
||||
pd.match(/[0-9A-F]+$/);au&&($t=xB(a,au[0]))}pd=va(pd,50)+" ;"+($t||"stack="+az(Wd));a.O(pd);Mm++}Mm||a.O("no return addresses found")}break;case "l":if("ln"==g[0]){xB(a,g[1],!0);break}yB(a,g);break;case "m":if("mouse"==g[0]){var Nm=g[1],nj=g[2];if(a.H){var bu=1;"-"==nj.charAt(0)&&(bu=-1,nj=nj.substr(1));var De=sy(a,nj,Nm);if(void 0!==De)switch(De=De*bu|0,Nm){case "x":a.H.tf(De,0);break;case "y":a.H.tf(0,De);break;case "click":a.H.Yd(De,!0);a.H.Yd(De,!1);break;default:a.O("unknown action: "+Nm)}}else a.O("no mouse");
|
||||
break}a:{var qd,rd=null,gb=g[1];"?"==gb&&(gb=void 0);if(void 0!==gb){var Xd=0;if("all"==gb)Xd=1610481663,gb=null;else if("on"==gb)rd=!0,gb=null;else if("off"==gb)rd=!1,gb=null;else{"keys"==gb&&(gb="key");"kbd"==gb&&(gb="keyboard");for(qd in Tb)if(gb==qd){Xd=Tb[qd];rd=!!(a.fc&Xd);break}if(!Xd){a.O("unknown message category: "+gb);break a}}if(Xd)if("on"==g[2])a.fc|=Xd,rd=!0;else if("off"==g[2]&&(a.fc&=~Xd,rd=!1,536870912==Xd)){for(var Om=0;Om<a.Ba.length;Om++)a.O(a.Ba[Om]);a.Ba=[]}}var zC=0,gh="";for(qd in Tb)if(!gb||
|
||||
gb==qd){var AC=!!(a.fc&Tb[qd]);if(null===rd||rd==AC)gh&&(gh+=","),++zC%10||(gh+="\n\t"),"key"==qd&&(qd="keys"),gh+=qd}void 0===gb&&a.O("message commands:\n\tm [category] [on|off]\tturn categories on/off");a.O((null!==rd?rd?"messages on: ":"messages off: ":"message categories:\n\t")+(gh||"none"));Fy(a)}break;case "o":var Pm=g[1],BC=g[2];if(Pm&&"?"!=Pm){var Qm=sy(a,Pm,"port #"),Rm=sy(a,BC);void 0!==Qm&&void 0!==Rm&&(Nc(a.na,Qm,1,Rm),a.O(oa(Qm)+": "+na(Rm)))}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]){BB(a,b.substr(5));break}var cu="pr"==g[0]?1:0,tf=1+cu;if(a.K)a.O("step in progress");else{var oj,du=!1,Kb=Dy(a,z(a.G),a.G.ba.T);do switch(oj=!1,a.ya(Kb)){case 38:case 46:case 54:case 62:case 100:case 101:case 102:case 103:case 240:fz(a,Kb,1);oj=!0;break;case 204:case 206:a.K=tf;fz(a,Kb,1);break;case 205:case 224:case 225:case 226:a.K=tf;fz(a,Kb,Kb.Jb?4:2);break;case 232:a.K=tf;fz(a,Kb,Kb.Jb?5:3);break;case 154:a.K=
|
||||
tf;fz(a,Kb,Kb.Jb?7:5);break;case 255:var eu=a.nb(Kb)&14591;if(4351==eu||6399==eu)a.K=tf,sA(a,Kb);break;case 243:case 242:fz(a,Kb,1);du=oj=!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:du&&(a.K=tf,fz(a,Kb,1))}while(oj);a.K?(a.td(a.B,Kb,!0),iA(a,void 0)&&Ad(a.G,void 0,void 0)||(a.oa&&a.oa.dd(),a.K=0)):DB(a,cu?"tr":"t")}break;case "r":if("reset"==b){a.oa&&a.oa.reset();break}jA(a,g);break;case "t":DB(a,g[0],g[1]);
|
||||
break;case "u":kA(a,g[1],g[2],8);break;case "v":if("var"==g[0]){wB(a,b.substr(3))||(d=!1);break}a.O("PCx86 version 1.36.2 ("+a.G.da+",RELEASE,NOPREFETCH"+(Pb?",TYPEDARRAYS":",LONGARRAYS")+",NOBACKTRACK)");a.O(Ha());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.G.Y.Te=hh;break;case "start":a.G.Y.xf=hh;break;case "stop":a.G.Y.Ve=hh;break;default:a.O("unknown cs option");break a}void 0!==hh&&yd(a.G);a.O("checksums "+(a.G.Z.Ke?"enabled":
|
||||
"disabled"));break;case "sp":void 0!==g[2]&&(Ed(a.G,+g[2])||a.O("warning: using 1x multiplier, previous target not reached"));a.O("target speed: "+(a.G.Y.te.toFixed(2)+"Mhz")+" ("+a.G.Y.Cd+"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]){BB(a,
|
||||
b.substr(1));break}var Sm="commands:",Tm;for(Tm in FB)Sm+="\n"+va(Tm,7)+FB[Tm];Jg(a)||(Sm+="\nnote: frequency/history disabled if no exec breakpoints");a.O(Sm);break;default:a.O("unknown command: "+b),d=!1}}}catch(gu){a.O("debugger error: "+(gu.stack||gu.message)),d=!1}return d}function Hy(a,b,c){b=a.Bg(b,c);for(var d in b)if(!rA(a,b[+d]))return!1;return!0}
|
||||
var fA={16:262144,19:524288,21:32768,22:65536,28:2048,33:134217728,51:16777216},eA=[26,28,40,42,109],FB={"?":"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"},lz=0,dz=1,Ny=2,oz=3,mz=4,ez=5,AA=18,BA=28,wA=36,FA=80,CA=104,DA=107,uA=176,tA="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(" "),
|
||||
yA="FLD FST FSTP FXCH FILD FIST FISTP FBLD FBSTP FADD FADDP FIADD FSUB FSUBP FISUB FSUBR FSUBRP FISUBR FMUL FMULP FIMUL FDIV FDIVP FIDIV FDIVR FDIVRP FIDIVR FSQRT FSCALE FPREM FRNDINT FXTRACT FABS FCHS FCOM FCOMP FCOMPP FICOM FICOMP FTST FXAM FPTAN FPATAN F2XM1 FYL2X FYL2XP1 FLDZ FLD1 FLDPI FLDL2T FLDL2E FLDLG2 FLDLN2 FINIT FNINIT FDISI FNDISI FENI FNENI FLDCW FSTCW FNSTCW FSTSW FNSTSW FCLEX FNCLEX FSTENV FNSTENV FLDENV FSAVE FNSAVE FRSTOR FINCSTP FDECSTP FFREE FFREEP FNOP FWAIT FSETPM FSINCOS FSTSWAX".split(" "),
|
||||
AB=["VALID","ZERO ","SPEC ","EMPTY"],GA=2,HA=3,iB=[8086,80186,80286,80386],sz=0,tz=1,uz=2,vz=3,wz=4,xz=5,yz=6,zz=7,Az=8,Bz=9,Cz=10,Dz=11,Ez=12,Fz=13,Gz=14,Hz=15,Jz=16,Iz=22,cA=23,Qz=24,Rz=25,Sz=26,Tz=27,Uz=28,Vz=29,Wz=30,Xz=31,Yz=32,Zz=33,$z=34,aA=35,mB=40,oB=48,bA=56,qz=["AL","CL","DL","BL","AH","CH","DH","BH","AX","CX","DX","BX","SP","BP","SI","DI","ES","CS","SS","DS","FS","GS","IP","PS","EAX","ECX","EDX","EBX","ESP","EBP","ESI","EDI","CR0","CR1","CR2","CR3",null,null,null,null,"DR0","DR1","DR2",
|
||||
"DR3",null,null,"DR6","DR7",null,null,null,null,null,null,"TR6","TR7","EIP"],Kz=0,Lz=1,Mz=2,Nz=3,Oz=4,Pz=5,NA="BX+SI BX+DI BP+SI BP+DI SI DI BP BX EAX ECX EDX EBX ESP EBP ESI EDI".split(" "),IA=15,LA=240,dB=3840,JA=0,U=1,YA=2,T=3,S=4,OA=5,PA=7,KA=8,bB=9,cB=10,QA=11,RA=11,SA=12,TA=12,UA=13,VA=14,V=0,XA=16,$A=32,aB=48,gB=64,hB=80,X=96,eB=112,R=128,MA=160,fB=192,kB=208,lB=224,nB=240,GB=sz<<8|X|U,HB=tz<<8|X|U,IB=Az<<8|X|S,JB=Bz<<8|X|S,KB=Cz<<8|X|S,LB=Dz<<8|X|S,MB=Ez<<8|X|S,NB=Fz<<8|X|S,OB=Gz<<8|X|S,PB=
|
||||
Hz<<8|X|S,QB=Kz<<8|eB|T,RB=Lz<<8|eB|T,SB=Mz<<8|eB|T,TB=Nz<<8|eB|T,UB=Oz<<8|eB|T,VB=Pz<<8|eB|T,W=12288,WB=GA<<14,Y=HA<<14,EA=14,hA=1E3,Jy=[0,JA],Ky=[uA,T|W],Iy=[[6,R|U|W,U|4272],[6,R|S|W,S|4272],[6,176|U|W,R|U|4096],[6,176|S|W,R|S|4096],[6,GB|W,V|U|4096],[6,IB|W,V|S|4096],[108,QB|4096],[103,QB|8192],[99,R|U|W,U|4272],[99,R|S|W,S|4272],[99,176|U|W,R|U|4096],[99,176|S|W,R|S|4096],[99,GB|W,V|U|4096],[99,IB|W,V|S|4096],[108,RB|4096],[103,RB|8192],[5,R|U|W,U|4272],[5,R|S|W,S|4272],[5,176|U|W,R|U|4096],
|
||||
[5,176|S|W,R|S|4096],[5,GB|W,V|U|4096],[5,IB|W,V|S|4096],[108,SB|4096],[103,SB|8192],[120,R|U|W,U|4272],[120,R|S|W,S|4272],[120,176|U|W,R|U|4096],[120,176|S|W,R|S|4096],[120,GB|W,V|U|4096],[120,IB|W,V|S|4096],[108,TB|4096],[103,TB|8192],[7,R|U|W,U|4272],[7,R|S|W,S|4272],[7,176|U|W,R|U|4096],[7,176|S|W,R|S|4096],[7,GB|W,V|U|4096],[7,IB|W,V|S|4096],[35,KA],[29],[154,R|U|W,U|4272],[154,R|S|W,S|4272],[154,176|U|W,R|U|4096],[154,176|S|W,R|S|4096],[154,GB|W,V|U|4096],[154,IB|W,V|S|4096],[27,KA],[30],[162,
|
||||
R|U|W,U|4272],[162,R|S|W,S|4272],[162,176|U|W,R|U|4096],[162,176|S|W,R|S|4096],[162,GB|W,V|U|4096],[162,IB|W,V|S|4096],[147,KA],[1],[24,R|U|4096,U|4272],[24,R|S|4096,S|4272],[24,U|4272,R|U|4096],[24,S|4272,R|S|4096],[24,GB|4096,V|U|4096],[24,IB|4096,V|S|4096],[33,KA],[4],[44,IB|W],[44,JB|W],[44,KB|W],[44,LB|W],[44,MB|W],[44,NB|W],[44,OB|W],[44,PB|W],[31,IB|W],[31,JB|W],[31,KB|W],[31,LB|W],[31,MB|W],[31,NB|W],[31,OB|W],[31,PB|W],[108,IB|4096],[108,JB|4096],[108,KB|4096],[108,LB|4096],[108,MB|4096],
|
||||
[108,NB|4096],[108,OB|4096],[108,PB|4096],[103,IB|8192],[103,JB|8192],[103,KB|8192],[103,LB|8192],[103,MB|8192],[103,NB|8192],[103,OB|8192],[103,PB|8192],[DA,JA|WB],[CA,JA|WB],[10,S|4272|WB,R|S|4096],[8,R|T|8192,T|4272],[37,KA|Y],[38,KA|Y],[100,KA|Y],[9,KA|Y],[108,V|S|4096|WB],[42,176|T|W|WB,R|S|4096,V|S|4096],[108,V|YA|4096|WB],[42,T|8368|WB,R|S|4096,V|U|4096],[45,hB|U|8192|WB,KB|4096],[45,hB|S|8192|WB,KB|4096],[102,KB|4096|WB,gB|U|4096],[102,KB|4096|WB,gB|S|4096],[64,aB|U|4096],[60,aB|U|4096],[51,
|
||||
aB|U|4096],[59,aB|U|4096],[67,aB|U|4096],[63,aB|U|4096],[50,aB|U|4096],[58,aB|U|4096],[66,aB|U|4096],[62,aB|U|4096],[65,aB|U|4096],[61,aB|U|4096],[55,aB|U|4096],[54,aB|U|4096],[56,aB|U|4096],[53,aB|U|4096],[163,R|U|W,V|U|4096],[164,R|S|W,V|S|4096],[163,R|U|W,V|U|4096],[165,R|S|W,V|U|4096],[155,R|U|4096,U|4272],[155,R|S|4096,S|4272],[160,176|U|W,R|U|W],[160,176|S|W,R|S|W],[90,R|U|8192,U|4272],[90,R|S|8192,S|4272],[90,U|8368,R|U|4096],[90,S|8368,R|S|4096],[90,R|S|8192,fB|T|4096],[71,S|8368,144|S],[90,
|
||||
fB|T|8192,R|S|4096],[103,R|S|8192],[97],[160,IB|W,JB|W],[160,IB|W,KB|W],[160,IB|W,LB|W],[160,IB|W,MB|W],[160,IB|W,NB|W],[160,IB|W,OB|W],[160,IB|W,PB|W],[AA],[BA],[17,V|PA|4096],[158],[106],[105],[117],[68],[90,GB|8192,$A|U|4096],[90,IB|8192,$A|S|4096],[90,$A|U|8192,GB|4096],[90,$A|S|8192,IB|4096],[91,hB|U|8192,gB|U|4096],[92,hB|S|8192,gB|S|4096],[25,hB|U|4096,gB|U|4096],[26,hB|S|4096,gB|S|4096],[155,GB|4096,V|U|4096],[155,IB|4096,V|S|4096],[151,hB|U|8192,GB|4096],[152,hB|S|8192,IB|4096],[82,GB|8192,
|
||||
gB|U|4096],[83,IB|8192,gB|S|4096],[121,GB|4096,hB|U|4096],[122,IB|4096,hB|S|4096],[90,GB|8192,V|U|4096],[90,HB|8192,V|U|4096],[90,uz<<8|X|U|8192,V|U|4096],[90,vz<<8|X|U|8192,V|U|4096],[90,wz<<8|X|U|8192,V|U|4096],[90,xz<<8|X|U|8192,V|U|4096],[90,yz<<8|X|U|8192,V|U|4096],[90,zz<<8|X|U|8192,V|U|4096],[90,IB|8192,V|S|4096],[90,JB|8192,V|S|4096],[90,KB|8192,V|S|4096],[90,LB|8192,V|S|4096],[90,MB|8192,V|S|4096],[90,NB|8192,V|S|4096],[90,OB|8192,V|S|4096],[90,PB|8192,V|S|4096],[166,R|U|W|16384,V|U|4096],
|
||||
[167,R|S|W|16384,V|U|4096],[113,V|T|4096],[113],[73,S|8368,4246],[70,S|8368,4246],[90,R|U|8192,V|U|4096],[90,R|S|8192,V|S|4096],[34,V|T|4096|WB,V|U|4096],[72,JA|WB],[114,V|T|4096],[114],[47],[46,V|U|4096],[48],[49],[168,R|U|W,XA|U|4096],[169,R|S|W,XA|U|4096],[170,R|U|W,HB|4096],[171,R|S|W,HB|4096],[3,V|U],[2,V|U],[118],[161],[wA,R|S|4096],[wA,R|S|4096],[wA,R|S|4096],[wA,R|S|4096],[wA,R|S|4096],[wA,R|S|4096],[wA,R|S|4096],[wA,R|S|4096],[85,aB|U|4096],[86,aB|U|4096],[84,aB|U|4096],[52,aB|U|4096],[43,
|
||||
GB|8192,V|U|4096],[43,IB|8192,V|U|4096],[101,V|U|4096,GB|4096],[101,V|U|4096,IB|4096],[17,aB|S|4096],[57,aB|S|4096],[57,V|PA|4096],[57,aB|U|4096],[43,GB|8192,KB|T|4096],[43,IB|8192,KB|T|4096],[101,KB|T|4096,GB|4096],[101,KB|T|4096,IB|4096],[81,KA],[0],[111,KA],[112,KA],[39],[23],[172,R|U|W],[173,R|S|W],[19],[148],[21],[150],[20],[149],[174,R|U|W],[175,R|S|W]],vA={0:[177,R|T|W],1:[178,R|T|W],2:[69,T|8368|WB,T|4240],3:[87,T|8368|WB,T|4240],5:[FA,WB],6:[22,WB],7:[FA,Y],32:[90,MA|OA|8192|Y,kB|OA|4096],
|
||||
33:[90,MA|OA|8192|Y,lB|OA|4096],34:[90,kB|OA|8192|Y,MA|OA|4096],35:[90,lB|OA|8192|Y,MA|OA|4096],36:[90,MA|OA|8192|Y,nB|OA|4096],38:[90,nB|OA|8192|Y,MA|OA|4096],128:[64,aB|S|4096|Y],129:[60,aB|S|4096|Y],130:[51,aB|S|4096|Y],131:[59,aB|S|4096|Y],132:[67,aB|S|4096|Y],133:[63,aB|S|4096|Y],134:[50,aB|S|4096|Y],135:[58,aB|S|4096|Y],136:[66,aB|S|4096|Y],137:[62,aB|S|4096|Y],138:[65,aB|S|4096|Y],139:[61,aB|S|4096|Y],140:[55,aB|S|4096|Y],141:[54,aB|S|4096|Y],142:[56,aB|S|4096|Y],143:[53,aB|S|4096|Y],144:[135,
|
||||
R|U|8192|Y],145:[131,R|U|8192|Y],146:[124,R|U|8192|Y],147:[130,R|U|8192|Y],148:[138,R|U|8192|Y],149:[134,R|U|8192|Y],150:[123,R|U|8192|Y],151:[129,R|U|8192|Y],152:[137,R|U|8192|Y],153:[133,R|U|8192|Y],154:[136,R|U|8192|Y],155:[132,R|U|8192|Y],156:[127,R|U|8192|Y],157:[126,R|U|8192|Y],158:[128,R|U|8192|Y],159:[125,R|U|8192|Y],160:[108,UB|4096|Y],161:[103,UB|8192|Y],163:[13,R|S|4096|Y,S|4272],164:[141,R|S|8192|Y,S|4272,V|U|4096],165:[141,R|S|8192|Y,S|4272,HB|4096],166:[159,S|8368|Y,R|S|4096,IB|4096,
|
||||
HB|4096],167:[40,R|S|8192|Y,IB|4096,HB|4096,S|4272],168:[108,VB|4096|Y],169:[103,VB|8192|Y],171:[16,R|S|8192|Y,S|4272],172:[143,R|S|8192|Y,S|4272,V|U|4096],173:[143,R|S|8192|Y,S|4272,HB|4096],175:[42,R|S|W|Y,S|4272],178:[88,S|8368,4246],179:[15,R|S|8192|Y,S|4272],180:[74,S|8368,4246],181:[76,S|8368,4246],182:[94,S|8368|Y,R|U|4096],183:[94,OA|8368|Y,R|T|4096],186:[179,R|S|W|Y,V|U|4096],187:[14,R|S|8192|Y,S|4272],188:[11,S|8368|Y,R|S|4096],189:[12,S|8368|Y,R|S|4096],190:[93,S|8368|Y,R|U|4096],191:[93,
|
||||
OA|8368|Y,R|T|4096]},xA={216:{0:[9,R|RA|4096],1:[18,R|RA|4096],2:[34,R|RA|4096],3:[35,R|RA|4096],4:[12,R|RA|4096],5:[15,R|RA|4096],6:[21,R|RA|4096],7:[24,R|RA|4096],48:[9,X|bB|8192,X|cB|4096],49:[18,X|bB|8192,X|cB|4096],50:[34,X|bB|8192,X|cB|4096],51:[35,X|bB|8192,X|cB|4096],52:[12,X|bB|8192,X|cB|4096],53:[15,X|bB|8192,X|cB|4096],54:[21,X|bB|8192,X|cB|4096],55:[24,X|bB|8192,X|cB|4096]},217:{0:[0,R|RA|4096],2:[1,R|RA|8192],3:[2,R|RA|8192],4:[68,R|4111],5:[59,R|T|4096],6:[66,R|8207],7:[60,R|T|8192],
|
||||
48:[0,X|cB|8192],49:[3,X|cB|8192],50:[76],51:[2,X|cB|8192],64:[33],65:[32],68:[39],69:[40],80:[47],81:[49],82:[50],83:[48],84:[51],85:[52],86:[46],96:[43],97:[44],98:[41],99:[42],100:[31],102:[73],103:[72],112:[29],113:[45],114:[27],116:[30],117:[28]},218:{0:[11,R|QA|4096],1:[20,R|QA|4096],2:[37,R|QA|4096],3:[38,R|QA|4096],4:[14,R|QA|4096],5:[17,R|QA|4096],6:[23,R|QA|4096],7:[26,R|QA|4096]},219:{0:[4,R|QA|4096],2:[5,R|QA|8192],3:[6,R|QA|8192],5:[0,R|UA|4096],7:[2,R|UA|8192],64:[57],65:[55],66:[64],
|
||||
67:[53],68:[78,WB],115:[79,Y]},220:{0:[9,R|TA|4096],1:[18,R|TA|4096],2:[34,R|TA|4096],3:[35,R|TA|4096],4:[12,R|TA|4096],5:[15,R|TA|4096],6:[21,R|TA|4096],7:[24,R|TA|4096],48:[9,X|cB|8192,X|bB|4096],49:[18,X|cB|8192,X|bB|4096],50:[34,X|cB|4096],51:[35,X|cB|4096],52:[15,X|cB|8192,X|bB|4096],53:[12,X|cB|8192,X|bB|4096],54:[24,X|cB|8192,X|bB|4096],55:[21,X|cB|8192,X|bB|4096]},221:{0:[0,R|TA|4096],2:[1,R|TA|8192],3:[2,R|TA|8192],4:[71,R|4111],6:[69,R|8207],7:[62,R|T|8192],48:[74,X|cB|4096],49:[3,X|cB|
|
||||
8192],50:[1,X|cB|4096],51:[2,X|cB|4096]},222:{0:[11,R|T|4096],1:[20,R|T|4096],2:[37,R|T|4096],3:[38,R|T|4096],4:[14,R|T|4096],5:[17,R|T|4096],6:[23,R|T|4096],7:[26,R|T|4096],48:[10,X|cB|8192,X|bB|4096],49:[19,X|cB|8192,X|bB|4096],50:[35,X|cB|4096],51:[36,X|cB|4096],52:[16,X|cB|8192,X|bB|4096],53:[13,X|cB|8192,X|bB|4096],54:[25,X|cB|8192,X|bB|4096],55:[22,X|cB|8192,X|bB|4096]},223:{0:[4,R|T|4096],2:[5,R|T|8192],3:[6,R|T|8192],4:[7,R|VA|4096],5:[4,R|SA|4096],6:[8,R|VA|8192],7:[6,R|SA|8192],48:[75,X|
|
||||
cB|4096],49:[3,X|cB|8192],50:[2,X|cB|4096],51:[2,X|cB|4096],52:[80,WB]}},zA=[[[6,R|U|W,V|U|4096],[99,R|U|W,V|U|4096],[5,R|U|W,V|U|4096],[120,R|U|W,V|U|4096],[7,R|U|W,V|U|4096],[154,R|U|W,V|U|4096],[162,R|U|W,V|U|4096],[24,R|U|4096,V|U|4096]],[[6,R|S|W,V|S|4096],[99,R|S|W,V|S|4096],[5,R|S|W,V|S|4096],[120,R|S|W,V|S|4096],[7,R|S|W,V|S|4096],[154,R|S|W,V|S|4096],[162,R|S|W,V|S|4096],[24,R|S|4096,V|S|4096]],[[6,R|S|W,V|YA|4096],[99,R|S|W,V|YA|4096],[5,R|S|W,V|YA|4096],[120,R|S|W,V|YA|4096],[7,R|S|W,V|
|
||||
YA|4096],[154,R|S|W,V|YA|4096],[162,R|S|W,V|YA|4096],[24,R|S|4096,V|YA|4096]],[[115,R|U|W|WB,V|U|4096],[116,R|U|W|WB,V|U|4096],[109,R|U|W|WB,V|U|4096],[110,R|U|W|WB,V|U|4096],[140,R|U|W|WB,V|U|4096],[142,R|U|W|WB,V|U|4096],Jy,[119,R|U|W|WB,V|U|4096]],[[115,R|S|W|WB,V|U|4096],[116,R|S|W|WB,V|U|4096],[109,R|S|W|WB,V|U|4096],[110,R|S|W|WB,V|U|4096],[140,R|S|W|WB,V|U|4096],[142,R|S|W|WB,V|U|4096],Jy,[119,R|S|W|WB,V|U|4096]],[[115,R|U|W,XA|U|4096],[116,R|U|W,XA|U|4096],[109,R|U|W,XA|U|4096],[110,R|U|W,
|
||||
XA|U|4096],[140,R|U|W,XA|U|4096],[142,R|U|W,XA|U|4096],Jy,[119,R|U|W,XA|U|4096]],[[115,R|S|W,XA|U|4096],[116,R|S|W,XA|U|4096],[109,R|S|W,XA|U|4096],[110,R|S|W,XA|U|4096],[140,R|S|W,XA|U|4096],[142,R|S|W,XA|U|4096],Jy,[119,R|S|W,XA|U|4096]],[[115,R|U|W,HB|4096],[116,R|U|W,HB|4096],[109,R|U|W,HB|4096],[110,R|U|W,HB|4096],[140,R|U|W,HB|4096],[142,R|U|W,HB|4096],Jy,[119,R|U|W,HB|4096]],[[115,R|S|W,HB|4096],[116,R|S|W,HB|4096],[109,R|S|W,HB|4096],[110,R|S|W,HB|4096],[140,R|S|W,HB|4096],[142,R|S|W,HB|4096],
|
||||
Jy,[119,R|S|W,HB|4096]],[[155,R|U|4096,V|U|4096],Jy,[98,R|U|W],[96,R|U|W],[95,R|U|4096],[42,R|U|W],[32,R|U|4096],[41,R|U|W]],[[155,R|S|4096,V|S|4096],Jy,[98,R|S|W],[96,R|S|W],[95,R|S|4096],[42,R|S|W],[32,R|S|4096],[41,R|S|W]],[[44,R|U|W],[31,R|U|W],Jy,Jy,Jy,Jy,Jy,Jy],[[44,R|S|W],[31,R|S|W],[17,R|S|4096],[17,R|PA|4096],[57,R|S|4096],[57,R|PA|4096],[108,R|S|4096],Jy],[],[[145,R|T|8192|WB],[153,R|T|8192|WB],[78,R|T|4096|WB],[89,R|T|4096|WB],[156,R|T|4096|WB],[157,R|T|4096|WB],Jy,Jy],[[139,R|T|8192|WB],
|
||||
[144,R|T|8192|WB],[75,R|T|4096|WB],[77,R|T|4096|WB],[146,R|T|8192|WB],Jy,[79,R|T|4096|WB],Jy],[Jy,Jy,Jy,Jy,[13,R|S|4096|Y,V|U|4096],[16,R|S|8192|Y,V|U|4096],[15,R|S|8192|Y,V|U|4096],[14,R|S|8192|Y,V|U|4096]]],Oy={256:["tss286",!1],512:["ldt",!1],768:["busy tss286",!1],1024:["call gate",!0],1280:["task gate",!0],1536:["int gate286",!0],1792:["trap gate286",!0],2304:["tss386",!1],2816:["busy tss386",!1],3072:["call gate386",!0],3584:["int gate386",!0],3840:["trap gate386",!0]},Sy={PREV_TSS:0,CPL0_SP:2,
|
||||
CPL0_SS:4,CPL1_SP:6,CPL1_SS:8,CPL2_SP:10,CPL2_SS:12,TASK_IP:14,TASK_PS:16,TASK_AX:18,TASK_CX:20,TASK_DX:22,TASK_BX:24,TASK_SP:26,TASK_BP:28,TASK_SI:30,TASK_DI:32,TASK_ES:34,TASK_CS:36,TASK_SS:38,TASK_DS:40,TASK_LDT:42},Ty={PREV_TSS:0,CPL0_ESP:4,CPL0_SS:8,CPL1_ESP:12,CPL1_SS:16,CPL2_ESP:20,CPL2_SS:24,TASK_CR3:28,TASK_EIP:32,TASK_PS:36,TASK_EAX:40,TASK_ECX:44,TASK_EDX:48,TASK_EBX:52,TASK_ESP:56,TASK_EBP:60,TASK_ESI:64,TASK_EDI:68,TASK_ES:72,TASK_CS:76,TASK_SS:80,TASK_DS:84,TASK_FS:88,TASK_GS:92,TASK_LDT:96,
|
||||
TASK_IOPM:100};Xa(function(){for(var a=vb(document,"pcx86","debugger"),b=0;b<a.length;b++){var c=a[b],d=wb(c),d=new Cy(d);ub(d,c)}});
|
||||
function XB(a,b,c){ib.call(this,"Computer",a,67108864);var d=this;YB(this,b);this.U=ud(this,"autoPower",a);this.D=+ud(this,"diagnostics",a);0<=this.D&&2>=this.D||(this.D=1);this.F=0;this.pa=a.busWidth||a.buswidth;this.A=ZB;this.P=null;this.L=this.ha=!1;this.ra=ud(this,"url")||"";this.ta=(Math.random()+.1).toString(36).substr(2,12);this.B=$B(this);if(this.G=tb("CPU",this.id)){this.ca=tb("Debugger",this.id);this.C=[];for(b=null;b=Vb(this,"Video",b);)this.C.push(b);this.na=new hc({id:this.ee+".bus",
|
||||
busWidth:this.pa},this.G,this.ca);var e,f=xb(this.id);this.K=(this.J=tb("Panel",this.id))&&this.J.ma.print;this.ka=this.Da;this.la=this.print;this.qa=this.O;this.K&&(this.ka=this.J.Da,this.la=this.J.print,this.qa=this.J.O);for(b=0;b<f.length;b++)e=f[b],e.Da=function(a,b,c){aC(d,a);return d.ka.call(this,a,b,c)}.bind(e),e.print=function(a){return d.la.call(this,a)}.bind(e),e.O=function(a,b,c){aC(d,a,b);return d.qa.call(this,a,b,c)}.bind(e);this.I=0;!this.K&&this.D&&bC(this);this.O("PCx86 v1.36.2\nCopyright \u00a9 2012-2017 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");
|
||||
for(b=0;b<f.length;b++)e=f[b],e.uc&&e.uc(this,this.na,this.G,this.ca);vd(this.G,this.id,function(){Rd(d)},1E3/cC);b=null;e=ud(this,"resume");void 0!==e&&(1<e.length?b=this.N=e:this.A=parseInt(e,10));e=!1;f=Qa("state");f||(e=!0,f=ud(this,"state",a));f&&(b=this.ba=f,e||(this.L=!0,this.A=ZB),this.A&&(this.V=new Wf(this,"1.36.2"),this.V.load()?b=null:delete this.V));!b&&this.A&&(b=dC(this))&&(this.L=!0);if(this.ea=b){var g="Loading "+this.ea+"...";Fa(this.ea,null,!0,function(a,b,c){c?(d.N=null,d.L=!1,
|
||||
d.Da("Unable to load machine state from server (error "+c+(b?": "+wa(b):"")+")")):(d.P=b,d.ha=!0);Jb(d)},function(){d.O(g,Fb.Ee)})}else Jb(this);this.ma.power||(this.U=!0);!c&&this.U&&this.cf(this.Ye)}else ab("Unable to find CPU component")}ba(XB,ib);function zB(a){a.K&&(a.K.value="")}function bC(a){if(!a.I)for(var b=0;b<a.C.length;b++){var c=a.C[b];c&&(c=c.og)&&(c.style.opacity="1",c.style.lineHeight="1",a.I++)}}
|
||||
function aC(a,b,c){if(a.I)for(var d=0;d<a.C.length;d++){var e=a.C[d];e&&(e=e.og)&&(c!=Fb.Ee||"..."!=b.slice(-3)?qb(e,b+"\n"):rb(e,b,b+"."))}}function yq(a){var b=a.D;3==a.D&&(a.D++,Jb(a));return!b}function YB(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){ab(d.message+" ("+c+")")}}a.M=b}function ud(a,b,c){var d=Qa(b);void 0===d&&a.M&&(d=a.M[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}l=XB.prototype;
|
||||
l.cf=function(a,b){for(var c=this,d=xb(this.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:this;if(!Ib(f)){Ib(f,function(){c.cf(a,b)});return}}a.call(this,b)};function eC(a,b){var c=new Wf(a,"1.36.2",fC);if(c.load()&&gC(c)){var d=c.get(hC),e=b?b.get(hC):"unknown";d!=e&&(a.Da("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}
|
||||
l.Ye=function(a){void 0===a&&(a=this.A||(this.P?iC:ZB));if(!this.F){this.F++;var b=!1,c=!1;this.fa=!1;var d=this.V||new Wf(this,"1.36.2");if(a==Dd)b=!0;else if(a>ZB){if(d.load(this.P)){this.H=new Wf(this,"1.36.2",jC);this.H.load()&&(a!=iC&&kC(this,d)&&(a=lC),mC(this.H));this.H.set(hC,za("Y-m-d H:i:s"));nC(this.H);var e=this.A&&!this.L;if(a==iC||pb("Click OK to restore the previous PCx86 machine state.")){if(c=gC(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g):("error"==f&&"no machine state"!=
|
||||
g?(this.Da("Error: "+g),"unable to verify user"==g&&(La(oC,""),this.B=null)):this.O(f+": "+g),mC(d),d.load()?(c=gC(d),e=!0):c=!1))}e&&eC(this,c?d:null)}else a==lC&&d.clear()}else eC(this);delete this.P;delete this.V}e=xb(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.G&&(c=pC(this,g,d,b,c));b=[d,a,c];a!=Dd?this.cf(this.$g,b):this.$g(b)}};
|
||||
function pC(a,b,c,d,e){if(!b.Z.bc){b.Z.bc=!0;if(b.ac){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/-[0-9]+\./i,"."))));"string"===typeof f&&(f=null);!b.ac(f,d)&&f&&(b.Da("Unable to restore hardware state")&&(a.ba&&!a.ha?(c.clear(),a.A=ZB,window&&window.location.reload()):a.fa=!0),b.ac(null),e=!1)}b.Z.qf=!0;if(!d&&b.vj)for(a=b.vj.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
|
||||
l.$g=function(a){if(!this.Z.qf){var b;a:{if(this.I){if(2==this.D){this.D++;this.O("Press any key to continue...");b=!1;break a}for(b=0;b<this.C.length;b++){var c=this.C[b];if(c&&(c=c.og)){var d=Ha();c.style.opacity="0";c.style.lineHeight="0";if(0<=d.indexOf("MSIE")||0<=d.indexOf("Trident"))c.style.fontSize="0";c.value=""}}this.I=0}this.D=0;b=!0}if(!b){Jb(this,!1);this.cf(this.$g,a);return}this.Z.qf=!0}b=a[0];c=0>a[1];a=a[2];if(d=this.ma.power)d.textContent="Shutdown";this.Z.bc=!0;this.G&&(pC(this,
|
||||
this.G,b,c,a),this.G.je());this.fa&&(kC(this,b),b.clear());!c&&this.H&&(this.H.clear(),delete this.H);this.F=0;zb(this.ee,ud(this,"autoScript"))};function kC(a,b){if(!a.Z.Ae){if(pb("There may be a problem with your PCx86 machine.\n\nTo help us diagnose it, click OK to send this PCx86 machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PCx86",ver:"1.36.2"};d.url=a.ra;d.user=c;d.type="bug";d.data=b;Fa("http://www.pcjs.org/api/v1/report",d,!0)}return!0}return!1}
|
||||
function EB(a,b,c){var d,e="none";if(a.F)return null;a.F--;var f=new Wf(a,"1.36.2"),g=new Wf(a,"1.36.2",fC),h=za("Y-m-d H:i:s");g.set(hC,h);f.set(hC,h);f.set(qC,"1.36.2");f.set(rC,window?window.location.href:null);f.set(sC,Ha());a.G&&a.G.$b&&(d=a.G.$b(b,c),"object"===typeof d&&f.set(a.G.id,d),c&&(a.G.Z.bc=!1,!1===d&&(e=null)));for(var h=xb(a.id),k=0;k<h.length;k++){var m=h[k];m.Z.bc&&(m.$b&&(d=m.$b(b,c),"object"===typeof d&&f.set(m.id,d)),c&&(m.Z.bc=!1,!1===d&&(e=null)))}e&&(c?(h=d=!1,b?(a.B&&CC(a,
|
||||
a.B,f.toString()),nC(g)&&nC(f)||(e=null,d=h=!0)):a.A&&(d=!0,h=a.A==DC),d&&f.clear(h)):e=f.toString());c&&(a.Z.bc=!1,b=a.ma.power)&&(b.textContent="Power");a.F=0;return e}l.reset=function(){this.na&&this.na.reset&&(Nb(this,"Resetting "+this.na.type),this.na.reset());for(var a=xb(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.na&&c.reset&&(Nb(this,"Resetting "+c.type),c.reset())}};
|
||||
function wA(a,b,c){var d=!0;try{if(!b.length||"end"==b)a.fa&&(a.O("ended assemble at "+fz(a.ea)),a.N=a.ea,a.fa=!1),b="";else if(!c){var e=">> ";a.G.ra&1&&(e=a.G.P&131072?"-- ":"## ");a.O(e+b)}var f=b.charAt(0);if('"'==f||"'"==f)return!0;a.Aa=null;if(Ib(a)&&0<b.length){a.fa&&(b="a "+fz(a.ea)+" "+b);var g=b.replace(/ +/g," ").split(" ");if(g&&g.length)for(var h=g[0],k=h.charAt(0),m=1;m<h.length;m++){var p=h.charAt(m);if("?"==k||"r"==k||"a">p||"z"<p){g[0]=h.substr(m);g.unshift(h.substr(0,m));break}}switch(g[0].charAt(0)){case "a":var v=
|
||||
pz(a,g[1],!0);if(v)if(a.ea=v,void 0===g[2])a.O("begin assemble at "+fz(v)),a.fa=!0,zd(a.G);else{var u;a.O("not supported yet");u=[];if(u.length){for(var D=0;D<u.length;D++)a.ub(v,u[D],1);a.O(xA(a,a.ea))}}break;case "b":a:{var G=g[0],I=g[1],J=b;if("?"==I)a.O("breakpoint commands:"),a.O("\tbi [p]\ttoggle break on input port [p]"),a.O("\tbo [p]\ttoggle break on output port [p]"),a.O("\tbp [a]\tset exec breakpoint at addr [a]"),a.O("\tbr [a]\tset read breakpoint at addr [a]"),a.O("\tbw [a]\tset write breakpoint at addr [a]"),
|
||||
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=G.charAt(1);if("l"==P){var K;K=0+vA(a,a.B);K+=vA(a,a.V);(K+=vA(a,a.L))||a.O("no breakpoints")}else if("n"==P)a.wa=xy(a,I),a.O("break after "+a.wa+" instruction(s)");else if(void 0===I)a.O("missing breakpoint address");else{var ka={};if("*"!=I&&(ka=pz(a,I,!0,!0),!ka))break a;I=null==ka.Ja?I:oa(ka.Ja);"c"==P?null==ka.Ja?(Jy(a),a.O("all breakpoints cleared")):ez(a,
|
||||
a.B,ka)||ez(a,a.V,ka)||ez(a,a.L,ka)||a.O("breakpoint missing: "+fz(ka)):"i"==P?a.O("breakpoint "+(Hc(a.na,ka.Ja)?"enabled":"cleared")+": port "+I+" (input)"):"o"==P?a.O("breakpoint "+(Lc(a.na,ka.Ja)?"enabled":"cleared")+": port "+I+" (output)"):null!=ka.Ja&&(sz(a,ka,J),"p"==P?a.td(a.B,ka):"r"==P?a.td(a.V,ka):"w"==P?a.td(a.L,ka):a.O("unknown breakpoint command: "+P))}}}break;case "c":EB(a.oa);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 Tb)a.Fa[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 uc=JB(a.oa,!0);uc?"console"==Oa?console.log(uc):
|
||||
(EB(a.oa),a.O(uc)):a.O("powerOff() error")}else if("symbols"==db)for(var lb=0;lb<a.F.length;lb++){var df=a.F[lb],Pd;for(Pd in df.Jd)if("."!=Pd.charAt(0)){var ef=df.Jd[Pd],Cg=ef.o;if(void 0!==Cg){var ff=ef.s;void 0===ff&&(ff=df.T);var Dg=df.Jd[Pd].l;Dg&&(Pd=Dg);a.O(Vy(Cg,ff)+" "+Pd)}}}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 Am=Z[0];if(Am){var Xg=a.Wb(pz(a,Am));if(-1===Xg)a.O("invalid address: "+Am);else{var qf,
|
||||
Ra=null;if(80386<=a.G.da){var rf=a.na,Ra={};Ra.Ik=(Xg&-4194304)>>>20;Ra.Ti=a.G.Uc+Ra.Ik;Ra.pb=rf.aa[(Ra.Ti&rf.C)>>>rf.A];Ra.Aj=Ra.pb.Od(Ra.Ik);Ra.Jk=(Xg&4190208)>>>10;Ra.Ui=(Ra.Aj&-4096)+Ra.Jk;Ra.qb=rf.aa[(Ra.Ui&rf.C)>>>rf.A];Ra.Bj=Ra.qb.Od(Ra.Jk);Ra.rl=(Ra.Bj&-4096)+(Xg&4095)}if(qf=Ra){a.O("linear PDE addr PDE PTE addr PTE physical");a.O("--------- ---------- -------- ---------- -------- ----------");var Be="%"+q(Xg),Be=Be+(" %%"+uz(qf.Ti,qf.Aj)),Be=
|
||||
Be+(" %%"+uz(qf.Ui,qf.Bj,!0)),Be=Be+(" %%"+q(qf.rl));a.O(Be)}else a.O("unsupported operation")}}else a.O("missing address")}else{if("d"==qa){if("disk"==db){Z[0]="l";Z[1]="json";DB(a,Z);break a}for(jb in Tb)if(Z[1]==jb){var Kt=a.Fa[jb];Kt?(Z.shift(),Z.shift(),Kt(Z)):a.O("no dump registered for "+db);break a}db||(qa=a.mb||"db")}if("dh"==qa){var Lt=db,Mt=Oa,Yg=kb,Yg=void 0===Yg?"history":Yg,Nt="",Ot=0,Pc=a.qa,od=a.U;if(od.length){var zc=+Lt||a.Ra,Zg=+Mt||10;isNaN(zc)?zc=Zg:Nt="more ";zc>od.length&&
|
||||
(a.O("note: only "+od.length+" available"),zc=od.length);Pc-=zc;0>Pc&&(null==od[od.length-1].T?(zc=Pc+zc,Pc=0):Pc+=od.length);var Bm=[];"call"==Mt&&(Zg=1E5,Bm=["CALL"]);for(void 0!==Lt&&a.O(zc+" instructions earlier:");0<Zg&&Pc!=a.qa;){var pd=od[Pc++];if(null==pd.T)break;var $g=Iy(a,pd.Ja,pd.T,pd.za,pd.type,pd.Jb,pd.gc),Pt=zc--;null!=pd.gj&&"cycles"==Yg&&(Pt=pd.gj);var Qt=xA(a,$g,Yg,Pt);(!Bm.length||0<=Qt.indexOf(Bm[0]))&&a.O(Qt);$g.Ie&&(Pc+=$g.Ie,Zg-=$g.Ie,zc-=$g.Ie);Pc>=od.length&&(Pc=0);a.Ra=zc;
|
||||
Ot++;Zg--}}Ot||(a.O("no "+Nt+"history available"),a.Ra=void 0)}else if("di"==qa){Z.shift();var Cm=Z[0];if(Cm){var ah=xy(a,Cm);if(void 0===ah||0>ah||255<ah)a.O("invalid vector: "+Cm);else{var Rt="&",St=!!(a.G.ra&1),Tt=!1,hj=a.G.Qb+(ah<<(St?3:2)),Ut=a.G.ja(hj+0),yC=a.G.ja(hj+2);St&&(Rt="#",a.G.ja(hj+4)&2048&&(Tt=!0,Ut|=a.G.ja(hj+6)<<16));a.O("dumpIDT("+oa(ah)+"): "+Rt+q(yC,4)+":"+q(Ut,Tt?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.mb=qa;var Ce=pz(a,db);if(Ce&&(null!=Ce.T||null!=Ce.za)){var sf=0;if(Oa){if("l"==Oa.charAt(0))Oa=Oa.substr(1)||kb,sf=xy(a,Oa);else{var Vt=pz(a,Oa);if(!Vt)break a;sf=Vt.Ja-Ce.Ja+1}if(0>sf||65536<sf)sf=0}var De="",Dm=!1,tf="dd"==qa?4:"dw"==qa?2:1,bh=tf*sf||128,Em=bh+15>>4||1,Fm=4==tf?16:a.D;"a"==qa[1]&&(Dm=!0,Em=25,Fm=160,bh=Em*Fm);for(;Em--&&0<bh;){var ch=0,Gm=0,dh,Hm="",ij="",db=fz(Ce);for(dh=Fm;0<dh&&0<bh;dh--){var jj=a.ya(Ce,1),ch=ch|jj<<(Gm++<<3);Gm==tf&&(Hm+=8==a.D?ma(ch,3*tf):q(ch,2*tf),
|
||||
Hm+=1==tf?9==dh?"-":" ":" ",ch=Gm=0);ij+=32<=jj&&128>jj?String.fromCharCode(jj):Dm?"":".";bh--}De&&(De+="\n");De=Dm?De+ij:De+(db+" "+Hm+va(ij,ij.length+3*dh+1,!0))}De&&a.O(De.replace(/\s*$/,""));a.Ca=Ce}}}}}break;case "e":if("else"==g[0])break;var kj=1,Wt=255,Xt=a.ya,Yt=a.ub;"ew"==g[0]&&(kj=2,Wt=65535,Xt=a.Wc,Yt=a.fl);var Zt=kj<<1,$t=g[1];if(null==$t)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 lj=pz(a,$t);if(lj)for(var mj=
|
||||
2;mj<g.length;mj++){var eh=Dy(a,g[mj]);if(void 0===eh){a.O("unrecognized value: "+g[mj]);break}eh&~Wt&&a.O("warning: "+q(eh)+" exceeds "+kj+"-byte value");var zC=Xt.call(a,lj);a.O("changing "+fz(lj)+" from "+q(zC,Zt,!0)+" to "+q(eh,Zt,!0));Yt.call(a,lj,eh,kj)}}break;case "f":AB(a,g[1]);break;case "g":a:{var au=g[1],AC=b;"gt"==g[0]&&(a.Ga=!0);if(void 0!==au){var Im=pz(a,au,!0);if(!Im)break a;sz(a,Im,AC);a.td(a.B,Im,!0)}nA(a,c)&&Ad(a.G,!0,c)}break;case "h":a.Ub()||Kb(a,!0)||c||a.O("already halted");
|
||||
break;case "i":if("if"==g[0]){var Jm;var fh=b.substr(2),fh=wa(fh);Dy(a,fh)?(c||a.O("true: "+fh),Jm=!0):(c||a.O("false: "+fh),Jm=!1);Jm||(d=!1);break}if("int"==g[0]){var nj;a:switch(xy(a,g[1])){case 19:Wk(a,19,a.G.ea,!0);a.ka=a.ba;nj=!0;break a;case 33:Wk(a,33,a.G.ea,!0);a.ka=a.ba;nj=!0;break a;default:nj=!1}nj||(d=!1);break}var Km=g[1];if(Km&&"?"!=Km){var Lm=xy(a,Km);if(void 0!==Lm){var BC=Jc(a.na,Lm,1);a.O(oa(Lm)+": "+na(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 Mm=0,bu=a.G.ba.T,gh=Iy(a),Xd=Iy(a,y(a.G),a.G.U.T);for(a.O("stack trace for "+fz(Xd));10>Mm;){for(var qd=null,DC=256;Xd.Ja>>>0<a.G.Pg>>>0;){gh.Ja=a.nb(Xd,!0);if(null==Xd.za||!DC--)break;gh.T=bu;if(qd=HB(a,gh))break;gh.T=a.nb(Xd);if(qd=HB(a,gh,!0)){bu=a.nb(Xd,!0);0<qd.indexOf("INT")&&a.nb(Xd,!0);break}}if(!qd||null==qd)break;var cu=null;if("ks"==CC){var du=
|
||||
qd.match(/[0-9A-F]+$/);du&&(cu=CB(a,du[0]))}qd=va(qd,50)+" ;"+(cu||"stack="+fz(Xd));a.O(qd);Mm++}Mm||a.O("no return addresses found")}break;case "l":if("ln"==g[0]){CB(a,g[1],!0);break}DB(a,g);break;case "m":if("mouse"==g[0]){var Nm=g[1],oj=g[2];if(a.H){var eu=1;"-"==oj.charAt(0)&&(eu=-1,oj=oj.substr(1));var Ee=xy(a,oj,Nm);if(void 0!==Ee)switch(Ee=Ee*eu|0,Nm){case "x":a.H.tf(Ee,0);break;case "y":a.H.tf(0,Ee);break;case "click":a.H.Yd(Ee,!0);a.H.Yd(Ee,!1);break;default:a.O("unknown action: "+Nm)}}else a.O("no mouse");
|
||||
break}a:{var rd,sd=null,gb=g[1];"?"==gb&&(gb=void 0);if(void 0!==gb){var Yd=0;if("all"==gb)Yd=1610481663,gb=null;else if("on"==gb)sd=!0,gb=null;else if("off"==gb)sd=!1,gb=null;else{"keys"==gb&&(gb="key");"kbd"==gb&&(gb="keyboard");for(rd in Tb)if(gb==rd){Yd=Tb[rd];sd=!!(a.fc&Yd);break}if(!Yd){a.O("unknown message category: "+gb);break a}}if(Yd)if("on"==g[2])a.fc|=Yd,sd=!0;else if("off"==g[2]&&(a.fc&=~Yd,sd=!1,536870912==Yd)){for(var Om=0;Om<a.Ba.length;Om++)a.O(a.Ba[Om]);a.Ba=[]}}var EC=0,hh="";for(rd in Tb)if(!gb||
|
||||
gb==rd){var FC=!!(a.fc&Tb[rd]);if(null===sd||sd==FC)hh&&(hh+=","),++EC%10||(hh+="\n\t"),"key"==rd&&(rd="keys"),hh+=rd}void 0===gb&&a.O("message commands:\n\tm [category] [on|off]\tturn categories on/off");a.O((null!==sd?sd?"messages on: ":"messages off: ":"message categories:\n\t")+(hh||"none"));Ky(a)}break;case "o":var Pm=g[1],GC=g[2];if(Pm&&"?"!=Pm){var Qm=xy(a,Pm,"port #"),Rm=xy(a,GC);void 0!==Qm&&void 0!==Rm&&(Nc(a.na,Qm,1,Rm),a.O(oa(Qm)+": "+na(Rm)))}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]){GB(a,b.substr(5));break}var fu="pr"==g[0]?1:0,uf=1+fu;if(a.K)a.O("step in progress");else{var pj,gu=!1,Mb=Iy(a,z(a.G),a.G.ba.T);do switch(pj=!1,a.ya(Mb)){case 38:case 46:case 54:case 62:case 100:case 101:case 102:case 103:case 240:kz(a,Mb,1);pj=!0;break;case 204:case 206:a.K=uf;kz(a,Mb,1);break;case 205:case 224:case 225:case 226:a.K=uf;kz(a,Mb,Mb.Jb?4:2);break;case 232:a.K=uf;kz(a,Mb,Mb.Jb?5:3);break;case 154:a.K=
|
||||
uf;kz(a,Mb,Mb.Jb?7:5);break;case 255:var hu=a.nb(Mb)&14591;if(4351==hu||6399==hu)a.K=uf,xA(a,Mb);break;case 243:case 242:kz(a,Mb,1);gu=pj=!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:gu&&(a.K=uf,kz(a,Mb,1))}while(pj);a.K?(a.td(a.B,Mb,!0),nA(a,void 0)&&Ad(a.G,void 0,void 0)||(a.oa&&a.oa.dd(),a.K=0)):IB(a,fu?"tr":"t")}break;case "r":if("reset"==b){a.oa&&a.oa.reset();break}oA(a,g);break;case "t":IB(a,g[0],g[1]);
|
||||
break;case "u":pA(a,g[1],g[2],8);break;case "v":if("var"==g[0]){BB(a,b.substr(3))||(d=!1);break}a.O("PCx86 version 1.36.2 ("+a.G.da+",RELEASE,NOPREFETCH"+(Pb?",TYPEDARRAYS":",LONGARRAYS")+",NOBACKTRACK)");a.O(Ha());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.G.Y.Te=ih;break;case "start":a.G.Y.xf=ih;break;case "stop":a.G.Y.Ve=ih;break;default:a.O("unknown cs option");break a}void 0!==ih&&yd(a.G);a.O("checksums "+(a.G.Z.Ke?"enabled":
|
||||
"disabled"));break;case "sp":void 0!==g[2]&&(Ed(a.G,+g[2])||a.O("warning: using 1x multiplier, previous target not reached"));a.O("target speed: "+(a.G.Y.te.toFixed(2)+"Mhz")+" ("+a.G.Y.Cd+"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]){GB(a,
|
||||
b.substr(1));break}var Sm="commands:",Tm;for(Tm in KB)Sm+="\n"+va(Tm,7)+KB[Tm];Jg(a)||(Sm+="\nnote: frequency/history disabled if no exec breakpoints");a.O(Sm);break;default:a.O("unknown command: "+b),d=!1}}}catch(ju){a.O("debugger error: "+(ju.stack||ju.message)),d=!1}return d}function My(a,b,c){b=a.Bg(b,c);for(var d in b)if(!wA(a,b[+d]))return!1;return!0}
|
||||
var kA={16:262144,19:524288,21:32768,22:65536,28:2048,33:134217728,51:16777216},jA=[26,28,40,42,109],KB={"?":"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"},qz=0,iz=1,Sy=2,tz=3,rz=4,jz=5,FA=18,GA=28,BA=36,KA=80,HA=104,IA=107,zA=176,yA="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(" "),
|
||||
DA="FLD FST FSTP FXCH FILD FIST FISTP FBLD FBSTP FADD FADDP FIADD FSUB FSUBP FISUB FSUBR FSUBRP FISUBR FMUL FMULP FIMUL FDIV FDIVP FIDIV FDIVR FDIVRP FIDIVR FSQRT FSCALE FPREM FRNDINT FXTRACT FABS FCHS FCOM FCOMP FCOMPP FICOM FICOMP FTST FXAM FPTAN FPATAN F2XM1 FYL2X FYL2XP1 FLDZ FLD1 FLDPI FLDL2T FLDL2E FLDLG2 FLDLN2 FINIT FNINIT FDISI FNDISI FENI FNENI FLDCW FSTCW FNSTCW FSTSW FNSTSW FCLEX FNCLEX FSTENV FNSTENV FLDENV FSAVE FNSAVE FRSTOR FINCSTP FDECSTP FFREE FFREEP FNOP FWAIT FSETPM FSINCOS FSTSWAX".split(" "),
|
||||
FB=["VALID","ZERO ","SPEC ","EMPTY"],LA=2,MA=3,nB=[8086,80186,80286,80386],xz=0,yz=1,zz=2,Az=3,Bz=4,Cz=5,Dz=6,Ez=7,Fz=8,Gz=9,Hz=10,Iz=11,Jz=12,Kz=13,Lz=14,Mz=15,Oz=16,Nz=22,hA=23,Vz=24,Wz=25,Xz=26,Yz=27,Zz=28,$z=29,aA=30,bA=31,cA=32,dA=33,eA=34,fA=35,rB=40,tB=48,gA=56,vz=["AL","CL","DL","BL","AH","CH","DH","BH","AX","CX","DX","BX","SP","BP","SI","DI","ES","CS","SS","DS","FS","GS","IP","PS","EAX","ECX","EDX","EBX","ESP","EBP","ESI","EDI","CR0","CR1","CR2","CR3",null,null,null,null,"DR0","DR1","DR2",
|
||||
"DR3",null,null,"DR6","DR7",null,null,null,null,null,null,"TR6","TR7","EIP"],Pz=0,Qz=1,Rz=2,Sz=3,Tz=4,Uz=5,SA="BX+SI BX+DI BP+SI BP+DI SI DI BP BX EAX ECX EDX EBX ESP EBP ESI EDI".split(" "),NA=15,QA=240,iB=3840,OA=0,U=1,cB=2,T=3,S=4,TA=5,UA=7,PA=8,gB=9,hB=10,VA=11,WA=11,XA=12,YA=12,ZA=13,$A=14,V=0,bB=16,eB=32,fB=48,lB=64,mB=80,X=96,jB=112,R=128,RA=160,kB=192,pB=208,qB=224,sB=240,LB=xz<<8|X|U,MB=yz<<8|X|U,NB=Fz<<8|X|S,OB=Gz<<8|X|S,PB=Hz<<8|X|S,QB=Iz<<8|X|S,RB=Jz<<8|X|S,SB=Kz<<8|X|S,TB=Lz<<8|X|S,UB=
|
||||
Mz<<8|X|S,VB=Pz<<8|jB|T,WB=Qz<<8|jB|T,XB=Rz<<8|jB|T,YB=Sz<<8|jB|T,ZB=Tz<<8|jB|T,$B=Uz<<8|jB|T,W=12288,aC=LA<<14,Y=MA<<14,JA=14,mA=1E3,Oy=[0,OA],Py=[zA,T|W],Ny=[[6,R|U|W,U|4272],[6,R|S|W,S|4272],[6,176|U|W,R|U|4096],[6,176|S|W,R|S|4096],[6,LB|W,V|U|4096],[6,NB|W,V|S|4096],[108,VB|4096],[103,VB|8192],[99,R|U|W,U|4272],[99,R|S|W,S|4272],[99,176|U|W,R|U|4096],[99,176|S|W,R|S|4096],[99,LB|W,V|U|4096],[99,NB|W,V|S|4096],[108,WB|4096],[103,WB|8192],[5,R|U|W,U|4272],[5,R|S|W,S|4272],[5,176|U|W,R|U|4096],
|
||||
[5,176|S|W,R|S|4096],[5,LB|W,V|U|4096],[5,NB|W,V|S|4096],[108,XB|4096],[103,XB|8192],[120,R|U|W,U|4272],[120,R|S|W,S|4272],[120,176|U|W,R|U|4096],[120,176|S|W,R|S|4096],[120,LB|W,V|U|4096],[120,NB|W,V|S|4096],[108,YB|4096],[103,YB|8192],[7,R|U|W,U|4272],[7,R|S|W,S|4272],[7,176|U|W,R|U|4096],[7,176|S|W,R|S|4096],[7,LB|W,V|U|4096],[7,NB|W,V|S|4096],[35,PA],[29],[154,R|U|W,U|4272],[154,R|S|W,S|4272],[154,176|U|W,R|U|4096],[154,176|S|W,R|S|4096],[154,LB|W,V|U|4096],[154,NB|W,V|S|4096],[27,PA],[30],[162,
|
||||
R|U|W,U|4272],[162,R|S|W,S|4272],[162,176|U|W,R|U|4096],[162,176|S|W,R|S|4096],[162,LB|W,V|U|4096],[162,NB|W,V|S|4096],[147,PA],[1],[24,R|U|4096,U|4272],[24,R|S|4096,S|4272],[24,U|4272,R|U|4096],[24,S|4272,R|S|4096],[24,LB|4096,V|U|4096],[24,NB|4096,V|S|4096],[33,PA],[4],[44,NB|W],[44,OB|W],[44,PB|W],[44,QB|W],[44,RB|W],[44,SB|W],[44,TB|W],[44,UB|W],[31,NB|W],[31,OB|W],[31,PB|W],[31,QB|W],[31,RB|W],[31,SB|W],[31,TB|W],[31,UB|W],[108,NB|4096],[108,OB|4096],[108,PB|4096],[108,QB|4096],[108,RB|4096],
|
||||
[108,SB|4096],[108,TB|4096],[108,UB|4096],[103,NB|8192],[103,OB|8192],[103,PB|8192],[103,QB|8192],[103,RB|8192],[103,SB|8192],[103,TB|8192],[103,UB|8192],[IA,OA|aC],[HA,OA|aC],[10,S|4272|aC,R|S|4096],[8,R|T|8192,T|4272],[37,PA|Y],[38,PA|Y],[100,PA|Y],[9,PA|Y],[108,V|S|4096|aC],[42,176|T|W|aC,R|S|4096,V|S|4096],[108,V|cB|4096|aC],[42,T|8368|aC,R|S|4096,V|U|4096],[45,mB|U|8192|aC,PB|4096],[45,mB|S|8192|aC,PB|4096],[102,PB|4096|aC,lB|U|4096],[102,PB|4096|aC,lB|S|4096],[64,fB|U|4096],[60,fB|U|4096],[51,
|
||||
fB|U|4096],[59,fB|U|4096],[67,fB|U|4096],[63,fB|U|4096],[50,fB|U|4096],[58,fB|U|4096],[66,fB|U|4096],[62,fB|U|4096],[65,fB|U|4096],[61,fB|U|4096],[55,fB|U|4096],[54,fB|U|4096],[56,fB|U|4096],[53,fB|U|4096],[163,R|U|W,V|U|4096],[164,R|S|W,V|S|4096],[163,R|U|W,V|U|4096],[165,R|S|W,V|U|4096],[155,R|U|4096,U|4272],[155,R|S|4096,S|4272],[160,176|U|W,R|U|W],[160,176|S|W,R|S|W],[90,R|U|8192,U|4272],[90,R|S|8192,S|4272],[90,U|8368,R|U|4096],[90,S|8368,R|S|4096],[90,R|S|8192,kB|T|4096],[71,S|8368,144|S],[90,
|
||||
kB|T|8192,R|S|4096],[103,R|S|8192],[97],[160,NB|W,OB|W],[160,NB|W,PB|W],[160,NB|W,QB|W],[160,NB|W,RB|W],[160,NB|W,SB|W],[160,NB|W,TB|W],[160,NB|W,UB|W],[FA],[GA],[17,V|UA|4096],[158],[106],[105],[117],[68],[90,LB|8192,eB|U|4096],[90,NB|8192,eB|S|4096],[90,eB|U|8192,LB|4096],[90,eB|S|8192,NB|4096],[91,mB|U|8192,lB|U|4096],[92,mB|S|8192,lB|S|4096],[25,mB|U|4096,lB|U|4096],[26,mB|S|4096,lB|S|4096],[155,LB|4096,V|U|4096],[155,NB|4096,V|S|4096],[151,mB|U|8192,LB|4096],[152,mB|S|8192,NB|4096],[82,LB|8192,
|
||||
lB|U|4096],[83,NB|8192,lB|S|4096],[121,LB|4096,mB|U|4096],[122,NB|4096,mB|S|4096],[90,LB|8192,V|U|4096],[90,MB|8192,V|U|4096],[90,zz<<8|X|U|8192,V|U|4096],[90,Az<<8|X|U|8192,V|U|4096],[90,Bz<<8|X|U|8192,V|U|4096],[90,Cz<<8|X|U|8192,V|U|4096],[90,Dz<<8|X|U|8192,V|U|4096],[90,Ez<<8|X|U|8192,V|U|4096],[90,NB|8192,V|S|4096],[90,OB|8192,V|S|4096],[90,PB|8192,V|S|4096],[90,QB|8192,V|S|4096],[90,RB|8192,V|S|4096],[90,SB|8192,V|S|4096],[90,TB|8192,V|S|4096],[90,UB|8192,V|S|4096],[166,R|U|W|16384,V|U|4096],
|
||||
[167,R|S|W|16384,V|U|4096],[113,V|T|4096],[113],[73,S|8368,4246],[70,S|8368,4246],[90,R|U|8192,V|U|4096],[90,R|S|8192,V|S|4096],[34,V|T|4096|aC,V|U|4096],[72,OA|aC],[114,V|T|4096],[114],[47],[46,V|U|4096],[48],[49],[168,R|U|W,bB|U|4096],[169,R|S|W,bB|U|4096],[170,R|U|W,MB|4096],[171,R|S|W,MB|4096],[3,V|U],[2,V|U],[118],[161],[BA,R|S|4096],[BA,R|S|4096],[BA,R|S|4096],[BA,R|S|4096],[BA,R|S|4096],[BA,R|S|4096],[BA,R|S|4096],[BA,R|S|4096],[85,fB|U|4096],[86,fB|U|4096],[84,fB|U|4096],[52,fB|U|4096],[43,
|
||||
LB|8192,V|U|4096],[43,NB|8192,V|U|4096],[101,V|U|4096,LB|4096],[101,V|U|4096,NB|4096],[17,fB|S|4096],[57,fB|S|4096],[57,V|UA|4096],[57,fB|U|4096],[43,LB|8192,PB|T|4096],[43,NB|8192,PB|T|4096],[101,PB|T|4096,LB|4096],[101,PB|T|4096,NB|4096],[81,PA],[0],[111,PA],[112,PA],[39],[23],[172,R|U|W],[173,R|S|W],[19],[148],[21],[150],[20],[149],[174,R|U|W],[175,R|S|W]],AA={0:[177,R|T|W],1:[178,R|T|W],2:[69,T|8368|aC,T|4240],3:[87,T|8368|aC,T|4240],5:[KA,aC],6:[22,aC],7:[KA,Y],32:[90,RA|TA|8192|Y,pB|TA|4096],
|
||||
33:[90,RA|TA|8192|Y,qB|TA|4096],34:[90,pB|TA|8192|Y,RA|TA|4096],35:[90,qB|TA|8192|Y,RA|TA|4096],36:[90,RA|TA|8192|Y,sB|TA|4096],38:[90,sB|TA|8192|Y,RA|TA|4096],128:[64,fB|S|4096|Y],129:[60,fB|S|4096|Y],130:[51,fB|S|4096|Y],131:[59,fB|S|4096|Y],132:[67,fB|S|4096|Y],133:[63,fB|S|4096|Y],134:[50,fB|S|4096|Y],135:[58,fB|S|4096|Y],136:[66,fB|S|4096|Y],137:[62,fB|S|4096|Y],138:[65,fB|S|4096|Y],139:[61,fB|S|4096|Y],140:[55,fB|S|4096|Y],141:[54,fB|S|4096|Y],142:[56,fB|S|4096|Y],143:[53,fB|S|4096|Y],144:[135,
|
||||
R|U|8192|Y],145:[131,R|U|8192|Y],146:[124,R|U|8192|Y],147:[130,R|U|8192|Y],148:[138,R|U|8192|Y],149:[134,R|U|8192|Y],150:[123,R|U|8192|Y],151:[129,R|U|8192|Y],152:[137,R|U|8192|Y],153:[133,R|U|8192|Y],154:[136,R|U|8192|Y],155:[132,R|U|8192|Y],156:[127,R|U|8192|Y],157:[126,R|U|8192|Y],158:[128,R|U|8192|Y],159:[125,R|U|8192|Y],160:[108,ZB|4096|Y],161:[103,ZB|8192|Y],163:[13,R|S|4096|Y,S|4272],164:[141,R|S|8192|Y,S|4272,V|U|4096],165:[141,R|S|8192|Y,S|4272,MB|4096],166:[159,S|8368|Y,R|S|4096,NB|4096,
|
||||
MB|4096],167:[40,R|S|8192|Y,NB|4096,MB|4096,S|4272],168:[108,$B|4096|Y],169:[103,$B|8192|Y],171:[16,R|S|8192|Y,S|4272],172:[143,R|S|8192|Y,S|4272,V|U|4096],173:[143,R|S|8192|Y,S|4272,MB|4096],175:[42,R|S|W|Y,S|4272],178:[88,S|8368,4246],179:[15,R|S|8192|Y,S|4272],180:[74,S|8368,4246],181:[76,S|8368,4246],182:[94,S|8368|Y,R|U|4096],183:[94,TA|8368|Y,R|T|4096],186:[179,R|S|W|Y,V|U|4096],187:[14,R|S|8192|Y,S|4272],188:[11,S|8368|Y,R|S|4096],189:[12,S|8368|Y,R|S|4096],190:[93,S|8368|Y,R|U|4096],191:[93,
|
||||
TA|8368|Y,R|T|4096]},CA={216:{0:[9,R|WA|4096],1:[18,R|WA|4096],2:[34,R|WA|4096],3:[35,R|WA|4096],4:[12,R|WA|4096],5:[15,R|WA|4096],6:[21,R|WA|4096],7:[24,R|WA|4096],48:[9,X|gB|8192,X|hB|4096],49:[18,X|gB|8192,X|hB|4096],50:[34,X|gB|8192,X|hB|4096],51:[35,X|gB|8192,X|hB|4096],52:[12,X|gB|8192,X|hB|4096],53:[15,X|gB|8192,X|hB|4096],54:[21,X|gB|8192,X|hB|4096],55:[24,X|gB|8192,X|hB|4096]},217:{0:[0,R|WA|4096],2:[1,R|WA|8192],3:[2,R|WA|8192],4:[68,R|4111],5:[59,R|T|4096],6:[66,R|8207],7:[60,R|T|8192],
|
||||
48:[0,X|hB|8192],49:[3,X|hB|8192],50:[76],51:[2,X|hB|8192],64:[33],65:[32],68:[39],69:[40],80:[47],81:[49],82:[50],83:[48],84:[51],85:[52],86:[46],96:[43],97:[44],98:[41],99:[42],100:[31],102:[73],103:[72],112:[29],113:[45],114:[27],116:[30],117:[28]},218:{0:[11,R|VA|4096],1:[20,R|VA|4096],2:[37,R|VA|4096],3:[38,R|VA|4096],4:[14,R|VA|4096],5:[17,R|VA|4096],6:[23,R|VA|4096],7:[26,R|VA|4096]},219:{0:[4,R|VA|4096],2:[5,R|VA|8192],3:[6,R|VA|8192],5:[0,R|ZA|4096],7:[2,R|ZA|8192],64:[57],65:[55],66:[64],
|
||||
67:[53],68:[78,aC],115:[79,Y]},220:{0:[9,R|YA|4096],1:[18,R|YA|4096],2:[34,R|YA|4096],3:[35,R|YA|4096],4:[12,R|YA|4096],5:[15,R|YA|4096],6:[21,R|YA|4096],7:[24,R|YA|4096],48:[9,X|hB|8192,X|gB|4096],49:[18,X|hB|8192,X|gB|4096],50:[34,X|hB|4096],51:[35,X|hB|4096],52:[15,X|hB|8192,X|gB|4096],53:[12,X|hB|8192,X|gB|4096],54:[24,X|hB|8192,X|gB|4096],55:[21,X|hB|8192,X|gB|4096]},221:{0:[0,R|YA|4096],2:[1,R|YA|8192],3:[2,R|YA|8192],4:[71,R|4111],6:[69,R|8207],7:[62,R|T|8192],48:[74,X|hB|4096],49:[3,X|hB|
|
||||
8192],50:[1,X|hB|4096],51:[2,X|hB|4096]},222:{0:[11,R|T|4096],1:[20,R|T|4096],2:[37,R|T|4096],3:[38,R|T|4096],4:[14,R|T|4096],5:[17,R|T|4096],6:[23,R|T|4096],7:[26,R|T|4096],48:[10,X|hB|8192,X|gB|4096],49:[19,X|hB|8192,X|gB|4096],50:[35,X|hB|4096],51:[36,X|hB|4096],52:[16,X|hB|8192,X|gB|4096],53:[13,X|hB|8192,X|gB|4096],54:[25,X|hB|8192,X|gB|4096],55:[22,X|hB|8192,X|gB|4096]},223:{0:[4,R|T|4096],2:[5,R|T|8192],3:[6,R|T|8192],4:[7,R|$A|4096],5:[4,R|XA|4096],6:[8,R|$A|8192],7:[6,R|XA|8192],48:[75,X|
|
||||
hB|4096],49:[3,X|hB|8192],50:[2,X|hB|4096],51:[2,X|hB|4096],52:[80,aC]}},EA=[[[6,R|U|W,V|U|4096],[99,R|U|W,V|U|4096],[5,R|U|W,V|U|4096],[120,R|U|W,V|U|4096],[7,R|U|W,V|U|4096],[154,R|U|W,V|U|4096],[162,R|U|W,V|U|4096],[24,R|U|4096,V|U|4096]],[[6,R|S|W,V|S|4096],[99,R|S|W,V|S|4096],[5,R|S|W,V|S|4096],[120,R|S|W,V|S|4096],[7,R|S|W,V|S|4096],[154,R|S|W,V|S|4096],[162,R|S|W,V|S|4096],[24,R|S|4096,V|S|4096]],[[6,R|S|W,V|cB|4096],[99,R|S|W,V|cB|4096],[5,R|S|W,V|cB|4096],[120,R|S|W,V|cB|4096],[7,R|S|W,V|
|
||||
cB|4096],[154,R|S|W,V|cB|4096],[162,R|S|W,V|cB|4096],[24,R|S|4096,V|cB|4096]],[[115,R|U|W|aC,V|U|4096],[116,R|U|W|aC,V|U|4096],[109,R|U|W|aC,V|U|4096],[110,R|U|W|aC,V|U|4096],[140,R|U|W|aC,V|U|4096],[142,R|U|W|aC,V|U|4096],Oy,[119,R|U|W|aC,V|U|4096]],[[115,R|S|W|aC,V|U|4096],[116,R|S|W|aC,V|U|4096],[109,R|S|W|aC,V|U|4096],[110,R|S|W|aC,V|U|4096],[140,R|S|W|aC,V|U|4096],[142,R|S|W|aC,V|U|4096],Oy,[119,R|S|W|aC,V|U|4096]],[[115,R|U|W,bB|U|4096],[116,R|U|W,bB|U|4096],[109,R|U|W,bB|U|4096],[110,R|U|W,
|
||||
bB|U|4096],[140,R|U|W,bB|U|4096],[142,R|U|W,bB|U|4096],Oy,[119,R|U|W,bB|U|4096]],[[115,R|S|W,bB|U|4096],[116,R|S|W,bB|U|4096],[109,R|S|W,bB|U|4096],[110,R|S|W,bB|U|4096],[140,R|S|W,bB|U|4096],[142,R|S|W,bB|U|4096],Oy,[119,R|S|W,bB|U|4096]],[[115,R|U|W,MB|4096],[116,R|U|W,MB|4096],[109,R|U|W,MB|4096],[110,R|U|W,MB|4096],[140,R|U|W,MB|4096],[142,R|U|W,MB|4096],Oy,[119,R|U|W,MB|4096]],[[115,R|S|W,MB|4096],[116,R|S|W,MB|4096],[109,R|S|W,MB|4096],[110,R|S|W,MB|4096],[140,R|S|W,MB|4096],[142,R|S|W,MB|4096],
|
||||
Oy,[119,R|S|W,MB|4096]],[[155,R|U|4096,V|U|4096],Oy,[98,R|U|W],[96,R|U|W],[95,R|U|4096],[42,R|U|W],[32,R|U|4096],[41,R|U|W]],[[155,R|S|4096,V|S|4096],Oy,[98,R|S|W],[96,R|S|W],[95,R|S|4096],[42,R|S|W],[32,R|S|4096],[41,R|S|W]],[[44,R|U|W],[31,R|U|W],Oy,Oy,Oy,Oy,Oy,Oy],[[44,R|S|W],[31,R|S|W],[17,R|S|4096],[17,R|UA|4096],[57,R|S|4096],[57,R|UA|4096],[108,R|S|4096],Oy],[],[[145,R|T|8192|aC],[153,R|T|8192|aC],[78,R|T|4096|aC],[89,R|T|4096|aC],[156,R|T|4096|aC],[157,R|T|4096|aC],Oy,Oy],[[139,R|T|8192|aC],
|
||||
[144,R|T|8192|aC],[75,R|T|4096|aC],[77,R|T|4096|aC],[146,R|T|8192|aC],Oy,[79,R|T|4096|aC],Oy],[Oy,Oy,Oy,Oy,[13,R|S|4096|Y,V|U|4096],[16,R|S|8192|Y,V|U|4096],[15,R|S|8192|Y,V|U|4096],[14,R|S|8192|Y,V|U|4096]]],Ty={256:["tss286",!1],512:["ldt",!1],768:["busy tss286",!1],1024:["call gate",!0],1280:["task gate",!0],1536:["int gate286",!0],1792:["trap gate286",!0],2304:["tss386",!1],2816:["busy tss386",!1],3072:["call gate386",!0],3584:["int gate386",!0],3840:["trap gate386",!0]},Xy={PREV_TSS:0,CPL0_SP:2,
|
||||
CPL0_SS:4,CPL1_SP:6,CPL1_SS:8,CPL2_SP:10,CPL2_SS:12,TASK_IP:14,TASK_PS:16,TASK_AX:18,TASK_CX:20,TASK_DX:22,TASK_BX:24,TASK_SP:26,TASK_BP:28,TASK_SI:30,TASK_DI:32,TASK_ES:34,TASK_CS:36,TASK_SS:38,TASK_DS:40,TASK_LDT:42},Yy={PREV_TSS:0,CPL0_ESP:4,CPL0_SS:8,CPL1_ESP:12,CPL1_SS:16,CPL2_ESP:20,CPL2_SS:24,TASK_CR3:28,TASK_EIP:32,TASK_PS:36,TASK_EAX:40,TASK_ECX:44,TASK_EDX:48,TASK_EBX:52,TASK_ESP:56,TASK_EBP:60,TASK_ESI:64,TASK_EDI:68,TASK_ES:72,TASK_CS:76,TASK_SS:80,TASK_DS:84,TASK_FS:88,TASK_GS:92,TASK_LDT:96,
|
||||
TASK_IOPM:100};Xa(function(){for(var a=vb(document,"pcx86","debugger"),b=0;b<a.length;b++){var c=a[b],d=wb(c),d=new Hy(d);ub(d,c)}});
|
||||
function bC(a,b,c){ib.call(this,"Computer",a,67108864);var d=this;cC(this,b);this.U=ud(this,"autoPower",a);this.D=+ud(this,"diagnostics",a);0<=this.D&&2>=this.D||(this.D=1);this.F=0;this.pa=a.busWidth||a.buswidth;this.A=dC;this.P=null;this.L=this.ha=!1;this.ra=ud(this,"url")||"";this.ta=(Math.random()+.1).toString(36).substr(2,12);this.B=eC(this);if(this.G=tb("CPU",this.id)){this.ca=tb("Debugger",this.id);this.C=[];for(b=null;b=Vb(this,"Video",b);)this.C.push(b);this.na=new hc({id:this.ee+".bus",
|
||||
busWidth:this.pa},this.G,this.ca);var e,f=xb(this.id);this.K=(this.J=tb("Panel",this.id))&&this.J.ma.print;this.ka=this.Da;this.la=this.print;this.qa=this.O;this.K&&(this.ka=this.J.Da,this.la=this.J.print,this.qa=this.J.O);for(b=0;b<f.length;b++)e=f[b],e.Da=function(a,b,c){fC(d,a);return d.ka.call(this,a,b,c)}.bind(e),e.print=function(a){return d.la.call(this,a)}.bind(e),e.O=function(a,b,c){fC(d,a,b);return d.qa.call(this,a,b,c)}.bind(e);this.I=0;!this.K&&this.D&&gC(this);this.O("PCx86 v1.36.2\nCopyright \u00a9 2012-2017 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");
|
||||
for(b=0;b<f.length;b++)e=f[b],e.uc&&e.uc(this,this.na,this.G,this.ca);vd(this.G,this.id,function(){Rd(d)},1E3/hC);b=null;e=ud(this,"resume");void 0!==e&&(1<e.length?b=this.N=e:this.A=parseInt(e,10));e=!1;f=Qa("state");f||(e=!0,f=ud(this,"state",a));f&&(b=this.ba=f,e||(this.L=!0,this.A=dC),this.A&&(this.V=new Wf(this,"1.36.2"),this.V.load()?b=null:delete this.V));!b&&this.A&&(b=iC(this))&&(this.L=!0);if(this.ea=b){var g="Loading "+this.ea+"...";Fa(this.ea,null,!0,function(a,b,c){c?(d.N=null,d.L=!1,
|
||||
d.Da("Unable to load machine state from server (error "+c+(b?": "+wa(b):"")+")")):(d.P=b,d.ha=!0);Jb(d)},function(){d.O(g,Fb.Ee)})}else Jb(this);this.ma.power||(this.U=!0);!c&&this.U&&this.cf(this.Ye)}else ab("Unable to find CPU component")}ba(bC,ib);function EB(a){a.K&&(a.K.value="")}function gC(a){if(!a.I)for(var b=0;b<a.C.length;b++){var c=a.C[b];c&&(c=c.og)&&(c.style.opacity="1",c.style.lineHeight="1",a.I++)}}
|
||||
function fC(a,b,c){if(a.I)for(var d=0;d<a.C.length;d++){var e=a.C[d];e&&(e=e.og)&&(c!=Fb.Ee||"..."!=b.slice(-3)?qb(e,b+"\n"):rb(e,b,b+"."))}}function yq(a){var b=a.D;3==a.D&&(a.D++,Jb(a));return!b}function cC(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){ab(d.message+" ("+c+")")}}a.M=b}function ud(a,b,c){var d=Qa(b);void 0===d&&a.M&&(d=a.M[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}l=bC.prototype;
|
||||
l.cf=function(a,b){for(var c=this,d=xb(this.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:this;if(!Ib(f)){Ib(f,function(){c.cf(a,b)});return}}a.call(this,b)};function jC(a,b){var c=new Wf(a,"1.36.2",kC);if(c.load()&&lC(c)){var d=c.get(mC),e=b?b.get(mC):"unknown";d!=e&&(a.Da("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}
|
||||
l.Ye=function(a){void 0===a&&(a=this.A||(this.P?nC:dC));if(!this.F){this.F++;var b=!1,c=!1;this.fa=!1;var d=this.V||new Wf(this,"1.36.2");if(a==Dd)b=!0;else if(a>dC){if(d.load(this.P)){this.H=new Wf(this,"1.36.2",oC);this.H.load()&&(a!=nC&&pC(this,d)&&(a=qC),rC(this.H));this.H.set(mC,za("Y-m-d H:i:s"));sC(this.H);var e=this.A&&!this.L;if(a==nC||pb("Click OK to restore the previous PCx86 machine state.")){if(c=lC(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g):("error"==f&&"no machine state"!=
|
||||
g?(this.Da("Error: "+g),"unable to verify user"==g&&(La(tC,""),this.B=null)):this.O(f+": "+g),rC(d),d.load()?(c=lC(d),e=!0):c=!1))}e&&jC(this,c?d:null)}else a==qC&&d.clear()}else jC(this);delete this.P;delete this.V}e=xb(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.G&&(c=uC(this,g,d,b,c));b=[d,a,c];a!=Dd?this.cf(this.$g,b):this.$g(b)}};
|
||||
function uC(a,b,c,d,e){if(!b.Z.bc){b.Z.bc=!0;if(b.ac){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/-[0-9]+\./i,"."))));"string"===typeof f&&(f=null);!b.ac(f,d)&&f&&(b.Da("Unable to restore hardware state")&&(a.ba&&!a.ha?(c.clear(),a.A=dC,window&&window.location.reload()):a.fa=!0),b.ac(null),e=!1)}b.Z.qf=!0;if(!d&&b.vj)for(a=b.vj.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
|
||||
l.$g=function(a){if(!this.Z.qf){var b;a:{if(this.I){if(2==this.D){this.D++;this.O("Press any key to continue...");b=!1;break a}for(b=0;b<this.C.length;b++){var c=this.C[b];if(c&&(c=c.og)){var d=Ha();c.style.opacity="0";c.style.lineHeight="0";if(0<=d.indexOf("MSIE")||0<=d.indexOf("Trident"))c.style.fontSize="0";c.value=""}}this.I=0}this.D=0;b=!0}if(!b){Jb(this,!1);this.cf(this.$g,a);return}this.Z.qf=!0}b=a[0];c=0>a[1];a=a[2];if(d=this.ma.power)d.textContent="Shutdown";this.Z.bc=!0;this.G&&(uC(this,
|
||||
this.G,b,c,a),this.G.je());this.fa&&(pC(this,b),b.clear());!c&&this.H&&(this.H.clear(),delete this.H);this.F=0;zb(this.ee,ud(this,"autoScript"))};function pC(a,b){if(!a.Z.Ae){if(pb("There may be a problem with your PCx86 machine.\n\nTo help us diagnose it, click OK to send this PCx86 machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PCx86",ver:"1.36.2"};d.url=a.ra;d.user=c;d.type="bug";d.data=b;Fa("http://www.pcjs.org/api/v1/report",d,!0)}return!0}return!1}
|
||||
function JB(a,b,c){var d,e="none";if(a.F)return null;a.F--;var f=new Wf(a,"1.36.2"),g=new Wf(a,"1.36.2",kC),h=za("Y-m-d H:i:s");g.set(mC,h);f.set(mC,h);f.set(vC,"1.36.2");f.set(wC,window?window.location.href:null);f.set(xC,Ha());a.G&&a.G.$b&&(d=a.G.$b(b,c),"object"===typeof d&&f.set(a.G.id,d),c&&(a.G.Z.bc=!1,!1===d&&(e=null)));for(var h=xb(a.id),k=0;k<h.length;k++){var m=h[k];m.Z.bc&&(m.$b&&(d=m.$b(b,c),"object"===typeof d&&f.set(m.id,d)),c&&(m.Z.bc=!1,!1===d&&(e=null)))}e&&(c?(h=d=!1,b?(a.B&&HC(a,
|
||||
a.B,f.toString()),sC(g)&&sC(f)||(e=null,d=h=!0)):a.A&&(d=!0,h=a.A==IC),d&&f.clear(h)):e=f.toString());c&&(a.Z.bc=!1,b=a.ma.power)&&(b.textContent="Power");a.F=0;return e}l.reset=function(){this.na&&this.na.reset&&(Nb(this,"Resetting "+this.na.type),this.na.reset());for(var a=xb(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.na&&c.reset&&(Nb(this,"Resetting "+c.type),c.reset())}};
|
||||
l.start=function(a,b){for(var c=xb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}};l.stop=function(a,b){for(var c=xb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}};
|
||||
l.Eb=function(a,b,c){var d=this;switch(b){case "power":return this.ma[b]=c,c.onclick=function(){d.F||(d.Z.bc?EB(d,!1,!0):d.cf(d.Ye))},!0;case "reset":return this.ma[b]=c,c.onclick=function(){if(d.Z.bc&&!d.F)if(d.G&&(d.G.Z.je=d.G.Z.Xa),d.A&&!d.N){var a=d.Z.Ae||!pb("Click OK to reset this PCx86 machine and discard all disk modifications.");EB(d,a,!0);!a&&d.ba?window&&window.location.reload():(a||(d.aa=!0),d.Ye(ZB),d.aa=!1)}else d.reset(),d.G&&d.G.je()},!0;case "save":if(sa(Ga(),"pcjs.org"))c.parentNode.removeChild(c);
|
||||
else return this.ma[b]=c,c.onclick=function(){var a=$B(d,!0);if(a){var b=!!(d.A&&!d.N||d.ba),c=EB(d,b);b?CC(d,a,c):d.Da("Resume disabled, machine state not saved")}},!0}return!1};
|
||||
function $B(a,b){var c=a.B;c||((c=Ka(oC),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=EC(a,c))||a.Da("The user ID is invalid.")):b&&a.Da("Browser local storage is not available"));return c}
|
||||
function EC(a,b){a.B=null;b=Fa(Ga()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(La(oC,b.data),a.B=b.data)}catch(d){ab(d.message+" ("+c+")")}return a.B}function dC(a){var b=null;a.B&&(b=Ga()+"/api/v1/user?req=load&user="+a.B+"&state="+FC(a,"1.36.2"));return b}
|
||||
function CC(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=FC(a,"1.36.2");d.data=c;b=Fa(Ga()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.Da("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.Da(c),La(oC,""),a.B=null)}}
|
||||
l.Eb=function(a,b,c){var d=this;switch(b){case "power":return this.ma[b]=c,c.onclick=function(){d.F||(d.Z.bc?JB(d,!1,!0):d.cf(d.Ye))},!0;case "reset":return this.ma[b]=c,c.onclick=function(){if(d.Z.bc&&!d.F)if(d.G&&(d.G.Z.je=d.G.Z.Xa),d.A&&!d.N){var a=d.Z.Ae||!pb("Click OK to reset this PCx86 machine and discard all disk modifications.");JB(d,a,!0);!a&&d.ba?window&&window.location.reload():(a||(d.aa=!0),d.Ye(dC),d.aa=!1)}else d.reset(),d.G&&d.G.je()},!0;case "save":if(sa(Ga(),"pcjs.org"))c.parentNode.removeChild(c);
|
||||
else return this.ma[b]=c,c.onclick=function(){var a=eC(d,!0);if(a){var b=!!(d.A&&!d.N||d.ba),c=JB(d,b);b?HC(d,a,c):d.Da("Resume disabled, machine state not saved")}},!0}return!1};
|
||||
function eC(a,b){var c=a.B;c||((c=Ka(tC),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=JC(a,c))||a.Da("The user ID is invalid.")):b&&a.Da("Browser local storage is not available"));return c}
|
||||
function JC(a,b){a.B=null;b=Fa(Ga()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(La(tC,b.data),a.B=b.data)}catch(d){ab(d.message+" ("+c+")")}return a.B}function iC(a){var b=null;a.B&&(b=Ga()+"/api/v1/user?req=load&user="+a.B+"&state="+KC(a,"1.36.2"));return b}
|
||||
function HC(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=KC(a,"1.36.2");d.data=c;b=Fa(Ga()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.Da("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.Da(c),La(tC,""),a.B=null)}}
|
||||
function Vb(a,b,c){a=xb(a.id);for(var d=0;d<a.length;d++){var e=a[d];if(c)c==e&&(c=null);else if(e.type==b)return e}return null}l.dd=function(a){if(this.C.length){var b=0,c=0;!a&&window&&(b=window.scrollX,c=window.scrollY);var d=this.C[0];d.F&&d.F.focus();!a&&window&&window.scrollTo(b,c)}};
|
||||
function Rd(a,b){if(a.G){var c=a.G;if(c.rj&&(b||!c.Z.Xa||c.Z.jj)){Ig(c,"EAX",c.D);Ig(c,"EBX",c.H);Ig(c,"ECX",c.I);Ig(c,"EDX",c.L);Ig(c,"ESP",y(c));Ig(c,"EBP",c.N);Ig(c,"ESI",c.K);Ig(c,"EDI",c.J);Ig(c,"CS",c.ba.T);Ig(c,"DS",c.Fa.T);Ig(c,"SS",c.U.T);Ig(c,"ES",c.pa.T);Ig(c,"EIP",z(c));var d=qe(c);Ig(c,"PS",d);Ig(c,"V",d&2048);Ig(c,"D",d&1024);Ig(c,"I",d&512);Ig(c,"T",d&256);Ig(c,"S",d&128);Ig(c,"Z",d&64);Ig(c,"A",d&16);Ig(c,"P",d&4);Ig(c,"C",d&1);80386==c.da&&(Ig(c,"FS",c.Ka.T),Ig(c,"GS",c.La.T),Ig(c,
|
||||
"CR0",c.ra),Ig(c,"CR2",c.qd),Ig(c,"CR3",c.Uc))}if(d=c.ma.speed)d.textContent=c.Z.Xa&&c.Y.Ld?c.Y.Ld.toFixed(2)+"Mhz":"Stopped"}for(c=0;c<a.C.length;c++)Js(a.C[c],b)}var jC="failsafe",fC="validate",hC="timestamp",qC="version",rC="url",sC="browser",oC="user",Dd=-1,ZB=0,iC=1,lC=2,DC=3,cC=2;Xa(function(){for(var a=vb(document,"pcx86-machine"),b=0;b<a.length;b++)for(var c=a[b],d=wb(c),c=vb(c,"pcx86","computer"),e=0;e<c.length;e++){var f=c[e],g=wb(f),g=new XB(g,d,!0);ub(g,f);g.U&&g.cf(g.Ye)}});
|
||||
Ya.show.push(function(){for(var a=vb(document,"pcx86","computer"),b=0;b<a.length;b++){var c=wb(a[b]);if(c=tb("Computer",c.id))c.Z.Ae=!1,c.Z.qf&&!c.Z.bc&&c.Ye(Dd)}});Ya.exit.push(function(){for(var a=vb(document,"pcx86","computer"),b=0;b<a.length;b++){var c=wb(a[b]);if(c=tb("Computer",c.id))c.Z.Ae=!0,c.Z.bc&&EB(c,!(!c.A||c.N),!0)}});function Wf(a,b,c){this.id=a.id;this.ca=a.ca;this.A="";this.state={};this.B=this.C=!1;this.key=FC(a,b,c);mC(this,a.Nk)}l=Wf.prototype;
|
||||
l.set=function(a,b){try{this.state[a]=b}catch(c){}};l.get=function(a){return this.state[a]||null};l.data=function(){return this.state};l.load=function(a){return a?(this.A=a,this.B=!0,this.C=!1,!0):this.B?!0:Ia()&&(a=Ka(this.key))?(this.A=a,this.B=!0):!1};function gC(a){var b=!0;if(!a.C)try{a.state=JSON.parse(a.A),a.C=!0}catch(c){ab(c.message||c),b=!1}return b}
|
||||
function nC(a){var b=!0;if(Ia()){var c=JSON.stringify(a.state);La(a.key,c)||(ab("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}l.toString=function(){return this.state?JSON.stringify(this.state):this.A};function mC(a,b){a.A="";a.state={};a.B=a.C=!1;b&&a.set("parms",b)}
|
||||
l.clear=function(a){mC(this);var b=[];try{for(var c=0,d=window.localStorage.length;c<d;c++)b.push(window.localStorage.key(c))}catch(e){}for(c=0;c<b.length;c++)if((d=b[c])&&(a||d.substr(0,this.key.length)==this.key)){try{window.localStorage.removeItem(d)}catch(e){}b.splice(c,1);c=0}};function FC(a,b,c){a=a.id;if(b){var d=b.indexOf(".");0<d&&(a+=".v"+b.substr(0,d))}c&&(a+="."+c);return a}var GC=0;
|
||||
function HC(a,b,c,d,e,f){e("Loading "+a+"...");Fa(a,null,!0,function(g,h,k){k?(h||(h="unable to load "+a+" ("+k+")"),f(h,null)):IC(h,a,b,c,d,e,f)})}
|
||||
function IC(a,b,c,d,e,f,g){function h(a,f){if(f)g(f,null);else{c&&(nb(c,b,a),(f=b)&&0>f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1<d.length&&(d+=",")):d='{state:"'+d+'",':d="{",d+='url:"'+f+'"}',"object"==typeof resources&&(f=null),d=d.replace(/\$/g,"$$$$"),a=a.replace(/(<machine[^>]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/(<xsl:variable name="APPNAME">).*?(<\/xsl:variable>)/,
|
||||
"$1PCx86$2"),a=a.replace(/(<xsl:variable name="APPCLASS">).*?(<\/xsl:variable>)/,"$1pcx86$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/<!DOCTYPE(.|[\r\n])*]>\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255<a.length?a.substr(0,255)+"...":a);g(a,f)}}a?e?JC(a,f,h):h(a,null):g("no data"+(b?" for file: "+
|
||||
"CR0",c.ra),Ig(c,"CR2",c.qd),Ig(c,"CR3",c.Uc))}if(d=c.ma.speed)d.textContent=c.Z.Xa&&c.Y.Ld?c.Y.Ld.toFixed(2)+"Mhz":"Stopped"}for(c=0;c<a.C.length;c++)Js(a.C[c],b)}var oC="failsafe",kC="validate",mC="timestamp",vC="version",wC="url",xC="browser",tC="user",Dd=-1,dC=0,nC=1,qC=2,IC=3,hC=2;Xa(function(){for(var a=vb(document,"pcx86-machine"),b=0;b<a.length;b++)for(var c=a[b],d=wb(c),c=vb(c,"pcx86","computer"),e=0;e<c.length;e++){var f=c[e],g=wb(f),g=new bC(g,d,!0);ub(g,f);g.U&&g.cf(g.Ye)}});
|
||||
Ya.show.push(function(){for(var a=vb(document,"pcx86","computer"),b=0;b<a.length;b++){var c=wb(a[b]);if(c=tb("Computer",c.id))c.Z.Ae=!1,c.Z.qf&&!c.Z.bc&&c.Ye(Dd)}});Ya.exit.push(function(){for(var a=vb(document,"pcx86","computer"),b=0;b<a.length;b++){var c=wb(a[b]);if(c=tb("Computer",c.id))c.Z.Ae=!0,c.Z.bc&&JB(c,!(!c.A||c.N),!0)}});function Wf(a,b,c){this.id=a.id;this.ca=a.ca;this.A="";this.state={};this.B=this.C=!1;this.key=KC(a,b,c);rC(this,a.Nk)}l=Wf.prototype;
|
||||
l.set=function(a,b){try{this.state[a]=b}catch(c){}};l.get=function(a){return this.state[a]||null};l.data=function(){return this.state};l.load=function(a){return a?(this.A=a,this.B=!0,this.C=!1,!0):this.B?!0:Ia()&&(a=Ka(this.key))?(this.A=a,this.B=!0):!1};function lC(a){var b=!0;if(!a.C)try{a.state=JSON.parse(a.A),a.C=!0}catch(c){ab(c.message||c),b=!1}return b}
|
||||
function sC(a){var b=!0;if(Ia()){var c=JSON.stringify(a.state);La(a.key,c)||(ab("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}l.toString=function(){return this.state?JSON.stringify(this.state):this.A};function rC(a,b){a.A="";a.state={};a.B=a.C=!1;b&&a.set("parms",b)}
|
||||
l.clear=function(a){rC(this);var b=[];try{for(var c=0,d=window.localStorage.length;c<d;c++)b.push(window.localStorage.key(c))}catch(e){}for(c=0;c<b.length;c++)if((d=b[c])&&(a||d.substr(0,this.key.length)==this.key)){try{window.localStorage.removeItem(d)}catch(e){}b.splice(c,1);c=0}};function KC(a,b,c){a=a.id;if(b){var d=b.indexOf(".");0<d&&(a+=".v"+b.substr(0,d))}c&&(a+="."+c);return a}var LC=0;
|
||||
function MC(a,b,c,d,e,f){e("Loading "+a+"...");Fa(a,null,!0,function(g,h,k){k?(h||(h="unable to load "+a+" ("+k+")"),f(h,null)):NC(h,a,b,c,d,e,f)})}
|
||||
function NC(a,b,c,d,e,f,g){function h(a,f){if(f)g(f,null);else{c&&(nb(c,b,a),(f=b)&&0>f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1<d.length&&(d+=",")):d='{state:"'+d+'",':d="{",d+='url:"'+f+'"}',"object"==typeof resources&&(f=null),d=d.replace(/\$/g,"$$$$"),a=a.replace(/(<machine[^>]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/(<xsl:variable name="APPNAME">).*?(<\/xsl:variable>)/,
|
||||
"$1PCx86$2"),a=a.replace(/(<xsl:variable name="APPCLASS">).*?(<\/xsl:variable>)/,"$1pcx86$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/<!DOCTYPE(.|[\r\n])*]>\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255<a.length?a.substr(0,255)+"...":a);g(a,f)}}a?e?OC(a,f,h):h(a,null):g("no data"+(b?" for file: "+
|
||||
b:""),null)}
|
||||
function JC(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");Fa(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var k=h[0],m,p=/( [a-z]+=)(['"])(.*?)\2/gi;m=p.exec(f);)k=0>k.toLowerCase().indexOf(m[1].toLowerCase())?k.replace(">",m[0]+">"):k.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=k&&(g=g.replace(h[0],k))}else{c(a,"missing <"+d[1]+
|
||||
"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/,"");a=a.replace(d[0],g);JC(a,b,c)}})}else c(a,null)}
|
||||
function KC(a,b,c,d){function e(a){if(void 0===h){var b=g&&vb(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=ta(a))}function f(a){e("Error: "+a);k&&(--GC||bb(!0));k=!1}var g,h,k=!0;GC++;ob[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText=m:v.appendChild(document.createTextNode(m));p.appendChild(v)}c||
|
||||
(c="/versions/pcx86/1.36.2/components.xsl");m=function(d,h){h?HC(c,null,null,!1,e,function(d,k){k?(nb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(k=h.transformNode(k))?(g.outerHTML=k,--GC||bb(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(k),(k=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(k,g),--GC||bb(!0)):f("invalid machine element: "+
|
||||
a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?HC(b,a,d,!0,e,m):IC(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(u){f(u.message)}return k}function LC(a,b,c,d){bb(!1);return KC(a,b,c,d)}window.embedPC=LC;window.embedPCx86=LC;
|
||||
function OC(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");Fa(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var k=h[0],m,p=/( [a-z]+=)(['"])(.*?)\2/gi;m=p.exec(f);)k=0>k.toLowerCase().indexOf(m[1].toLowerCase())?k.replace(">",m[0]+">"):k.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=k&&(g=g.replace(h[0],k))}else{c(a,"missing <"+d[1]+
|
||||
"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/,"");a=a.replace(d[0],g);OC(a,b,c)}})}else c(a,null)}
|
||||
function PC(a,b,c,d){function e(a){if(void 0===h){var b=g&&vb(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=ta(a))}function f(a){e("Error: "+a);k&&(--LC||bb(!0));k=!1}var g,h,k=!0;LC++;ob[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText=m:v.appendChild(document.createTextNode(m));p.appendChild(v)}c||
|
||||
(c="/versions/pcx86/1.36.2/components.xsl");m=function(d,h){h?MC(c,null,null,!1,e,function(d,k){k?(nb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(k=h.transformNode(k))?(g.outerHTML=k,--LC||bb(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(k),(k=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(k,g),--LC||bb(!0)):f("invalid machine element: "+
|
||||
a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?MC(b,a,d,!0,e,m):NC(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(u){f(u.message)}return k}function QC(a,b,c,d){bb(!1);return PC(a,b,c,d)}window.embedPC=QC;window.embedPCx86=QC;
|
||||
window.commandMachine=function(a,b,c,d,e,f){if("script"==e)return zb(c,f)?(b&&(a.disabled=!0),!0):!1;if(d){var g=tb(d,c+".machine");if(g){var h=g.exports;if(h&&(h=h[e]))return h.call(g,f)?(b&&(a.disabled=!0),!0):!1}}console.log("unimplemented: commandMachine('"+c+"','"+d+"','"+e+"','"+f+"')");return!1};window.enableEvents=bb;window.sendEvent=fb;
|
||||
function MC(a,b,c,d){if(!c&&b){d.push(b);a=ob[d[0]];b=null;for(var e in a)if(sa(e,"components.xsl")){b=e.replace(".xsl",".css");break}b?Fa(b,null,!0,function(a,b){NC(b,d)}):NC(null,d)}else ab("Error ("+c+") requesting "+a)}
|
||||
function NC(a,b){var c,d,e,f=b[0],g=b[1];c=b[4];if(c=c.match(/^(\s*\(function\(\)\{)([\s\S]*)(}\)\(\);)/)){var h=ob[f],k={},m;for(m in h){var p=h[m],v=ra(m);if("xml"==v){for(v=/[ \t]*<disk [^>]*path=(['"])(.*?)\1.*?<\/disk>\n?/g;d=v.exec(h[m]);){var u=d[2];u&&(h[u]||(p=p.replace(d[0],"")))}d=m=pa(m)}else"xsl"==v&&(e=m=pa(m));k[m]=p}a&&(k[m="css"]=a);b[2]&&(k[m="parms"]=b[2]);b[3]&&(k[m="state"]=b[3]);d&&e?(a=JSON.stringify(k),g+=".js",c=c[1]+"var resources="+a+";"+c[2]+c[3],c=c.replace(/\u00A9/g,
|
||||
function RC(a,b,c,d){if(!c&&b){d.push(b);a=ob[d[0]];b=null;for(var e in a)if(sa(e,"components.xsl")){b=e.replace(".xsl",".css");break}b?Fa(b,null,!0,function(a,b){SC(b,d)}):SC(null,d)}else ab("Error ("+c+") requesting "+a)}
|
||||
function SC(a,b){var c,d,e,f=b[0],g=b[1];c=b[4];if(c=c.match(/^(\s*\(function\(\)\{)([\s\S]*)(}\)\(\);)/)){var h=ob[f],k={},m;for(m in h){var p=h[m],v=ra(m);if("xml"==v){for(v=/[ \t]*<disk [^>]*path=(['"])(.*?)\1.*?<\/disk>\n?/g;d=v.exec(h[m]);){var u=d[2];u&&(h[u]||(p=p.replace(d[0],"")))}d=m=pa(m)}else"xsl"==v&&(e=m=pa(m));k[m]=p}a&&(k[m="css"]=a);b[2]&&(k[m="parms"]=b[2]);b[3]&&(k[m="state"]=b[3]);d&&e?(a=JSON.stringify(k),g+=".js",c=c[1]+"var resources="+a+";"+c[2]+c[3],c=c.replace(/\u00A9/g,
|
||||
"©"),a=Ta(c,"javascript",!1,g),a=a+(', copy it to your web server as "'+g+'", and then add the following to your web page:\n\n')+('<div id="'+f+'"></div>\n')+"...\n",a=a+('<script type="text/javascript" src="'+g+'">\x3c/script>\n')+('<script type="text/javascript">embedPC("'+f+'","'+d+'","'+e+'");\x3c/script>\n\n')+"The machine should appear where the <div> is located.",ab(a)):ab("Missing XML/XSL resources")}else ab("Unsupported script")}
|
||||
window.savePC=function(a,b,c){var d=tb("Computer",a),e=tb("Debugger",a);if(d){var f=EB(d,!0),g=d.M?JSON.stringify(d.M):null;b||(b="/versions/pcx86/1.36.2/pcx86"+(e?"-dbg":"")+".js");if(c&&c({state:f,Nk:g}))return!0;Fa(b,null,!0,function(c,d,e){MC(c,d,e,[a,pa(b,!0),g,f])});return!0}ab("Unable to identify machine '"+a+"'");return!1};})();//# sourceMappingURL=/versions/pcx86/1.36.2/pcx86-dbg.map
|
||||
window.savePC=function(a,b,c){var d=tb("Computer",a),e=tb("Debugger",a);if(d){var f=JB(d,!0),g=d.M?JSON.stringify(d.M):null;b||(b="/versions/pcx86/1.36.2/pcx86"+(e?"-dbg":"")+".js");if(c&&c({state:f,Nk:g}))return!0;Fa(b,null,!0,function(c,d,e){RC(c,d,e,[a,pa(b,!0),g,f])});return!0}ab("Unable to identify machine '"+a+"'");return!1};})();//# sourceMappingURL=/versions/pcx86/1.36.2/pcx86-dbg.map
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -56029,70 +56029,74 @@ SerialPort.sIOBuffer = "buffer";
|
|||
* 0x0002 56000 2.86%
|
||||
* 0x0001 128000
|
||||
*/
|
||||
SerialPort.DLL = {REG: 0}; // Divisor Latch LSB (only when SerialPort.LCR.DLAB is set)
|
||||
SerialPort.THR = {REG: 0}; // Transmitter Holding Register (write)
|
||||
SerialPort.DL_DEFAULT = 0x180; // we select an arbitrary default Divisor Latch equivalent to 300 baud
|
||||
SerialPort.DLL = {REG: 0}; // Divisor Latch LSB (only when SerialPort.LCR.DLAB is set)
|
||||
SerialPort.THR = {REG: 0}; // Transmitter Holding Register (write)
|
||||
SerialPort.DL_DEFAULT = 0x180; // we select an arbitrary default Divisor Latch equivalent to 300 baud
|
||||
|
||||
/*
|
||||
* Receiver Buffer Register (RBR.REG, offset 0; eg, 0x3F8 or 0x2F8) on read, Transmitter Holding Register on write
|
||||
*/
|
||||
SerialPort.RBR = {REG: 0}; // (read)
|
||||
SerialPort.RBR = {REG: 0}; // (read)
|
||||
|
||||
/*
|
||||
* Interrupt Enable Register (IER.REG, offset 1; eg, 0x3F9 or 0x2F9)
|
||||
*/
|
||||
SerialPort.IER = {};
|
||||
SerialPort.IER.REG = 1; // Interrupt Enable Register
|
||||
SerialPort.IER.RBR_AVAIL = 0x01;
|
||||
SerialPort.IER.THR_EMPTY = 0x02;
|
||||
SerialPort.IER.LSR_DELTA = 0x04;
|
||||
SerialPort.IER.MSR_DELTA = 0x08;
|
||||
SerialPort.IER.UNUSED = 0xF0; // always zero
|
||||
SerialPort.IER = {
|
||||
REG: 1, // Interrupt Enable Register
|
||||
RBR_AVAIL: 0x01,
|
||||
THR_EMPTY: 0x02,
|
||||
LSR_DELTA: 0x04,
|
||||
MSR_DELTA: 0x08,
|
||||
UNUSED: 0xF0 // always zero
|
||||
};
|
||||
|
||||
SerialPort.DLM = {REG: 1}; // Divisor Latch MSB (only when SerialPort.LCR.DLAB is set)
|
||||
SerialPort.DLM = {REG: 1}; // Divisor Latch MSB (only when SerialPort.LCR.DLAB is set)
|
||||
|
||||
/*
|
||||
* Interrupt ID Register (IIR.REG, offset 2; eg, 0x3FA or 0x2FA)
|
||||
*
|
||||
* All interrupt conditions cleared by reading the corresponding register (or, in the case of IRR_INT_THR, writing a new value to THR.REG)
|
||||
*/
|
||||
SerialPort.IIR = {};
|
||||
SerialPort.IIR.REG = 2; // Interrupt ID Register (read-only)
|
||||
SerialPort.IIR.NO_INT = 0x01;
|
||||
SerialPort.IIR.INT_LSR = 0x06; // Line Status (highest priority: Overrun error, Parity error, Framing error, or Break Interrupt)
|
||||
SerialPort.IIR.INT_RBR = 0x04; // Receiver Data Available
|
||||
SerialPort.IIR.INT_THR = 0x02; // Transmitter Holding Register Empty
|
||||
SerialPort.IIR.INT_MSR = 0x00; // Modem Status Register (lowest priority: Clear To Send, Data Set Ready, Ring Indicator, or Data Carrier Detect)
|
||||
SerialPort.IIR.INT_BITS = 0x06;
|
||||
SerialPort.IIR.UNUSED = 0xF8; // always zero (the ROM BIOS relies on these bits "floating to 1" when no SerialPort is present)
|
||||
SerialPort.IIR = {
|
||||
REG: 2, // Interrupt ID Register (read-only)
|
||||
NO_INT: 0x01,
|
||||
INT_LSR: 0x06, // Line Status (highest priority: Overrun error, Parity error, Framing error, or Break Interrupt)
|
||||
INT_RBR: 0x04, // Receiver Data Available
|
||||
INT_THR: 0x02, // Transmitter Holding Register Empty
|
||||
INT_MSR: 0x00, // Modem Status Register (lowest priority: Clear To Send, Data Set Ready, Ring Indicator, or Data Carrier Detect)
|
||||
INT_BITS: 0x06,
|
||||
UNUSED: 0xF8 // always zero (the ROM BIOS relies on these bits "floating to 1" when no SerialPort is present)
|
||||
};
|
||||
|
||||
/*
|
||||
* Line Control Register (LCR.REG, offset 3; eg, 0x3FB or 0x2FB)
|
||||
*/
|
||||
SerialPort.LCR = {};
|
||||
SerialPort.LCR.REG = 3; // Line Control Register
|
||||
SerialPort.LCR.DATA_5BITS = 0x00;
|
||||
SerialPort.LCR.DATA_6BITS = 0x01;
|
||||
SerialPort.LCR.DATA_7BITS = 0x02;
|
||||
SerialPort.LCR.DATA_8BITS = 0x03;
|
||||
SerialPort.LCR.STOP_BITS = 0x04; // clear: 1 stop bit; set: 1.5 stop bits for LCR_DATA_5BITS, 2 stop bits for all other data lengths
|
||||
SerialPort.LCR.PARITY_BIT = 0x08; // if set, a parity bit is inserted/expected between the last data bit and the first stop bit; no parity bit if clear
|
||||
SerialPort.LCR.PARITY_EVEN = 0x10; // if set, even parity is selected (ie, the parity bit insures an even number of set bits); if clear, odd parity
|
||||
SerialPort.LCR.PARITY_STICK = 0x20; // if set, parity bit is transmitted inverted; if clear, parity bit is transmitted normally
|
||||
SerialPort.LCR.BREAK = 0x40; // if set, serial output (SOUT) signal is forced to logical 0 for the duration
|
||||
SerialPort.LCR.DLAB = 0x80; // Divisor Latch Access Bit; if set, DLL.REG and DLM.REG can be read or written
|
||||
SerialPort.LCR = {
|
||||
REG: 3, // Line Control Register
|
||||
DATA_5BITS: 0x00,
|
||||
DATA_6BITS: 0x01,
|
||||
DATA_7BITS: 0x02,
|
||||
DATA_8BITS: 0x03,
|
||||
STOP_BITS: 0x04, // clear: 1 stop bit; set: 1.5 stop bits for LCR_DATA_5BITS, 2 stop bits for all other data lengths
|
||||
PARITY_BIT: 0x08, // if set, a parity bit is inserted/expected between the last data bit and the first stop bit; no parity bit if clear
|
||||
PARITY_EVEN: 0x10, // if set, even parity is selected (ie, the parity bit insures an even number of set bits); if clear, odd parity
|
||||
PARITY_STICK: 0x20, // if set, parity bit is transmitted inverted; if clear, parity bit is transmitted normally
|
||||
BREAK: 0x40, // if set, serial output (SOUT) signal is forced to logical 0 for the duration
|
||||
DLAB: 0x80 // Divisor Latch Access Bit; if set, DLL.REG and DLM.REG can be read or written
|
||||
};
|
||||
|
||||
/*
|
||||
* Modem Control Register (MCR.REG, offset 4; eg, 0x3FC or 0x2FC)
|
||||
*/
|
||||
SerialPort.MCR = {};
|
||||
SerialPort.MCR.REG = 4; // Modem Control Register
|
||||
SerialPort.MCR.DTR = 0x01; // when set, DTR goes high, indicating ready to establish link (looped back to DSR in loop-back mode)
|
||||
SerialPort.MCR.RTS = 0x02; // when set, RTS goes high, indicating ready to exchange data (looped back to CTS in loop-back mode)
|
||||
SerialPort.MCR.OUT1 = 0x04; // when set, OUT1 goes high (looped back to RI in loop-back mode)
|
||||
SerialPort.MCR.OUT2 = 0x08; // when set, OUT2 goes high (looped back to RLSD in loop-back mode)
|
||||
SerialPort.MCR.LOOPBACK = 0x10; // when set, enables loop-back mode
|
||||
SerialPort.MCR.UNUSED = 0xE0; // always zero
|
||||
SerialPort.MCR = {
|
||||
REG: 4, // Modem Control Register
|
||||
DTR: 0x01, // when set, DTR goes high, indicating ready to establish link (looped back to DSR in loop-back mode)
|
||||
RTS: 0x02, // when set, RTS goes high, indicating ready to exchange data (looped back to CTS in loop-back mode)
|
||||
OUT1: 0x04, // when set, OUT1 goes high (looped back to RI in loop-back mode)
|
||||
OUT2: 0x08, // when set, OUT2 goes high (looped back to RLSD in loop-back mode)
|
||||
LOOPBACK: 0x10, // when set, enables loop-back mode
|
||||
UNUSED: 0xE0 // always zero
|
||||
};
|
||||
|
||||
/*
|
||||
* Line Status Register (LSR.REG, offset 5; eg, 0x3FD or 0x2FD)
|
||||
|
|
@ -56101,30 +56105,32 @@ SerialPort.MCR.UNUSED = 0xE0; // always zero
|
|||
* I have calls it TEMT instead of TSRE, and claims that it is set whenever BOTH the THR and TSR are empty, and clear
|
||||
* whenever EITHER the THR or TSR contain data.
|
||||
*/
|
||||
SerialPort.LSR = {};
|
||||
SerialPort.LSR.REG = 5; // Line Status Register
|
||||
SerialPort.LSR.DR = 0x01; // Data Ready (set when new data in RBR.REG; cleared when RBR.REG read)
|
||||
SerialPort.LSR.OE = 0x02; // Overrun Error (set when new data arrives in RBR.REG before previous data read; cleared when LSR.REG read)
|
||||
SerialPort.LSR.PE = 0x04; // Parity Error (set when new data has incorrect parity; cleared when LSR.REG read)
|
||||
SerialPort.LSR.FE = 0x08; // Framing Error (set when new data has invalid stop bit; cleared when LSR.REG read)
|
||||
SerialPort.LSR.BI = 0x10; // Break Interrupt (set when new data exceeded normal transmission time; cleared LSR.REG when read)
|
||||
SerialPort.LSR.THRE = 0x20; // Transmitter Holding Register Empty (set when UART ready to accept new data; cleared when THR.REG written)
|
||||
SerialPort.LSR.TSRE = 0x40; // Transmitter Shift Register Empty (set when the TSR is empty; cleared when the THR is transferred to the TSR)
|
||||
SerialPort.LSR.UNUSED = 0x80; // always zero
|
||||
SerialPort.LSR = {
|
||||
REG: 5, // Line Status Register
|
||||
DR: 0x01, // Data Ready (set when new data in RBR.REG; cleared when RBR.REG read)
|
||||
OE: 0x02, // Overrun Error (set when new data arrives in RBR.REG before previous data read; cleared when LSR.REG read)
|
||||
PE: 0x04, // Parity Error (set when new data has incorrect parity; cleared when LSR.REG read)
|
||||
FE: 0x08, // Framing Error (set when new data has invalid stop bit; cleared when LSR.REG read)
|
||||
BI: 0x10, // Break Interrupt (set when new data exceeded normal transmission time; cleared LSR.REG when read)
|
||||
THRE: 0x20, // Transmitter Holding Register Empty (set when UART ready to accept new data; cleared when THR.REG written)
|
||||
TSRE: 0x40, // Transmitter Shift Register Empty (set when the TSR is empty; cleared when the THR is transferred to the TSR)
|
||||
UNUSED: 0x80 // always zero
|
||||
};
|
||||
|
||||
/*
|
||||
* Modem Status Register (MSR.REG, offset 6; eg, 0x3FE or 0x2FE)
|
||||
*/
|
||||
SerialPort.MSR = {};
|
||||
SerialPort.MSR.REG = 6; // Modem Status Register
|
||||
SerialPort.MSR.DCTS = 0x01; // when set, CTS (Clear To Send) has changed since last read
|
||||
SerialPort.MSR.DDSR = 0x02; // when set, DSR (Data Set Ready) has changed since last read
|
||||
SerialPort.MSR.TERI = 0x04; // when set, TERI (Trailing Edge Ring Indicator) indicates RI has changed from 1 to 0
|
||||
SerialPort.MSR.DRLSD = 0x08; // when set, RLSD (Received Line Signal Detector) has changed
|
||||
SerialPort.MSR.CTS = 0x10; // when set, the modem or data set is ready to exchange data (complement of the Clear To Send input signal)
|
||||
SerialPort.MSR.DSR = 0x20; // when set, the modem or data set is ready to establish link (complement of the Data Set Ready input signal)
|
||||
SerialPort.MSR.RI = 0x40; // complement of the RI (Ring Indicator) input
|
||||
SerialPort.MSR.RLSD = 0x80; // complement of the RLSD (Received Line Signal Detect) input
|
||||
SerialPort.MSR = {
|
||||
REG: 6, // Modem Status Register
|
||||
DCTS: 0x01, // when set, CTS (Clear To Send) has changed since last read
|
||||
DDSR: 0x02, // when set, DSR (Data Set Ready) has changed since last read
|
||||
TERI: 0x04, // when set, TERI (Trailing Edge Ring Indicator) indicates RI has changed from 1 to 0
|
||||
DRLSD: 0x08, // when set, RLSD (Received Line Signal Detector) has changed
|
||||
CTS: 0x10, // when set, the modem or data set is ready to exchange data (complement of the Clear To Send input signal)
|
||||
DSR: 0x20, // when set, the modem or data set is ready to establish link (complement of the Data Set Ready input signal)
|
||||
RI: 0x40, // complement of the RI (Ring Indicator) input
|
||||
RLSD: 0x80 // complement of the RLSD (Received Line Signal Detect) input
|
||||
};
|
||||
|
||||
/*
|
||||
* Scratch Register (SCR.REG, offset 7; eg, 0x3FF or 0x2FF)
|
||||
|
|
@ -56179,24 +56185,26 @@ class Mouse extends Component {
|
|||
*
|
||||
* The Mouse component has the following component-specific (parmsMouse) properties:
|
||||
*
|
||||
* serial: the ID of the corresponding serial component
|
||||
* adapter: 1 (primary) or 2 (secondary); 0 if not defined
|
||||
*
|
||||
* Since the first version of this component supports ONLY emulation of the original Microsoft
|
||||
* serial mouse, a valid serial component ID is required. It's possible that future versions
|
||||
* of this component may support other types of simulated hardware (eg, the Microsoft InPort
|
||||
* bus mouse adapter), or a virtual driver interface that would eliminate the need for any
|
||||
* intermediate hardware simulation (at the expense of writing an intermediate software layer or
|
||||
* virtual driver for each supported operating system). However, those possibilities are extremely
|
||||
* unlikely in the near term.
|
||||
* binding: name of a corresponding device component (implies type is "serial")
|
||||
*
|
||||
* If the 'serial' property is specified, then communication will be established with the
|
||||
* SerialPort component, requesting access to the corresponding serial component ID. If the
|
||||
* SerialPort component is not installed and/or the specified serial component ID is not present,
|
||||
* a configuration error will be reported.
|
||||
* scaleMouse: a floating-point number used to scale incoming mouse coordinates; the default is 0.5
|
||||
*
|
||||
* TODO: Just out of curiosity, verify that the Microsoft Bus Mouse used ports 0x23D and 0x23F,
|
||||
* because I saw Windows v1.01 probing those ports immediately prior to probing COM2 (and then COM1)
|
||||
* for a serial mouse.
|
||||
* serial: the ID of a corresponding serial component (used in lieu of type="serial" and binding="ID")
|
||||
*
|
||||
* type: one of "bus", "inport", or "serial"; the default is "serial" if serial or binding properties are set
|
||||
*
|
||||
* The first version of this component supported ONLY emulation of the original Microsoft serial mouse,
|
||||
* so a valid serial component ID using the 'serial' property was required. Now, using the 'type' property,
|
||||
* it's possible to enable support for other types of mouse hardware (eg, 'bus' for the original Microsoft
|
||||
* Bus Mouse interface or 'inport' for the Microsoft InPort Mouse interface). The 'adapter' property is used
|
||||
* only when the selected type supports different configurations (eg, primary vs. secondary InPort adapters).
|
||||
*
|
||||
* If either the original 'serial' property or the new 'binding' property is set, then serial communication
|
||||
* will be established with the specified SerialPort component, requesting access to the corresponding serial
|
||||
* component ID. If the SerialPort component is not installed and/or the specified serial component ID is not
|
||||
* present, a configuration error will be reported.
|
||||
*
|
||||
* @this {Mouse}
|
||||
* @param {Object} parmsMouse
|
||||
|
|
@ -56205,18 +56213,22 @@ class Mouse extends Component {
|
|||
{
|
||||
super("Mouse", parmsMouse, Messages.MOUSE);
|
||||
|
||||
this.idAdapter = parmsMouse['serial'];
|
||||
if (this.idAdapter) this.sAdapterType = "SerialPort";
|
||||
this.iAdapter = parmsMouse['adapter'] || 0;
|
||||
this.idDevice = parmsMouse['serial'] || parmsMouse['binding'];
|
||||
this.sType = parmsMouse['type'] || (this.idDevice? Mouse.TYPE.SERIAL : Mouse.TYPE.BUS);
|
||||
this.typeDevice = (this.sType == Mouse.TYPE.SERIAL? "SerialPort" : null);
|
||||
this.componentDevice = null;
|
||||
|
||||
this.scale = parmsMouse['scaleMouse'];
|
||||
this.setActive(false);
|
||||
this.fCaptured = this.fLocked = false;
|
||||
this.fActive = this.fCaptured = this.fLocked = false;
|
||||
|
||||
/*
|
||||
* Initially, no video devices, and therefore no screens, are attached. initBus() will update aVideo,
|
||||
* and powerUp() will update aScreens.
|
||||
*/
|
||||
this.aVideo = [];
|
||||
this.aScreens = [];
|
||||
this.setReady();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -56241,6 +56253,11 @@ class Mouse extends Component {
|
|||
for (var video = null; (video = cmp.getMachineComponent("Video", video));) {
|
||||
this.aVideo.push(video);
|
||||
}
|
||||
if (this.sType == Mouse.TYPE.BUS) {
|
||||
bus.addPortInputTable(this, Mouse.aBusInput, Mouse.BUS.DATA.PORT);
|
||||
bus.addPortOutputTable(this, Mouse.aBusOutput, Mouse.BUS.DATA.PORT);
|
||||
}
|
||||
this.setReady();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -56289,35 +56306,35 @@ class Mouse extends Component {
|
|||
} else {
|
||||
if (!this.restore(data)) return false;
|
||||
}
|
||||
if (this.sAdapterType && !this.componentAdapter) {
|
||||
var componentAdapter = null;
|
||||
while ((componentAdapter = this.cmp.getMachineComponent(this.sAdapterType, componentAdapter))) {
|
||||
if (componentAdapter.attachMouse) {
|
||||
this.componentAdapter = componentAdapter.attachMouse(this.idAdapter, this, this.receiveStatus);
|
||||
if (this.componentAdapter) {
|
||||
if (this.typeDevice && !this.componentDevice) {
|
||||
var componentDevice = null;
|
||||
while ((componentDevice = this.cmp.getMachineComponent(this.typeDevice, componentDevice))) {
|
||||
if (componentDevice.attachMouse) {
|
||||
this.componentDevice = componentDevice.attachMouse(this.idDevice, this, this.receiveStatus);
|
||||
if (this.componentDevice) {
|
||||
/*
|
||||
* It's possible that the SerialPort we've just attached to might want to bring us "up to speed"
|
||||
* on the adapter's state, which is why I envisioned a subsequent syncMouse() call. And you would
|
||||
* want to do that as a separate call, not as part of attachMouse(), because componentAdapter
|
||||
* on the device's state, which is why I envisioned a subsequent syncMouse() call. And you would
|
||||
* want to do that as a separate call, not as part of attachMouse(), because componentDevice
|
||||
* isn't set until attachMouse() returns.
|
||||
*
|
||||
* However, syncMouse() seems unnecessary, given that SerialPort initializes its MCR to an "inactive"
|
||||
* state, and even when restoring a previous state, if we've done our job properly, both SerialPort
|
||||
* and Mouse should be restored in sync, making any explicit attempt at sync'ing unnecessary (or so I hope).
|
||||
*/
|
||||
// this.componentAdapter.syncMouse();
|
||||
// this.componentDevice.syncMouse();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.componentAdapter) {
|
||||
if (this.componentDevice) {
|
||||
this.aScreens = []; // ensure the screen array is empty before (re)filling it
|
||||
for (var i = 0; i < this.aVideo.length; i++) {
|
||||
var screen = this.aVideo[i].getScreen(this);
|
||||
if (screen) this.aScreens.push(screen);
|
||||
}
|
||||
} else {
|
||||
Component.warning(this.id + ": " + this.sAdapterType + " " + this.idAdapter + " unavailable");
|
||||
Component.warning(this.id + ": " + this.typeDevice + " " + this.idDevice + " unavailable");
|
||||
}
|
||||
}
|
||||
if (this.fActive) {
|
||||
|
|
@ -56680,7 +56697,7 @@ class Mouse extends Component {
|
|||
if (this.messageEnabled(Messages.SERIAL)) {
|
||||
this.printMessage((sDiag? (sDiag + ": ") : "") + (yDiag !== undefined? ("mouse (" + xDiag + "," + yDiag + "): ") : "") + "serial packet [" + Str.toHexByte(b1) + "," + Str.toHexByte(b2) + "," + Str.toHexByte(b3) + "]", 0, true);
|
||||
}
|
||||
this.componentAdapter.receiveData([b1, b2, b3]);
|
||||
this.componentDevice.receiveData([b1, b2, b3]);
|
||||
this.xDelta = this.yDelta = 0;
|
||||
}
|
||||
|
||||
|
|
@ -56691,7 +56708,7 @@ class Mouse extends Component {
|
|||
*
|
||||
* During normal serial mouse operation, both RTS and DTR must be "positive".
|
||||
*
|
||||
* Setting RTS "negative" for 100ms resets the mouse. Toggling DTR requests an identification byte (ID_SERIAL).
|
||||
* Setting RTS "negative" for 100ms resets the mouse. Toggling DTR requests an identification byte (SERIAL.ID).
|
||||
*
|
||||
* NOTES: The above 3rd-party information notwithstanding, I've observed that Windows v1.01 initially writes 0x01
|
||||
* to the MCR (DTR on, RTS off), spins in a loop that reads the RBR (probably to avoid a bogus identification byte
|
||||
|
|
@ -56734,11 +56751,11 @@ class Mouse extends Component {
|
|||
* its failure to properly terminate-and-stay-resident when its initial INT 0x33 reset returns an error,
|
||||
* I'm not in the mood to give it the benefit of the doubt.
|
||||
*
|
||||
* So, anyway, I solve the terminate-and-stay-resident bug in MOUSE.COM v8.20 by feeding it *two* ID_SERIAL
|
||||
* So, anyway, I solve the terminate-and-stay-resident bug in MOUSE.COM v8.20 by feeding it *two* SERIAL.ID
|
||||
* bytes on a reset. This doesn't seem to adversely affect serial mouse emulation for Windows 1.01, so
|
||||
* I'm calling this good enough for now.
|
||||
*/
|
||||
this.componentAdapter.receiveData([Mouse.ID_SERIAL, Mouse.ID_SERIAL]);
|
||||
this.componentDevice.receiveData([Mouse.SERIAL.ID, Mouse.SERIAL.ID]);
|
||||
this.printMessage("serial mouse ID sent");
|
||||
}
|
||||
this.captureAll();
|
||||
|
|
@ -56766,6 +56783,118 @@ class Mouse extends Component {
|
|||
this.pins = pins;
|
||||
}
|
||||
|
||||
/**
|
||||
* inBusData(port, addrFrom)
|
||||
*
|
||||
* @this {Mouse}
|
||||
* @param {number} port (eg, 0x23C)
|
||||
* @param {number} [addrFrom] (not defined whenever the Debugger tries to read the specified port)
|
||||
* @return {number} simulated port value
|
||||
*/
|
||||
inBusData(port, addrFrom)
|
||||
{
|
||||
var b = 0;
|
||||
this.printMessageIO(port, null, addrFrom, "DATA", b);
|
||||
return b;
|
||||
}
|
||||
|
||||
/**
|
||||
* inBusTPPI(port, addrFrom)
|
||||
*
|
||||
* @this {Mouse}
|
||||
* @param {number} port (eg, 0x23D)
|
||||
* @param {number} [addrFrom] (not defined whenever the Debugger tries to read the specified port)
|
||||
* @return {number} simulated port value
|
||||
*/
|
||||
inBusTPPI(port, addrFrom)
|
||||
{
|
||||
var b = 0;
|
||||
this.printMessageIO(port, null, addrFrom, "TPPI", b);
|
||||
return b;
|
||||
}
|
||||
|
||||
/**
|
||||
* inBusCtrl(port, addrFrom)
|
||||
*
|
||||
* @this {Mouse}
|
||||
* @param {number} port (eg, 0x23E)
|
||||
* @param {number} [addrFrom] (not defined whenever the Debugger tries to read the specified port)
|
||||
* @return {number} simulated port value
|
||||
*/
|
||||
inBusCtrl(port, addrFrom)
|
||||
{
|
||||
var b = 0;
|
||||
this.printMessageIO(port, null, addrFrom, "CTRL", b);
|
||||
return b;
|
||||
}
|
||||
|
||||
/**
|
||||
* inBusCPPI(port, addrFrom)
|
||||
*
|
||||
* @this {Mouse}
|
||||
* @param {number} port (eg, 0x23F)
|
||||
* @param {number} [addrFrom] (not defined whenever the Debugger tries to read the specified port)
|
||||
* @return {number} simulated port value
|
||||
*/
|
||||
inBusCPPI(port, addrFrom)
|
||||
{
|
||||
var b = 0;
|
||||
this.printMessageIO(port, null, addrFrom, "CPPI", b);
|
||||
return b;
|
||||
}
|
||||
|
||||
/**
|
||||
* outBusData(port, bOut, addrFrom)
|
||||
*
|
||||
* @this {Mouse}
|
||||
* @param {number} port (eg, 0x23C)
|
||||
* @param {number} bOut
|
||||
* @param {number} [addrFrom] (not defined whenever the Debugger tries to write the specified port)
|
||||
*/
|
||||
outBusData(port, bOut, addrFrom)
|
||||
{
|
||||
this.printMessageIO(port, bOut, addrFrom, "DATA");
|
||||
}
|
||||
|
||||
/**
|
||||
* outBusTPPI(port, bOut, addrFrom)
|
||||
*
|
||||
* @this {Mouse}
|
||||
* @param {number} port (eg, 0x23D)
|
||||
* @param {number} bOut
|
||||
* @param {number} [addrFrom] (not defined whenever the Debugger tries to write the specified port)
|
||||
*/
|
||||
outBusTPPI(port, bOut, addrFrom)
|
||||
{
|
||||
this.printMessageIO(port, bOut, addrFrom, "TPPI");
|
||||
}
|
||||
|
||||
/**
|
||||
* outBusCtrl(port, bOut, addrFrom)
|
||||
*
|
||||
* @this {Mouse}
|
||||
* @param {number} port (eg, 0x23E)
|
||||
* @param {number} bOut
|
||||
* @param {number} [addrFrom] (not defined whenever the Debugger tries to write the specified port)
|
||||
*/
|
||||
outBusCtrl(port, bOut, addrFrom)
|
||||
{
|
||||
this.printMessageIO(port, bOut, addrFrom, "CTRL");
|
||||
}
|
||||
|
||||
/**
|
||||
* outBusCPPI(port, bOut, addrFrom)
|
||||
*
|
||||
* @this {Mouse}
|
||||
* @param {number} port (eg, 0x23F)
|
||||
* @param {number} bOut
|
||||
* @param {number} [addrFrom] (not defined whenever the Debugger tries to write the specified port)
|
||||
*/
|
||||
outBusCPPI(port, bOut, addrFrom)
|
||||
{
|
||||
this.printMessageIO(port, bOut, addrFrom, "CPPI");
|
||||
}
|
||||
|
||||
/**
|
||||
* Mouse.init()
|
||||
*
|
||||
|
|
@ -56786,6 +56915,121 @@ class Mouse extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
Mouse.TYPE = {
|
||||
BUS: "bus",
|
||||
INPORT: "inport",
|
||||
SERIAL: "serial"
|
||||
};
|
||||
|
||||
Mouse.BUTTON = {
|
||||
LEFT: 0,
|
||||
RIGHT: 2
|
||||
};
|
||||
|
||||
/*
|
||||
* The Microsoft Bus Mouse supported only one base address: 0x23C.
|
||||
*
|
||||
* NOTE: Windows v1.01 probes ports 0x23D and 0x23F immediately prior to probing COM2 (and then COM1)
|
||||
* for a serial mouse.
|
||||
*/
|
||||
Mouse.BUS = {
|
||||
DATA: { // Mouse Data Register
|
||||
PORT: 0x23C
|
||||
},
|
||||
TPPI: { // 8255 (PPI) Test Register
|
||||
PORT: 0x23D
|
||||
},
|
||||
CTRL: { // Mouse Control Register
|
||||
PORT: 0x23E
|
||||
},
|
||||
CPPI: { // 8255 (PPI) Control Register
|
||||
PORT: 0x23F
|
||||
}
|
||||
};
|
||||
|
||||
Mouse.aBusInput = {
|
||||
0x0: Mouse.prototype.inBusData,
|
||||
0x1: Mouse.prototype.inBusTPPI,
|
||||
0x2: Mouse.prototype.inBusCtrl,
|
||||
0x3: Mouse.prototype.inBusCPPI
|
||||
};
|
||||
|
||||
Mouse.aBusOutput = {
|
||||
0x0: Mouse.prototype.outBusData,
|
||||
0x1: Mouse.prototype.outBusTPPI,
|
||||
0x2: Mouse.prototype.outBusCtrl,
|
||||
0x3: Mouse.prototype.outBusCPPI
|
||||
};
|
||||
|
||||
/*
|
||||
* The retail Microsoft InPort card supported two base addresses, 0x23C and 0x238, through the primary and
|
||||
* secondary jumpers, respectively. However, OEMs may have had InPorts on other base addresses.
|
||||
*
|
||||
* Here's a typical InPort Mouse detection sequence:
|
||||
*
|
||||
* S = IN(Mouse.INPORT.ID.PORT)
|
||||
* ...
|
||||
* VERIFY THAT S EQUALS Mouse.INPORT.ID.CHIP
|
||||
* T = IN(Mouse.INPORT.ID.PORT)
|
||||
* ...
|
||||
* VERIFY ADDITIONAL PAIRS OF READS RETURN MATCHING S AND T VALUES
|
||||
*
|
||||
* Here's a typical InPort Mouse interrupt sequence:
|
||||
*
|
||||
* OUT(Mouse.INPORT.ADDR.PORT, Mouse.INPORT.ADDR.MODE)
|
||||
* OUT(Mouse.INPORT.DATA.PORT, IN(Mouse.INPORT.DATA.PORT) | Mouse.INPORT.DATA.MODE.HOLD)
|
||||
* ...
|
||||
* OUT(Mouse.INPORT.ADDR.PORT, Mouse.INPORT.ADDR.X)
|
||||
* X = IN(Mouse.INPORT.DATA.PORT)
|
||||
* OUT(Mouse.INPORT.ADDR.PORT, Mouse.INPORT.ADDR.Y)
|
||||
* Y = IN(Mouse.INPORT.DATA.PORT)
|
||||
* OUT(Mouse.INPORT.ADDR.PORT, Mouse.INPORT.ADDR.STATUS)
|
||||
* B = IN(Mouse.INPORT.DATA.PORT) & (Mouse.INPORT.DATA.STATUS.B1 | Mouse.INPORT.DATA.STATUS.B2 | Mouse.INPORT.DATA.STATUS.B3)
|
||||
* ...
|
||||
* OUT(Mouse.INPORT.ADDR.PORT, Mouse.INPORT.ADDR.MODE)
|
||||
* OUT(Mouse.INPORT.DATA.PORT, IN(Mouse.INPORT.DATA.PORT) & ~Mouse.INPORT.DATA.MODE.HOLD)
|
||||
*/
|
||||
Mouse.INPORT = {
|
||||
ADDR: {
|
||||
PORT: 0x23C,
|
||||
STATUS: 0x00, // InPort Status Register
|
||||
X: 0x01, // InPort X Movement Register
|
||||
Y: 0x02, // InPort Y Movement Register
|
||||
ISTAT: 0x05, // InPort Interface Status Register
|
||||
ICTRL: 0x06, // InPort Interface Control Register
|
||||
MODE: 0x07 // InPort Mode Register
|
||||
},
|
||||
DATA: {
|
||||
PORT: 0x23D,
|
||||
STATUS: { // InPort Status Register (0)
|
||||
B3: 0x01, // Status button 3
|
||||
B2: 0x02, // Status button 2
|
||||
B1: 0x04, // Status button 1
|
||||
DB3: 0x08, // Delta button 3
|
||||
DB2: 0x10, // Delta button 2
|
||||
DB1: 0x20, // Delta button 1
|
||||
MOVE: 0x40, // Movement
|
||||
PACKET: 0x80 // Packet complete
|
||||
},
|
||||
MODE: { // InPort Mode Register (7)
|
||||
HOLD: 0x20 // hold the status for reading
|
||||
}
|
||||
/*
|
||||
* The internal register read or written via this port is determined by the value written to ADDR.PORT
|
||||
*/
|
||||
},
|
||||
ID: {
|
||||
PORT: 0x23E,
|
||||
CHIP: 0xDE // InPort Chip ID
|
||||
/*
|
||||
* Alternate reads return a byte containing InPort revision number in low nibble, version number in high nibble
|
||||
*/
|
||||
},
|
||||
TEST: {
|
||||
PORT: 0x23F
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* From http://paulbourke.net/dataformats/serialmouse:
|
||||
*
|
||||
|
|
@ -56861,12 +57105,8 @@ class Mouse extends Component {
|
|||
* The high order bit of each byte (D7) is ignored. Bit D6 indicates the start of an event, which allows the software to
|
||||
* synchronize with the mouse.
|
||||
*/
|
||||
|
||||
Mouse.ID_SERIAL = 0x4D;
|
||||
|
||||
Mouse.BUTTON = {
|
||||
LEFT: 0,
|
||||
RIGHT: 2
|
||||
Mouse.SERIAL = {
|
||||
ID: 0x4D
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -46,9 +46,9 @@
|
|||
var l,ba;function ca(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a;for(var d in b)if(Object.defineProperties){var e=Object.getOwnPropertyDescriptor(b,d);e&&Object.defineProperty(a,d,e)}else a[d]=b[d]}
|
||||
var da="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ea="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this;
|
||||
function fa(a,b){if(b){var c=ea;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&da(c,a,{configurable:!0,writable:!0,value:b})}}fa("Math.trunc",function(a){return a?a:function(a){a=Number(a);if(isNaN(a)||Infinity===a||-Infinity===a||!a)return a;var b=Math.floor(Math.abs(a));return 0>a?-b:b}});fa("Math.sign",function(a){return a?a:function(a){a=Number(a);return!a||isNaN(a)?a:0<a?1:-1}});
|
||||
var ga={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[40,2,9,,253],737280:[80,2,9,,249],1228800:[80,2,15,,249],1474560:[80,2,18,,240],2949120:[80,2,36,,240],10653696:[306,4,17],21411840:[615,4,17],256256:[77,1,26,128],2494464:[203,2,12,512],5242880:[256,2,40,256],10485760:[512,2,40,256]},n={Ln:0,Nn:1,On:2,Tj:3,Pn:4,Qn:5,Rn:6,Sn:7,Tn:8,Un:9,Vn:10,Wn:11,Xn:12,Yn:13,Zn:14,$n:15,ao:16,bo:17,co:18,eo:19,fo:20,ho:21,io:22,jo:23,ko:24,lo:25,mo:26," ":32,"!":33,'"':34,"#":35,$:36,
|
||||
"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,Ed:65,sh:66,th:67,vh:68,E:69,wh:70,xh:71,yh:72,zh:73,Ah:74,Bh:75,Ch:76,Dh:77,Eh:78,Fh:79,Gh:80,Q:81,Hh:82,Ih:83,Jh:84,Kh:85,Lh:86,Mh:87,Nh:88,Ph:89,qf:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Fd:97,dk:98,ek:99,d:100,e:101,nk:102,pk:103,qk:104,rk:105,Cl:106,k:107,Dl:108,Hl:109,n:110,Ql:111,p:112,q:113,r:114,ln:115,t:116,on:117,
|
||||
pn:118,qn:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126,no:127},ha={};ha[173]=n["-"];ha[186]=n[";"];ha[187]=n["="];ha[189]=n["-"];ha[188]=n[","];ha[190]=n["."];ha[191]=n["/"];ha[192]=n["`"];ha[219]=n["["];ha[220]=n["\\"];ha[221]=n["]"];ha[222]=n["'"];var p={};p[n["1"]]=n["!"];p[n["2"]]=n["@"];p[n["3"]]=n["#"];p[n["4"]]=n.$;p[n["5"]]=n["%"];p[n["6"]]=n["^"];p[n["7"]]=n["&"];p[n["8"]]=n["*"];p[n["9"]]=n["("];p[n["0"]]=n[")"];p[186]=n[":"];p[187]=n["+"];p[188]=n["<"];p[189]=n._;p[190]=n[">"];
|
||||
var ga={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[40,2,9,,253],737280:[80,2,9,,249],1228800:[80,2,15,,249],1474560:[80,2,18,,240],2949120:[80,2,36,,240],10653696:[306,4,17],21411840:[615,4,17],256256:[77,1,26,128],2494464:[203,2,12,512],5242880:[256,2,40,256],10485760:[512,2,40,256]},n={Tn:0,Vn:1,Wn:2,Tj:3,Xn:4,Yn:5,Zn:6,$n:7,ao:8,bo:9,co:10,eo:11,fo:12,ho:13,io:14,jo:15,ko:16,lo:17,mo:18,no:19,oo:20,po:21,qo:22,ro:23,so:24,to:25,uo:26," ":32,"!":33,'"':34,"#":35,$:36,
|
||||
"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,Ed:65,sh:66,th:67,vh:68,E:69,wh:70,xh:71,yh:72,zh:73,Ah:74,Bh:75,Ch:76,Dh:77,Eh:78,Fh:79,Gh:80,Q:81,Hh:82,Ih:83,Jh:84,Kh:85,Lh:86,Mh:87,Nh:88,Ph:89,qf:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Fd:97,dk:98,ek:99,d:100,e:101,nk:102,pk:103,qk:104,rk:105,Gl:106,k:107,Hl:108,Ll:109,n:110,Ul:111,p:112,q:113,r:114,tn:115,t:116,wn:117,
|
||||
xn:118,yn:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126,vo:127},ha={};ha[173]=n["-"];ha[186]=n[";"];ha[187]=n["="];ha[189]=n["-"];ha[188]=n[","];ha[190]=n["."];ha[191]=n["/"];ha[192]=n["`"];ha[219]=n["["];ha[220]=n["\\"];ha[221]=n["]"];ha[222]=n["'"];var p={};p[n["1"]]=n["!"];p[n["2"]]=n["@"];p[n["3"]]=n["#"];p[n["4"]]=n.$;p[n["5"]]=n["%"];p[n["6"]]=n["^"];p[n["7"]]=n["&"];p[n["8"]]=n["*"];p[n["9"]]=n["("];p[n["0"]]=n[")"];p[186]=n[":"];p[187]=n["+"];p[188]=n["<"];p[189]=n._;p[190]=n[">"];
|
||||
p[191]=n["?"];p[192]=n["~"];p[219]=n["{"];p[220]=n["|"];p[221]=n["}"];p[222]=n['"'];p[173]=n._;p[61]=n["+"];p[59]=n[":"];
|
||||
function ia(a,b){var c;if(a){b||(b=10);var d,e,f=0<a.indexOf(",");f&&(a=a.replace(/,/g,""));d=e=a.charAt(0);"#"==e?(b=8,e=""):"$"==e&&(b=16,e="");d!=e?a=a.substr(1):(d=e=a.substr(0,2),"0b"==e&&f||"^B"==e?(b=2,e=""):"0o"==e||"^O"==e?(b=8,e=""):"^D"==e?(b=10,e=""):"0x"==e&&(b=16,e=""),d!=e&&(a=a.substr(2)));d=e=a.slice(-1);"Y"==e||"y"==e?(b=2,e=""):"."==e?(b=10,e=""):"H"==e||"h"==e?(b=16,e=""):"K"==e?e="000":"M"==e?e="000000":"G"==e&&(e="000000000");d!=e&&(a=a.slice(0,-1)+e);var g;d=0;10>=b&&(e=a.match(/(-?[0-9]+)B([0-9]*)/))&&
|
||||
(a=e[1],d=35-((e[2]||35)&255));e=a;((f=b)&&10!=f?16==f?e.match(/^-?[0-9a-f]+$/i):8==f?e.match(/^-?[0-7]+$/):2==f&&e.match(/^-?[01]+$/):e.match(/^-?[0-9]+$/))&&!isNaN(g=parseInt(a,b))&&(d&&(0>g&&(g+=Math.pow(2,36)),g=0<d?g*Math.pow(2,d):Math.trunc(g/Math.pow(2,-d))),c=g)}return c}
|
||||
|
|
@ -65,7 +65,7 @@ function Ia(a){if(!Ja){var b,c={};if(window){b||(b=window.location.search.substr
|
|||
function Ka(a,b,c,d){var e=null;b="data:application/"+b+(c?";base64":"")+",";b=Ea("Firefox")?b+(c?a:encodeURIComponent(a)):b+(c?a:encodeURI(a));d&&(e=document.createElement("a"),"string"!=typeof e.download&&(e=null));e?(e.href=b,e.download=d,document.body.appendChild(e),e.click(),document.body.removeChild(e),a="Check your Downloads folder for "+d+"."):(window.open(b),a="Check your browser for a new window/tab containing the requested data"+(d?" ("+d+")":"")+".");return a}
|
||||
function La(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function Ma(a){Na.init.push(a)}function Oa(a){if(Pa)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){q(""+("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks."))}}function Qa(a){!Pa&&a?(Pa=!0,Ra&&Sa("init"),Ta&&Sa("show")):Pa=a}function Sa(a){Na[a]&&Oa(Na[a])}
|
||||
var Ja=null,Na={init:[],show:[],exit:[]},Ga=["","moz","ms","webkit"],Ra=!1,Ta=!1,Pa=!0,Ba=null;La("onload",function(){Ra=!0;Oa(Na.init)});La("onpageshow",function(){Ta=!0;Oa(Na.show)});La(Ea("iOS")?"onpagehide":Ea("Opera")?"onunload":"onbeforeunload",function(){Oa(Na.exit)});
|
||||
function u(a,b){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.ki=b.comment;this.Dj=b;this.exports={};this.ia=this.bindings={};a=this.id.indexOf(".");0>a?this.Ce=this.id:(this.Cd=this.id.substr(0,a),this.Ce=this.id.substr(a+1));this.X={ready:!1,Ho:!1,Io:!1,Ke:!1,Sb:!1,Yd:!1,error:!1};this.Df=null;this.X.error=!1;this.Ea=this.R=this.oa=this.na=null;Ua.push(this)}function Va(a,b,c){Wa[a]&&b&&(Wa[a][b]=c)}function q(a){window&&window.alert(a)}
|
||||
function u(a,b){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.ki=b.comment;this.Dj=b;this.exports={};this.ia=this.bindings={};a=this.id.indexOf(".");0>a?this.Ce=this.id:(this.Cd=this.id.substr(0,a),this.Ce=this.id.substr(a+1));this.Y={ready:!1,Po:!1,Qo:!1,Ke:!1,Sb:!1,Yd:!1,error:!1};this.Df=null;this.Y.error=!1;this.Ea=this.R=this.oa=this.na=null;Ua.push(this)}function Va(a,b,c){Wa[a]&&b&&(Wa[a][b]=c)}function q(a){window&&window.alert(a)}
|
||||
function Xa(a){var b=!1;window&&(b=window.confirm(a));return b}function Ya(a,b){a.value+=b;b=a.value;8192<b.length&&(a.value=b.substr(b.length-4096));a.scrollTop=a.scrollHeight}function Za(a,b,c){var d=a.value,e=d.lastIndexOf(b);0>e?d+=b+"\n":d=d.substr(0,e)+c+d.substr(e+b.length);8192<d.length&&(d=d.substr(d.length-4096));a.value=d;a.scrollTop=a.scrollHeight}function $a(a,b,c){var d;b&&(void 0===d&&(d="Panel"),(d=ab(d,a.id))&&(b=d.ia[b])&&a.Ab(null,c,b))}
|
||||
function bb(a,b){b=cb(b.parentNode,"pcx86-control");for(var c=0;c<b.length;c++)for(var d=b[c].childNodes,e=0;e<d.length;e++){var f=d[e];if(1===f.nodeType){var g=f.getAttribute("class");if(g)for(var h=g.split(" "),k=0;k<h.length;k++)switch(g=h[k],g){case "pcx86-binding":(g=db(f))&&g.binding&&a.Ab(g.type,g.binding,f,g.value),k=h.length}}}}function eb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b<Ua.length;b++){var d=Ua[b];a&&d.id.indexOf(a)||c.push(d)}return c}
|
||||
function fb(a,b){if(void 0!==a){var c;b&&0<(c=b.indexOf("."))&&(a=b.substr(0,c+1)+a);for(c=0;c<Ua.length;c++)if(Ua[c].id===a)return Ua[c]}return null}function ab(a,b){var c;if(void 0!==a){var d;b&&(b=0<(d=b.indexOf("."))?b.substr(0,d+1):"");for(d=0;d<Ua.length;d++)if(c)c==Ua[d]&&(c=null);else if(!(a!=Ua[d].type||b&&Ua[d].id.indexOf(b)))return Ua[d]}return null}function db(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")}catch(c){q(c.message+" ("+a+")")}return b}
|
||||
|
|
@ -74,8 +74,8 @@ function gb(a,b){var c=!1;a+=".machine";if(!b)delete hb[a],c=!0;else if("string"
|
|||
function ib(a){for(var b=!0,c=hb[a];c&&c.length;){var d=c.splice(0,1)[0],e=d[0],f=null;0<=jb.indexOf(e)&&(f=function(){return function(){ib(a)}}());var g=kb[e];if(g)if(!f)b=g(d[1],d[2],d[3]);else{if(!g(f,d[1],d[2],d[3]))break}else{var b=!1,h=ab(d[1],a);if(h)if(g=lb[e])b=g(h,d[2],d[3]);else{var k=h.exports;if(k&&(g=k[e]))if(b=!0,!f)b=g.call(h,d[2],d[3]);else if(!g.call(h,f,d[2],d[3]))break}}if(!b){q("Script error: '"+e+(g?" failed":" unrecognized"));break}}c&&!c.length&&delete hb[a];return b}l=u.prototype;
|
||||
l.toString=function(){return this.name?this.name:this.id||this.type};
|
||||
l.Ab=function(a,b,c){switch(b){case "clear":return this.ia[b]||(this.ia[b]=c,c.onclick=function(a){return function(){a.ia.print&&(a.ia.print.value="")}}(this)),!0;case "print":return this.ia[b]||(this.ia[b]=c,this.wa=function(a){this.qb(a,this.type);return!0},c.value="",this.print=function(a){return function(b){Ya(a,b)}}(c),this.qb=function(a,b){return function(a,c){a||(a="");c!=mb.ae||"..."!=a.slice(-3)?(c&&(a=c+": "+a),Ya(b,a+"\n")):Za(b,a,a+".")}}(this,c)),!0;default:return!1}};l.log=function(){};
|
||||
l.print=function(){};l.qb=function(){};l.status=function(a){this.qb(this.type+": "+a)};l.wa=function(a,b,c){if(!b){var d=ab("Computer",this.id);if(d&&d.X.Yd)return console.log("ignoring notice during unload: "+a),!1}c=c||this.type;b||q((c?c+": ":"")+a);return!0};function nb(a,b){a.X.error=!0;a.wa(b)}function ob(a,b){b&&(a.X.ready?b():a.Df=b);return a.X.ready}function v(a,b){a.X.error||(a.X.ready=!1!==b,a.X.ready&&(b=a.Df,a.Df=null,b&&b()))}l.Rb=function(){return this.X.Sb=!0};
|
||||
l.Qb=function(a,b){b&&(this.X.Sb=!1);return!0};var mb={ERROR:"error",ro:"notice",ae:"progress",SCRIPT:"script",Co:"warning"};window&&(window.PCjs||(window.PCjs={}),window.PCjs.Machines||(window.PCjs.Machines={}),window.PCjs.Components||(window.PCjs.Components=[]),window.PCjs.Commands||(window.PCjs.Commands={}));
|
||||
l.print=function(){};l.qb=function(){};l.status=function(a){this.qb(this.type+": "+a)};l.wa=function(a,b,c){if(!b){var d=ab("Computer",this.id);if(d&&d.Y.Yd)return console.log("ignoring notice during unload: "+a),!1}c=c||this.type;b||q((c?c+": ":"")+a);return!0};function nb(a,b){a.Y.error=!0;a.wa(b)}function ob(a,b){b&&(a.Y.ready?b():a.Df=b);return a.Y.ready}function v(a,b){a.Y.error||(a.Y.ready=!1!==b,a.Y.ready&&(b=a.Df,a.Df=null,b&&b()))}l.Rb=function(){return this.Y.Sb=!0};
|
||||
l.Qb=function(a,b){b&&(this.Y.Sb=!1);return!0};var mb={ERROR:"error",zo:"notice",ae:"progress",SCRIPT:"script",Ko:"warning"};window&&(window.PCjs||(window.PCjs={}),window.PCjs.Machines||(window.PCjs.Machines={}),window.PCjs.Components||(window.PCjs.Components=[]),window.PCjs.Commands||(window.PCjs.Commands={}));
|
||||
var Wa=window?window.PCjs.Machines:{},Ua=window?window.PCjs.Components:[],hb=window?window.PCjs.Commands:{},jb=["hold","sleep","wait"],kb={alert:function(a){q(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},lb={select:function(a,b,c){var d=!1;if(a=a.bindings[b])for(b=0;b<a.options.length;b++)if(a.options[b].textContent==c){a.selectedIndex!=b&&(a.selectedIndex=b);d=!0;break}return d}};
|
||||
Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});
|
||||
Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});
|
||||
|
|
@ -83,118 +83,118 @@ var pb="undefined"!==typeof ArrayBuffer,qb={Of:4,gc:5,$c:6,Bc:7,Cc:8,Pa:9,Mb:11,
|
|||
tj:16,Qd:10,Hc:2,wg:18,xg:7,yg:15,Dg:12,Eg:7,Fg:11,Lg:18,Mg:7,Ng:15,Qg:15,Rg:7,Sg:13,Wg:11,Xg:7,Yg:8,uj:8,xj:12,vj:18,wj:17,yj:15,Ug:8,Tg:20,Vg:2,ah:3,Ve:9,$g:5,Zg:11,dh:4,bh:17,zj:11},rb={Of:0,gc:0,$c:0,Bc:0,Cc:0,Pa:0,Mb:1,Nb:1,Pd:3,Ai:14,Bi:16,$b:2,zb:7,nc:7,Nf:0,Fi:7,Hi:13,Ji:7,Ii:11,Gi:16,Di:3,zg:6,Ei:2,Ci:13,Bg:5,Ag:5,Se:2,Re:7,Xi:23,Yi:0,Zi:1,$i:3,Wi:17,Cg:7,bj:11,Ja:7,Ka:3,dj:7,cj:11,aj:15,Ob:2,ej:3,te:7,fj:8,Hg:8,gj:8,Gg:4,Ig:4,lj:2,kj:3,ij:5,jj:2,hj:3,Jg:5,Kg:3,Li:14,Ni:22,Ki:17,Mi:25,Pi:17,
|
||||
Ri:25,Oi:20,Qi:28,nj:13,pj:21,mj:16,oj:24,Ti:13,Vi:21,Si:16,Ui:24,Ue:2,Te:7,Pg:5,Og:5,qj:19,ac:5,rj:5,sj:17,tc:3,tj:5,Qd:3,Hc:0,wg:8,xg:5,yg:9,Dg:5,Eg:5,Fg:4,Lg:5,Mg:5,Ng:4,Qg:7,Rg:5,Sg:8,Wg:3,Xg:4,Yg:3,uj:11,xj:11,vj:15,wj:15,yj:7,Ug:5,Tg:8,Vg:0,ah:2,Ve:6,$g:3,Zg:6,dh:3,bh:5,zj:5};function sb(a){u.call(this,"Panel",a);this.mh=this.A=this.B=this.G=-1}ca(sb,u);l=sb.prototype;l.kc=function(a,b,c,d){this.na=a;this.oa=b;this.R=c;this.Ea=d;this.C=tb(a,"Keyboard")};
|
||||
l.Ab=function(a,b,c,d){return this.na&&this.na.Ab(a,b,c,d)||this.R&&this.R.Ab(a,b,c,d)||this.C&&this.C.Ab(a,b,c,d)?!0:u.prototype.Ab.call(this,a,b,c,d)};l.Rb=function(a,b){b||ub();return!0};l.Qb=function(){return!0};l.ie=function(a,b){a.button||(this.G=b?0:-1,vb(this,a,b))};l.ng=function(a){vb(this,a)};
|
||||
function vb(a,b,c){var d=wb/null.offsetWidth,e=xb/null.offsetHeight,f=null.getBoundingClientRect(),d=(b.clientX-f.left)*d|0;b=(b.clientY-f.top)*e|0;null==c&&(a.G||(a.G=Math.abs(a.A-d)>Math.abs(a.B-b)?1:2),1==a.G?b=a.B:2==a.G&&(d=a.A));a.A=d;a.B=b;if(0<=d&&d<wb&&0<=b&&b<xb){a:{c=d;if(c<yb&&a.F&&a.F.Th)for(f=0;f<a.F.Th.length;f++)if(e=a.F.Th[f],e.contains(c,b)){c-=e.x;b-=e.y;var f=a.F.Fo[f],g,d=zb.Pl;g=(a.F.Eo[f.Lo]&d.Il)>>d.shift;d=g*a.oa.A;f=(g+f.Jo)*a.oa.A-1;0<b&&(d+=e.Ko*(b-1)*a.fa);d+=c*a.fa;d|=
|
||||
0;d>f&&(d=f);c=d;break a}c=-1}if(-1!==c&&(c&=-16,c!=a.M)){b=c;if(a.context&&a.J&&a.K){e=Ab-Bb;f=a.J.width;a.K.fillStyle=Cb;a.K.fillRect(0,e,f,Bb);d=e+Db;g=a.J;var h=a.K,k,m=null.style.color,r=a.ja=10;a.D=r;a.I=d;a.ba=a.aa=Db;k||(k=a.W||a.aa+"px "+Eb);a.Y=a.W=k;g&&(a.N=g);h&&(a.H=h,a.U=m||"white");a.L=a.N.width/24|0;if(null==b)Fb(a,"Mouse over memory to dump");else for(Fb(a,ja(b,8,!0),null,0,1),k=1;16>=k;k++){d="";for(g=1;8>=g;g++)h=a.oa,m=b++,h=h.Y[(m&h.D)>>>h.B].Bd(m&h.C,m),Fb(a,ja(h,2),null,1),
|
||||
d+=32<=h&&128>h?String.fromCharCode(h):".";Fb(a,d,null,0,1)}a.context.drawImage(a.J,0,e,f,Bb,a.pa,a.ra,a.la,a.qa)}a.M=c}}}function Fb(a,b,c,d,e){a.H.font=a.Y;a.H.fillStyle=a.U;a.H.fillText(b,a.D,a.I);a.D+=a.L;null!=c&&(16!=a.ma?b=c.toString():(b=8>a.da?"0x":"",b+=ja(c,a.da)),a.H.fillText(b,a.D,a.I),a.D+=a.L);d&&(a.D+=a.L*d);e&&(a.D=a.ja,a.I+=(a.ba+2)*(e||1))}
|
||||
function vb(a,b,c){var d=wb/null.offsetWidth,e=xb/null.offsetHeight,f=null.getBoundingClientRect(),d=(b.clientX-f.left)*d|0;b=(b.clientY-f.top)*e|0;null==c&&(a.G||(a.G=Math.abs(a.A-d)>Math.abs(a.B-b)?1:2),1==a.G?b=a.B:2==a.G&&(d=a.A));a.A=d;a.B=b;if(0<=d&&d<wb&&0<=b&&b<xb){a:{c=d;if(c<yb&&a.F&&a.F.Th)for(f=0;f<a.F.Th.length;f++)if(e=a.F.Th[f],e.contains(c,b)){c-=e.x;b-=e.y;var f=a.F.No[f],g,d=zb.Tl;g=(a.F.Mo[f.To]&d.Ml)>>d.shift;d=g*a.oa.A;f=(g+f.Ro)*a.oa.A-1;0<b&&(d+=e.So*(b-1)*a.fa);d+=c*a.fa;d|=
|
||||
0;d>f&&(d=f);c=d;break a}c=-1}if(-1!==c&&(c&=-16,c!=a.M)){b=c;if(a.context&&a.J&&a.K){e=Ab-Bb;f=a.J.width;a.K.fillStyle=Cb;a.K.fillRect(0,e,f,Bb);d=e+Db;g=a.J;var h=a.K,k,m=null.style.color,r=a.ja=10;a.D=r;a.I=d;a.ba=a.aa=Db;k||(k=a.W||a.aa+"px "+Eb);a.X=a.W=k;g&&(a.N=g);h&&(a.H=h,a.U=m||"white");a.L=a.N.width/24|0;if(null==b)Fb(a,"Mouse over memory to dump");else for(Fb(a,ja(b,8,!0),null,0,1),k=1;16>=k;k++){d="";for(g=1;8>=g;g++)h=a.oa,m=b++,h=h.X[(m&h.D)>>>h.B].Bd(m&h.C,m),Fb(a,ja(h,2),null,1),
|
||||
d+=32<=h&&128>h?String.fromCharCode(h):".";Fb(a,d,null,0,1)}a.context.drawImage(a.J,0,e,f,Bb,a.pa,a.ra,a.la,a.qa)}a.M=c}}}function Fb(a,b,c,d,e){a.H.font=a.X;a.H.fillStyle=a.U;a.H.fillText(b,a.D,a.I);a.D+=a.L;null!=c&&(16!=a.ma?b=c.toString():(b=8>a.da?"0x":"",b+=ja(c,a.da)),a.H.fillText(b,a.D,a.I),a.D+=a.L);d&&(a.D+=a.L*d);e&&(a.D=a.ja,a.I+=(a.ba+2)*(e||1))}
|
||||
function ub(){for(var a=!1,b=cb(document,"pcx86","panel"),c=0;c<b.length;c++){var d=b[c],e=db(d),f=fb(e.id);f||(a=!0,f=new sb(e));bb(f,d);a&&v(f)}}var wb=1280,xb=720,Db=18,Eb="Monaco, Lucida Console, Courier New",yb=3*wb>>2,Ab=xb,Cb="black",Bb=xb>>1;Ma(ub);
|
||||
function Gb(a,b,c){u.call(this,"Bus",a);this.R=b;this.Ea=c;this.F=a.busWidth||20;this.N=Math.pow(2,this.F);this.W=this.D=this.N-1|0;this.B=32==this.F||20>=this.F?12:24>=this.F?14:15;this.A=1<<this.B;this.U=this.A>>2;this.C=this.A-1;this.H=this.N/this.A|0;this.K=this.H-1;this.I=[];this.J=[];this.L=[];this.M=[];a=new w;Hb(a,this.Ea);this.Y=Array(this.H);for(b=0;b<this.H;b++)this.Y[b]=a;a=this.R;b=this.Y;c=this.B;a.Nc=a.Y=b;a.Eb=c;a.Rh=1<<a.Eb;a.Db=a.Rh-1;a.jf=b.length;a.Ae=a.jf-1;a=this.R;a.Be=a.Dc=
|
||||
function Gb(a,b,c){u.call(this,"Bus",a);this.R=b;this.Ea=c;this.F=a.busWidth||20;this.N=Math.pow(2,this.F);this.W=this.D=this.N-1|0;this.B=32==this.F||20>=this.F?12:24>=this.F?14:15;this.A=1<<this.B;this.U=this.A>>2;this.C=this.A-1;this.H=this.N/this.A|0;this.K=this.H-1;this.I=[];this.J=[];this.L=[];this.M=[];a=new w;Hb(a,this.Ea);this.X=Array(this.H);for(b=0;b<this.H;b++)this.X[b]=a;a=this.R;b=this.X;c=this.B;a.Nc=a.X=b;a.Eb=c;a.Rh=1<<a.Eb;a.Db=a.Rh-1;a.jf=b.length;a.Ae=a.jf-1;a=this.R;a.Be=a.Dc=
|
||||
this.D;v(this)}ca(Gb,u);l=Gb.prototype;l.reset=function(){Ib(this,!0)};l.Rb=function(a,b){b||this.reset();return!0};
|
||||
function Jb(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.B;0<g&&h<a.Y.length;){var k=a.Y[h],m=h*a.A,r=a.A-(f-m);r>g&&(r=g);if(k&&k.size){if(k.type==d&&k.controller==e){if(f+g<=k.ee)return k.ye+=k.ee-f,k.ee=f,!0;if(f>=k.ee+k.ye){r=k.size-(f-m);r>g&&(r=g);k.ye=f-k.ee+r;f=m+a.A;g-=r;h++;continue}}return Kb(a,Lb,f,g)}f=new w(f,r,a.A,d,e);Hb(f,a.Ea,k);a.Y[h++]=f;f=m+a.A;g-=r}return 0>=g?(e=a.R,e.pa&-2147483648&&Mb(e),a.R.X.cb||(e=c/1024|0,a.status((e?e+"Kb ":c+" bytes ")+Nb[d]+" at "+ja(b))),!0):Kb(a,Pb,b,c)}
|
||||
function Ib(a,b){32==a.F?b?a.G&&(Qb(a,1048576,1048576,a.G),a.G=null):a.G||(a.G=Rb(a,1048576,1048576),Qb(a,1048576,1048576,Rb(a,0,1048576))):20<a.F&&(b=a.D&-1048577|(b?1048576:0),b!=a.D&&(a.D=b,a.R&&(a=a.R,a.Be=a.Dc=b)))}l.Yf=function(a,b,c,d){if(!(a&this.C||!b||b&this.C)){for(var e=a>>>this.B;0<b;){var f=this.Y[e];if(!f.controller)return Kb(this,Sb,a,b,d);Tb(f,c,!0);b-=this.A;e++}return!0}return Kb(this,Ub,a,b)};
|
||||
function Vb(a,b,c){if(!(b&a.C||!c||c&a.C)){for(var d=b>>>a.B;0<c;){var e=a.Y[d];b=new w(b);Hb(b,a.Ea,e);a.Y[d++]=b;b=d*a.A;c-=a.A}a=a.R;a.pa&-2147483648&&Mb(a);return!0}return Kb(a,Wb,b,c)}function Rb(a,b,c){var d=[];for(b>>>=a.B;0<c&&b<a.Y.length;)d.push(a.Y[b++]),c-=a.A;return d}
|
||||
function Qb(a,b,c,d,e){for(var f=0,g=b>>>a.B;0<c&&g<a.Y.length;){var h=d[f++];if(!h)break;if(void 0!==e){var k=new w(b),m=k,r=e,y=a.Ea;m.id=h.id|1;m.ye=h.ye;m.size=h.size;r&&(m.type=r,m.H=r==Xb);pb?(m.L=h.L,m.K=h.K,m.Ha=h.Ha,m.ud=h.ud,m.S=h.S,Tb(m,Yb?Zb:$b)):(m.S=h.S,Tb(m,ac));Hb(m,y,h);h=k}a.Y[g++]=h;c-=a.A}}l.Ia=function(a){return this.Y[(a&this.D)>>>this.B].oc(a&this.C,a)};function bc(a,b){var c=b&a.C,d=(b&a.D)>>>a.B;return c!=a.C?a.Y[d].af(c,b):a.Y[d++].Bd(c,b)|a.Y[d&a.K].Bd(0,b+1)<<8}
|
||||
l.Bb=function(a,b){this.Y[(a&this.D)>>>this.B].pc(a&this.C,b&255,a)};function cc(a,b,c){var d=b&a.C,e=(b&a.D)>>>a.B;d!=a.C?a.Y[e].qh(d,c&65535,b):(a.Y[e++].ef(d,c&255,b),a.Y[e&a.K].ef(0,c>>8&255,b+1))}
|
||||
function dc(a,b){var c=0,d=[],e=!a.G&&a.W==a.D;e||Ib(a,!0);for(var f=0;f<a.H;f++){var g=a.Y[f];if(b&&g.type!=Xb||g.Fa||g.hi){d[c++]=f;var h=c++;if(g=g.save()){for(var k=0,m=0,r=[];k<g.length;){for(var y=g[k],t=k+1;t<g.length&&g[t]===y;)t++;r[m++]=t-k;r[m++]=y;k=t}r.length<g.length&&(g=r)}d[h]=g}}e||Ib(a,!1);d[c]=e;return d}
|
||||
function Jb(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.B;0<g&&h<a.X.length;){var k=a.X[h],m=h*a.A,r=a.A-(f-m);r>g&&(r=g);if(k&&k.size){if(k.type==d&&k.controller==e){if(f+g<=k.ee)return k.ye+=k.ee-f,k.ee=f,!0;if(f>=k.ee+k.ye){r=k.size-(f-m);r>g&&(r=g);k.ye=f-k.ee+r;f=m+a.A;g-=r;h++;continue}}return Kb(a,Lb,f,g)}f=new w(f,r,a.A,d,e);Hb(f,a.Ea,k);a.X[h++]=f;f=m+a.A;g-=r}return 0>=g?(e=a.R,e.pa&-2147483648&&Mb(e),a.R.Y.cb||(e=c/1024|0,a.status((e?e+"Kb ":c+" bytes ")+Nb[d]+" at "+ja(b))),!0):Kb(a,Ob,b,c)}
|
||||
function Ib(a,b){32==a.F?b?a.G&&(Qb(a,1048576,1048576,a.G),a.G=null):a.G||(a.G=Rb(a,1048576,1048576),Qb(a,1048576,1048576,Rb(a,0,1048576))):20<a.F&&(b=a.D&-1048577|(b?1048576:0),b!=a.D&&(a.D=b,a.R&&(a=a.R,a.Be=a.Dc=b)))}l.Yf=function(a,b,c,d){if(!(a&this.C||!b||b&this.C)){for(var e=a>>>this.B;0<b;){var f=this.X[e];if(!f.controller)return Kb(this,Sb,a,b,d);Tb(f,c,!0);b-=this.A;e++}return!0}return Kb(this,Ub,a,b)};
|
||||
function Vb(a,b,c){if(!(b&a.C||!c||c&a.C)){for(var d=b>>>a.B;0<c;){var e=a.X[d];b=new w(b);Hb(b,a.Ea,e);a.X[d++]=b;b=d*a.A;c-=a.A}a=a.R;a.pa&-2147483648&&Mb(a);return!0}return Kb(a,Wb,b,c)}function Rb(a,b,c){var d=[];for(b>>>=a.B;0<c&&b<a.X.length;)d.push(a.X[b++]),c-=a.A;return d}
|
||||
function Qb(a,b,c,d,e){for(var f=0,g=b>>>a.B;0<c&&g<a.X.length;){var h=d[f++];if(!h)break;if(void 0!==e){var k=new w(b),m=k,r=e,y=a.Ea;m.id=h.id|1;m.ye=h.ye;m.size=h.size;r&&(m.type=r,m.H=r==Xb);pb?(m.L=h.L,m.K=h.K,m.Ha=h.Ha,m.ud=h.ud,m.S=h.S,Tb(m,Yb?Zb:$b)):(m.S=h.S,Tb(m,ac));Hb(m,y,h);h=k}a.X[g++]=h;c-=a.A}}l.Ia=function(a){return this.X[(a&this.D)>>>this.B].oc(a&this.C,a)};function bc(a,b){var c=b&a.C,d=(b&a.D)>>>a.B;return c!=a.C?a.X[d].af(c,b):a.X[d++].Bd(c,b)|a.X[d&a.K].Bd(0,b+1)<<8}
|
||||
l.Bb=function(a,b){this.X[(a&this.D)>>>this.B].pc(a&this.C,b&255,a)};function cc(a,b,c){var d=b&a.C,e=(b&a.D)>>>a.B;d!=a.C?a.X[e].qh(d,c&65535,b):(a.X[e++].ef(d,c&255,b),a.X[e&a.K].ef(0,c>>8&255,b+1))}
|
||||
function dc(a,b){var c=0,d=[],e=!a.G&&a.W==a.D;e||Ib(a,!0);for(var f=0;f<a.H;f++){var g=a.X[f];if(b&&g.type!=Xb||g.Fa||g.hi){d[c++]=f;var h=c++;if(g=g.save()){for(var k=0,m=0,r=[];k<g.length;){for(var y=g[k],t=k+1;t<g.length&&g[t]===y;)t++;r[m++]=t-k;r[m++]=y;k=t}r.length<g.length&&(g=r)}d[h]=g}}e||Ib(a,!1);d[c]=e;return d}
|
||||
function ec(a,b,c,d){void 0===d&&(d=0);for(var e in c){var f=a,g=+e+d,h=c[e].bind(b);if(h)for(var k=+e+d;k<=g;k++)void 0!==f.I[k]?q("Input port "+ja(k,4,!0)+" already registered"):f.I[k]=[h,!1]}}function fc(a,b,c,d){for(var e=0,f=0;0<c;){var g=a.I[b],h=a.L[b]||1,k=1==h?255:2==h?65535:-1,m=k;void 0!==g&&g[0]&&(m=g[0](b,d),null==m?m=k:m&=k);e|=m<<f;f+=h<<3;b+=h;c-=h}return e}
|
||||
function gc(a,b,c,d){void 0===d&&(d=0);for(var e in c){var f=a,g=+e+d,h=c[e].bind(b);if(h)for(var k=+e+d;k<=g;k++)void 0!==f.J[k]?q("Output port "+ja(k,4,!0)+" already registered"):f.J[k]=[h,!1]}}function hc(a,b,c,d,e){for(var f=0;0<c;){var g=a.J[b],h=a.M[b]||1,k=1==h?255:2==h?65535:-1,k=(d>>>=f)&k;if(void 0!==g&&g[0])g[0](b,k,e);f+=h<<3;b+=h;c-=h}}function Kb(a,b,c,d,e){b="Memory block error ("+b+": "+ja(c)+","+ja(d)+")";e?a.Ea?a.Ea.message(b):a.log(b):q(b);return!1}
|
||||
var zb,ic={Pl:20,count:8,Go:1,type:3},jc=0,kc;for(kc in ic){var lc=ic[kc];ic[kc]={Il:(1<<lc)-1<<jc,shift:jc};jc+=lc}zb=ic;var Lb=1,Pb=2,Sb=3,Ub=4,Wb=5,mc;if(pb){var nc=new ArrayBuffer(2);(new DataView(nc)).setUint16(0,256,!0);mc=256===(new Uint16Array(nc))[0]}else mc=!1;var Yb=mc;
|
||||
var zb,ic={Tl:20,count:8,Oo:1,type:3},jc=0,kc;for(kc in ic){var lc=ic[kc];ic[kc]={Ml:(1<<lc)-1<<jc,shift:jc};jc+=lc}zb=ic;var Lb=1,Ob=2,Sb=3,Ub=4,Wb=5,mc;if(pb){var nc=new ArrayBuffer(2);(new DataView(nc)).setUint16(0,256,!0);mc=256===(new Uint16Array(nc))[0]}else mc=!1;var Yb=mc;
|
||||
function w(a,b,c,d,e,f){this.id=oc+=2;this.S=null;this.G=0;this.ee=a;this.ye=b;this.size=c||0;this.type=d||pc;this.H=d==Xb;this.controller=null;this.F=f;Hb(this);this.Fa=this.hi=!1;if(c)if(e)this.controller=e,a=e.mi(a),this.S=a[0],this.G=a[1],Tb(this,e.lg());else if(pb)this.L=new ArrayBuffer(c),this.K=new DataView(this.L,0,c),this.Ha=new Uint8Array(this.L,0,c),this.ud=new Uint16Array(this.L,0,c>>1),this.S=new Int32Array(this.L,0,c>>2),Tb(this,Yb?Zb:$b);else{this.S=Array(c>>2);for(e=0;e<this.S.length;e++)this.S[e]=
|
||||
0;Tb(this,ac)}else Tb(this)}l=w.prototype;l.yl=function(a){this.ee=a};l.save=function(){var a,b;if(this.controller)a=null;else if(pb)for(a=Array(this.size>>2),b=0;b<a.length;b++)a[b]=this.K.getInt32(b<<2,!0);else a=this.S;return a};l.restore=function(a){if(this.controller)return!a;if(a&&this.size==a.length<<2){var b;if(pb)for(b=0;b<a.length;b++)this.K.setInt32(b<<2,a[b],!0);else this.S=a;return this.Fa=!0}return!1};function Tb(a,b,c){b||(b=a.type==qc?sc:a.type==tc?uc:vc);wc(a,b,c);xc(a,b,c)}
|
||||
0;Tb(this,ac)}else Tb(this)}l=w.prototype;l.Cl=function(a){this.ee=a};l.save=function(){var a,b;if(this.controller)a=null;else if(pb)for(a=Array(this.size>>2),b=0;b<a.length;b++)a[b]=this.K.getInt32(b<<2,!0);else a=this.S;return a};l.restore=function(a){if(this.controller)return!a;if(a&&this.size==a.length<<2){var b;if(pb)for(b=0;b<a.length;b++)this.K.setInt32(b<<2,a[b],!0);else this.S=a;return this.Fa=!0}return!1};function Tb(a,b,c){b||(b=a.type==qc?rc:a.type==tc?uc:vc);wc(a,b,c);xc(a,b,c)}
|
||||
function wc(a,b,c){c&&a.fe||(a.oc=b[0]||a.Hj,a.$e=b[2]||a.Ij,a.Rd=b[4]||a.Fj);if(c||void 0===c)a.Bd=b[0]||a.Hj,a.af=b[2]||a.Ij,a.hh=b[4]||a.Fj}function xc(a,b,c){c&&a.ge||(a.pc=!a.H&&b[1]||a.oh,a.gf=!a.H&&b[3]||a.ph,a.ff=!a.H&&b[5]||a.nh);if(c||void 0===c)a.ef=b[1]||a.oh,a.qh=b[3]||a.ph,a.R=b[5]||a.nh}function Hb(a,b,c){a.Ea=b;a.fe=a.ge=0;c&&(c.F&&(a.F=c.F),(a.fe=c.fe)&&wc(a,yc,!1),(a.ge=c.ge)&&xc(a,yc,!1))}l.Hj=function(){return 255};l.oh=function(){};
|
||||
l.Ij=function(a,b){return this.oc(a++,b++)|this.oc(a,b)<<8};l.Fj=function(a,b){return this.oc(a++,b++)|this.oc(a++,b++)<<8|this.oc(a++,b++)<<16|this.oc(a,b)<<24};l.ph=function(a,b,c){this.pc(a++,b&255,c++);this.pc(a,b>>8,c)};l.nh=function(a,b,c){this.pc(a++,b&255,c++);this.pc(a++,b>>8&255,c++);this.pc(a++,b>>16&255,c++);this.pc(a,b>>>24,c)};l.Um=function(a){return this.S[a>>2]>>>((a&3)<<3)&255};
|
||||
l.fn=function(a){var b=a>>2;a=(a&3)<<3;var c=this.S[b]>>a;return 24>a?c&65535:c&255|(this.S[b+1]&255)<<8};l.$m=function(a){var b=a>>2;a=(a&3)<<3;var c=this.S[b];a&&(c=c>>>a|this.S[b+1]<<32-a);return c};l.vn=function(a,b){var c=a>>2;a=(a&3)<<3;this.S[c]=this.S[c]&~(255<<a)|b<<a;this.Fa=!0};l.Hn=function(a,b){var c=a>>2;a=(a&3)<<3;24>a?this.S[c]=this.S[c]&~(65535<<a)|b<<a:(this.S[c]=this.S[c]&16777215|b<<24,c++,this.S[c]=this.S[c]&-256|b>>8);this.Fa=!0};
|
||||
l.Bn=function(a,b){var c=a>>2;if(a=(a&3)<<3){var d=-1<<a;this.S[c]=this.S[c]&~d|b<<a;c++;this.S[c]=this.S[c]&d|b>>>32-a}else this.S[c]=b;this.Fa=!0};l.Tm=function(a,b){this.F&&zc(this.F,b,1,!1);return this.Bd(a,b)};l.en=function(a,b){this.F&&zc(this.F,b,2,!1);return this.af(a,b)};l.Zm=function(a,b){this.F&&zc(this.F,b,4,!1);return this.hh(a,b)};l.un=function(a,b,c){this.F&&zc(this.F,c,1,!0);this.H||this.ef(a,b,c)};l.Gn=function(a,b,c){this.F&&zc(this.F,c,2,!0);this.H||this.qh(a,b,c)};
|
||||
l.An=function(a,b,c){this.F&&zc(this.F,c,4,!0);this.H||this.R(a,b,c)};l.Wm=function(a,b){this.A.S[this.C]|=this.I;this.B.S[this.D]|=this.I;return this.J.oc(a,b)};l.hn=function(a,b){this.A.S[this.C]|=this.I;this.B.S[this.D]|=this.I;return this.J.$e(a,b)};l.bn=function(a,b){this.A.S[this.C]|=this.I;this.B.S[this.D]|=this.I;return this.J.Rd(a,b)};l.xn=function(a,b,c){this.A.S[this.C]|=this.I;this.B.S[this.D]|=this.M;this.J.pc(a,b,c)};
|
||||
l.Jn=function(a,b,c){this.A.S[this.C]|=this.I;this.B.S[this.D]|=this.M;this.J.gf(a,b,c)};l.Dn=function(a,b,c){this.A.S[this.C]|=this.I;this.B.S[this.D]|=this.M;this.J.ff(a,b,c)};l.Xm=function(a,b){return Ac(this.F,b,!1).oc(a,b)};l.jn=function(a,b){return Ac(this.F,b,!1).$e(a,b)};l.cn=function(a,b){return Ac(this.F,b,!1).Rd(a,b)};l.yn=function(a,b,c){Ac(this.F,c,!0).pc(a,b,c)};l.Kn=function(a,b,c){Ac(this.F,c,!0).gf(a,b,c)};l.En=function(a,b,c){Ac(this.F,c,!0).ff(a,b,c)};l.Sm=function(a){return this.Ha[a]};
|
||||
l.Ej=function(a){return this.Ha[a]};l.Vm=function(a){this.A.S[this.C]|=32;this.B.S[this.D]|=32;this.oc=this.Ej;return this.Ha[a]};l.dn=function(a){return this.K.getUint16(a,!0)};l.Jj=function(a){return a&1?this.Ha[a]|this.Ha[a+1]<<8:this.ud[a>>1]};l.gn=function(a){this.A.S[this.C]|=32;this.B.S[this.D]|=32;this.$e=this.Jj;return a&1?this.Ha[a]|this.Ha[a+1]<<8:this.ud[a>>1]};l.Ym=function(a){return this.K.getInt32(a,!0)};
|
||||
l.Gj=function(a){return a&3?this.Ha[a]|this.Ha[a+1]<<8|this.Ha[a+2]<<16|this.Ha[a+3]<<24:this.S[a>>2]};l.an=function(a){this.A.S[this.C]|=32;this.B.S[this.D]|=32;this.Rd=this.Gj;return a&3?this.Ha[a]|this.Ha[a+1]<<8|this.Ha[a+2]<<16|this.Ha[a+3]<<24:this.S[a>>2]};l.tn=function(a,b){this.Ha[a]=b;this.Fa=!0};l.Qj=function(a,b){this.Ha[a]=b;this.Fa=!0};l.wn=function(a,b){this.Ha[a]=b;this.A.S[this.C]|=32;this.B.S[this.D]|=96;this.pc=this.Qj;this.J.Fa=!0};
|
||||
l.Fn=function(a,b){this.K.setUint16(a,b,!0);this.Fa=!0};l.Sj=function(a,b){a&1?(this.Ha[a]=b,this.Ha[a+1]=b>>8):this.ud[a>>1]=b;this.Fa=!0};l.In=function(a,b){a&1?(this.Ha[a]=b,this.Ha[a+1]=b>>8):this.ud[a>>1]=b;this.A.S[this.C]|=32;this.B.S[this.D]|=96;this.gf=this.Sj;this.J.Fa=!0};l.zn=function(a,b){this.K.setInt32(a,b,!0);this.Fa=!0};l.Rj=function(a,b){a&3?(this.Ha[a]=b,this.Ha[a+1]=b>>8,this.Ha[a+2]=b>>16,this.Ha[a+3]=b>>24):this.S[a>>2]=b;this.Fa=!0};
|
||||
l.Cn=function(a,b){a&3?(this.Ha[a]=b,this.Ha[a+1]=b>>8,this.Ha[a+2]=b>>16,this.Ha[a+3]=b>>24):this.S[a>>2]=b;this.A.S[this.C]|=32;this.B.S[this.D]|=96;this.ff=this.Rj;this.J.Fa=!0};function Bc(a){pb&&!Yb&&(a=a<<24|a<<8&16711680|a>>8&65280|a>>>24);return a}
|
||||
var pc=0,Xb=2,qc=5,tc=6,Nb="NONE RAM ROM VIDEO H/W UNPAGED PAGED".split(" "),oc=0,vc=[],ac=[w.prototype.Um,w.prototype.vn,w.prototype.fn,w.prototype.Hn,w.prototype.$m,w.prototype.Bn],yc=[w.prototype.Tm,w.prototype.un,w.prototype.en,w.prototype.Gn,w.prototype.Zm,w.prototype.An],uc=[w.prototype.Wm,w.prototype.xn,w.prototype.hn,w.prototype.Jn,w.prototype.bn,w.prototype.Dn],sc=[w.prototype.Xm,w.prototype.yn,w.prototype.jn,w.prototype.Kn,w.prototype.cn,w.prototype.En];
|
||||
if(pb)var $b=[w.prototype.Sm,w.prototype.tn,w.prototype.dn,w.prototype.Fn,w.prototype.Ym,w.prototype.zn],Zb=[w.prototype.Ej,w.prototype.Qj,w.prototype.Jj,w.prototype.Sj,w.prototype.Gj,w.prototype.Rj],Cc=[w.prototype.Vm,w.prototype.wn,w.prototype.gn,w.prototype.In,w.prototype.an,w.prototype.Cn];
|
||||
function Dc(a,b){u.call(this,"CPU",a);b=a.cycles||b;var c=a.multiplier||1;this.V={};this.V.yd=b;this.V.zi=this.V.sg=this.V.md=c;this.V.Gf=Math.round(this.V.yd/1E4)/100;this.V.hd=this.V.re=this.V.Gf*this.V.md;this.X.Pj=this.X.cb=this.X.Zf=!1;this.X.Gd=a.autoStart;this.X.ei=!1;this.X.zf=!1;this.V.Hf=this.V.se=0;this.V.If=a.csStart;this.V.Me=a.csInterval;this.V.Ne=a.csStop;this.qa=[];this.pi=this.kn.bind(this)}ca(Dc,u);l=Dc.prototype;
|
||||
l.kc=function(a,b,c,d){this.na=a;this.oa=b;this.Ea=d;for(b=0;b<Ec.length;b++)(d=this.ia[Ec[b]])&&this.na.Ab(null,Ec[b],d);this.qd=tb(a,"FPU");this.U=tb(a,"ChipSet");a=Fc(a,"autoStart");null!=a&&(this.X.Gd="true"==a?!0:"false"==a?!1:!!a);Gc(c,this.id,function(){c.X.Zf=!0},1E3/Hc);v(this)};l.reset=function(){};l.save=function(){return null};l.restore=function(){return!1};
|
||||
l.Rb=function(a,b){if(!b){if(a&&this.restore){Ic(this);if(!this.restore(a))return!1;Jc(this)}else this.reset();this.qb("No debugger detected")}Lc(this);return!0};l.Qb=function(a,b){var c=this.X.cb;b&&Mc(this);return a?this.save(c):!0};l.Gd=function(){return this.X.cb?!0:this.X.Gd||void 0===this.ia.run?Nc(this):!1};l.li=function(){return 0};
|
||||
function Jc(a){void 0===a.V.If&&(a.V.If=0);void 0===a.V.Me&&(a.V.Me=-1);void 0===a.V.Ne&&(a.V.Ne=-1);a.X.zf=0<=a.V.If&&0<a.V.Me;a.X.zf&&(a.V.Hf=0,a.V.se=a.V.If-a.Ic)}
|
||||
l.Ab=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.ia[b]=c;a=!0;break;case "run":this.ia[b]=c;c.onclick=function(){var a=d.X.cb,b;if(b=d.na)if(b=d.na,b.X.Yd&&(b.X.Yd=!1,b.X.Ke&&!b.X.Sb&&b.ue(Oc)),b.X.Sb)b=!0;else{var c=null,h,k=eb(b.id);for(h=0;h<k.length&&(c=k[h],c===b||c.X.ready);h++);if(h==k.length)for(h=0;h<k.length&&(c=k[h],c===b||c.X.Sb);h++);h==k.length&&(c=b);q("The "+c.type+" component ("+c.id+") is not "+(c.X.ready?"powered yet":"ready yet"+(c.Df?" (waiting for notification)":
|
||||
""))+".");b=!1}b&&a==d.X.cb&&(d.X.cb?Mc(d,!0):Nc(d,!0))};a=!0;break;case "speed":this.ia[b]=c;a=!0;break;case "setSpeed":this.ia[b]=c,c.onclick=function(){Pc(d,d.V.md<<1,!0)},c.textContent=this.V.re.toFixed(2)+"Mhz",a=!0}return a};function Qc(a,b){a.X.cb&&(b=a.A-b,a.A-=b,a.dd-=b)}function Rc(a){var b=a.V.hd/a.V.Gf;if(!b||b>a.V.md)b=a.V.md;a.V.yi=Math.round(1E3/Hc);a.V.Ml=Math.floor(a.V.yd/Hc*b);a.V.sg=b}
|
||||
l.Ij=function(a,b){return this.oc(a++,b++)|this.oc(a,b)<<8};l.Fj=function(a,b){return this.oc(a++,b++)|this.oc(a++,b++)<<8|this.oc(a++,b++)<<16|this.oc(a,b)<<24};l.ph=function(a,b,c){this.pc(a++,b&255,c++);this.pc(a,b>>8,c)};l.nh=function(a,b,c){this.pc(a++,b&255,c++);this.pc(a++,b>>8&255,c++);this.pc(a++,b>>16&255,c++);this.pc(a,b>>>24,c)};l.bn=function(a){return this.S[a>>2]>>>((a&3)<<3)&255};
|
||||
l.on=function(a){var b=a>>2;a=(a&3)<<3;var c=this.S[b]>>a;return 24>a?c&65535:c&255|(this.S[b+1]&255)<<8};l.hn=function(a){var b=a>>2;a=(a&3)<<3;var c=this.S[b];a&&(c=c>>>a|this.S[b+1]<<32-a);return c};l.Dn=function(a,b){var c=a>>2;a=(a&3)<<3;this.S[c]=this.S[c]&~(255<<a)|b<<a;this.Fa=!0};l.Pn=function(a,b){var c=a>>2;a=(a&3)<<3;24>a?this.S[c]=this.S[c]&~(65535<<a)|b<<a:(this.S[c]=this.S[c]&16777215|b<<24,c++,this.S[c]=this.S[c]&-256|b>>8);this.Fa=!0};
|
||||
l.Jn=function(a,b){var c=a>>2;if(a=(a&3)<<3){var d=-1<<a;this.S[c]=this.S[c]&~d|b<<a;c++;this.S[c]=this.S[c]&d|b>>>32-a}else this.S[c]=b;this.Fa=!0};l.an=function(a,b){this.F&&zc(this.F,b,1,!1);return this.Bd(a,b)};l.nn=function(a,b){this.F&&zc(this.F,b,2,!1);return this.af(a,b)};l.gn=function(a,b){this.F&&zc(this.F,b,4,!1);return this.hh(a,b)};l.Cn=function(a,b,c){this.F&&zc(this.F,c,1,!0);this.H||this.ef(a,b,c)};l.On=function(a,b,c){this.F&&zc(this.F,c,2,!0);this.H||this.qh(a,b,c)};
|
||||
l.In=function(a,b,c){this.F&&zc(this.F,c,4,!0);this.H||this.R(a,b,c)};l.dn=function(a,b){this.A.S[this.C]|=this.I;this.B.S[this.D]|=this.I;return this.J.oc(a,b)};l.qn=function(a,b){this.A.S[this.C]|=this.I;this.B.S[this.D]|=this.I;return this.J.$e(a,b)};l.kn=function(a,b){this.A.S[this.C]|=this.I;this.B.S[this.D]|=this.I;return this.J.Rd(a,b)};l.Fn=function(a,b,c){this.A.S[this.C]|=this.I;this.B.S[this.D]|=this.M;this.J.pc(a,b,c)};
|
||||
l.Rn=function(a,b,c){this.A.S[this.C]|=this.I;this.B.S[this.D]|=this.M;this.J.gf(a,b,c)};l.Ln=function(a,b,c){this.A.S[this.C]|=this.I;this.B.S[this.D]|=this.M;this.J.ff(a,b,c)};l.en=function(a,b){return Ac(this.F,b,!1).oc(a,b)};l.rn=function(a,b){return Ac(this.F,b,!1).$e(a,b)};l.ln=function(a,b){return Ac(this.F,b,!1).Rd(a,b)};l.Gn=function(a,b,c){Ac(this.F,c,!0).pc(a,b,c)};l.Sn=function(a,b,c){Ac(this.F,c,!0).gf(a,b,c)};l.Mn=function(a,b,c){Ac(this.F,c,!0).ff(a,b,c)};l.$m=function(a){return this.Ha[a]};
|
||||
l.Ej=function(a){return this.Ha[a]};l.cn=function(a){this.A.S[this.C]|=32;this.B.S[this.D]|=32;this.oc=this.Ej;return this.Ha[a]};l.mn=function(a){return this.K.getUint16(a,!0)};l.Jj=function(a){return a&1?this.Ha[a]|this.Ha[a+1]<<8:this.ud[a>>1]};l.pn=function(a){this.A.S[this.C]|=32;this.B.S[this.D]|=32;this.$e=this.Jj;return a&1?this.Ha[a]|this.Ha[a+1]<<8:this.ud[a>>1]};l.fn=function(a){return this.K.getInt32(a,!0)};
|
||||
l.Gj=function(a){return a&3?this.Ha[a]|this.Ha[a+1]<<8|this.Ha[a+2]<<16|this.Ha[a+3]<<24:this.S[a>>2]};l.jn=function(a){this.A.S[this.C]|=32;this.B.S[this.D]|=32;this.Rd=this.Gj;return a&3?this.Ha[a]|this.Ha[a+1]<<8|this.Ha[a+2]<<16|this.Ha[a+3]<<24:this.S[a>>2]};l.Bn=function(a,b){this.Ha[a]=b;this.Fa=!0};l.Qj=function(a,b){this.Ha[a]=b;this.Fa=!0};l.En=function(a,b){this.Ha[a]=b;this.A.S[this.C]|=32;this.B.S[this.D]|=96;this.pc=this.Qj;this.J.Fa=!0};
|
||||
l.Nn=function(a,b){this.K.setUint16(a,b,!0);this.Fa=!0};l.Sj=function(a,b){a&1?(this.Ha[a]=b,this.Ha[a+1]=b>>8):this.ud[a>>1]=b;this.Fa=!0};l.Qn=function(a,b){a&1?(this.Ha[a]=b,this.Ha[a+1]=b>>8):this.ud[a>>1]=b;this.A.S[this.C]|=32;this.B.S[this.D]|=96;this.gf=this.Sj;this.J.Fa=!0};l.Hn=function(a,b){this.K.setInt32(a,b,!0);this.Fa=!0};l.Rj=function(a,b){a&3?(this.Ha[a]=b,this.Ha[a+1]=b>>8,this.Ha[a+2]=b>>16,this.Ha[a+3]=b>>24):this.S[a>>2]=b;this.Fa=!0};
|
||||
l.Kn=function(a,b){a&3?(this.Ha[a]=b,this.Ha[a+1]=b>>8,this.Ha[a+2]=b>>16,this.Ha[a+3]=b>>24):this.S[a>>2]=b;this.A.S[this.C]|=32;this.B.S[this.D]|=96;this.ff=this.Rj;this.J.Fa=!0};function Bc(a){pb&&!Yb&&(a=a<<24|a<<8&16711680|a>>8&65280|a>>>24);return a}
|
||||
var pc=0,Xb=2,qc=5,tc=6,Nb="NONE RAM ROM VIDEO H/W UNPAGED PAGED".split(" "),oc=0,vc=[],ac=[w.prototype.bn,w.prototype.Dn,w.prototype.on,w.prototype.Pn,w.prototype.hn,w.prototype.Jn],yc=[w.prototype.an,w.prototype.Cn,w.prototype.nn,w.prototype.On,w.prototype.gn,w.prototype.In],uc=[w.prototype.dn,w.prototype.Fn,w.prototype.qn,w.prototype.Rn,w.prototype.kn,w.prototype.Ln],rc=[w.prototype.en,w.prototype.Gn,w.prototype.rn,w.prototype.Sn,w.prototype.ln,w.prototype.Mn];
|
||||
if(pb)var $b=[w.prototype.$m,w.prototype.Bn,w.prototype.mn,w.prototype.Nn,w.prototype.fn,w.prototype.Hn],Zb=[w.prototype.Ej,w.prototype.Qj,w.prototype.Jj,w.prototype.Sj,w.prototype.Gj,w.prototype.Rj],Cc=[w.prototype.cn,w.prototype.En,w.prototype.pn,w.prototype.Qn,w.prototype.jn,w.prototype.Kn];
|
||||
function Dc(a,b){u.call(this,"CPU",a);b=a.cycles||b;var c=a.multiplier||1;this.V={};this.V.yd=b;this.V.zi=this.V.sg=this.V.md=c;this.V.Gf=Math.round(this.V.yd/1E4)/100;this.V.hd=this.V.re=this.V.Gf*this.V.md;this.Y.Pj=this.Y.cb=this.Y.Zf=!1;this.Y.Gd=a.autoStart;this.Y.ei=!1;this.Y.zf=!1;this.V.Hf=this.V.se=0;this.V.If=a.csStart;this.V.Me=a.csInterval;this.V.Ne=a.csStop;this.qa=[];this.pi=this.sn.bind(this)}ca(Dc,u);l=Dc.prototype;
|
||||
l.kc=function(a,b,c,d){this.na=a;this.oa=b;this.Ea=d;for(b=0;b<Ec.length;b++)(d=this.ia[Ec[b]])&&this.na.Ab(null,Ec[b],d);this.qd=tb(a,"FPU");this.U=tb(a,"ChipSet");a=Fc(a,"autoStart");null!=a&&(this.Y.Gd="true"==a?!0:"false"==a?!1:!!a);Gc(c,this.id,function(){c.Y.Zf=!0},1E3/Hc);v(this)};l.reset=function(){};l.save=function(){return null};l.restore=function(){return!1};
|
||||
l.Rb=function(a,b){if(!b){if(a&&this.restore){Ic(this);if(!this.restore(a))return!1;Jc(this)}else this.reset();this.qb("No debugger detected")}Kc(this);return!0};l.Qb=function(a,b){var c=this.Y.cb;b&&Mc(this);return a?this.save(c):!0};l.Gd=function(){return this.Y.cb?!0:this.Y.Gd||void 0===this.ia.run?Nc(this):!1};l.li=function(){return 0};
|
||||
function Jc(a){void 0===a.V.If&&(a.V.If=0);void 0===a.V.Me&&(a.V.Me=-1);void 0===a.V.Ne&&(a.V.Ne=-1);a.Y.zf=0<=a.V.If&&0<a.V.Me;a.Y.zf&&(a.V.Hf=0,a.V.se=a.V.If-a.Ic)}
|
||||
l.Ab=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.ia[b]=c;a=!0;break;case "run":this.ia[b]=c;c.onclick=function(){var a=d.Y.cb,b;if(b=d.na)if(b=d.na,b.Y.Yd&&(b.Y.Yd=!1,b.Y.Ke&&!b.Y.Sb&&b.ue(Oc)),b.Y.Sb)b=!0;else{var c=null,h,k=eb(b.id);for(h=0;h<k.length&&(c=k[h],c===b||c.Y.ready);h++);if(h==k.length)for(h=0;h<k.length&&(c=k[h],c===b||c.Y.Sb);h++);h==k.length&&(c=b);q("The "+c.type+" component ("+c.id+") is not "+(c.Y.ready?"powered yet":"ready yet"+(c.Df?" (waiting for notification)":
|
||||
""))+".");b=!1}b&&a==d.Y.cb&&(d.Y.cb?Mc(d,!0):Nc(d,!0))};a=!0;break;case "speed":this.ia[b]=c;a=!0;break;case "setSpeed":this.ia[b]=c,c.onclick=function(){Pc(d,d.V.md<<1,!0)},c.textContent=this.V.re.toFixed(2)+"Mhz",a=!0}return a};function Qc(a,b){a.Y.cb&&(b=a.A-b,a.A-=b,a.dd-=b)}function Rc(a){var b=a.V.hd/a.V.Gf;if(!b||b>a.V.md)b=a.V.md;a.V.yi=Math.round(1E3/Hc);a.V.Ql=Math.floor(a.V.yd/Hc*b);a.V.sg=b}
|
||||
function Sc(a,b){var c=a.Ic+a.Sc+a.dd-a.A;b&&1<a.V.md&&a.V.hd>a.V.Gf&&(c=Math.round(c/a.V.md));return c}function Ic(a){a.Ic=a.Sc=a.dd=a.A=0;Jc(a);Pc(a,a.V.zi)}
|
||||
function Pc(a,b,c){if(void 0!==b){0<a.V.hd&&a.V.hd<.9*a.V.re&&(b=a.V.zi);a.V.hd=0;a.V.md=b;b=a.V.Gf*a.V.md;if(a.V.re!=b){a.V.re=b;b=a.V.re.toFixed(2)+"Mhz";var d=a.ia.setSpeed;d&&(d.textContent=b);a.qb("target speed: "+b)}c&&a.na&&Tc(a.na)}a.Ic+=a.Sc;a.Sc=0;a.V.Zc=a.V.Od=0;Rc(a);for(c=a.qa.length-1;0<=c;c--)b=a.qa[c],0<=b[2]&&Uc(a,c,b[2],!0)}function Gc(a,b,c,d){d=void 0===d?-1:d;var e=a.qa.length;a.qa.push([b,-1,d,c]);0<=d&&Uc(a,e,d);return e}
|
||||
function Uc(a,b,c,d){0<=b&&b<a.qa.length&&(b=a.qa[b],d||0>b[1])&&(c=a.V.yd*a.V.sg/1E3*c|0,a.X.cb&&(c+=Vc(a)),b[1]=c)}function Wc(a){for(var b=[],c=0;c<a.qa.length;c++){var d=a.qa[c];b.push([d[0],d[1],d[2]])}return b}function Vc(a){var b=a.dd-a.A;a.dd=a.A=0;a.V.Jf+=b;a.Sc+=b;return b}
|
||||
l.kn=function(){if(this.X.cb){Rc(this);this.V.Jf=0;this.V.Le=va();this.V.Zc||(this.V.Zc=this.V.Le);if(this.V.Od){var a=this.V.Le-this.V.Od;a>this.V.yi&&(this.V.Zc+=a,this.V.Zc>this.V.Le&&(this.V.Zc=this.V.Le))}try{this.X.Zf=!1;do{for(var b,c=this.X.zf?1:this.V.yd*this.V.sg|0,d=this.qa.length-1;0<=d;d--){var e=this.qa[d];0>e[1]||c>e[1]&&(c=e[1])}b=c;if(this.U){Xc(this.U);var f=this.U,a=b,g=f.qa[0];if(g.Ld){var h=(Sc(f.R,f.M)-g.jd)/f.Ba|0,k=Yc(f,0)-h;g.mode==Zc&&(k-=h);var m=k*f.Ba|0;g.mode==Zc&&(m>>=
|
||||
1);a>m&&(a=m)}b=a;var r=this.U,a=b;if(r.A&&r.A[$c]&ad){var y=r.Y-Sc(r.R,r.M);0<y&&a>y&&(a=y)}b=a}try{this.uh(b)}catch(N){if("number"!=typeof N)throw N;}for(var a=b=Vc(this),t=this.qa.length-1;0<=t;t--){var z=this.qa[t];0>z[1]||(z[1]-=a,0>=z[1]&&(z[1]=-1,z[3](),0<=z[2]&&Uc(this,t,z[2])))}a=b;if(this.X.zf){var D=!1;this.V.Hf=this.V.Hf+this.li()|0;this.V.se-=a;0>=this.V.se&&(this.V.se+=this.V.Me,D=!0);0<=this.V.Ne&&this.V.Ne<=Sc(this)&&(this.V.Me=this.V.Ne=-1,Jc(this),Mc(this),D=!0);D&&this.qb(Sc(this)+
|
||||
" cycles: checksum="+ja(this.V.Hf))}}while(this.X.cb&&!this.X.Zf)}catch(N){Mc(this);Lc(this);this.na&&this.na.stop(va(),Sc(this));nb(this,N.stack||N.message);return}if(this.X.cb){b=setTimeout;c=this.pi;this.V.Od=va();d=this.V.yi;this.V.Jf&&(d=Math.round(d*this.V.Jf/this.V.Ml));d-=this.V.Od-this.V.Le;if(e=this.V.Od-this.V.Zc)this.V.hd=Math.round(this.Sc/(10*e))/100,864E5<=e&&(this.Ic=0,this.U&&Xc(this.U,!0),Pc(this));0>d?(-1E3>d&&(this.V.Zc-=d),d=0):this.V.hd<this.V.re&&(d=0);this.V.Od+=d;b(c,d)}}};
|
||||
function Nc(a,b){var c;a.X.error?(a.qb(a.toString()+" error"),c=!0):c=!1;if(c)return!1;if(a.X.cb)return a.qb(a.toString()+" busy"),!1;Pc(a);a.X.cb=!0;a.X.Pj=!0;a.U&&a.U.start();if(c=a.ia.run)c.textContent="Halt";a.na&&(bd(a.na,!0),b&&Tc(a.na,!0),a.na.start(a.V.Zc,Sc(a)));setTimeout(a.pi,0);return!0}l.uh=function(){return 0};
|
||||
function Mc(a,b){if(a.X.cb){Vc(a);a.Ic+=a.Sc;a.Sc=0;a.X.cb=!1;a.U&&a.U.stop();var c=a.ia.run;c&&(c.textContent="Run");a.na&&(a.na.stop(Date.now()||+new Date,Sc(a)),bd(a.na,!0));a.Ea||a.status("Stopped")}a.X.complete=b}function Lc(a){a.na&&bd(a.na,void 0)}var Hc=30,Ec=["power","reset"];
|
||||
function Uc(a,b,c,d){0<=b&&b<a.qa.length&&(b=a.qa[b],d||0>b[1])&&(c=a.V.yd*a.V.sg/1E3*c|0,a.Y.cb&&(c+=Vc(a)),b[1]=c)}function Wc(a){for(var b=[],c=0;c<a.qa.length;c++){var d=a.qa[c];b.push([d[0],d[1],d[2]])}return b}function Vc(a){var b=a.dd-a.A;a.dd=a.A=0;a.V.Jf+=b;a.Sc+=b;return b}
|
||||
l.sn=function(){if(this.Y.cb){Rc(this);this.V.Jf=0;this.V.Le=va();this.V.Zc||(this.V.Zc=this.V.Le);if(this.V.Od){var a=this.V.Le-this.V.Od;a>this.V.yi&&(this.V.Zc+=a,this.V.Zc>this.V.Le&&(this.V.Zc=this.V.Le))}try{this.Y.Zf=!1;do{for(var b,c=this.Y.zf?1:this.V.yd*this.V.sg|0,d=this.qa.length-1;0<=d;d--){var e=this.qa[d];0>e[1]||c>e[1]&&(c=e[1])}b=c;if(this.U){Xc(this.U);var f=this.U,a=b,g=f.qa[0];if(g.Ld){var h=(Sc(f.R,f.M)-g.jd)/f.Ba|0,k=Yc(f,0)-h;g.mode==Zc&&(k-=h);var m=k*f.Ba|0;g.mode==Zc&&(m>>=
|
||||
1);a>m&&(a=m)}b=a;var r=this.U,a=b;if(r.A&&r.A[$c]&ad){var y=r.X-Sc(r.R,r.M);0<y&&a>y&&(a=y)}b=a}try{this.uh(b)}catch(N){if("number"!=typeof N)throw N;}for(var a=b=Vc(this),t=this.qa.length-1;0<=t;t--){var z=this.qa[t];0>z[1]||(z[1]-=a,0>=z[1]&&(z[1]=-1,z[3](),0<=z[2]&&Uc(this,t,z[2])))}a=b;if(this.Y.zf){var D=!1;this.V.Hf=this.V.Hf+this.li()|0;this.V.se-=a;0>=this.V.se&&(this.V.se+=this.V.Me,D=!0);0<=this.V.Ne&&this.V.Ne<=Sc(this)&&(this.V.Me=this.V.Ne=-1,Jc(this),Mc(this),D=!0);D&&this.qb(Sc(this)+
|
||||
" cycles: checksum="+ja(this.V.Hf))}}while(this.Y.cb&&!this.Y.Zf)}catch(N){Mc(this);Kc(this);this.na&&this.na.stop(va(),Sc(this));nb(this,N.stack||N.message);return}if(this.Y.cb){b=setTimeout;c=this.pi;this.V.Od=va();d=this.V.yi;this.V.Jf&&(d=Math.round(d*this.V.Jf/this.V.Ql));d-=this.V.Od-this.V.Le;if(e=this.V.Od-this.V.Zc)this.V.hd=Math.round(this.Sc/(10*e))/100,864E5<=e&&(this.Ic=0,this.U&&Xc(this.U,!0),Pc(this));0>d?(-1E3>d&&(this.V.Zc-=d),d=0):this.V.hd<this.V.re&&(d=0);this.V.Od+=d;b(c,d)}}};
|
||||
function Nc(a,b){var c;a.Y.error?(a.qb(a.toString()+" error"),c=!0):c=!1;if(c)return!1;if(a.Y.cb)return a.qb(a.toString()+" busy"),!1;Pc(a);a.Y.cb=!0;a.Y.Pj=!0;a.U&&a.U.start();if(c=a.ia.run)c.textContent="Halt";a.na&&(bd(a.na,!0),b&&Tc(a.na,!0),a.na.start(a.V.Zc,Sc(a)));setTimeout(a.pi,0);return!0}l.uh=function(){return 0};
|
||||
function Mc(a,b){if(a.Y.cb){Vc(a);a.Ic+=a.Sc;a.Sc=0;a.Y.cb=!1;a.U&&a.U.stop();var c=a.ia.run;c&&(c.textContent="Run");a.na&&(a.na.stop(Date.now()||+new Date,Sc(a)),bd(a.na,!0));a.Ea||a.status("Stopped")}a.Y.complete=b}function Kc(a){a.na&&bd(a.na,void 0)}var Hc=30,Ec=["power","reset"];
|
||||
function cd(a,b,c,d){this.A=a;this.Ea=a.Ea;this.id=b;this.Xf=c||"";this.ha=0;this.jb=65535;this.C=this.jb+1;this.tb=this.jc=this.ext=this.nb=this.type=this.va=0;this.cc=-1;this.T=this.Jc=2;this.O=this.ta=65535;this.J=this.wi;this.I=this.H=this.xf;this.B={ha:-1,va:0,jb:0,nb:0,type:0,ext:0,cc:-1};1==this.id&&(this.Ze=0,this.D=null,this.ne=!1,this.G=Array(32),this.F=[]);dd(this,!0,d);this.id||(this.Kb=this.sb=this.bi)}l=cd.prototype;l.wi=function(a){this.ha=a&65535;return this.va=this.ha<<4};
|
||||
l.Ff=function(a,b){var c,d,e=this.A;a&=65535;a&4?(c=e.mc.va,d=c+e.mc.jb|0):(c=e.Jb,d=e.Oc);if(c){c=c+(a&65528)|0;if(d-c|0)return e.A-=15,ed(this,c,a,b);this.id<fd&&x.call(e,b&&this.id==gd?10:13,a&65532)}return-1};l.Gl=function(a){var b=this.A;a=b.Xb+(a<<2);var c=b.ga(a);b.N&=-769;return this.load(b.ga(a+2))+c|0};l.Fl=function(a){var b=this.A;a<<=3;var c=b.Xb+a|0;if(7<=(b.Qc-c|0))return this.D=!0,a=ed(this,c,a),-1!==a&&(a+=this.Ze),a;x.call(b,13,a|2);return-1};l.bi=function(a){return this.va+a|0};
|
||||
l.Ff=function(a,b){var c,d,e=this.A;a&=65535;a&4?(c=e.mc.va,d=c+e.mc.jb|0):(c=e.Jb,d=e.Oc);if(c){c=c+(a&65528)|0;if(d-c|0)return e.A-=15,ed(this,c,a,b);this.id<fd&&x.call(e,b&&this.id==gd?10:13,a&65532)}return-1};l.Kl=function(a){var b=this.A;a=b.Xb+(a<<2);var c=b.ga(a);b.N&=-769;return this.load(b.ga(a+2))+c|0};l.Jl=function(a){var b=this.A;a<<=3;var c=b.Xb+a|0;if(7<=(b.Qc-c|0))return this.D=!0,a=ed(this,c,a),-1!==a&&(a+=this.Ze),a;x.call(b,13,a|2);return-1};l.bi=function(a){return this.va+a|0};
|
||||
l.xf=function(a,b){(a>>>0)+b>this.C&&(8088>=this.A.ca?this.A.K|=8:x.call(this.A,13));return this.va+a|0};l.ai=function(a,b){return(a>>>0)+b<=this.C?this.va+a|0:this.wf()};l.fk=function(a,b){return(a>>>0)+b>this.C?this.va+a|0:this.wf()};l.wf=function(){x.call(this.A,13,0);return-1};l.ci=function(a,b){return(a>>>0)+b<=this.C?this.va+a|0:this.yf()};l.gk=function(a,b){return(a>>>0)+b>this.C?this.va+a|0:this.yf()};l.yf=function(){x.call(this.A,13,0);return-1};
|
||||
function hd(a,b,c,d,e){a.ha=b;a.va=d;a.jb=e;a.C=(e>>>0)+1;a.nb=c;a.type=c&7936;a.ext=c>>16&192;a.cc=(b&4?a.A.mc.va:a.A.Jb)+(b&65528)|0;a.id<id&&dd(a,!0)}function jd(a,b,c){var d=a.A,e=d.ga(b+2),f=d.ga(b)|(e&255)<<16,d=d.ga(b+4);a.ha=c;a.va=f;a.jb=d;a.C=(d>>>0)+1;a.nb=e;a.type=e&7936;a.ext=0;a.cc=b;a.id<id&&dd(a,!0)}
|
||||
function ed(a,b,c,d){var e=a.A;if(!d&&c===a.B.ha)return a.ha=c,a.va=a.B.va,a.jb=a.B.jb,a.C=(a.B.jb>>>0)+1,a.nb=a.B.nb,a.type=a.B.type,a.ext=a.B.ext,a.cc=a.B.cc,a.B.ha=-1,dd(a,!0,!0,!1),a.va;a.B.ha=-1;var f=e.ga(b+0),g=e.ga(b+4),h=g&7936,k=e.ga(b+2)|(g&255)<<16,m=e.ga(b+6),r=c&65528;if(80386<=e.ca){var y=f,k=k|(m&65280)<<16,f=f|(m&15)<<16;m&128&&(f=f<<12|4095)}switch(a.id){case kd:var t=a.D;a.ne=!1;if(t&&c==ld&&a.F.length){var z=a.F[a.Ze-1];if(z&&!z())return-1}var D=c&3,N=(g&24576)>>13,z=-1,P,aa;r||
|
||||
b>=e.Jb&&b<e.Oc&&(h=0);if(6144<=h)null!=d?z=0:!1!==t?(h&1024?N<=a.tb&&(z=0):D<=a.tb&&N==a.tb&&(z=0),z||(c=c&-4|a.tb&3)):D>=a.tb&&(D>a.tb&&(z=A(e),md(e,A(e),!0),B(e,z),a.ne=!0),z=0);else{if(256==h||2304==h)return nd(a,c,t)?a.va:-1;if(1024==h)z=2,aa=0,D<a.tb&&(D=a.tb);else if(3072==h)z=4,aa=0,D<a.tb&&(D=a.tb);else if(1536==h)z=2,aa=148224;else if(3584==h)z=4,aa=148224;else if(1792==h)z=2,aa=147712;else if(3840==h)z=4,aa=147712;else if(1280==h)return nd(a,k&65535,t)?a.va:-1}0<z&&!(g&32768)&&(z=0);if(0<
|
||||
z&&(r=a.tb,P=b==e.Xb+c,D<=N&&(!P||0<=e.sc||r<=N))){b=k&65535;h&2048&&(f=y|m<<16);m=h=0;d=b&3;if(d<r){if(-1===a.Ff(b,!0))return-1;m=e.la.va;e.la.type&2048?(c=(d<<3)+4,k=4):(c=(d<<2)+2,k=2);h=e.ga(m+c+k);if(!h)return x.call(e,10,h),-1;if(-1===e.W.Ff(h,!0))return-1;m=2==k?e.ga(m+c):e.ea(m+c)}c=e.N;e.N&=~aa;c&131072&&pd(e,!0,!1);if(-1===a.Ff(b,!1))return-1;qd(e,z);a.Ze=f;if(d<r){if(!0!==t)return-1;z=C(e);f=0;for(g&=31;g--;)a.G[f++]=rd(e,e.W,z),z+=2;t=e.W.ha;g=C(e);md(e,h,!0);B(e,m);c&131072&&(qd(e,4),
|
||||
z&&(r=a.tb,P=b==e.Xb+c,D<=N&&(!P||0<=e.sc||r<=N))){b=k&65535;h&2048&&(f=y|m<<16);m=h=0;d=b&3;if(d<r){if(-1===a.Ff(b,!0))return-1;m=e.la.va;e.la.type&2048?(c=(d<<3)+4,k=4):(c=(d<<2)+2,k=2);h=e.ga(m+c+k);if(!h)return x.call(e,10,h),-1;if(-1===e.W.Ff(h,!0))return-1;m=2==k?e.ga(m+c):e.ea(m+c)}c=e.N;e.N&=~aa;c&131072&&od(e,!0,!1);if(-1===a.Ff(b,!1))return-1;qd(e,z);a.Ze=f;if(d<r){if(!0!==t)return-1;z=C(e);f=0;for(g&=31;g--;)a.G[f++]=rd(e,e.W,z),z+=2;t=e.W.ha;g=C(e);md(e,h,!0);B(e,m);c&131072&&(qd(e,4),
|
||||
sd(e,e.vb.ha,4,2),e.vb.load(0),sd(e,e.rb.ha,4,2),e.rb.load(0),sd(e,e.Ga.ha,4,2),td(e,0),sd(e,e.xa.ha,4,2),ud(e,0));sd(e,t,e.T,2);for(E(e,g);f;)E(e,a.G[--f]);a.ne=!0}return a.va}if(z)return x.call(e,13,c&65532|(P?2:0)),-1;if(!(g&32768))return x.call(e,11,c&65532|(P?2:0)),-1;break;case vd:if(r){if(4096>h||2048==(h&2560))return x.call(e,13,c&65532),-1;if(!(g&32768))return x.call(e,11,c&65532),-1}break;case gd:if(!r||4096>h||512!=(h&2560))return x.call(e,13,c&65532),-1;if(!(g&32768))return x.call(e,12,
|
||||
c&65532),-1;break;case id:t=h&-513;if(!r||256!=t&&2304!=t)return x.call(e,13,c&65532),-1;2304==t&&(a.Vh=k+e.ga(k+102)|0,a.ck=k+a.jb|0);break;case fd:if(!(h&4096)&&768<h&&2304!=h&&2816!=h)return-1}d?(a.B.ha=c,a.B.va=k,a.B.jb=f,a.B.nb=g,a.B.type=h,a.B.ext=m,a.B.cc=b):(a.ha=c,a.va=k,a.jb=f,a.C=(f>>>0)+1,a.nb=g,a.type=h,a.ext=m,a.cc=b,dd(a,!0,!0,!1));return k}
|
||||
function nd(a,b,c){var d=a.A,e=a.tb,f=d.la.ha,g=d.la.va;if(!c){if(!(d.la.type&512))return x.call(d,13,b&65532),!1;d.Za(d.la.cc+4,d.la.nb&=-513)}if(-1===d.la.load(b))return!1;var h=d.la.va;if(!1!==c){if(d.la.type&512)return x.call(d,13,b&65532),!1;d.Za(d.la.cc+4,d.la.nb|=512)}d.la.type=d.la.type&-513|d.la.nb&512;256==d.la.type||768==d.la.type?(d.Za(g+14,F(d)),d.Za(g+16,wd(d)),d.Za(g+18,d.F),d.Za(g+20,d.H),d.Za(g+22,d.L),d.Za(g+24,d.G),d.Za(g+26,C(d)),d.Za(g+28,d.M),d.Za(g+30,d.J),d.Za(g+32,d.I),d.Za(g+
|
||||
34,d.xa.ha),d.Za(g+36,d.fa.ha),d.Za(g+38,d.W.ha),d.Za(g+40,d.Ga.ha),d.mc.load(d.ga(h+42)),xd(d,d.ga(h+16)|(c?16384:0)),d.F=d.ga(h+18),d.H=d.ga(h+20),d.L=d.ga(h+22),d.G=d.ga(h+24),d.M=d.ga(h+28),d.J=d.ga(h+30),d.I=d.ga(h+32),d.xa.load(d.ga(h+34)),d.Ga.load(d.ga(h+40)),yd(d,d.ga(h+14),d.ga(h+36)),b=38,g=26,a.tb<e&&(g=(a.tb<<2)+2,b=g+2),md(d,d.ga(h+b),!0),B(d,d.ga(h+g))):(d.Ta(g+28,d.Vc),d.Ta(g+32,F(d)),d.Ta(g+36,wd(d)),d.Ta(g+40,d.F),d.Ta(g+44,d.H),d.Ta(g+48,d.L),d.Ta(g+52,d.G),d.Ta(g+56,C(d)),d.Ta(g+
|
||||
60,d.M),d.Ta(g+64,d.J),d.Ta(g+68,d.I),d.Ta(g+72,d.xa.ha),d.Ta(g+76,d.fa.ha),d.Ta(g+80,d.W.ha),d.Ta(g+84,d.Ga.ha),d.Ta(g+88,d.rb.ha),d.Ta(g+92,d.vb.ha),zd.call(d,d.ea(h+28)),d.mc.load(d.ga(h+96)),xd(d,d.ea(h+36)|(c?16384:0)),d.F=d.ea(h+40),d.H=d.ea(h+44),d.L=d.ea(h+48),d.G=d.ea(h+52),d.M=d.ea(h+60),d.J=d.ea(h+64),d.I=d.ea(h+68),d.xa.load(d.ga(h+72)),d.Ga.load(d.ga(h+84)),d.rb.load(d.ga(h+88)),d.vb.load(d.ga(h+92)),yd(d,d.ea(h+32),d.ga(h+76)),b=80,g=56,a.tb<e&&(g=(a.tb<<3)+4,b=g+4),md(d,d.ga(h+b),!0),
|
||||
B(d,d.ea(h+g)));c&&d.Za(h+0,f);d.pa|=8;return!0}l.save=function(){return[this.ha,this.va,this.jb,this.nb,this.id,this.Xf,this.tb,this.jc,this.cc,this.Jc,this.ta,this.T,this.O,this.type,this.C]};l.restore=function(a){"number"==typeof a?this.load(a):(this.ha=a[0],this.va=a[1],this.jb=a[2],this.nb=a[3],this.id=a[4],this.Xf=a[5],this.tb=a[6],this.jc=a[7],this.cc=a[8],this.Jc=a[9]||2,this.ta=a[10]||65535,this.T=a[11]||2,this.O=a[12]||65535,this.type=a[13]||this.nb&7936,this.C=a[14]||(this.jb>>>0)+1)};
|
||||
function dd(a,b,c,d){void 0===c&&(c=!!(a.A.pa&1));a.ke=!1;if(c)if(a.load=a.Ff,a.vi=a.Fl,a.sb=a.ai,a.Kb=a.ci,void 0===d&&(d=!!(a.A.N&131072)),d)a.load=a.J,a.sb=a.H,a.Kb=a.I,a.tb=a.jc=3,a.T=2,a.O=a.ta=65535,a.jb=65535,a.C=a.jb+1,a.Jc=a.T,a.cc=-1,a.ne=!1;else{if(!(a.ha&-4))a.sb=a.wf,a.Kb=a.yf;else if(a.type&4096){6144==(a.type&6656)&&(a.sb=a.wf);if(a.type&2048||!(a.type&512))a.Kb=a.yf;1024==(a.type&3072)&&(a.sb==a.ai&&(a.sb=a.fk),a.Kb==a.ci&&(a.Kb=a.gk),a.ke=!0);b&&a.id<fd&&a.ha&-4&&-1!==a.cc&&(c=a.cc+
|
||||
5,d=a.A.Ia(c),d&1||a.A.Bb(c,d|1))}b&&(a.tb=a.ha&3,a.jc=(a.nb&24576)>>13,80386>a.A.ca||!(a.ext&64)?(a.T=2,a.O=65535):(a.T=4,a.O=-1),a.Jc=a.T,a.ta=a.O)}else a.load=a.wi,a.vi=a.Gl,a.sb=a.xf,a.Kb=a.xf,a.tb=a.jc=0,a.cc=-1,a.ne=!1}var kd=1,vd=2,gd=3,id=4,fd=6,ld=1;
|
||||
function dd(a,b,c,d){void 0===c&&(c=!!(a.A.pa&1));a.ke=!1;if(c)if(a.load=a.Ff,a.vi=a.Jl,a.sb=a.ai,a.Kb=a.ci,void 0===d&&(d=!!(a.A.N&131072)),d)a.load=a.J,a.sb=a.H,a.Kb=a.I,a.tb=a.jc=3,a.T=2,a.O=a.ta=65535,a.jb=65535,a.C=a.jb+1,a.Jc=a.T,a.cc=-1,a.ne=!1;else{if(!(a.ha&-4))a.sb=a.wf,a.Kb=a.yf;else if(a.type&4096){6144==(a.type&6656)&&(a.sb=a.wf);if(a.type&2048||!(a.type&512))a.Kb=a.yf;1024==(a.type&3072)&&(a.sb==a.ai&&(a.sb=a.fk),a.Kb==a.ci&&(a.Kb=a.gk),a.ke=!0);b&&a.id<fd&&a.ha&-4&&-1!==a.cc&&(c=a.cc+
|
||||
5,d=a.A.Ia(c),d&1||a.A.Bb(c,d|1))}b&&(a.tb=a.ha&3,a.jc=(a.nb&24576)>>13,80386>a.A.ca||!(a.ext&64)?(a.T=2,a.O=65535):(a.T=4,a.O=-1),a.Jc=a.T,a.ta=a.O)}else a.load=a.wi,a.vi=a.Kl,a.sb=a.xf,a.Kb=a.xf,a.tb=a.jc=0,a.cc=-1,a.ne=!1}var kd=1,vd=2,gd=3,id=4,fd=6,ld=1;
|
||||
function Ad(a){var b,c=+a.model||8088;switch(c){default:b=4772727;break;case 80286:b=6E6;break;case 80386:b=16E6}Dc.call(this,a,b);this.ca=c;a=a.stepping;this.pd=c+(a?ia(a,16):0);this.Qh=61442;this.od=1792;this.Oh=28672;this.hf=4;this.Ma=255;this.B=80286<=this.ca?rb:qb;this.ra=Bd;this.Zh=Cd;this.$h=Dd;this.di=Ed;if(80186<=this.ca&&(this.ra=Bd.slice(),this.Zh=Cd.slice(),this.$h=Dd.slice(),this.Ma=31,this.ra[15]=Fd,this.ra[96]=Gd,this.ra[97]=Hd,this.ra[98]=Id,this.ra[99]=Fd,this.ra[100]=Fd,this.ra[101]=
|
||||
Fd,this.ra[102]=Fd,this.ra[103]=Fd,this.ra[104]=Jd,this.ra[105]=Kd,this.ra[106]=Ld,this.ra[107]=Md,this.ra[108]=Nd,this.ra[109]=Od,this.ra[110]=Pd,this.ra[111]=Qd,this.ra[192]=Rd,this.ra[193]=Sd,this.ra[200]=Td,this.ra[201]=Ud,this.ra[241]=Vd,this.Zh[7]=Wd,this.$h[7]=Wd,80286<=this.ca)){this.Qh=2;this.od|=28672;this.hf=0;this.ra[15]=Xd;this.cd=Yd.slice();for(c=0;c<this.cd.length;c++)this.cd[c]||(this.cd[c]=Zd);this.ra[84]=$d;this.ra[99]=ae;if(80386<=this.ca){var d;this.Oh=0;this.od|=196608;this.ra[100]=
|
||||
be;this.ra[101]=ce;this.ra[102]=de;this.ra[103]=ee;for(d in G)this.cd[+d]=G[+d];80546<=this.pd&&80562>=this.pd&&(this.cd[166]=fe,this.cd[167]=ge)}}this.lf=[];this.Uh=[];this.ag=0;Ic(this);this.X.complete=this.X.hk=!1;this.ji=0;this.Nc=this.Y=[];this.Eb=this.Rh=this.Db=this.jf=this.Ae=this.Be=this.Dc=0;he(this)}ca(Ad,Dc);
|
||||
function Mb(a){var b;if(a.Y===a.Nc){a.Y=Array(a.jf);a.mf=new w(null,0,0,qc,null,a);Hb(a.mf,a.Ea);for(b=0;b<a.jf;b++)a.Y[b]=a.mf;a.De=new w;a.rh=Array(ie);a.nf=0}else for(var c=0;c<a.kf.length;c++){b=a.kf[c];var d=a.Y[b];a.nf<ie&&(a.rh[a.nf++]=d);a.Y[b]=a.mf}a.kf=[]}
|
||||
function Ac(a,b,c,d){var e=(b&-4194304)>>>20,f=a.Nc[(a.Vc+e&a.Be)>>>a.Eb],g=f.Rd(e);if(!(g&1))return d||je.call(a,b,!1,c),a.De;if(!(g&4)&&3==a.La)return d||je.call(a,b,!0,c),a.De;var h=(b&4190208)>>>10,g=a.Nc[((g&-4096)+h&a.Be)>>>a.Eb],k=g.Rd(h);if(!(k&1))return d||je.call(a,b,!1,c),a.De;if(!(k&4)&&3==a.La)return d||je.call(a,b,!0,c),a.De;c=a.Nc[((k&-4096)+(b&4095)&a.Be)>>>a.Eb];if(d)return c;d=b>>>a.Eb;k=a.Y[d];b&=-4096;var m;0<a.nf?(m=a.rh[--a.nf],m.yl(b)):m=new w(b,0,0,tc);b=m;b.J=c;b.A=f;b.C=
|
||||
e>>2;b.B=g;b.D=h>>2;pb&&Yb&&c.S&&!c.controller&&!c.fe&&!c.ge?(b.Ha=c.Ha,b.ud=c.ud,b.S=c.S,Tb(b,Cc)):(b.I=c?Bc(32):0,b.M=c?Bc(96):0,Tb(b,uc));Hb(b,a.Ea,k);a.Y[d]=b;a.kf.push(d);return b}function ke(a){a.Y!==a.Nc&&(a.Y=a.Nc,a.mf=null,a.kf=null,a.De=null)}l=Ad.prototype;l.reset=function(){he(this);Ic(this);this.X.error=!1};
|
||||
be;this.ra[101]=ce;this.ra[102]=de;this.ra[103]=ee;for(d in G)this.cd[+d]=G[+d];80546<=this.pd&&80562>=this.pd&&(this.cd[166]=fe,this.cd[167]=ge)}}this.lf=[];this.Uh=[];this.ag=0;Ic(this);this.Y.complete=this.Y.hk=!1;this.ji=0;this.Nc=this.X=[];this.Eb=this.Rh=this.Db=this.jf=this.Ae=this.Be=this.Dc=0;he(this)}ca(Ad,Dc);
|
||||
function Mb(a){var b;if(a.X===a.Nc){a.X=Array(a.jf);a.mf=new w(null,0,0,qc,null,a);Hb(a.mf,a.Ea);for(b=0;b<a.jf;b++)a.X[b]=a.mf;a.De=new w;a.rh=Array(ie);a.nf=0}else for(var c=0;c<a.kf.length;c++){b=a.kf[c];var d=a.X[b];a.nf<ie&&(a.rh[a.nf++]=d);a.X[b]=a.mf}a.kf=[]}
|
||||
function Ac(a,b,c,d){var e=(b&-4194304)>>>20,f=a.Nc[(a.Vc+e&a.Be)>>>a.Eb],g=f.Rd(e);if(!(g&1))return d||je.call(a,b,!1,c),a.De;if(!(g&4)&&3==a.La)return d||je.call(a,b,!0,c),a.De;var h=(b&4190208)>>>10,g=a.Nc[((g&-4096)+h&a.Be)>>>a.Eb],k=g.Rd(h);if(!(k&1))return d||je.call(a,b,!1,c),a.De;if(!(k&4)&&3==a.La)return d||je.call(a,b,!0,c),a.De;c=a.Nc[((k&-4096)+(b&4095)&a.Be)>>>a.Eb];if(d)return c;d=b>>>a.Eb;k=a.X[d];b&=-4096;var m;0<a.nf?(m=a.rh[--a.nf],m.Cl(b)):m=new w(b,0,0,tc);b=m;b.J=c;b.A=f;b.C=
|
||||
e>>2;b.B=g;b.D=h>>2;pb&&Yb&&c.S&&!c.controller&&!c.fe&&!c.ge?(b.Ha=c.Ha,b.ud=c.ud,b.S=c.S,Tb(b,Cc)):(b.I=c?Bc(32):0,b.M=c?Bc(96):0,Tb(b,uc));Hb(b,a.Ea,k);a.X[d]=b;a.kf.push(d);return b}function ke(a){a.X!==a.Nc&&(a.X=a.Nc,a.mf=null,a.kf=null,a.De=null)}l=Ad.prototype;l.reset=function(){he(this);Ic(this);this.Y.error=!1};
|
||||
function le(a,b){var c;switch(b){case 0:c=a.F;break;case 1:c=a.H;break;case 2:c=a.L;break;case 3:c=a.G;break;case 4:c=C(a);break;case 5:c=a.M;break;case 6:c=a.J;break;case 7:c=a.I}return c}function me(a,b,c){switch(b){case 0:a.F=c;break;case 1:a.H=c;break;case 2:a.L=c;break;case 3:a.G=c;break;case 4:B(a,c);break;case 5:a.M=c;break;case 6:a.J=c;break;case 7:a.I=c}}
|
||||
function he(a){a.F=0;a.G=0;a.H=0;a.L=0;a.lc=0;a.M=0;a.J=0;a.I=0;a.fc=!1;a.Ba=a.Sa=0;a.Jl=[0,0];a.Ol=[0,0];a.ua=0;a.gi=0;a.aa=0;a.pa=65520;a.Xb=0;a.Qc=1023;a.N=a.Zb=0;a.Zd=a.Ee=a.sd=a.$d=0;a.sc=-1;a.Tc=a.uc=-1;a.Uc=a.ma=-1;a.fa=new cd(a,kd,"CS");a.Ga=new cd(a,vd,"DS");a.xa=new cd(a,vd,"ES");a.W=new cd(a,gd,"SS");B(a,0);md(a,0);if(80386<=a.ca){switch(a.pd){case 80562:case 80563:a.L=771;break;case 80578:a.L=772;break;case 80594:a.L=773;break;case 80595:case 80596:a.L=776}a.pa=16;a.si=0;a.rd=0;a.Vc=0;
|
||||
a.Cb=[0,0,0,0,null,null,0,0];a.pf=[null,null,null,null,null,null,0,0];a.rb=new cd(a,vd,"FS");a.vb=new cd(a,vd,"GS");ke(a)}a.cg=new cd(a,0,"NULL");a.Ca=a.Ga;a.Gb=a.W;a.K=a.ba=0;a.C=a.D=-1;a.Da=a.cg;a.Qa=0;if(80286>a.ca)yd(a,0,65535);else{a.Jb=0;a.Oc=65535;a.mc=new cd(a,5,"LDT",!0);a.la=new cd(a,id,"TSS",!0);a.gb=new cd(a,fd,"VER",!0);yd(a,65520,61440);var b,c=F(a);b=a.fa;var d=-65536;80386>b.A.ca&&(d&=16777215);b=b.va=d;a.da=b+c|0;a.bg=(b>>>0)+(a.fa.jb>>>0)+1}xd(a,0);pd(a)}
|
||||
function he(a){a.F=0;a.G=0;a.H=0;a.L=0;a.lc=0;a.M=0;a.J=0;a.I=0;a.fc=!1;a.Ba=a.Sa=0;a.Nl=[0,0];a.Sl=[0,0];a.ua=0;a.gi=0;a.aa=0;a.pa=65520;a.Xb=0;a.Qc=1023;a.N=a.Zb=0;a.Zd=a.Ee=a.sd=a.$d=0;a.sc=-1;a.Tc=a.uc=-1;a.Uc=a.ma=-1;a.fa=new cd(a,kd,"CS");a.Ga=new cd(a,vd,"DS");a.xa=new cd(a,vd,"ES");a.W=new cd(a,gd,"SS");B(a,0);md(a,0);if(80386<=a.ca){switch(a.pd){case 80562:case 80563:a.L=771;break;case 80578:a.L=772;break;case 80594:a.L=773;break;case 80595:case 80596:a.L=776}a.pa=16;a.si=0;a.rd=0;a.Vc=0;
|
||||
a.Cb=[0,0,0,0,null,null,0,0];a.pf=[null,null,null,null,null,null,0,0];a.rb=new cd(a,vd,"FS");a.vb=new cd(a,vd,"GS");ke(a)}a.cg=new cd(a,0,"NULL");a.Ca=a.Ga;a.Gb=a.W;a.K=a.ba=0;a.C=a.D=-1;a.Da=a.cg;a.Qa=0;if(80286>a.ca)yd(a,0,65535);else{a.Jb=0;a.Oc=65535;a.mc=new cd(a,5,"LDT",!0);a.la=new cd(a,id,"TSS",!0);a.gb=new cd(a,fd,"VER",!0);yd(a,65520,61440);var b,c=F(a);b=a.fa;var d=-65536;80386>b.A.ca&&(d&=16777215);b=b.va=d;a.da=b+c|0;a.bg=(b>>>0)+(a.fa.jb>>>0)+1}xd(a,0);od(a)}
|
||||
function ne(a){2==a.Jc?(a.ni=a.ga,a.Yb=oe,a.ec=pe,a.Rc=qe,2==a.T?(a.ja=re,a.za=se,a.eb=te):(a.ja=ue,a.za=ve,a.eb=we)):(a.ni=a.ea,a.Yb=xe,a.ec=ye,a.Rc=ze,2==a.T?(a.ja=Ae,a.za=Be,a.eb=Ce):(a.ja=De,a.za=Ee,a.eb=Fe))}function qd(a,b){a.T!=b&&(a.ba|=1024,a.T=b,a.O=2==b?65535:-1,Ge(a))}function Ge(a){2==a.T?(a.wb=32768,a.mb=a.ga,a.Lb=a.Za,2==a.Jc?(a.ja=re,a.za=se,a.eb=te):(a.ja=Ae,a.za=Be,a.eb=Ce)):(a.wb=-2147483648,a.mb=a.ea,a.Lb=a.Ta,2==a.Jc?(a.ja=ue,a.za=ve,a.eb=we):(a.ja=De,a.za=Ee,a.eb=Fe))}
|
||||
function He(a){a.Jc=a.fa.Jc;a.ta=a.fa.ta;ne(a);a.T=a.fa.T;a.O=a.fa.O;Ge(a);a.ba&=-3073}l.li=function(){var a=this.F+this.G+this.H+this.L+C(this)+this.M+this.J+this.I|0;return a=a+F(this)+this.fa.ha+this.Ga.ha+this.W.ha+this.xa.ha+wd(this)|0};function Ie(a,b,c){void 0===a.lf[b]&&(a.lf[b]=[]);a.lf[b].push(c)}function Je(a,b){var c=a.Uh[b];null!=c&&(c(--a.ag),delete a.Uh[b])}
|
||||
function Ke(a,b){for(var c=a.Cb[7],d=c>>16,e=0;4>e;e++){if(c&3){var f=!!(d&1),g=a.Cb[e],g=g&~(d>>2&3);if(b){var g=a.Y[g>>>a.Eb],h=a;f?g.ge++||(h&&(g.F=h),xc(g,yc,!1)):g.fe++||(h&&(g.F=h),wc(g,yc,!1))}else g=a.Y[g>>>a.Eb],f?--g.ge||(f=g,f.pc=f.H?f.oh:f.ef,f.gf=f.H?f.ph:f.qh,f.ff=f.H?f.nh:f.R):--g.fe||(f=g,f.oc=f.Bd,f.$e=f.af,f.Rd=f.hh)}c>>=2;d>>=4}}
|
||||
function zc(a,b,c,d){if(!(a.K&8192)&&a.Cb[7]&255){c--;var e=a.Cb[7],f=e>>16;d=d?1:0==d?3:0;for(var g=0;4>g;g++){if(e&3&&(f&3)==d){var h=f>>2;if(b+c>=a.Cb[g]&&b<=a.Cb[g]+h){a.Cb[6]|=1<<g;a.Qa|=2;break}}e>>=2;f>>=4}}}function pd(a,b,c){void 0===b&&(b=!!(a.pa&1));void 0===c&&(c=!!(a.N&131072));a.di=b&&!c?Le:Ed;dd(a.fa,!1,b,c);dd(a.Ga,!1,b,c);dd(a.W,!1,b,c);dd(a.xa,!1,b,c);80386<=a.ca&&(dd(a.rb,!1,b,c),dd(a.vb,!1,b,c));He(a)}
|
||||
function Ke(a,b){for(var c=a.Cb[7],d=c>>16,e=0;4>e;e++){if(c&3){var f=!!(d&1),g=a.Cb[e],g=g&~(d>>2&3);if(b){var g=a.X[g>>>a.Eb],h=a;f?g.ge++||(h&&(g.F=h),xc(g,yc,!1)):g.fe++||(h&&(g.F=h),wc(g,yc,!1))}else g=a.X[g>>>a.Eb],f?--g.ge||(f=g,f.pc=f.H?f.oh:f.ef,f.gf=f.H?f.ph:f.qh,f.ff=f.H?f.nh:f.R):--g.fe||(f=g,f.oc=f.Bd,f.$e=f.af,f.Rd=f.hh)}c>>=2;d>>=4}}
|
||||
function zc(a,b,c,d){if(!(a.K&8192)&&a.Cb[7]&255){c--;var e=a.Cb[7],f=e>>16;d=d?1:0==d?3:0;for(var g=0;4>g;g++){if(e&3&&(f&3)==d){var h=f>>2;if(b+c>=a.Cb[g]&&b<=a.Cb[g]+h){a.Cb[6]|=1<<g;a.Qa|=2;break}}e>>=2;f>>=4}}}function od(a,b,c){void 0===b&&(b=!!(a.pa&1));void 0===c&&(c=!!(a.N&131072));a.di=b&&!c?Le:Ed;dd(a.fa,!1,b,c);dd(a.Ga,!1,b,c);dd(a.W,!1,b,c);dd(a.xa,!1,b,c);80386<=a.ca&&(dd(a.rb,!1,b,c),dd(a.vb,!1,b,c));He(a)}
|
||||
l.save=function(a){var b=new Me(this);b.set(0,[this.F,this.G,this.H,this.L,C(this),this.M,this.J,this.I]);var c=F(this),d=this.fa.save(),e=this.Ga.save(),f=this.W.save(),g=this.xa.save(),h;null!=this.Jb?(h=[this.pa,this.Jb,this.Oc,this.Xb,this.Qc,this.mc.save(),this.la.save(),this.Zb],80386<=this.ca&&(h.push(this.si),h.push(this.rd),h.push(this.Vc),h.push(this.Cb),h.push(this.pf))):h=null;c=[c,d,e,f,g,h,wd(this)];80386<=this.ca&&(c.push(this.rb.save()),c.push(this.vb.save()));b.set(1,c);b.set(2,[this.Ca.Xf,
|
||||
this.Gb.Xf,this.K,this.ba,this.Qa,this.C,this.D]);b.set(3,[0,this.Ic,this.V.md,a,Wc(this)]);b.set(4,dc(this.oa,!!(this.pa&-2147483648)));return b.data()};
|
||||
l.restore=function(a){var b=a[0];this.F=b[0];this.G=b[1];this.H=b[2];this.L=b[3];var c=b[4];this.M=b[5];this.J=b[6];this.I=b[7];b=a[1];this.fa.restore(b[1]);this.Ga.restore(b[2]);this.W.restore(b[3]);this.xa.restore(b[4]);var d=b[5];d&&d.length&&(this.pa=d[0],this.Jb=d[1],this.Oc=d[2],this.Xb=d[3],this.Qc=d[4],this.mc.restore(d[5]),this.la.restore(d[6]),this.Zb=d[7],80386<=this.ca&&(this.si=d[8],this.rd=d[9],this.Vc=d[10],this.Cb=d[11],this.pf=d[12]),pd(this));xd(this,b[6]);var d=!1,e;a:{e=this.oa;
|
||||
var f=a[4],g;for(g=0;g<f.length-1;g+=2){var h=f[g],k=f[g+1];if(k&&k.length<e.U){for(var m=0,r=Array(e.U),y=0;y<k.length-1;)for(var t=k[y++],z=k[y++];t--;)r[m++]=z;k=r}m=e.Y[h];if(!m||!m.restore(k)){q("Unable to restore memory block "+h);e=!1;break a}}void 0!==f[g]&&Ib(e,f[g]);e=!0}e&&(yd(this,b[0],this.fa.ha),B(this,c),md(this,this.W.ha),80386<=this.ca&&(this.rb.restore(b[7]),this.vb.restore(b[8])),d=!0);b=a[2];this.Ca=null!=b[0]&&Ne(this,b[0])||this.Ga;this.Gb=null!=b[1]&&Ne(this,b[1])||this.W;this.K=
|
||||
b[2];this.ba=b[3];this.Qa=b[4];this.C=b[5];this.D=b[6];b=a[3];this.Ic=b[1];Pc(this,b[2]);null!=b[3]&&(this.X.Gd=b[3]);if(null!=b[4])for(a=b[4],b=0;b<a.length;b++){c=a[b];a:{for(e=0;e<this.qa.length;e++)if(f=this.qa[e],f[0]==c[0]){e=f;break a}e=null}e&&(e[1]=c[1],e[2]=c[2])}return d};function Ne(a,b){switch(b){case "CS":return a.fa;case "DS":return a.Ga;case "SS":return a.W;case "ES":return a.xa;case "NULL":return a.cg;default:return[0,b,0,0,""]}}function Oe(a,b){null!=yd(a,F(a),b)&&(a.K|=a.hf)}
|
||||
l.restore=function(a){var b=a[0];this.F=b[0];this.G=b[1];this.H=b[2];this.L=b[3];var c=b[4];this.M=b[5];this.J=b[6];this.I=b[7];b=a[1];this.fa.restore(b[1]);this.Ga.restore(b[2]);this.W.restore(b[3]);this.xa.restore(b[4]);var d=b[5];d&&d.length&&(this.pa=d[0],this.Jb=d[1],this.Oc=d[2],this.Xb=d[3],this.Qc=d[4],this.mc.restore(d[5]),this.la.restore(d[6]),this.Zb=d[7],80386<=this.ca&&(this.si=d[8],this.rd=d[9],this.Vc=d[10],this.Cb=d[11],this.pf=d[12]),od(this));xd(this,b[6]);var d=!1,e;a:{e=this.oa;
|
||||
var f=a[4],g;for(g=0;g<f.length-1;g+=2){var h=f[g],k=f[g+1];if(k&&k.length<e.U){for(var m=0,r=Array(e.U),y=0;y<k.length-1;)for(var t=k[y++],z=k[y++];t--;)r[m++]=z;k=r}m=e.X[h];if(!m||!m.restore(k)){q("Unable to restore memory block "+h);e=!1;break a}}void 0!==f[g]&&Ib(e,f[g]);e=!0}e&&(yd(this,b[0],this.fa.ha),B(this,c),md(this,this.W.ha),80386<=this.ca&&(this.rb.restore(b[7]),this.vb.restore(b[8])),d=!0);b=a[2];this.Ca=null!=b[0]&&Ne(this,b[0])||this.Ga;this.Gb=null!=b[1]&&Ne(this,b[1])||this.W;this.K=
|
||||
b[2];this.ba=b[3];this.Qa=b[4];this.C=b[5];this.D=b[6];b=a[3];this.Ic=b[1];Pc(this,b[2]);null!=b[3]&&(this.Y.Gd=b[3]);if(null!=b[4])for(a=b[4],b=0;b<a.length;b++){c=a[b];a:{for(e=0;e<this.qa.length;e++)if(f=this.qa[e],f[0]==c[0]){e=f;break a}e=null}e&&(e[1]=c[1],e[2]=c[2])}return d};function Ne(a,b){switch(b){case "CS":return a.fa;case "DS":return a.Ga;case "SS":return a.W;case "ES":return a.xa;case "NULL":return a.cg;default:return[0,b,0,0,""]}}function Oe(a,b){null!=yd(a,F(a),b)&&(a.K|=a.hf)}
|
||||
function td(a,b){-1!==a.Ga.load(b)&&(a.K|=a.hf)}function md(a,b,c){var d=C(a);-1!==a.W.load(b)&&(B(a,d),a.W.ke?(a.ti=a.W.va+a.W.ta|0,a.ui=a.W.va+a.W.jb|0):(a.ti=a.W.va+a.W.jb|0,a.ui=a.W.va),c||(a.K|=4))}function ud(a,b){-1!==a.xa.load(b)&&(a.K|=a.hf)}function F(a){return a.da-a.fa.va|0}function H(a,b){a.da=a.fa.va+(b&a.O)|0}function Pe(a,b){a.da=b;a.bg=(a.fa.va>>>0)+(a.fa.jb>>>0)+1;a.La=a.fa.tb;He(a)}
|
||||
function yd(a,b,c,d){var e=a.fa;e.Ze=b;e.D=d;b=e.load(c);return-1!==b?(Pe(a,b+(a.fa.Ze&a.fa.O)),a.fa.ne):null}function Qe(a,b){var c=(a.da>>>0)+b;c>a.bg&&(8088>=a.ca?(c=a.fa.va+(c-a.bg&a.O),2==b&&(a.K|=8)):x.call(a,13,0));return c|0}function Re(a){a.da=a.Uc}function C(a){return a.lc&~a.W.ta|a.Aa-a.W.va}function B(a,b){a.lc=b;a.Aa=a.W.va+(b&a.W.ta)|0}
|
||||
function Se(a,b,c,d,e,f){if(63!=(e&63)&&e!=a.resultType){var g=(e^a.resultType)&a.resultType;g&&(g&1&&Te(a),g&2&&Ue(a),g&4&&Ve(a),g&8&&We(a),g&16&&Xe(a),g&32&&Ye(a))}f?(a.Zd=d,a.sd=b):(a.Zd=b,a.sd=d);a.Ee=c;a.$d=d;a.resultType=e}function Ze(a,b,c,d,e){a.resultType=c|26;a.$d=b;d?$e(a):af(a);e?bf(a):cf(a);return b}function df(a,b,c,d){c&d?$e(a):af(a);(b^c)&d?bf(a):cf(a)}function ef(a){return Te(a)?1:0}
|
||||
function Te(a){a.resultType&1&&(a.N&=-2,(a.Zd^(a.Zd^a.Ee)&(a.Ee^a.sd))&a.resultType&-2147450752&&(a.N|=1),a.resultType&=-2);return a.N&1}function Ue(a){a.resultType&2&&(a.N&=-5,38505>>((a.$d^a.$d>>4)&15)&1&&(a.N|=4),a.resultType&=-3);return a.N&4}function Ve(a){a.resultType&4&&(a.N&=-17,(a.sd^a.Zd^a.Ee)&16&&(a.N|=16),a.resultType&=-5);return a.N&16}function We(a){a.resultType&8&&(a.N&=-65,a.$d&((a.resultType&-2147450752)-1|a.resultType&-2147450752)||(a.N|=64),a.resultType&=-9);return a.N&64}
|
||||
function Xe(a){a.resultType&16&&(a.N&=-129,a.$d&a.resultType&-2147450752&&(a.N|=128),a.resultType&=-17);return a.N&128}function Ye(a){a.resultType&32&&(a.N&=-2049,(a.Zd^a.sd)&(a.Ee^a.sd)&a.resultType&-2147450752&&(a.N|=2048),a.resultType&=-33);return a.N&2048}function af(a){a.resultType&=-2;a.N&=-2}function ff(a){a.resultType&=-5;a.N&=-17}function gf(a){a.resultType&=-9;a.N&=-65}function cf(a){a.resultType&=-33;a.N&=-2049}function $e(a){a.resultType&=-2;a.N|=1}
|
||||
function hf(a){a.resultType&=-5;a.N|=16}function jf(a){a.resultType&=-9;a.N|=64}function bf(a){a.resultType&=-33;a.N|=2048}function wd(a){return a.N&-2262|Te(a)|Ue(a)|Ve(a)|We(a)|Xe(a)|Ye(a)}function kf(a,b){b|=a.pa&1|65520;a.pa=a.pa&-65536|b&65535;a.pa&1&&pd(a,!0)}function xd(a,b,c){a.pa&1||(b&=~a.Oh);void 0===c&&(c=a.La);c?b=b&-12289|a.N&12288:a.Zb=(b&12288)>>12;c>a.Zb&&(b=b&-513|a.N&512);a.resultType=128;a.N=a.N&~(a.od|2261)|b&(a.od|2261)|a.Qh;a.N&256&&(a.Qa|=2,a.K|=4)}
|
||||
function hf(a){a.resultType&=-5;a.N|=16}function jf(a){a.resultType&=-9;a.N|=64}function bf(a){a.resultType&=-33;a.N|=2048}function wd(a){return a.N&-2262|Te(a)|Ue(a)|Ve(a)|We(a)|Xe(a)|Ye(a)}function kf(a,b){b|=a.pa&1|65520;a.pa=a.pa&-65536|b&65535;a.pa&1&&od(a,!0)}function xd(a,b,c){a.pa&1||(b&=~a.Oh);void 0===c&&(c=a.La);c?b=b&-12289|a.N&12288:a.Zb=(b&12288)>>12;c>a.Zb&&(b=b&-513|a.N&512);a.resultType=128;a.N=a.N&~(a.od|2261)|b&(a.od|2261)|a.Qh;a.N&256&&(a.Qa|=2,a.K|=4)}
|
||||
function lf(a,b,c){var d=0;if(a.pa&1&&(a.La>a.Zb||a.N&131072)&&a.la.Vh)for(var e=a.la.Vh+(b>>>3),d=(1<<c)-1<<(b&7);d&&e<=a.la.ck&&!(a.Ia(e)&d);)d>>>=8,e++;return d?(x.call(a,13,0),!1):!0}
|
||||
l.Ab=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.ia[b]=c;this.ji++;a=!0;break;default:a=Dc.prototype.Ab.call(this,a,b,c)}return a};
|
||||
function mf(a,b,c,d){var e=(d?a.Nc:a.Y)[(b&a.Dc)>>>a.Eb];e&&e.type==qc&&(e=Ac(a,b,!1,!0));if(e){var f=b&a.Db;if(!c||1==c)return e.Bd(f,b);if(2==c)return f<a.Db?e.af(f,b):e.Bd(f,b)|mf(a,b+1,1,d)<<8;if(4==c)return f<a.Db-2?e.hh(f,b):f==a.Db-1?e.af(f,b)|mf(a,b+2,2,d)<<16:e.Bd(f,b)|mf(a,b+1,1,d)<<8|mf(a,b+2,1,d)<<16|mf(a,b+3,1,d)<<24}return null}l.Ia=function(a){return this.Y[(a&this.Dc)>>>this.Eb].oc(a&this.Db,a)};
|
||||
l.ga=function(a){var b=a&this.Db,c=(a&this.Dc)>>>this.Eb;this.A-=this.B.Of;if(b<this.Db)return this.Y[c].$e(b,a);b=this.Y[c].oc(b,a);this.K&4096||(b|=this.Y[c+1&this.Ae].oc(0,a+1)<<8);return b};l.ea=function(a){var b=a&this.Db,c=(a&this.Dc)>>>this.Eb;if(b<this.Db-2)return this.Y[c].Rd(b,a);for(var d=0,e=4,f=0,g=4-(b&3);e--;){d|=this.Y[c].oc(b++,a++)<<f;if(this.K&4096)break;--g||(c=c+1&this.Ae,b=0);f+=8}return d};l.Bb=function(a,b){this.Y[(a&this.Dc)>>>this.Eb].pc(a&this.Db,b&255,a)};
|
||||
l.Za=function(a,b){var c=a&this.Db,d=(a&this.Dc)>>>this.Eb;this.A-=this.B.Of;c<this.Db?this.Y[d].gf(c,b&65535,a):(this.Y[d++].pc(c,b&255,a),this.K&4096||this.Y[d&this.Ae].pc(0,b>>8&255,a+1))};l.Ta=function(a,b){var c=a&this.Db,d=(a&this.Dc)>>>this.Eb;this.A-=this.B.Of;if(c<this.Db-2)this.Y[d].ff(c,b,a);else for(var e=4,f=4-(c&3);e--;){this.Y[d].pc(c++,b&255,a++);if(this.K&4096)break;--f||(d=d+1&this.Ae,c=0);b>>>=8}};function nf(a,b,c){a.Da=b;a.fb=c&a.ta;a.C=b.sb(a.fb,1);return a.K&1?0:a.Ia(a.C)}
|
||||
function mf(a,b,c,d){var e=(d?a.Nc:a.X)[(b&a.Dc)>>>a.Eb];e&&e.type==qc&&(e=Ac(a,b,!1,!0));if(e){var f=b&a.Db;if(!c||1==c)return e.Bd(f,b);if(2==c)return f<a.Db?e.af(f,b):e.Bd(f,b)|mf(a,b+1,1,d)<<8;if(4==c)return f<a.Db-2?e.hh(f,b):f==a.Db-1?e.af(f,b)|mf(a,b+2,2,d)<<16:e.Bd(f,b)|mf(a,b+1,1,d)<<8|mf(a,b+2,1,d)<<16|mf(a,b+3,1,d)<<24}return null}l.Ia=function(a){return this.X[(a&this.Dc)>>>this.Eb].oc(a&this.Db,a)};
|
||||
l.ga=function(a){var b=a&this.Db,c=(a&this.Dc)>>>this.Eb;this.A-=this.B.Of;if(b<this.Db)return this.X[c].$e(b,a);b=this.X[c].oc(b,a);this.K&4096||(b|=this.X[c+1&this.Ae].oc(0,a+1)<<8);return b};l.ea=function(a){var b=a&this.Db,c=(a&this.Dc)>>>this.Eb;if(b<this.Db-2)return this.X[c].Rd(b,a);for(var d=0,e=4,f=0,g=4-(b&3);e--;){d|=this.X[c].oc(b++,a++)<<f;if(this.K&4096)break;--g||(c=c+1&this.Ae,b=0);f+=8}return d};l.Bb=function(a,b){this.X[(a&this.Dc)>>>this.Eb].pc(a&this.Db,b&255,a)};
|
||||
l.Za=function(a,b){var c=a&this.Db,d=(a&this.Dc)>>>this.Eb;this.A-=this.B.Of;c<this.Db?this.X[d].gf(c,b&65535,a):(this.X[d++].pc(c,b&255,a),this.K&4096||this.X[d&this.Ae].pc(0,b>>8&255,a+1))};l.Ta=function(a,b){var c=a&this.Db,d=(a&this.Dc)>>>this.Eb;this.A-=this.B.Of;if(c<this.Db-2)this.X[d].ff(c,b,a);else for(var e=4,f=4-(c&3);e--;){this.X[d].pc(c++,b&255,a++);if(this.K&4096)break;--f||(d=d+1&this.Ae,c=0);b>>>=8}};function nf(a,b,c){a.Da=b;a.fb=c&a.ta;a.C=b.sb(a.fb,1);return a.K&1?0:a.Ia(a.C)}
|
||||
function I(a,b){return nf(a,a.Ca,b)}function J(a,b){return nf(a,a.Gb,b)}function of(a,b,c){a.Da=b;a.fb=c&a.ta;a.C=b.sb(a.fb,a.T);if(a.K&9){if(a.K&1)return 0;a=a.Ia(a.C)|a.Ia(b.sb(0,1))<<8}else a=a.mb(a.C);return a}function K(a,b){a.Da=a.Ca;a.fb=b&a.ta;a.C=a.Da.sb(a.fb,2);if(a.K&9){if(a.K&1)return 0;b=a.Ia(a.C)|a.Ia(a.Da.sb(0,1))<<8;a.K&=-9}else b=a.ga(a.C);return b}
|
||||
function L(a,b){a.Da=a.Gb;a.fb=b&a.ta;a.C=a.Da.sb(a.fb,2);if(a.K&9){if(a.K&1)return 0;b=a.Ia(a.C)|a.Ia(a.Da.sb(0,1))<<8;a.K&=-9}else b=a.ga(a.C);return b}function M(a,b){a.Da=a.Ca;a.fb=b&a.ta;a.C=a.Da.sb(a.fb,4);return a.K&1?0:a.ea(a.C)}function O(a,b){a.Da=a.Gb;a.fb=b&a.ta;a.C=a.Da.sb(a.fb,4);return a.K&1?0:a.ea(a.C)}function pf(a,b){a.K&2||a.Bb(a.Da.Kb(a.fb,1),b)}function qf(a,b){if(!(a.K&2)){var c=a.Da.Kb(a.fb,2);a.K&8?(a.Bb(c,b),a.Bb(a.Da.Kb(0,1),b>>8),a.K&=-9):a.Za(c,b)}}
|
||||
function rf(a,b){a.K&2||a.Ta(a.Da.Kb(a.fb,4),b)}function rd(a,b,c){c=b.sb(c,a.T);a.K&8?(b=a.Ia(c)|a.Ia(b.sb(0,1))<<8,a.K&=-9):b=a.mb(c);return b}function sf(a,b,c,d){c=b.Kb(c,a.T);a.K&8?(a.Bb(c,d),a.Bb(b.Kb(0,1),d>>8),a.K&=-9):a.Lb(c,d)}l.ka=function(){var a=Qe(this,1),b=this.Ia(this.da);this.da=a;return b};function tf(a){var b,c=Qe(a,2);a.K&8?(b=a.Ia(a.da)|a.Ia(c-1)<<8,a.K&=-9):b=a.ga(a.da);a.da=c;return b}
|
||||
function Q(a){var b,c=Qe(a,a.Jc);a.K&8?(b=a.Ia(a.da)|a.Ia(c-1)<<8,a.K&=-9):b=a.ni(a.da);a.da=c;return b}l.ya=function(){var a,b=Qe(this,this.T);this.K&8?(a=this.Ia(this.da)|this.Ia(b-1)<<8,this.K&=-9):a=this.mb(this.da);this.da=b;return a};l.P=function(){var a=Qe(this,1),b=this.Ia(this.da)<<24>>24;this.da=a;return b};
|
||||
function A(a){var b=a.mb(a.Aa);a.Aa=a.Aa+a.T|0;var c=(a.ti>>>0)-(a.Aa>>>0);0>c&&(8088>=a.ca?(B(a,a.Aa-a.W.va&a.W.ta),-1>c&&(b=b&255|a.Ia(a.Aa-1)<<8)):-1>c?x.call(a,12,0):(!a.W.ke&&a.W.jb==a.W.ta||a.W.ke&&!a.W.jb)&&B(a,a.Aa-a.W.va&a.W.ta));return b}function E(a,b){sd(a,b,a.T)}
|
||||
function sd(a,b,c,d){d=void 0===d?c:d;var e=a.Aa-c|0,f=(e>>>0)-(a.ui>>>0);if(0>f){if(8088>=a.ca&&-1==f){a.Bb(e+1,b>>8);B(a,e-a.W.va&a.W.ta);a.Bb(a.Aa,b);return}if(!a.W.ke&&a.W.jb==a.W.ta||a.W.ke&&!a.W.jb){if(f>-c){x.call(a,12,0);return}B(a,e-a.W.va&a.W.ta);e=a.Aa}else{x.call(a,12,0);return}}switch(d){case 1:a.Bb(e,b);break;case 2:a.Za(e,b);break;case 4:a.Ta(e,b)}a.Aa=e}
|
||||
function uf(a,b,c){var d=4;1==b.length&&(d=1,c=c?1:0);if(80386>a.ca)2<b.length&&(b=b.substr(1,2));else if("PS"==b||2<b.length)d=8;a.ia[b]&&(void 0===c&&(nb(a,"Value for "+b+" is invalid"),Mc(a)),d=!a.X.cb||a.X.ei?ja(c,d):"--------".substr(0,d),a.ia[b].textContent!=d&&(a.ia[b].textContent=d))}
|
||||
l.uh=function(a){this.X.complete=!0;this.X.hk=!1;this.X.Pj=!1;this.dd=this.A=a;this.U&&!a&&Xc(this.U);a||(this.K|=4);do{if(a=this.K&3312)this.ba|=a;else if(this.Uc=this.da,this.Ca=this.Ga,this.Gb=this.W,this.C=this.D=-1,this.ba&3072&&He(this),this.ba=this.K&256,this.Qa){a:if(!(this.K&4)){a=80286>this.ca?0:1;for(var b=0;2>b;b++){switch(a){case 0:if(this.Qa&1&&this.N&512){var c=vf(this.U);if(-1<=c&&(this.Qa&=-2,0<=c)){this.Qa&=-5;wf.call(this,c);break a}}break;case 1:if(this.Qa&2){this.Qa&=-3;80386<=
|
||||
this.ca&&(this.Cb[6]|=16384);wf.call(this,1);break a}}a=1-a}}if(this.Qa&4){this.K=this.A=0;break}}this.K=0;this.ra[this.ka()].call(this)}while(0<this.A);return this.X.complete?this.dd-this.A:void 0===this.X.complete?0:-1};var ie=512;Ma(function(){for(var a=cb(document,"pcx86","cpu"),b=0;b<a.length;b++){var c=a[b],d=db(c),d=new Ad(d);bb(d,c)}});
|
||||
function xf(a){u.call(this,"FPU",a);this.ca=a.model||8087;this.H=new Float64Array(8);this.aa=new Int32Array(this.H.buffer);this.Y=new Float32Array(1);this.ja=new Int32Array(this.Y.buffer);this.K=new Float64Array(1);this.G=new Int32Array(this.K.buffer);this.D=Array(3);this.L=this.M=-1;this.I=this.J=this.N=this.A=0;this.W=new Float64Array(1);this.ba=new Int32Array(this.W.buffer);this.ba[0]=0;this.ba[1]=268402688;yf(this);this.fa=xf.prototype.lh;this.da=xf.prototype.Oj}ca(xf,u);l=xf.prototype;
|
||||
function uf(a,b,c){var d=4;1==b.length&&(d=1,c=c?1:0);if(80386>a.ca)2<b.length&&(b=b.substr(1,2));else if("PS"==b||2<b.length)d=8;a.ia[b]&&(void 0===c&&(nb(a,"Value for "+b+" is invalid"),Mc(a)),d=!a.Y.cb||a.Y.ei?ja(c,d):"--------".substr(0,d),a.ia[b].textContent!=d&&(a.ia[b].textContent=d))}
|
||||
l.uh=function(a){this.Y.complete=!0;this.Y.hk=!1;this.Y.Pj=!1;this.dd=this.A=a;this.U&&!a&&Xc(this.U);a||(this.K|=4);do{if(a=this.K&3312)this.ba|=a;else if(this.Uc=this.da,this.Ca=this.Ga,this.Gb=this.W,this.C=this.D=-1,this.ba&3072&&He(this),this.ba=this.K&256,this.Qa){a:if(!(this.K&4)){a=80286>this.ca?0:1;for(var b=0;2>b;b++){switch(a){case 0:if(this.Qa&1&&this.N&512){var c=vf(this.U);if(-1<=c&&(this.Qa&=-2,0<=c)){this.Qa&=-5;wf.call(this,c);break a}}break;case 1:if(this.Qa&2){this.Qa&=-3;80386<=
|
||||
this.ca&&(this.Cb[6]|=16384);wf.call(this,1);break a}}a=1-a}}if(this.Qa&4){this.K=this.A=0;break}}this.K=0;this.ra[this.ka()].call(this)}while(0<this.A);return this.Y.complete?this.dd-this.A:void 0===this.Y.complete?0:-1};var ie=512;Ma(function(){for(var a=cb(document,"pcx86","cpu"),b=0;b<a.length;b++){var c=a[b],d=db(c),d=new Ad(d);bb(d,c)}});
|
||||
function xf(a){u.call(this,"FPU",a);this.ca=a.model||8087;this.H=new Float64Array(8);this.aa=new Int32Array(this.H.buffer);this.X=new Float32Array(1);this.ja=new Int32Array(this.X.buffer);this.K=new Float64Array(1);this.G=new Int32Array(this.K.buffer);this.D=Array(3);this.L=this.M=-1;this.I=this.J=this.N=this.A=0;this.W=new Float64Array(1);this.ba=new Int32Array(this.W.buffer);this.ba[0]=0;this.ba[1]=268402688;yf(this);this.fa=xf.prototype.lh;this.da=xf.prototype.Oj}ca(xf,u);l=xf.prototype;
|
||||
l.kc=function(a,b,c){this.R=c;this.U=tb(a,"ChipSet");v(this)};l.Rb=function(a,b){if(!b)if(!a||!this.restore)yf(this);else if(!this.restore(a))return!1;return!0};l.Qb=function(a){return a?this.save():!0};l.save=function(){var a=new Me(this),b=[],c=0;b[c++]=this.F;b[c++]=this.Z|this.B<<11;b[c++]=zf(this);for(var d=0;d<this.H.length;d++)b[c++]=this.H[d];a.set(0,b);return a.data()};
|
||||
l.restore=function(a){a=a[0];var b=0;this.F=a[b++]&-57409;var c=a[b++];this.Z=c&-14337;this.B=(c&14336)>>11;Af(this);Bf(this,a[b++]);for(c=0;c<this.H.length;c++)this.H[c]=a[b++];return!0};function yf(a){a.C=0;a.F=959;a.Z=0;a.B=0;a.U&&(a=a.U,a.ca>=Cf&&Df(a,Ef))}function Af(a){a.Z&=-129;a.Z&~a.F&63&&(a.Z|=128);if(a.Z&128&&!(a.F&128))return a=a.U,a.ca>=Cf?Ff(a,Ef):a.da&Gf||wf.call(a.R,2),!0;a=a.U;a.ca>=Cf&&Df(a,Ef);return!1}function Hf(a,b){80387<=a.ca||(b&=-65);a.Z|=b;return Af(a)}
|
||||
function If(a,b){return isFinite(b)?!0:!Hf(a,Infinity===b?8:16)}function Jf(a,b,c){var d=null;null!=b&&null!=c&&(d=b+c,If(a,d)||(d=null));return d}function Kf(a,b,c){var d=null;null!=b&&null!=c&&(d=b-c,If(a,d)||(d=null));return d}function Lf(a,b,c){var d=null;null!=b&&null!=c&&(d=b*c,If(a,d)||(d=null));return d}function Mf(a,b,c){var d=null;null==b||null==c||!c&&Hf(a,2)||(d=b/c,If(a,d)||(d=null));return d}
|
||||
function Nf(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.Z=a.Z&-18177|d;return!0}return!1}function Of(a,b,c){if(null==b)return null;var d=a.F&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(Hf(a,1))return null;d=-c}else if(d<-c){if(Hf(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 Pf(a,b){var c=3;a.C&1<<b&&(a=a.H[b],c=0,a?isFinite(a)||(c=2):c=1);return c}function zf(a){for(var b=0,c=a.H.length-1;0<=c;c--)b<<=2,b|=Pf(a,c);return b}function Bf(a,b){a.C=0;for(var c=1;128>=c;c<<=1)3!=(b&3)&&(a.C|=c),b>>=2}function Qf(a){var b=a.B+0&7;return a.C&1<<b?(a.Y[0]=a.H[b],!0):Hf(a,1)?!1:(a.Y[0]=a.W[0],!0)}function Rf(a){var b=a.B+0&7;return a.C&1<<b?(a.K[0]=a.H[b],!0):Hf(a,1)?!1:(a.K[0]=a.W[0],!0)}
|
||||
function Pf(a,b){var c=3;a.C&1<<b&&(a=a.H[b],c=0,a?isFinite(a)||(c=2):c=1);return c}function zf(a){for(var b=0,c=a.H.length-1;0<=c;c--)b<<=2,b|=Pf(a,c);return b}function Bf(a,b){a.C=0;for(var c=1;128>=c;c<<=1)3!=(b&3)&&(a.C|=c),b>>=2}function Qf(a){var b=a.B+0&7;return a.C&1<<b?(a.X[0]=a.H[b],!0):Hf(a,1)?!1:(a.X[0]=a.W[0],!0)}function Rf(a){var b=a.B+0&7;return a.C&1<<b?(a.K[0]=a.H[b],!0):Hf(a,1)?!1:(a.K[0]=a.W[0],!0)}
|
||||
function R(a,b){var c=null;b=a.B+b&7;a.C&1<<b?c=a.H[b]:Hf(a,1)||(c=a.W[0]);return c}function S(a,b,c){return null!=c&&(isNaN(c)?!Hf(a,1):1)?(b=a.B+b&7,a.H[b]=c,a.C|=1<<b,!0):!1}function Sf(a,b,c){var d=null;b=a.B+b&7;if(c||a.C&1<<b||!Hf(a,1)){d=b<<1;c=a.aa[d];d=a.aa[d+1];b=d>>20&2047;var e=2147483648|(d&1048575)<<11|c>>>21;2047==b?b=32767:b?b+=15360:e&=2147483647;a.D[0]=c<<11;a.D[1]=e;a.D[2]=d>>16&32768|b;d=a.D}return d}function Tf(a){return a.R.ga(a.R.C)<<16>>16}
|
||||
function Uf(a){return a.R.ea(a.R.C)}function Xf(a){a.ja[0]=a.R.ea(a.R.C);return a.Y[0]}function Yf(a){a.G[0]=a.R.ea(a.R.C);a.G[1]=a.R.ea(a.R.C+4);return a.K[0]}function Zf(a){a.D[0]=a.R.ea(a.R.C);a.D[1]=a.R.ea(a.R.C+4);a.D[2]=a.R.ga(a.R.C+8);return a.D}l.lh=function(){this.R.Ta(this.R.C,this.G[0])};l.Oj=function(){this.R.Ta(this.R.C,this.G[0]);this.R.Ta(this.R.C+4,this.G[1])};function $f(a){a.R.Ta(a.R.C,a.D[0]);a.R.Ta(a.R.C+4,a.D[1]);a.R.Za(a.R.C+8,a.D[2])}
|
||||
function Uf(a){return a.R.ea(a.R.C)}function Vf(a){a.ja[0]=a.R.ea(a.R.C);return a.X[0]}function Yf(a){a.G[0]=a.R.ea(a.R.C);a.G[1]=a.R.ea(a.R.C+4);return a.K[0]}function Zf(a){a.D[0]=a.R.ea(a.R.C);a.D[1]=a.R.ea(a.R.C+4);a.D[2]=a.R.ga(a.R.C+8);return a.D}l.lh=function(){this.R.Ta(this.R.C,this.G[0])};l.Oj=function(){this.R.Ta(this.R.C,this.G[0]);this.R.Ta(this.R.C+4,this.G[1])};function $f(a){a.R.Ta(a.R.C,a.D[0]);a.R.Ta(a.R.C+4,a.D[1]);a.R.Za(a.R.C+8,a.D[2])}
|
||||
function ag(a,b){var c=b[1],d=(b[2]&32768)>>4,e=b[2]&32767;b=b[0]>>>11|c<<21;c=c>>11&1048575;32767==e?e=2047:e&&(e+=-15360,0>=e&&(e=2047,b=c=0));a.G[0]=b;a.G[1]=c|(d|e)<<20;return a.K[0]}function bg(a,b){for(var c=0,d=1;b--;)c+=(a&15)*d,d*=10,a>>=4;return c}function cg(a,b){for(var c=0,d=0;b--;)c|=a%10<<d,a/=10,d+=4;return c}function dg(a){var b=null,c=1<<a.B;if(!(a.C&c)&&(a.Z&=-513,Hf(a,65)))return b;a.C&=~c;b=a.H[a.B];a.B=a.B+1&7;return b}
|
||||
function eg(a,b){if(null!=b){var c=a.B-1&7,d=1<<c;if(a.C&d&&(a.Z|=512,Hf(a,65)))return;if(isNaN(b)&&Hf(a,1)){if(Hf(a,1))return;b=NaN}a.H[a.B=c]=b;a.C|=d}}
|
||||
function fg(a,b){var c,d=a.R;c=d.mb(b);a.F=c&-57409;c=d.mb(b+=d.T);a.Z=c&-14337;a.B=(c&14336)>>11;Af(a);Bf(a,d.mb(b+=d.T));!(d.pa&1)||d.N&131072?(a.I=d.mb(b+=d.T),c=d.mb(b+=d.T),a.N=c&2047,a.I|=(c&-4096)<<4,a.L=-1,a.J=d.mb(b+=d.T),a.J|=(d.mb(b+=d.T)&-4096)<<4,a.M=-1):(a.I=d.mb(b+=d.T),c=d.mb(b+=d.T),a.L=c&65535,a.N=c>>16&2047,a.J=d.mb(b+=d.T),a.M=d.mb(b+=d.T)&65535);return b+d.T}
|
||||
function gg(a,b){var c=a.R;c.Lb(b,a.F);c.Lb(b+=c.T,a.Z|a.B<<11);c.Lb(b+=c.T,zf(a));if(!(c.pa&1)||c.N&131072){var d=(a.L<<4)+a.I;c.Lb(b+=c.T,d);c.Lb(b+=c.T,d>>4&-4096|a.N);d=(a.M<<4)+a.J;c.Lb(b+=c.T,d);c.Lb(b+=c.T,d>>4&-4096)}else c.Lb(b+=c.T,a.I),c.Lb(b+=c.T,a.L|a.N<<16),c.Lb(b+=c.T,a.J),c.Lb(b+=c.T,a.M);return b+c.T}function hg(){this.Z&=-32896;Af(this)}function ig(){Nf(this,R(this,0),R(this,this.A))}function jg(){Nf(this,R(this,0),R(this,this.A))&&dg(this)}function kg(){jg.call(this)}
|
||||
function lg(){S(this,0,Mf(this,R(this,0),Xf(this)))}function mg(){this.C&=~(1<<this.B)}function ng(){yf(this)}function og(){this.F=this.R.ga(this.R.C)&-57409}function pg(){fg(this,this.R.C)}function qg(){for(var a=this.R,b=fg(this,a.C),c=this.D,d=0;d<this.H.length;d++)c[0]=a.ea(b),c[1]=a.ea(b+=4),c[2]=a.ga(b+=4),c&&S(this,d,ag(this,c)),b+=2}function rg(){for(var a=this.R,b=gg(this,a.C),c=0;c<this.H.length;c++){var d=Sf(this,c,!0);a.Ta(b,d[0]);a.Ta(b+=4,d[1]);a.Za(b+=4,d[2]);b+=2}yf(this)}
|
||||
function lg(){S(this,0,Mf(this,R(this,0),Vf(this)))}function mg(){this.C&=~(1<<this.B)}function ng(){yf(this)}function og(){this.F=this.R.ga(this.R.C)&-57409}function pg(){fg(this,this.R.C)}function qg(){for(var a=this.R,b=fg(this,a.C),c=this.D,d=0;d<this.H.length;d++)c[0]=a.ea(b),c[1]=a.ea(b+=4),c[2]=a.ga(b+=4),c&&S(this,d,ag(this,c)),b+=2}function rg(){for(var a=this.R,b=gg(this,a.C),c=0;c<this.H.length;c++){var d=Sf(this,c,!0);a.Ta(b,d[0]);a.Ta(b+=4,d[1]);a.Za(b+=4,d[2]);b+=2}yf(this)}
|
||||
function sg(){gg(this,this.R.C);this.F|=63}function tg(){S(this,this.A,R(this,0))&&dg(this)}function ug(){tg.call(this)}function vg(){this.R.Za(this.R.C,this.F)}function wg(){this.R.Za(this.R.C,this.Z|this.B<<11)}function xg(){80287<=this.ca&&(this.R.F=this.R.F&-65536|this.Z|this.B<<11)}function yg(){var a=R(this,0);S(this,0,R(this,this.A));S(this,this.A,a)}function zg(){yg.call(this)}
|
||||
var Ag=Math.log(10)/Math.LN2,Bg=Math.LOG2E,Cg=Math.PI,Dg=Math.log(2)/Math.LN10,Eg=Math.LN2,Fg=Math.pow(2,63),Gg={216:{0:function(){S(this,0,Jf(this,R(this,0),Xf(this)))},1:function(){S(this,0,Lf(this,R(this,0),Xf(this)))},2:function(){Nf(this,R(this,0),Xf(this))},3:function(){Nf(this,R(this,0),Xf(this))&&dg(this)},4:function(){S(this,0,Kf(this,R(this,0),Xf(this)))},5:function(){S(this,0,Kf(this,Xf(this),R(this,0)))},6:lg,7:lg,48:function(){S(this,0,Jf(this,R(this,0),R(this,this.A)))},49:function(){S(this,
|
||||
0,Lf(this,R(this,0),R(this,this.A)))},50:ig,51:jg,52:function(){S(this,0,Kf(this,R(this,0),R(this,this.A)))},53:function(){S(this,0,Kf(this,R(this,this.A),R(this,0)))},54:function(){S(this,0,Mf(this,R(this,0),R(this,this.A)))},55:function(){S(this,0,Mf(this,R(this,this.A),R(this,0)))}},217:{0:function(){eg(this,Xf(this))},2:function(){Qf(this)&&this.fa()},3:function(){Qf(this)&&(this.fa(),dg(this))},4:pg,5:og,6:sg,7:vg,48:function(){eg(this,R(this,this.A))},49:yg,50:function(){},51:ug,64:function(){S(this,
|
||||
var Ag=Math.log(10)/Math.LN2,Bg=Math.LOG2E,Cg=Math.PI,Dg=Math.log(2)/Math.LN10,Eg=Math.LN2,Fg=Math.pow(2,63),Gg={216:{0:function(){S(this,0,Jf(this,R(this,0),Vf(this)))},1:function(){S(this,0,Lf(this,R(this,0),Vf(this)))},2:function(){Nf(this,R(this,0),Vf(this))},3:function(){Nf(this,R(this,0),Vf(this))&&dg(this)},4:function(){S(this,0,Kf(this,R(this,0),Vf(this)))},5:function(){S(this,0,Kf(this,Vf(this),R(this,0)))},6:lg,7:lg,48:function(){S(this,0,Jf(this,R(this,0),R(this,this.A)))},49:function(){S(this,
|
||||
0,Lf(this,R(this,0),R(this,this.A)))},50:ig,51:jg,52:function(){S(this,0,Kf(this,R(this,0),R(this,this.A)))},53:function(){S(this,0,Kf(this,R(this,this.A),R(this,0)))},54:function(){S(this,0,Mf(this,R(this,0),R(this,this.A)))},55:function(){S(this,0,Mf(this,R(this,this.A),R(this,0)))}},217:{0:function(){eg(this,Vf(this))},2:function(){Qf(this)&&this.fa()},3:function(){Qf(this)&&(this.fa(),dg(this))},4:pg,5:og,6:sg,7:vg,48:function(){eg(this,R(this,this.A))},49:yg,50:function(){},51:ug,64:function(){S(this,
|
||||
0,-R(this,0))},65:function(){S(this,0,Math.abs(R(this,0)))},68:function(){Nf(this,R(this,0),0)},69:function(){this.Z&=-18177;this.aa[((this.B+0&7)<<1)+1]&-2147483648&&(this.Z|=512);if(3==Pf(this,this.B))this.Z|=16640;else{var a=R(this,0);this.Z=isNaN(a)?this.Z|256:0===a?this.Z|16384:Infinity===a||-Infinity===a?this.Z|1280:this.Z|1024}},80:function(){eg(this,1)},81:function(){eg(this,Ag)},82:function(){eg(this,Bg)},83:function(){eg(this,Cg)},84:function(){eg(this,Dg)},85:function(){eg(this,Eg)},86:function(){eg(this,
|
||||
0)},96:function(){S(this,0,Math.pow(2,R(this,0))-1)},97:function(){S(this,1,R(this,1)*Math.log(R(this,0))/Math.LN2)&&dg(this)},98:function(){S(this,0,Math.tan(R(this,0)))&&eg(this,1)},99:function(){S(this,1,Math.atan2(R(this,1),R(this,0)))&&dg(this)},100:function(){var a=R(this,0);null!=a&&(this.K[0]=a,S(this,0,(this.G[1]>>20&2047)-1023),this.G[1]=(this.G[1]|1072693248)&-1073741825,eg(this,this.K[0]))},102:function(){this.B=this.B-1&7;this.Z&=-513},103:function(){this.B=this.B+1&7;this.Z&=-513},112:function(){S(this,
|
||||
0,R(this,0)%R(this,1))},113:function(){S(this,1,R(this,1)*Math.log(R(this,0)+1)/Math.LN2)&&dg(this)},114:function(){var a=R(this,0),b=null;if(0<=a||!Hf(this,1))b=Math.sqrt(a),If(this,b)||(b=null);S(this,0,b)},116:function(){S(this,0,Of(this,R(this,0),Fg))},117:function(){var a=R(this,0),b=R(this,1);null!=a&&null!=b&&S(this,0,a*Math.pow(2,0<b?Math.floor(b):Math.ceil(b)))}},218:{0:function(){S(this,0,Jf(this,R(this,0),Uf(this)))},1:function(){S(this,0,Lf(this,R(this,0),Uf(this)))},2:function(){Nf(this,
|
||||
|
|
@ -223,18 +223,18 @@ function vh(a,b){switch(this.aa>>3&7){case 0:b=this.xa.ha;break;case 1:b=this.fa
|
|||
function ih(a,b){if(a&-65536||b&-65536){var c=b&65535;b>>>=16;var d=a&65535;a>>>=16;var e=c*d,d=(e>>>16)+b*d,f=d>>>16,d=(d&65535)+c*a;this.Ba=d<<16|e&65535;this.Sa=f+((d>>>16)+b*a)|0}else this.Ba=a*b|0,this.Sa=0}function wh(a,b){this.A-=-1===this.D?-1===this.C?this.B.$b:this.B.zb:this.B.nc;return Ze(this,a|b,128)}function xh(a,b){this.A-=-1===this.D?-1===this.C?this.B.$b:this.B.zb:this.B.nc;return Ze(this,a|b,this.wb)&this.O}
|
||||
function yh(a,b){var c=a-b-ef(this)|0;Se(this,a,b,c,191,!0);this.A-=-1===this.D?-1===this.C?this.B.$b:this.B.zb:this.B.nc;return c&255}function zh(a,b){var c=a-b-ef(this)|0;Se(this,a,b,c,this.wb|63,!0);this.A-=-1===this.D?-1===this.C?this.B.$b:this.B.zb:this.B.nc;return c&this.O}function Ah(){return Ye(this)?1:0}function Bh(){return Te(this)?1:0}function Ch(){return Te(this)?0:1}function Dh(){return We(this)?1:0}function Eh(){return We(this)?0:1}function Fh(){return Te(this)||We(this)?1:0}
|
||||
function Gh(){return Te(this)||We(this)?0:1}function Hh(){return Xe(this)?1:0}function Ih(){return Xe(this)?0:1}function Jh(){return Ue(this)?1:0}function Kh(){return Ue(this)?0:1}function Lh(){return!Xe(this)!=!Ye(this)?1:0}function Mh(){return!Xe(this)!=!Ye(this)?0:1}function Nh(){return We(this)||!Xe(this)!=!Ye(this)?1:0}function Oh(){return We(this)||!Xe(this)!=!Ye(this)?0:1}function Ph(a,b){return Qh.call(this,a,b,this.ka())}function Rh(a,b){return Sh.call(this,a,b,this.ka())}
|
||||
function Th(a,b){return Qh.call(this,a,b,this.H&31)}function Uh(a,b){return Sh.call(this,a,b,this.H&31)}function Vh(a,b){return Wh.call(this,a,b,this.ka())}function Xh(a,b){return ai.call(this,a,b,this.ka())}function bi(a,b){return Wh.call(this,a,b,this.H&31)}function ci(a,b){return ai.call(this,a,b,this.H&31)}function di(a,b){var c=a-b|0;Se(this,a,b,c,191,!0);this.A-=-1===this.D?-1===this.C?this.B.$b:this.B.zb:this.B.nc;return c&255}
|
||||
function Th(a,b){return Qh.call(this,a,b,this.H&31)}function Uh(a,b){return Sh.call(this,a,b,this.H&31)}function Vh(a,b){return Wh.call(this,a,b,this.ka())}function Xh(a,b){return Yh.call(this,a,b,this.ka())}function bi(a,b){return Wh.call(this,a,b,this.H&31)}function ci(a,b){return Yh.call(this,a,b,this.H&31)}function di(a,b){var c=a-b|0;Se(this,a,b,c,191,!0);this.A-=-1===this.D?-1===this.C?this.B.$b:this.B.zb:this.B.nc;return c&255}
|
||||
function ei(a,b){var c=a-b|0;Se(this,a,b,c,this.wb|63,!0);this.A-=-1===this.D?-1===this.C?this.B.$b:this.B.zb:this.B.nc;return c&this.O}function fi(a,b){Ze(this,a&b,128);this.A-=-1===this.D?-1===this.C?this.B.ah:this.B.Ve:this.B.Ve;this.K|=2;return a}function gi(a,b){Ze(this,a&b,this.wb);this.A-=-1===this.D?-1===this.C?this.B.ah:this.B.Ve:this.B.Ve;this.K|=2;return a}function hi(a,b){var c=this.F&this.O,d=(1<<(this.H&31))-1;return a&~(d<<c)|(b&d)<<c}
|
||||
function ii(a,b){return b>>(this.F&this.O)&(1<<(this.H&31))-1&this.O}function ji(a,b){if(-1===this.C){switch(this.aa&7){case 0:this.F=this.F&-256|a;break;case 1:this.H=this.H&-256|a;break;case 2:this.L=this.L&-256|a;break;case 3:this.G=this.G&-256|a;break;case 4:this.F=this.F&-65281|a<<8;break;case 5:this.H=this.H&-65281|a<<8;break;case 6:this.L=this.L&-65281|a<<8;break;case 7:this.G=this.G&-65281|a<<8}this.A-=this.B.dh}else this.D=this.C,pf(this,a),this.A-=this.B.bh;return b}
|
||||
function ki(a,b){if(-1===this.C){switch(this.aa&7){case 0:this.F=this.F&~this.O|a;break;case 1:this.H=this.H&~this.O|a;break;case 2:this.L=this.L&~this.O|a;break;case 3:this.G=this.G&~this.O|a;break;case 4:B(this,C(this)&~this.O|a);break;case 5:this.M=this.G&~this.O|a;break;case 6:this.J=this.J&~this.O|a;break;case 7:this.I=this.I&~this.O|a}this.A-=this.B.dh}else{this.D=this.C;if(!(this.K&2)){var c=this.Da.Kb(this.fb,this.T);this.K&8?(this.Bb(c,a),this.Bb(this.Da.Kb(0,1),a>>8),this.K&=-9):this.Lb(c,
|
||||
a)}this.A-=this.B.bh}return b}function li(a,b){a^=b;Ze(this,a,128);this.A-=-1===this.D?-1===this.C?this.B.$b:this.B.zb:this.B.nc;return a}function mi(a,b){this.A-=-1===this.D?-1===this.C?this.B.$b:this.B.zb:this.B.nc;return Ze(this,a^b,this.wb)&this.O}function ni(a,b){var c=a[1]-b[1];c||(c=a[0]-b[0]);return c}function oi(a){var b=a-1|0;Se(this,a,1,b,this.wb|62,!0);this.A-=2;return a&~this.O|b&this.O}
|
||||
function pi(a,b,c){c>>>=0;if(!c||c<=b>>>0)return!1;var d=0,e=1,f=this.Jl;f[0]=c>>>0;f[1]=0;c=this.Ol;c[0]=a>>>0;for(c[1]=b>>>0;0<ni(c,f);)b=a=f,a[0]+=b[0],a[1]+=b[1],4294967295<a[0]&&(a[0]>>>=0,a[1]++),e+=e;do 0<=ni(c,f)&&(a=c,b=f,a[0]-=b[0],a[1]-=b[1],0>a[0]&&(a[0]>>>=0,a[1]--),d+=e),a=f,a[0]>>>=1,a[1]&1&&(a[0]=(a[0]|2147483648)>>>0),a[1]>>>=1,e/=2;while(1<=e);this.Ba=d;this.Sa=c[0];return!0}function qi(a){var b=a+1|0;Se(this,a,1,b,this.wb|62);this.A-=2;return a&~this.O|b&this.O}
|
||||
function pi(a,b,c){c>>>=0;if(!c||c<=b>>>0)return!1;var d=0,e=1,f=this.Nl;f[0]=c>>>0;f[1]=0;c=this.Sl;c[0]=a>>>0;for(c[1]=b>>>0;0<ni(c,f);)b=a=f,a[0]+=b[0],a[1]+=b[1],4294967295<a[0]&&(a[0]>>>=0,a[1]++),e+=e;do 0<=ni(c,f)&&(a=c,b=f,a[0]-=b[0],a[1]-=b[1],0>a[0]&&(a[0]>>>=0,a[1]--),d+=e),a=f,a[0]>>>=1,a[1]&1&&(a[0]=(a[0]|2147483648)>>>0),a[1]>>>=1,e/=2;while(1<=e);this.Ba=d;this.Sa=c[0];return!0}function qi(a){var b=a+1|0;Se(this,a,1,b,this.wb|62);this.A-=2;return a&~this.O|b&this.O}
|
||||
function zd(a){this.Vc=a;this.pa&-2147483648&&Mb(this)}function ri(a){this.K|=1;this.ec.call(this,a);this.A-=-1===this.C?4:5}function Qh(a,b,c){if(c){16<c&&(a=b,c-=16);var d=a<<c-1;a=(d<<1|b>>>16-c)&65535;Ze(this,a,32768,d&32768)}return a}function Sh(a,b,c){if(c){var d=a<<c-1;a=d<<1|b>>>32-c;Ze(this,a,-2147483648,d&-2147483648)}return a}function Wh(a,b,c){if(c){16<c&&(a=b,c-=16);var d=a>>>c-1;a=(d>>>1|b<<16-c)&65535;Ze(this,a,32768,d&1)}return a}
|
||||
function ai(a,b,c){if(c){var d=a>>>c-1;a=d>>>1|b<<32-c;Ze(this,a,-2147483648,d&1)}return a}function si(){this.A-=-1===this.C?2:this.B.yj;return 1}function ti(){var a=this.H&255;this.A-=(-1===this.C?this.B.Ug:this.B.Tg)+(a<<this.B.Vg);return a}function ui(){var a=this.ka();this.A-=(-1===this.C?this.B.Ug:this.B.Tg)+(a<<this.B.Vg);return a}function vi(){return null}function wi(){return this.ua}
|
||||
function Yh(a,b,c){if(c){var d=a>>>c-1;a=d>>>1|b<<32-c;Ze(this,a,-2147483648,d&1)}return a}function si(){this.A-=-1===this.C?2:this.B.yj;return 1}function ti(){var a=this.H&255;this.A-=(-1===this.C?this.B.Ug:this.B.Tg)+(a<<this.B.Vg);return a}function ui(){var a=this.ka();this.A-=(-1===this.C?this.B.Ug:this.B.Tg)+(a<<this.B.Vg);return a}function vi(){return null}function wi(){return this.ua}
|
||||
function xi(a,b){this.Tc=this.fa.ha;this.uc=this.W.ha;this.ma=this.Aa;var c=F(this),d=this.T;null!=yd(this,a,b,!0)&&(sd(this,this.Tc,d,2),sd(this,c,d,d));this.Tc=this.uc=this.ma=-1}function yi(a,b,c){this.A-=this.B.Xi+(c||0);c=wd(this);var d=this.fa.ha,e=F(this);a=this.fa.vi(a);-1!==a&&(E(this,c),E(this,d),E(this,e),null!=b&&E(this,b),this.sc=-1,Pe(this,a))}
|
||||
function zi(a){this.uc=this.W.ha;this.ma=this.Aa;var b=A(this),c=A(this);a&&B(this,C(this)+a);yd(this,b,c,!1)&&(a&&B(this,C(this)+a),Ai.call(this,this.Ga),Ai.call(this,this.xa),80386<=this.ca&&(Ai.call(this,this.rb),Ai.call(this,this.vb)));2==a&&this.ag&&Je(this,this.da);this.uc=this.ma=-1}function Bi(){8086==this.ca?(this.sc=-1,yi.call(this,0,null,2)):x.call(this,0,null,2)}function wf(a,b){this.sc=a;void 0===b&&(b=11);yi.call(this,a,null,b)}
|
||||
function x(a,b,c,d){var e=!1;this.X.complete?80186<=this.ca&&(e=!0,0>this.sc?(-1!=this.Tc&&(this.Tc!==this.fa.ha&&(this.fa.tb=this.Tc&3,Oe(this,this.Tc)),this.Tc=-1),this.Uc!==this.da&&Pe(this,this.Uc),-1!=this.uc&&(this.uc!==this.W.ha&&md(this,this.uc),this.uc=-1),-1!==this.ma&&(this.ma!==this.Aa&&B(this,this.lc&~this.W.ta|this.ma-this.W.va),this.ma=-1)):8!=this.sc?(b=0,a=8):(b=0,a=-1,he(this),e=d=!1)):Pe(this,this.Uc);var f=a,g=b,h=mf(this,this.da);204!=h||this.Qc||(d=!1);this.N&131072&&(6==f&&
|
||||
99==h||13==f&&205==h)&&(d=!1);983040<=this.da&&1048575>=this.da&&(d=!1);if(d){var k=this.X.cb,f="Fault "+ja(f,2,!0)+(null!=g?" ("+ja(g,4,!0)+")":"")+" on opcode "+ja(h,2,!0);d&&k&&(f+=" (blocked)");this.wa(f);Mc(this)}if(d&&e)throw-1;if(e)throw this.sc=a,yi.call(this,a,b,c),this.Uc=this.da,this.K=1==a?this.K|8192:this.K|4096,a;}function je(a,b,c){this.rd=a;a=0;b&&(a|=1);c&&(a|=2);3==this.La&&(a|=4);x.call(this,14,a)}
|
||||
function x(a,b,c,d){var e=!1;this.Y.complete?80186<=this.ca&&(e=!0,0>this.sc?(-1!=this.Tc&&(this.Tc!==this.fa.ha&&(this.fa.tb=this.Tc&3,Oe(this,this.Tc)),this.Tc=-1),this.Uc!==this.da&&Pe(this,this.Uc),-1!=this.uc&&(this.uc!==this.W.ha&&md(this,this.uc),this.uc=-1),-1!==this.ma&&(this.ma!==this.Aa&&B(this,this.lc&~this.W.ta|this.ma-this.W.va),this.ma=-1)):8!=this.sc?(b=0,a=8):(b=0,a=-1,he(this),e=d=!1)):Pe(this,this.Uc);var f=a,g=b,h=mf(this,this.da);204!=h||this.Qc||(d=!1);this.N&131072&&(6==f&&
|
||||
99==h||13==f&&205==h)&&(d=!1);983040<=this.da&&1048575>=this.da&&(d=!1);if(d){var k=this.Y.cb,f="Fault "+ja(f,2,!0)+(null!=g?" ("+ja(g,4,!0)+")":"")+" on opcode "+ja(h,2,!0);d&&k&&(f+=" (blocked)");this.wa(f);Mc(this)}if(d&&e)throw-1;if(e)throw this.sc=a,yi.call(this,a,b,c),this.Uc=this.da,this.K=1==a?this.K|8192:this.K|4096,a;}function je(a,b,c){this.rd=a;a=0;b&&(a|=1);c&&(a|=2);3==this.La&&(a|=4);x.call(this,14,a)}
|
||||
function Ai(a){var b=a.nb&7680;a.ha&65528&&(6144==b||7168==b||7168>b&&a.jc<this.La&&a.jc<(a.ha&3))&&a.load(0)}
|
||||
function oe(a){var b,c;switch((this.aa=this.ka())&199){case 0:c=I(this,this.G+this.J);this.A-=this.B.Bc;break;case 1:c=I(this,this.G+this.I);this.A-=this.B.Cc;break;case 2:c=J(this,this.M+this.J);this.A-=this.B.Cc;break;case 3:c=J(this,this.M+this.I);this.A-=this.B.Bc;break;case 4:c=I(this,this.J);this.A-=this.B.gc;break;case 5:c=I(this,this.I);this.A-=this.B.gc;break;case 6:c=I(this,Q(this));this.A-=this.B.$c;break;case 7:c=I(this,this.G);this.A-=this.B.gc;break;case 64:c=I(this,this.G+this.J+this.P());
|
||||
this.A-=this.B.Mb;break;case 65:c=I(this,this.G+this.I+this.P());this.A-=this.B.Nb;break;case 66:c=J(this,this.M+this.J+this.P());this.A-=this.B.Nb;break;case 67:c=J(this,this.M+this.I+this.P());this.A-=this.B.Mb;break;case 68:c=I(this,this.J+this.P());this.A-=this.B.Pa;break;case 69:c=I(this,this.I+this.P());this.A-=this.B.Pa;break;case 70:c=J(this,this.M+this.P());this.A-=this.B.Pa;break;case 71:c=I(this,this.G+this.P());this.A-=this.B.Pa;break;case 128:c=I(this,this.G+this.J+Q(this));this.A-=this.B.Mb;
|
||||
|
|
@ -363,7 +363,7 @@ this.F&~this.O|e;this.J=this.J&~c|this.J+(this.N&1024?-this.T:this.T)&c;this.H=t
|
|||
this.A-=this.B.Ob},function(){this.G=this.G&-256|this.ka();this.A-=this.B.Ob},function(){this.F=this.F&-65281|this.ka()<<8;this.A-=this.B.Ob},function(){this.H=this.H&-65281|this.ka()<<8;this.A-=this.B.Ob},function(){this.L=this.L&-65281|this.ka()<<8;this.A-=this.B.Ob},function(){this.G=this.G&-65281|this.ka()<<8;this.A-=this.B.Ob},function(){this.F=this.F&~this.O|this.ya();this.A-=this.B.Ob},function(){this.H=this.H&~this.O|this.ya();this.A-=this.B.Ob},function(){this.L=this.L&~this.O|this.ya();
|
||||
this.A-=this.B.Ob},function(){this.G=this.G&~this.O|this.ya();this.A-=this.B.Ob},function(){B(this,C(this)&~this.O|this.ya());this.A-=this.B.Ob},function(){this.M=this.M&~this.O|this.ya();this.A-=this.B.Ob},function(){this.J=this.J&~this.O|this.ya();this.A-=this.B.Ob},function(){this.I=this.I&~this.O|this.ya();this.A-=this.B.Ob},bj,cj,bj,cj,function(){this.ja.call(this,mh)},function(){this.ja.call(this,kh)},function(){this.K|=1;this.Rc.call(this,jj,this.ka)},function(){this.K|=1;this.eb.call(this,
|
||||
jj,this.ya)},dj,ej,dj,ej,function(){if(this.N&131072&&3>this.Zb)x.call(this,13,0);else{var a=this.B.Yi;this.sc=-1;yi.call(this,3,null,a)}},function(){var a=this.ka();if(this.N&131072&&3>this.Zb)x.call(this,13,0);else{var b;a:{b=this.lf[a];if(void 0!==b)for(var c=0;c<b.length;c++)if(!b[c](this.da)){b=!1;break a}b=!0}b?(this.sc=-1,yi.call(this,a,null,0)):this.A--}},function(){if(Ye(this))if(this.N&131072&&3>this.Zb)x.call(this,13,0);else{var a=this.B.Zi;this.sc=-1;yi.call(this,4,null,a)}else this.A-=
|
||||
this.B.$i},function(){if(this.N&131072&&3>this.Zb)x.call(this,13,0);else{this.uc=this.W.ha;this.ma=this.Aa;this.A-=this.B.Wi;if(this.pa&1&&this.N&16384){var a=this.ga(this.la.va+0);nd(this.fa,a,!1)}else{var a=this.La,b=A(this),c=A(this),d=A(this);if(this.N&131072)d=d&131071|this.N&-131072;else if(d&131072){var e=A(this),f=A(this),g=A(this),h=A(this),k=A(this),m=A(this);pd(this,!0,!0);md(this,f);B(this,e);ud(this,g);td(this,h);this.rb.load(k);this.vb.load(m)}null!=yd(this,b,c,!1)&&(xd(this,d,a),this.ag&&
|
||||
this.B.$i},function(){if(this.N&131072&&3>this.Zb)x.call(this,13,0);else{this.uc=this.W.ha;this.ma=this.Aa;this.A-=this.B.Wi;if(this.pa&1&&this.N&16384){var a=this.ga(this.la.va+0);nd(this.fa,a,!1)}else{var a=this.La,b=A(this),c=A(this),d=A(this);if(this.N&131072)d=d&131071|this.N&-131072;else if(d&131072){var e=A(this),f=A(this),g=A(this),h=A(this),k=A(this),m=A(this);od(this,!0,!0);md(this,f);B(this,e);ud(this,g);td(this,h);this.rb.load(k);this.vb.load(m)}null!=yd(this,b,c,!1)&&(xd(this,d,a),this.ag&&
|
||||
Je(this,this.da))}this.uc=this.ma=-1}},function(){this.Rc.call(this,Zi,si)},function(){this.eb.call(this,2==this.T?$i:aj,si)},function(){this.Rc.call(this,Zi,ti)},function(){this.eb.call(this,2==this.T?$i:aj,ti)},function(){var a=this.ka();if(a){var b=this.F&255;this.F=this.F&-65536|b/a<<8|b%a;Ze(this,this.F,128);this.A-=this.B.Bi}else Bi.call(this)},function(){var a=this.F&255,b=(this.F>>8&255)*this.ka()|0,c=a+b|0;this.F=this.F&-65536|c&255;Se(this,a,b,c,191);this.A-=this.B.Ai},function(){this.F=
|
||||
this.F&-256|(Te(this)?255:0);this.A-=2},function(){this.F=this.F&-256|nf(this,this.Ca,this.G+(this.F&255));this.A-=this.B.zj},function(){fj.call(this,216)},function(){fj.call(this,217)},function(){fj.call(this,218)},function(){fj.call(this,219)},function(){fj.call(this,220)},function(){fj.call(this,221)},function(){fj.call(this,222)},function(){fj.call(this,223)},function(){var a=this.P(),b=this.H-1&this.ta;this.H=this.H&~this.ta|b;b&&!We(this)?(H(this,F(this)+a),this.A-=this.B.gj):this.A-=this.B.Gg},
|
||||
function(){var a=this.P(),b=this.H-1&this.ta;this.H=this.H&~this.ta|b;b&&We(this)?(H(this,F(this)+a),this.A-=this.B.Hg):this.A-=this.B.Ig},function(){var a=this.P(),b=this.H-1&this.ta;this.H=this.H&~this.ta|b;b?(H(this,F(this)+a),this.A-=this.B.fj):this.A-=this.B.Gg},function(){var a=this.P();this.H&this.ta?this.A-=this.B.Ig:(H(this,F(this)+a),this.A-=this.B.Hg)},function(){var a=this.ka();lf(this,a,1)&&(this.F=this.F&-256|fc(this.oa,a,1,this.da-2)&255,this.A-=this.B.Bg)},function(){var a=this.ka();
|
||||
|
|
@ -387,10 +387,10 @@ this.ga(this.C+this.T));this.A-=this.B.aj;this.K|=2;return a},function(a){var b=
|
|||
Yd[2]=function(){!(this.pa&1)||this.N&131072?x.call(this,6):this.ja.call(this,jh)};Yd[3]=function(){!(this.pa&1)||this.N&131072?x.call(this,6):this.ja.call(this,ph)};
|
||||
Yd[5]=function(){this.La?x.call(this,13,0,0,!0):(kf(this,this.ga(2054)),this.I=this.ga(2086),this.J=this.ga(2088),this.M=this.ga(2090),this.G=this.ga(2094),this.L=this.ga(2096),this.H=this.ga(2098),this.F=this.ga(2100),jd(this.xa,2102,this.ga(2084)),jd(this.fa,2108,this.ga(2082)),jd(this.W,2114,this.ga(2080)),jd(this.Ga,2120,this.ga(2078)),xd(this,this.ga(2072)),H(this,this.ga(2074)),B(this,this.ga(2092)),this.Jb=this.ga(2126)|this.Ia(2128)<<16,this.Oc=this.Jb+this.ga(2130),this.Xb=this.ga(2138)|
|
||||
this.Ia(2140)<<16,this.Qc=this.Xb+this.ga(2142),jd(this.mc,2132,this.ga(2076)),jd(this.la,2144,this.ga(2070)),this.A-=195)};Yd[6]=function(){this.La?x.call(this,13,0):(this.pa&=-9,this.A-=2)};Yd[11]=Fd;Yd[166]=Fd;Yd[255]=Fd;var G=[];G[5]=Fd;
|
||||
G[7]=function(){if(this.La)x.call(this,13,0,0,!0);else{var a=this.xa.sb(this.I&this.ta,204);if(-1!==a){this.pa=this.ea(a);pd(this);this.pa&-2147483648?Mb(this):ke(this);var b=this.ea(a+168),c=(b&24576)>>13;xd(this,this.ea(a+4),c);this.Jb=this.ea(a+112);this.Oc=this.Jb+this.ea(a+116);this.Xb=this.ea(a+100);this.Qc=this.Xb+this.ea(a+104);hd(this.mc,this.ea(a+56),this.ea(a+120),this.ea(a+124),this.ea(a+128));hd(this.la,this.ea(a+52),this.ea(a+84),this.ea(a+88),this.ea(a+92));this.I=this.ea(a+12);this.J=
|
||||
G[7]=function(){if(this.La)x.call(this,13,0,0,!0);else{var a=this.xa.sb(this.I&this.ta,204);if(-1!==a){this.pa=this.ea(a);od(this);this.pa&-2147483648?Mb(this):ke(this);var b=this.ea(a+168),c=(b&24576)>>13;xd(this,this.ea(a+4),c);this.Jb=this.ea(a+112);this.Oc=this.Jb+this.ea(a+116);this.Xb=this.ea(a+100);this.Qc=this.Xb+this.ea(a+104);hd(this.mc,this.ea(a+56),this.ea(a+120),this.ea(a+124),this.ea(a+128));hd(this.la,this.ea(a+52),this.ea(a+84),this.ea(a+88),this.ea(a+92));this.I=this.ea(a+12);this.J=
|
||||
this.ea(a+16);this.M=this.ea(a+20);this.G=this.ea(a+28);this.L=this.ea(a+32);this.H=this.ea(a+36);this.F=this.ea(a+40);hd(this.vb,this.ea(a+60),this.ea(a+132),this.ea(a+136),this.ea(a+140));hd(this.rb,this.ea(a+64),this.ea(a+144),this.ea(a+148),this.ea(a+152));hd(this.Ga,this.ea(a+68),this.ea(a+156),this.ea(a+160),this.ea(a+164));hd(this.W,this.ea(a+72),b,this.ea(a+172),this.ea(a+176));hd(this.fa,this.ea(a+76),this.ea(a+180),this.ea(a+184),this.ea(a+188));hd(this.xa,this.ea(a+80),this.ea(a+192),this.ea(a+
|
||||
196),this.ea(a+200));H(this,this.ea(a+8));B(this,this.ea(a+24))}this.A-=122<<(a&3?1:0)}};G[16]=Vi;G[17]=Wi;G[18]=Xi;G[19]=Yi;G[32]=function(){if(this.La)x.call(this,13,0);else{var a,b=this.ka();switch((b&56)>>3){case 0:a=this.pa;break;case 2:a=this.rd;break;case 3:a=this.Vc;break;default:Zd.call(this);return}me(this,b&7,a);this.A-=6}};G[33]=function(){if(this.La)x.call(this,13,0);else{var a=this.ka(),b=(a&56)>>3;4==b||5==b?Zd.call(this):(me(this,a&7,this.Cb[b]),this.A-=22)}};
|
||||
G[34]=function(){if(this.La)x.call(this,13,0);else{var a=this.ka(),b=le(this,a&7);switch((a&56)>>3){case 0:this.pa=b;pd(this);this.pa&-2147483648?Mb(this):ke(this);this.A-=10;break;case 2:this.rd=b;this.A-=4;break;case 3:zd.call(this,b);this.A-=5;break;default:Zd.call(this)}}};G[35]=function(){if(this.La)x.call(this,13,0);else{var a=this.ka(),b=(a&56)>>3;4==b||5==b?Zd.call(this):(a=le(this,a&7),a!=this.Cb[b]&&(Ke(this,!1),this.Cb[b]=a,Ke(this,!0)),this.A-=4>b?22:14)}};
|
||||
G[34]=function(){if(this.La)x.call(this,13,0);else{var a=this.ka(),b=le(this,a&7);switch((a&56)>>3){case 0:this.pa=b;od(this);this.pa&-2147483648?Mb(this):ke(this);this.A-=10;break;case 2:this.rd=b;this.A-=4;break;case 3:zd.call(this,b);this.A-=5;break;default:Zd.call(this)}}};G[35]=function(){if(this.La)x.call(this,13,0);else{var a=this.ka(),b=(a&56)>>3;4==b||5==b?Zd.call(this):(a=le(this,a&7),a!=this.Cb[b]&&(Ke(this,!1),this.Cb[b]=a,Ke(this,!0)),this.A-=4>b?22:14)}};
|
||||
G[36]=function(){if(this.La)x.call(this,13,0);else{var a=this.ka(),b=(a&56)>>3;6>b?Zd.call(this):(me(this,a&7,this.pf[b]),this.A-=12)}};G[38]=function(){if(this.La)x.call(this,13,0);else{var a=this.ka(),b=(a&56)>>3;6>b?Zd.call(this):(this.pf[b]=le(this,a&7),this.A-=12)}};G[128]=function(){var a=this.ya();Ye(this)?(H(this,F(this)+a),this.A-=this.B.Ja):this.A-=this.B.Ka};G[129]=function(){var a=this.ya();Ye(this)?this.A-=this.B.Ka:(H(this,F(this)+a),this.A-=this.B.Ja)};
|
||||
G[130]=function(){var a=this.ya();Te(this)?(H(this,F(this)+a),this.A-=this.B.Ja):this.A-=this.B.Ka};G[131]=function(){var a=this.ya();Te(this)?this.A-=this.B.Ka:(H(this,F(this)+a),this.A-=this.B.Ja)};G[132]=function(){var a=this.ya();We(this)?(H(this,F(this)+a),this.A-=this.B.Ja):this.A-=this.B.Ka};G[133]=function(){var a=this.ya();We(this)?this.A-=this.B.Ka:(H(this,F(this)+a),this.A-=this.B.Ja)};G[134]=function(){var a=this.ya();Te(this)||We(this)?(H(this,F(this)+a),this.A-=this.B.Ja):this.A-=this.B.Ka};
|
||||
G[135]=function(){var a=this.ya();Te(this)||We(this)?this.A-=this.B.Ka:(H(this,F(this)+a),this.A-=this.B.Ja)};G[136]=function(){var a=this.ya();Xe(this)?(H(this,F(this)+a),this.A-=this.B.Ja):this.A-=this.B.Ka};G[137]=function(){var a=this.ya();Xe(this)?this.A-=this.B.Ka:(H(this,F(this)+a),this.A-=this.B.Ja)};G[138]=function(){var a=this.ya();Ue(this)?(H(this,F(this)+a),this.A-=this.B.Ja):this.A-=this.B.Ka};G[139]=function(){var a=this.ya();Ue(this)?this.A-=this.B.Ka:(H(this,F(this)+a),this.A-=this.B.Ja)};
|
||||
|
|
@ -414,14 +414,14 @@ l.kc=function(a,b,c,d){this.oa=b;this.R=c;this.Ea=d;this.na=a;this.qd=tb(a,"FPU"
|
|||
l.Ab=function(a,b,c){switch(b){case rj:return this.ia[b]=c,Kj(this,0,b),!0;case vj:if((this.ca|0)==Lj||this.ca==Aj)return this.ia[b]=c,Kj(this,1,b),!0;break;case Mj:return this.ia[b]=c,!0}return!1};l.Rb=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};l.Qb=function(a){return a?this.save():!0};
|
||||
l.reset=function(a){var b;Nj(this);this.D=Array(this.za);for(b=0;b<this.za;b++)Oj(this,b);this.bc=Array(this.la);Pj(this,Qj,Rj);1<this.la&&Pj(this,Sj,Tj);this.fa=this.ua=null;this.qa=Array((this.ca|0)==Hj?6:3);for(b=0;b<this.qa.length;b++)Uj(this,b);this.ja=this.Ca=this.H=this.xa=null;this.da=Gf;this.ca==Aj&&(this.ba=0);if(this.ca>=Cf){this.F=Vj;this.J=0;this.I=Wj;this.pa=0;this.K=Xj|Yj;512<=Zj(this)&&(this.K|=ak);+bk(this,uj,void 0)==ck&&(this.K|=dk);(this.ca|0)==Hj&&(this.K=this.K|ek|fk);this.ra=
|
||||
gk|hk;this.G=Array(8);this.W=0;a&&(this.A=Array(ik));jk(this,this.Sa);for(a=kk;a<=lk;a++)this.A[a]=0;for(a=mk;a<nk;a++)void 0===this.A[a]&&(this.A[a]=0);a=0|+bk(this,uj,void 0)<<ok.$f&ok.ic;a|=+bk(this,wj,void 0)?pk:0;b=+bk(this,tj,void 0);a|=b?b-1<<qk.$f&qk.ic|qk.Zj:0;this.A[rk]=a;this.A[sk]=tk(this,0)<<4|tk(this,1);uk(this)}};
|
||||
function jk(a,b){var c=b?new Date(b):new Date;"[object Date]"!==Object.prototype.toString.call(c)||isNaN(c.getTime())?(c=new Date,a.qb("CMOS date invalid ("+b+"), using "+c)):b&&a.qb("CMOS date: "+c);a.A[vk]=c.getSeconds();a.A[wk]=0;a.A[xk]=c.getMinutes();a.A[yk]=0;a.A[zk]=c.getHours();a.A[Ak]=0;a.A[Bk]=c.getDay()+1;a.A[Ck]=c.getDate();a.A[Dk]=c.getMonth()+1;b=c.getFullYear();a.A[Ek]=b%100;b/=100;a.A[Fk]=b%10|b/10<<4;a.A[Gk]=38;a.A[$c]=Hk;a.A[Ik]=0;a.A[Jk]=Kk;a.ma=a.Y=0;a.Qa=a.Aa=null}
|
||||
function Lk(a){var b=a.Aa;a.Y=Sc(a.R,a.M)+b;a.A[$c]&ad&&Qc(a.R,b)}function uk(a){for(var b=0,c=sk;c<nk;c++)b+=a.A[c];a.A[Mk]=b&255;a.A[nk]=b>>8}
|
||||
l.save=function(){var a=new Me(this);a.set(0,[this.B]);for(var b=[],c=0;c<this.D;c++){for(var d=this.D[c],e=d,f=[],g=0;g<e.Tb.length;g++){var h=e.Tb[g];f[g]=[h.Nd,h.rf,h.dc,h.hb,h.ib,h.mode,h.tf,h.mn,h.nn]}b[c]=[d.Fb,d.eg,d.Yh,d.Ib,f,d.gg]}a.set(1,[b]);b=[];for(c=0;c<this.bc.length;c++)d=this.bc[c],b[c]=[d.Oe,d.Kc,d.kd,d.Wc,d.Ub,d.xc,d.Hd,d.He];a.set(2,[b]);b=[];for(c=0;c<this.qa.length;c++)d=this.qa[c],b[c]=[d.dc,d.zc,d.ib,d.Id,d.hg,d.mode,d.df,d.Yc,d.gd,d.Lc,d.je,d.Ld,d.jd,d.Fb,d.oe];a.set(3,[this.ua,
|
||||
b,this.fa]);a.set(4,[this.xa,this.H,this.Ca,this.ja,this.da]);this.ca>=Cf&&(a.set(5,[this.F,this.J,this.I,this.pa,this.K,this.ra]),a.set(6,[this.G[7],this.G,this.W,this.A,this.ma,this.Y]));return a.data()};
|
||||
function jk(a,b){var c=b?new Date(b):new Date;"[object Date]"!==Object.prototype.toString.call(c)||isNaN(c.getTime())?(c=new Date,a.qb("CMOS date invalid ("+b+"), using "+c)):b&&a.qb("CMOS date: "+c);a.A[vk]=c.getSeconds();a.A[wk]=0;a.A[xk]=c.getMinutes();a.A[yk]=0;a.A[zk]=c.getHours();a.A[Ak]=0;a.A[Bk]=c.getDay()+1;a.A[Ck]=c.getDate();a.A[Dk]=c.getMonth()+1;b=c.getFullYear();a.A[Ek]=b%100;b/=100;a.A[Fk]=b%10|b/10<<4;a.A[Gk]=38;a.A[$c]=Hk;a.A[Ik]=0;a.A[Jk]=Kk;a.ma=a.X=0;a.Qa=a.Aa=null}
|
||||
function Lk(a){var b=a.Aa;a.X=Sc(a.R,a.M)+b;a.A[$c]&ad&&Qc(a.R,b)}function uk(a){for(var b=0,c=sk;c<nk;c++)b+=a.A[c];a.A[Mk]=b&255;a.A[nk]=b>>8}
|
||||
l.save=function(){var a=new Me(this);a.set(0,[this.B]);for(var b=[],c=0;c<this.D;c++){for(var d=this.D[c],e=d,f=[],g=0;g<e.Tb.length;g++){var h=e.Tb[g];f[g]=[h.Nd,h.rf,h.dc,h.hb,h.ib,h.mode,h.tf,h.un,h.vn]}b[c]=[d.Fb,d.eg,d.Yh,d.Ib,f,d.gg]}a.set(1,[b]);b=[];for(c=0;c<this.bc.length;c++)d=this.bc[c],b[c]=[d.Oe,d.Kc,d.kd,d.Wc,d.Ub,d.xc,d.Hd,d.He];a.set(2,[b]);b=[];for(c=0;c<this.qa.length;c++)d=this.qa[c],b[c]=[d.dc,d.zc,d.ib,d.Id,d.hg,d.mode,d.df,d.Yc,d.gd,d.Lc,d.je,d.Ld,d.jd,d.Fb,d.oe];a.set(3,[this.ua,
|
||||
b,this.fa]);a.set(4,[this.xa,this.H,this.Ca,this.ja,this.da]);this.ca>=Cf&&(a.set(5,[this.F,this.J,this.I,this.pa,this.K,this.ra]),a.set(6,[this.G[7],this.G,this.W,this.A,this.ma,this.X]));return a.data()};
|
||||
l.restore=function(a){var b,c;b=a[0];Array.isArray(b[0])?this.B=b[0]:(this.B[0][0]=b[0],this.B[1][0]=b[1]&15,this.B[0][1]=b[2],this.B[1][1]=b[3]&15);Nj(this);b=a[1];for(c=0;c<this.za;c++)Oj(this,c,1==b.length?b[0][c]:b);b=a[2];for(c=0;c<this.la;c++)Pj(this,c,c?Tj:Rj,b[0][c]);b=a[3];this.ua=b[0];this.fa=b[2];for(c=0;c<this.qa.length;c++)Uj(this,c,b[1][c]);b=a[4];this.xa=b[0];this.H=b[1];this.Ca=b[2];this.ja=b[3];this.da=b[4];if(b=a[5])this.F=b[0],this.J=b[1],this.I=b[2],this.pa=b[3],this.K=b[4],this.ra=
|
||||
b[5];if(b=a[6])this.G=b[1],this.G[7]=b[0],this.W=b[2],this.A=b[3],this.ma=b[4],this.Y=b[5],jk(this);return!0};l.start=function(){Nk(this)};l.stop=function(){Nk(this)};function Oj(a,b,c){var d=a.D[b];d||(d={Tb:Array(4)});c=c&&5<=c.length?c:Ok;d.Fb=c[0];d.eg=c[1];d.Yh=c[2];d.Ib=c[3];d.Kl=b<<2;for(var e=0;e<d.Tb.length;e++)Pk(d,e,c[4][e]);d.gg=c[5]||0;a.D[b]=d}
|
||||
function Pk(a,b,c){var d=a.Tb[b];d||(d={rf:[0,0],dc:[0,0],hb:[0,0],ib:[0,0]});c=c&&8==c.length?c:Qk;d.Nd=c[0];d.rf[0]=c[1][0];d.rf[1]=c[1][1];d.dc[0]=c[2][0];d.dc[1]=c[2][1];d.hb[0]=c[3][0];d.hb[1]=c[3][1];d.ib[0]=c[4][0];d.ib[1]=c[4][1];d.mode=c[5];d.tf=c[6];d.controller=a;d.oi=b;Rk(d,c[8],c[9]);a.Tb[b]=d}function Rk(a,b,c,d){"string"==typeof b&&(b=fb(b));b&&(a.done=null,a.mn=b.id,a.nn=c,a.Af=b,a.kg=b[c],a.Pf=d)}
|
||||
function Pj(a,b,c,d){var e=a.bc[b];e||(e={Kc:[null,null,null,null]});d=d&&8==d.length?d:Sk;e.port=c;e.Mo=b<<3;e.Oe=d[0];e.Kc[0]=d[1][0];e.Kc[1]=d[1][1];e.Kc[2]=d[1][2];e.Kc[3]=d[1][3];e.kd=d[2];e.Wc=d[3];e.Ub=d[4];e.xc=d[5];e.Hd=d[6];e.He=d[7];a.bc[b]=e}
|
||||
b[5];if(b=a[6])this.G=b[1],this.G[7]=b[0],this.W=b[2],this.A=b[3],this.ma=b[4],this.X=b[5],jk(this);return!0};l.start=function(){Nk(this)};l.stop=function(){Nk(this)};function Oj(a,b,c){var d=a.D[b];d||(d={Tb:Array(4)});c=c&&5<=c.length?c:Ok;d.Fb=c[0];d.eg=c[1];d.Yh=c[2];d.Ib=c[3];d.Ol=b<<2;for(var e=0;e<d.Tb.length;e++)Pk(d,e,c[4][e]);d.gg=c[5]||0;a.D[b]=d}
|
||||
function Pk(a,b,c){var d=a.Tb[b];d||(d={rf:[0,0],dc:[0,0],hb:[0,0],ib:[0,0]});c=c&&8==c.length?c:Qk;d.Nd=c[0];d.rf[0]=c[1][0];d.rf[1]=c[1][1];d.dc[0]=c[2][0];d.dc[1]=c[2][1];d.hb[0]=c[3][0];d.hb[1]=c[3][1];d.ib[0]=c[4][0];d.ib[1]=c[4][1];d.mode=c[5];d.tf=c[6];d.controller=a;d.oi=b;Rk(d,c[8],c[9]);a.Tb[b]=d}function Rk(a,b,c,d){"string"==typeof b&&(b=fb(b));b&&(a.done=null,a.un=b.id,a.vn=c,a.Af=b,a.kg=b[c],a.Pf=d)}
|
||||
function Pj(a,b,c,d){var e=a.bc[b];e||(e={Kc:[null,null,null,null]});d=d&&8==d.length?d:Sk;e.port=c;e.Uo=b<<3;e.Oe=d[0];e.Kc[0]=d[1][0];e.Kc[1]=d[1][1];e.Kc[2]=d[1][2];e.Kc[3]=d[1][3];e.kd=d[2];e.Wc=d[3];e.Ub=d[4];e.xc=d[5];e.Hd=d[6];e.He=d[7];a.bc[b]=e}
|
||||
function Uj(a,b,c){var d=a.qa[b];d||(d={dc:[0,0],zc:[0,0],ib:[0,0],Id:[0,0]});c=c&&13<=c.length?c:Tk;d.dc[0]=c[0][0];d.dc[1]=c[0][1];d.zc[0]=c[1][0];d.zc[1]=c[1][1];d.ib[0]=c[2][0];d.ib[1]=c[2][1];d.Id[0]=c[3][0];d.Id[1]=c[3][1];d.hg=c[4];d.mode=c[5];d.df=c[6];d.Yc=c[7];d.gd=c[8];d.Lc=c[9];d.je=c[10];d.Ld=c[11];d.jd=c[12];d.Fb=c[13]||0;d.oe=c[14]||!1;a.qa[b]=d}
|
||||
function Kj(a,b,c){for(var d="",e=a.ia[c],f=1;8>=f;f++){var g="pcjs-bitCell";f||(g+=" pcjs-bitCellLeft");d+='<div id="'+(c+"-"+f)+'" class="'+g+'" data-value="0">'+f+"</div>\n"}e.innerHTML=d;Uk(a,b,c,!0)}function Vk(a,b,c){if(b=(a=V[a.ca|0])&&a[b])for(var d in b)if(a=b[d],a.ic&1<<c)return a;return null}
|
||||
function bk(a,b,c){for(var d=null,e=V[a.ca]||V[a.ca|0]||V[Lj],f=0;f<e.length;f++){var g=e[f];if(g&&(g=g[b])){a=a.B[f][c?0:1]&g.ic;for(var h in g.Fc)if(g.Fc[h]==a&&(d=h,"number"==typeof+d))break;break}}return d}function tk(a,b){if(b<+bk(a,tj,void 0)){if(!a.L)return Wk;if(b<a.L.length)switch(a.L[b]){case 160:case 180:case 320:case 360:return Wk;case 720:return Xk;case 1200:return Yk;case 1440:return Zk}}return $k}function Zj(a,b){return+bk(a,al,b)+ +bk(a,bl,b)}
|
||||
|
|
@ -429,7 +429,7 @@ function qj(a,b){if(a){b=0;for(var c=1,d=0;d<a.length;d++)"0"==a.charAt(d)&&(b|=
|
|||
function Uk(a,b,c,d){if(c=a.ia[c]){d=d?a.B[b][0]:a.B[b][1]=a.B[b][0];c=cb(c,"pcjs-bitCell");for(var e=0;e<c.length;e++){var f=Vk(a,b,e);c[e].setAttribute("title",f&&f.ed||"Reserved");cl(c[e],!(d&1<<e));c[e].onclick=function(a,b){return function(){var c="1"!=b.getAttribute("data-value");cl(b,c);var d=b.getAttribute("id").split("-"),e=1<<+d[1]-1;switch(d[0]){case rj:a.B[0][0]=a.B[0][0]&~e|(c?0:e);break;case vj:a.B[1][0]=a.B[1][0]&~e|(c?0:e)}dl(a)}}(a,c[e])}}}
|
||||
function dl(a){var b=a.ia[Mj];if(null!=b){var c;c=""+(Zj(a,!0)+"Kb");c+=", "+(+ +bk(a,wj,!0)?"":"No ")+"FPU";c+=", "+{0:"Enhanced Color",1:"TV",2:"Color",3:"Monochrome"}[+bk(a,uj,!0)]+" Monitor";c+=", "+ +bk(a,tj,!0)+" Floppy Drives";if(null!=a.B[0][1]&&a.B[0][1]!=a.B[0][0]||null!=a.B[1][1]&&a.B[1][1]!=a.B[1][0])c+=" (Reset required)";b.textContent=c}}
|
||||
function el(a,b,c){a=a.D[b];var d=a.Tb[c],e=d.hb[a.Ib];a.Ib^=1;b||c!=fl||a.Ib||(d.hb[0]++,255<d.hb[0]&&(d.hb[0]=0,d.hb[1]++,255<d.hb[1]&&(d.hb[1]=0)));return e}function gl(a,b,c,d){a=a.D[b];c=a.Tb[c];c.hb[a.Ib]=c.rf[a.Ib]=d;a.Ib^=1}function hl(a,b,c){a=a.D[b];var d=a.Tb[c],e=d.ib[a.Ib];a.Ib^=1;b||c!=fl||a.Ib||(d.ib[0]--,0>d.ib[0]&&(d.ib[0]=255,d.ib[1]--,0>d.ib[1]&&(d.ib[1]=255)));return e}function il(a,b,c,d){a=a.D[b];c=a.Tb[c];c.ib[a.Ib]=c.dc[a.Ib]=d;a.Ib^=1}
|
||||
function jl(a,b){a=a.D[b];b=a.Fb|kl;a.Fb&=~ll;return b}function ml(a,b,c){a=a.D[b];b=c&3;a.Fb=a.Fb&~(16<<b)|(c&4)<<b+2;a.Yh=c}function nl(a,b,c){b=a.D[b];var d=c&ol,e=b.Tb[d];e.Nd=!!(c&pl);e.Nd||ql(a,b.Kl+d)}function rl(a,b){a=a.D[b];for(b=0;b<a.Tb.length;b++)Pk(a,b)}function sl(a,b,c){return a.D[b].Tb[c].tf}function tl(a,b,c,d){a.D[b].Tb[c].tf=d}function ul(a,b,c,d,e){Rk(a.D[b>>2].Tb[b&3],c,d,e)}function ql(a,b,c){b=a.D[b>>2].Tb[b&3];b.Af&&b.kg&&b.Pf?(c&&(b.done=c),b.Nd||vl(a,b,!0)):c&&c(!0)}
|
||||
function jl(a,b){a=a.D[b];b=a.Fb|kl;a.Fb&=~ll;return b}function ml(a,b,c){a=a.D[b];b=c&3;a.Fb=a.Fb&~(16<<b)|(c&4)<<b+2;a.Yh=c}function nl(a,b,c){b=a.D[b];var d=c&ol,e=b.Tb[d];e.Nd=!!(c&pl);e.Nd||ql(a,b.Ol+d)}function rl(a,b){a=a.D[b];for(b=0;b<a.Tb.length;b++)Pk(a,b)}function sl(a,b,c){return a.D[b].Tb[c].tf}function tl(a,b,c,d){a.D[b].Tb[c].tf=d}function ul(a,b,c,d,e){Rk(a.D[b>>2].Tb[b&3],c,d,e)}function ql(a,b,c){b=a.D[b>>2].Tb[b&3];b.Af&&b.kg&&b.Pf?(c&&(b.done=c),b.Nd||vl(a,b,!0)):c&&c(!0)}
|
||||
function vl(a,b,c){c&&(b.count=b.ib[1]<<8|b.ib[0],b.type=b.mode&wl,b.ii=b.Bf=!1);for(var d=!1;0<=b.count&&(c=b.tf<<16|b.hb[1]<<8|b.hb[0],b.type==xl?(d=!0,function(c){b.kg.call(b.Af,b.Pf,-1,function(e,g){0>e&&(b.ii||(b.ii=!0),e=255);b.Nd||a.oa.Bb(c,e);(d=g)&&setTimeout(function(){yl(b)||vl(a,b)},0)})}(c)):b.type==zl?(c=a.oa.Ia(c),0>b.kg.call(b.Af,b.Pf,c)&&(b.Bf=!0)):b.type!=Al&&(b.Bf=!0)),!d&&!yl(b););}
|
||||
function yl(a){if(!a.Bf&&0<=--a.count&&(a.mode&Bl?(a.hb[0]--,0>a.hb[0]&&(a.hb[0]=255,a.hb[1]--,0>a.hb[1]&&(a.hb[1]=255))):(a.hb[0]++,255<a.hb[0]&&(a.hb[0]=0,a.hb[1]++,255<a.hb[1]&&(a.hb[1]=0))),!a.Nd))return!1;var b=a.controller;b.Fb=b.Fb&~(16<<a.oi)|1<<a.oi;a.mode&Cl||(a.Nd=!0,a.Af=a.Pf=null);a.done&&(a.done(!a.Bf),a.done=null);return!0}function Dl(a,b){var c=0;a=a.bc[b];if(null!=a.He)switch(a.He&El){case Fl:c=a.Ub;break;case Gl:c=a.xc}return c}
|
||||
function Hl(a,b,c){b=a.bc[b];if(c&Il)b.kd=0,b.Kc[b.kd++]=c,b.Wc=0,b.Hd=7,b.Ub=b.xc=0,b.He=Jl|Fl;else if(c&Jl)b.He=c;else{var d=c&Kl;if(d&Ll){var e=0;if((d&Ml)==Ml)c&=Nl,e=1<<c;else for(c=b.Hd+1;;){c&=7;d=1<<c;if(b.xc&d){e=d;break}if(c++==b.Hd)break}b.xc&e&&(b.xc&=~e,Ol(a))}else d==Pl&&(b.Hd=c&Nl)}}function Ql(a,b,c){var d=a.bc[b];d.kd<d.Kc.length?(d.Kc[d.kd++]=c,2==d.kd&&d.Kc[0]&Rl&&d.kd++,3!=d.kd||d.Kc[0]&Sl||d.kd++):(d.Wc=c,d=a.R,d.K|=4,Ol(a,b||253!=c?0:6))}
|
||||
|
|
@ -439,53 +439,53 @@ function Xl(a,b,c,d){var e=b?3:0,f=a.qa[e+c];f.Yc==f.gd&&Vl(a,e+c);f.dc[f.Yc++]=
|
|||
function em(a,b,c){var d=0,e=c&fm;b?(d=3,a.fa=c):a.ua=c;if(e==gm){if(!(c&hm))for(e=0;2>=e;e++)if(c&im<<e){b=d+e;var f=a.qa[b];f.oe||(Wl(a,b),f.Fb=f.hg|f.mode|f.df|(f.Yc<f.gd?jm:0)|(f.Lc?km:0),f.oe=!0)}if(!(c&lm))for(e=0;2>=e;e++)c&im<<e&&mm(a,d+e)}else{var e=e>>nm,f=c&om,g=c±c&=qm;if(c==rm)mm(a,d+e);else{var d=d+e,h=a.qa[d];h.df=c;h.mode=g;h.hg=f;h.dc=[0,0];h.ib=[0,0];h.Id=[0,0];h.Lc=!1;h.je=!1;h.Ld=!1;h.oe=!1;Vl(a,d);b==$l&&e==am&&Df(a,bm);b==$l&&e==dm&&255==a.bc[0].Wc&&a.H==(sm|tm|um|vm)&&(e=
|
||||
a.qa[0],e.zc[0]=e.dc[0],e.zc[1]=e.dc[1],e.jd=Sc(a.R,a.M))}}}function cm(a,b){a=a.qa[b];(b=a.dc[1]<<8|a.dc[0])||(b=1==a.gd?256:65536);return b}function Yc(a,b){a=a.qa[b];(b=a.zc[1]<<8|a.zc[0])||(b=1==a.gd?256:65536);return b}function mm(a,b){Wl(a,b);var c=a.qa[b];c.Id[0]=c.ib[0];c.Id[1]=c.ib[1];c.je=!0;Vl(a,b)}function Vl(a,b){a=a.qa[b];a.Yc=a.df==wm?1:0;a.gd=a.df==xm?2:1}
|
||||
function Wl(a,b,c){var d=a.qa[b];if(d.Ld&&(b!=dm||a.H&sm)){var e=Sc(a.R,a.M),f=(e-d.jd)/a.Ba|0;0>f&&(d.jd=e,f=0);var g=cm(a,b),h=Yc(a,b)-f;d.mode==Yl?(0>=h&&(h=0),h||(d.Lc=!0,d.Ld=!1,b||Ff(a,bm))):d.mode==ym?(d.Lc=1!=h,0>=h&&(h=g+h,0>=h&&(h=g),d.zc[0]=h&255,d.zc[1]=h>>8&255,d.jd=e,!b&&d.Lc&&Ff(a,bm))):d.mode==Zc&&(h-=f,0>=h&&(d.Lc=!d.Lc,h=g+h,0>=h&&(h=g),d.zc[0]=h&255,d.zc[1]=h>>8&255,d.jd=e,!b&&d.Lc&&Ff(a,bm)));d.ib[0]=h&255;d.ib[1]=h>>8&255;c&&(a.jd=0)}return d}
|
||||
function Xc(a,b){for(var c=0;c<a.qa.length;c++)Wl(a,c,b);if(a.ca>=Cf){b=a.R.V.yd;c=Sc(a.R,a.M);null==a.Aa&&(a.ma=Sc(a.R,a.M),a.Qa=1024,a.Aa=Math.floor(a.R.V.yd/a.Qa),Lk(a));c>=a.Y&&(a.A[Ik]|=zm,a.A[$c]&ad&&(a.A[Ik]|=Am,Ff(a,Bm)),a.Y=c+a.Aa);a.A[vk]==a.A[wk]&&a.A[xk]==a.A[yk]&&a.A[zk]==a.A[Ak]&&(a.A[Ik]|=Cm,a.A[$c]&Dm&&(a.A[Ik]|=Am,Ff(a,Bm)));var d=c-a.ma,e=Math.floor(d/b);if(e&&!(a.A[$c]&Em)){for(;e--;)if(60<=++a.A[vk]&&(a.A[vk]=0,60<=++a.A[xk]&&(a.A[xk]=0,24<=++a.A[zk]))){a.A[zk]=0;a.A[Bk]=a.A[Bk]%
|
||||
7+1;var f;f=a.A[Ek];var g=ua[a.A[Dk]-1];28==g&&(f%4||!(f%100)&&f%400||g++);f=g;++a.A[Ck]>f&&(a.A[Ck]=1,12<++a.A[Dk]&&(a.A[Dk]=1,a.A[Ek]=(a.A[Ek]+1)%100))}a.A[Ik]|=Fm;a.A[$c]&Gm&&(a.A[Ik]|=Am,Ff(a,Bm))}a.ma=c-d%b}}l.jl=function(){var a=this.xa;this.ja&Hm&&(this.H&Im?a=this.B[0][1]:this.C&&(a=Jm(this.C)));return a};l.Gm=function(a,b){this.xa=b};l.kl=function(){return this.H};l.Hm=function(a,b){Om(this,b)};
|
||||
function Om(a,b){var c=!!(b&Pm),d=!!(a.H&Pm);a.H=b;a.C&&Qm(a.C,!(b&Im),!!(b&vm));c!=d&&Nk(a,c)}l.ll=function(){var a=0,a=(this.ca|0)==Lj?this.H&tm?a|this.B[1][1]&Rm:a|this.B[1][1]>>4&1:this.H&Sm?a|this.B[0][1]>>4:a|this.B[0][1]&15;this.H&sm&&Wl(this,dm).Lc&&(a=this.H&Pm?a|Tm:a|Um);return a};l.Im=function(a,b){this.Ca=b};l.ml=function(){return this.ja};l.Jm=function(a,b){this.ja=b};l.vk=function(){var a=this.C?Jm(this.C):0;this.ba&=~Vm;return a};l.Sl=function(){};l.uk=function(){return this.H};
|
||||
l.Rl=function(a,b){Om(this,b)};l.wk=function(){return this.ba};l.xk=function(){var a=this.pa;this.F&=~(Vm|Wm);this.C&&Xm(this.C);return a};l.Ul=function(a,b){if(this.F&Ym)switch(this.J){case Zm:$m(this,b);break;case an:bn(this,b);break;default:if($m(this,this.I&~Wj),this.C){a=this.C;var c=b,d=-1;switch(a.F||c){case cn:d=dn;a.Pb=[];en(a,fn);break;case gn:a.F&&(c=0);en(a,dn);a.F=c;break;case hn:a.F&&(c=0),en(a,dn),a.F=c}jn(this,d)}}this.J=b;this.F&=~Ym};
|
||||
l.yk=function(){return this.H&~(kn|ln)|(Sc(this.R)&64?ln:0)};l.Vl=function(a,b){Om(this,b)};l.zk=function(){var a=this.F&255;this.F&Wm&&(this.F|=Vm,this.F&=~Wm);return a};
|
||||
l.Tl=function(a,b){this.J=b;this.F|=Ym;a=0;this.J>=mn&&(a=this.J^15,this.J=mn);switch(this.J){case nn:jn(this,this.I);break;case on:$m(this,this.I|Wj);break;case pn:$m(this,this.I&~Wj);this.C&&Xm(this.C);break;case qn:this.C&&(this.C.Pb=[]);$m(this,this.I|Wj);jn(this,rn);bn(this,gk|hk);break;case sn:jn(this,tn);break;case un:jn(this,this.K);break;case vn:jn(this,this.ra);break;case wn:jn(this,this.I&Wj?0:xn);break;case mn:a&1&&he(this.R)}};
|
||||
function $m(a,b){a.I=b;a.F=a.F&~yn|b&zn;a.C&&Qm(a.C,!!(b&An),!(b&Wj))}function jn(a,b,c){0<=b&&(a.pa=b,c?a.F|=Vm:(a.F&=~Vm,a.F|=Wm))}function bn(a,b){a.ra=b;Ib(a.oa,!!(b&hk));b&gk||he(a.R)}function Bn(a,b){a.ca<Cf?(Ff(a,Cn,4),a.ba|=Vm):a.I&Wj||a.F&(Vm|Wm)||(jn(a,b,!0),Dn(a.C),Ff(a,Cn,120))}l.Nk=function(){return this.W};l.im=function(a,b){this.W=b;this.da=b&En?Gf:Fn};
|
||||
l.Ok=function(a,b){a=this.W&Gn;var c;if(a<=Jk)if(c=this.A[a],a<Gk){var d=!1;a!=zk&&a!=Ak||this.A[$c]&Hk||(12>c?c=c?c:12:c=(c-=12)?c+128:140,d=!0);this.A[$c]&Hn||(d&&128<c&&(c-=48),c=c%10|c/10<<4)}else a==Gk&&(this.A[a]^=In);else c=this.A[a];null!=b&&a==Ik&&(this.A[a]&=Jn,c&Am&&Df(this,Bm),c&zm&&this.A[$c]&ad&&Lk(this));return c};
|
||||
l.jm=function(a,b){a=this.W&Gn;var c=b^this.A[a],d;if(a<=Jk){if(d=b,a<Gk){var e=!1;this.A[$c]&Hn||(d=10*(d>>4)+(d&15),e=!0);if(a==zk||a==Ak)e&&23<d&&(d+=48),this.A[$c]&Hk||(12>=d?d=12==d?0:d:(d-=116,d=24==d?12:d))}}else d=b;this.A[a]=d;a==$c&&c&ad&&b&ad&&Lk(this)};l.Cj=function(a,b){this.da=b};l.tm=function(){};l.um=function(){this.qd&&yf(this.qd)};
|
||||
function Nk(a,b){if(a.N){void 0!==b?a.La=b:b=!!(a.La&&a.R&&a.R.X.cb);var c=Math.round(xj/cm(a,dm));if(20>c||2E4<c)b=!1;b&&Kn(a)?(a.U.frequency.setValueAtTime(c,0),a.aa.gain.value=a.Ga):a.aa&&(a.aa.gain.value=0)}}
|
||||
function Xc(a,b){for(var c=0;c<a.qa.length;c++)Wl(a,c,b);if(a.ca>=Cf){b=a.R.V.yd;c=Sc(a.R,a.M);null==a.Aa&&(a.ma=Sc(a.R,a.M),a.Qa=1024,a.Aa=Math.floor(a.R.V.yd/a.Qa),Lk(a));c>=a.X&&(a.A[Ik]|=zm,a.A[$c]&ad&&(a.A[Ik]|=Am,Ff(a,Bm)),a.X=c+a.Aa);a.A[vk]==a.A[wk]&&a.A[xk]==a.A[yk]&&a.A[zk]==a.A[Ak]&&(a.A[Ik]|=Cm,a.A[$c]&Dm&&(a.A[Ik]|=Am,Ff(a,Bm)));var d=c-a.ma,e=Math.floor(d/b);if(e&&!(a.A[$c]&Em)){for(;e--;)if(60<=++a.A[vk]&&(a.A[vk]=0,60<=++a.A[xk]&&(a.A[xk]=0,24<=++a.A[zk]))){a.A[zk]=0;a.A[Bk]=a.A[Bk]%
|
||||
7+1;var f;f=a.A[Ek];var g=ua[a.A[Dk]-1];28==g&&(f%4||!(f%100)&&f%400||g++);f=g;++a.A[Ck]>f&&(a.A[Ck]=1,12<++a.A[Dk]&&(a.A[Dk]=1,a.A[Ek]=(a.A[Ek]+1)%100))}a.A[Ik]|=Fm;a.A[$c]&Gm&&(a.A[Ik]|=Am,Ff(a,Bm))}a.ma=c-d%b}}l.nl=function(){var a=this.xa;this.ja&Hm&&(this.H&Im?a=this.B[0][1]:this.C&&(a=Jm(this.C)));return a};l.Om=function(a,b){this.xa=b};l.ol=function(){return this.H};l.Pm=function(a,b){Om(this,b)};
|
||||
function Om(a,b){var c=!!(b&Pm),d=!!(a.H&Pm);a.H=b;a.C&&Qm(a.C,!(b&Im),!!(b&vm));c!=d&&Nk(a,c)}l.pl=function(){var a=0,a=(this.ca|0)==Lj?this.H&tm?a|this.B[1][1]&Rm:a|this.B[1][1]>>4&1:this.H&Sm?a|this.B[0][1]>>4:a|this.B[0][1]&15;this.H&sm&&Wl(this,dm).Lc&&(a=this.H&Pm?a|Tm:a|Um);return a};l.Qm=function(a,b){this.Ca=b};l.ql=function(){return this.ja};l.Rm=function(a,b){this.ja=b};l.vk=function(){var a=this.C?Jm(this.C):0;this.ba&=~Vm;return a};l.Wl=function(){};l.uk=function(){return this.H};
|
||||
l.Vl=function(a,b){Om(this,b)};l.wk=function(){return this.ba};l.xk=function(){var a=this.pa;this.F&=~(Vm|Wm);this.C&&Xm(this.C);return a};l.Yl=function(a,b){if(this.F&Ym)switch(this.J){case Zm:$m(this,b);break;case an:bn(this,b);break;default:if($m(this,this.I&~Wj),this.C){a=this.C;var c=b,d=-1;switch(a.F||c){case cn:d=dn;a.Pb=[];en(a,fn);break;case gn:a.F&&(c=0);en(a,dn);a.F=c;break;case hn:a.F&&(c=0),en(a,dn),a.F=c}jn(this,d)}}this.J=b;this.F&=~Ym};
|
||||
l.yk=function(){return this.H&~(kn|ln)|(Sc(this.R)&64?ln:0)};l.Zl=function(a,b){Om(this,b)};l.zk=function(){var a=this.F&255;this.F&Wm&&(this.F|=Vm,this.F&=~Wm);return a};
|
||||
l.Xl=function(a,b){this.J=b;this.F|=Ym;a=0;this.J>=mn&&(a=this.J^15,this.J=mn);switch(this.J){case nn:jn(this,this.I);break;case on:$m(this,this.I|Wj);break;case pn:$m(this,this.I&~Wj);this.C&&Xm(this.C);break;case qn:this.C&&(this.C.Pb=[]);$m(this,this.I|Wj);jn(this,rn);bn(this,gk|hk);break;case sn:jn(this,tn);break;case un:jn(this,this.K);break;case vn:jn(this,this.ra);break;case wn:jn(this,this.I&Wj?0:xn);break;case mn:a&1&&he(this.R)}};
|
||||
function $m(a,b){a.I=b;a.F=a.F&~yn|b&zn;a.C&&Qm(a.C,!!(b&An),!(b&Wj))}function jn(a,b,c){0<=b&&(a.pa=b,c?a.F|=Vm:(a.F&=~Vm,a.F|=Wm))}function bn(a,b){a.ra=b;Ib(a.oa,!!(b&hk));b&gk||he(a.R)}function Bn(a,b){a.ca<Cf?(Ff(a,Cn,4),a.ba|=Vm):a.I&Wj||a.F&(Vm|Wm)||(jn(a,b,!0),Dn(a.C),Ff(a,Cn,120))}l.Rk=function(){return this.W};l.qm=function(a,b){this.W=b;this.da=b&En?Gf:Fn};
|
||||
l.Sk=function(a,b){a=this.W&Gn;var c;if(a<=Jk)if(c=this.A[a],a<Gk){var d=!1;a!=zk&&a!=Ak||this.A[$c]&Hk||(12>c?c=c?c:12:c=(c-=12)?c+128:140,d=!0);this.A[$c]&Hn||(d&&128<c&&(c-=48),c=c%10|c/10<<4)}else a==Gk&&(this.A[a]^=In);else c=this.A[a];null!=b&&a==Ik&&(this.A[a]&=Jn,c&Am&&Df(this,Bm),c&zm&&this.A[$c]&ad&&Lk(this));return c};
|
||||
l.rm=function(a,b){a=this.W&Gn;var c=b^this.A[a],d;if(a<=Jk){if(d=b,a<Gk){var e=!1;this.A[$c]&Hn||(d=10*(d>>4)+(d&15),e=!0);if(a==zk||a==Ak)e&&23<d&&(d+=48),this.A[$c]&Hk||(12>=d?d=12==d?0:d:(d-=116,d=24==d?12:d))}}else d=b;this.A[a]=d;a==$c&&c&ad&&b&ad&&Lk(this)};l.Cj=function(a,b){this.da=b};l.Bm=function(){};l.Cm=function(){this.qd&&yf(this.qd)};
|
||||
function Nk(a,b){if(a.N){void 0!==b?a.La=b:b=!!(a.La&&a.R&&a.R.Y.cb);var c=Math.round(xj/cm(a,dm));if(20>c||2E4<c)b=!1;b&&Kn(a)?(a.U.frequency.setValueAtTime(c,0),a.aa.gain.value=a.Ga):a.aa&&(a.aa.gain.value=0)}}
|
||||
function Kn(a,b){if(a.N){if(b){if(a.Ma)return!0;a.U=null;a.Ma=!0}if(a.U)return!0;try{if(a.U=a.N.createOscillator(),"start"in a.U)return a.aa=a.N.createGain(),a.U.connect(a.aa),a.aa.connect(a.N.destination),a.aa.gain.value=0,a.U.type="square",a.U.start(0),!0}catch(c){a.wa("AudioContext exception: "+c.message),a.N=null}}return!1}var Lj=5150,pj=5150.9,Cf=5170,Aj=5160.101,Hj=5180,oj={5150:Lj,5160:5160,5170:Cf,att6300:Aj,mpc1600:5150.101,z150:5160.15,compaq:5150.102,other:pj};oj.deskpro386=Hj;
|
||||
var rj="sw1",vj="sw2",Mj="swdesc",ck=3,kl=1,ll=15,ol=3,pl=4,wl=12,Al=0,xl=4,zl=8,Cl=16,Bl=32,fl=0,Qj=0,Rj=32,Sj=1,Tj=160,Il=16,Sl=1,Rl=2,Nl=7,Kl=224,Ll=32,Ml=96,Pl=192,Jl=8,Fl=2,Gl=3,El=3,bm=0,Cn=1,Tl=2,Bm=8,Ef=13,$l=0,am=0,dm=2,om=1,pm=14,Yl=0,ym=4,Zc=6,Zl=8,qm=48,rm=0,wm=32,xm=48,fm=192,gm=192,nm=6,im=2,hm=16,lm=32,jm=64,km=128,xj=1193181,sm=1,Pm=2,tm=4,um=8,Sm=8,vm=64,Im=128,Rm=15,Um=16,Tm=32,Hm=16,qk={Zj:1,ONE:0,Bo:64,zo:128,po:192,ic:192,$f:6},pk=2,ok={Ao:16,Mn:32,qo:48,ic:48,$f:4},tj=1,wj=3,
|
||||
var rj="sw1",vj="sw2",Mj="swdesc",ck=3,kl=1,ll=15,ol=3,pl=4,wl=12,Al=0,xl=4,zl=8,Cl=16,Bl=32,fl=0,Qj=0,Rj=32,Sj=1,Tj=160,Il=16,Sl=1,Rl=2,Nl=7,Kl=224,Ll=32,Ml=96,Pl=192,Jl=8,Fl=2,Gl=3,El=3,bm=0,Cn=1,Tl=2,Bm=8,Ef=13,$l=0,am=0,dm=2,om=1,pm=14,Yl=0,ym=4,Zc=6,Zl=8,qm=48,rm=0,wm=32,xm=48,fm=192,gm=192,nm=6,im=2,hm=16,lm=32,jm=64,km=128,xj=1193181,sm=1,Pm=2,tm=4,um=8,Sm=8,vm=64,Im=128,Rm=15,Um=16,Tm=32,Hm=16,qk={Zj:1,ONE:0,Jo:64,Ho:128,xo:192,ic:192,$f:6},pk=2,ok={Io:16,Un:32,yo:48,ic:48,$f:4},tj=1,wj=3,
|
||||
uj=4,al=5,bl=6,V={};V[Lj]=[{},{}];V[Lj][0][tj]={ic:192,Fc:{1:0,2:64,3:128,4:192},ed:"Number of Floppy Drives"};V[Lj][0][wj]={ic:2,Fc:{0:0,1:2},ed:"FPU"};V[Lj][0][uj]={ic:48,Fc:{0:0,1:16,2:32,3:48,none:0,tv:16,color:32,cga:32,mda:48,mono:48,ega:0,vga:0},ed:"Monitor Type"};V[Lj][0][al]={ic:12,Fc:{16:0,32:4,48:8,64:12},ed:"Base Memory (16Kb Increments)"};V[Lj][1][bl]={ic:31,Fc:{0:0,32:1,64:2,96:3,128:4,160:5,192:6,224:7,256:8,288:9,320:10,352:11,384:12,416:13,448:14,480:15,512:16,544:17,576:18},ed:"Expansion Memory (32Kb Increments)"};
|
||||
V[5160]=[{},{}];V[5160][0][tj]=V[Lj][0][tj];V[5160][0][wj]=V[Lj][0][wj];V[5160][0][uj]=V[Lj][0][uj];V[5160][0][al]={ic:12,Fc:{64:0,128:4,192:8,256:12},ed:"Base Memory (64Kb Increments)"};V[5160][1][bl]=V[Lj][1][bl];V[Aj]=[{},{}];V[Aj][0][al]={ic:143,Fc:{128:1,256:130,512:8,640:141},ed:"Base Memory (128Kb Increments)"};V[Aj][0][wj]={ic:16,Fc:{0:0,1:16},ed:"FPU"};V[Aj][1][2]={ic:1,Fc:{0:0,1:1},ed:"Floppy Type"};V[Aj][1][tj]=V[Lj][0][tj];V[Aj][1][uj]=V[Lj][0][uj];
|
||||
var zn=4,An=8,Wj=16,rn=85,tn=0,ek=4,fk=8,ak=16,Xj=32,dk=64,Yj=128,gk=1,hk=2,xn=1,ln=16,kn=192,nn=32,Zm=96,qn=170,sn=171,on=173,pn=174,un=192,vn=208,an=209,wn=224,mn=240,Vm=1,yn=4,Ym=8,Vj=16,Wm=256,vk=0,wk=1,xk=2,yk=3,zk=4,Ak=5,Bk=6,Ck=7,Dk=8,Ek=9,Gk=10,$c=11,Ik=12,Jk=13,mk=14,sk=16,rk=20,kk=21,lk=24,nk=46,Mk=47,Fk=50,Gn=63,ik=64,En=128,In=128,Em=128,ad=64,Dm=32,Gm=16,Hn=4,Hk=2,Am=128,zm=64,Cm=32,Fm=16,Jn=15,Kk=128,$k=0,Wk=1,Yk=2,Xk=3,Zk=4,Fn=128,Gf=0,Ok=[0,null,null,0,Array(4),0],Qk=[!0,[0,0],[0,
|
||||
0],[0,0],[0,0]],Sk=[0,Array(4)],Tk=[[0,0],[0,0],[0,0],[0,0]],yj={0:function(){return el(this,0,0)},1:function(){return hl(this,0,0)},2:function(){return el(this,0,1)},3:function(){return hl(this,0,1)},4:function(){return el(this,0,2)},5:function(){return hl(this,0,2)},6:function(){return el(this,0,3)},7:function(){return hl(this,0,3)},8:function(){return jl(this,0)},13:function(){return this.D[0].gg},32:function(){return Dl(this,Qj)},33:function(){return this.bc[Qj].Wc},64:function(){return Ul(this,
|
||||
$l,am)},65:function(){return Ul(this,$l,1)},66:function(){return Ul(this,$l,dm)},67:function(){return $l?this.fa:this.ua},129:function(){return sl(this,0,2)},130:function(){return sl(this,0,3)},131:function(){return sl(this,0,1)},135:function(){return sl(this,0,0)}},Bj={96:U.prototype.jl,97:U.prototype.kl,98:U.prototype.ll,99:U.prototype.ml},Fj={96:U.prototype.xk,97:U.prototype.yk,100:U.prototype.zk,112:U.prototype.Nk,113:U.prototype.Ok,128:function(){return this.G[7]},132:function(){return this.G[0]},
|
||||
$l,am)},65:function(){return Ul(this,$l,1)},66:function(){return Ul(this,$l,dm)},67:function(){return $l?this.fa:this.ua},129:function(){return sl(this,0,2)},130:function(){return sl(this,0,3)},131:function(){return sl(this,0,1)},135:function(){return sl(this,0,0)}},Bj={96:U.prototype.nl,97:U.prototype.ol,98:U.prototype.pl,99:U.prototype.ql},Fj={96:U.prototype.xk,97:U.prototype.yk,100:U.prototype.zk,112:U.prototype.Rk,113:U.prototype.Sk,128:function(){return this.G[7]},132:function(){return this.G[0]},
|
||||
133:function(){return this.G[1]},134:function(){return this.G[2]},136:function(){return this.G[3]},137:function(){return sl(this,1,2)},138:function(){return sl(this,1,3)},139:function(){return sl(this,1,1)},140:function(){return this.G[4]},141:function(){return this.G[5]},142:function(){return this.G[6]},143:function(){return sl(this,1,0)},160:function(){return Dl(this,Sj)},161:function(){return this.bc[Sj].Wc},192:function(){return el(this,1,0)},194:function(){return hl(this,1,0)},196:function(){return el(this,
|
||||
1,1)},198:function(){return hl(this,1,1)},200:function(){return el(this,1,2)},202:function(){return hl(this,1,2)},204:function(){return el(this,1,3)},206:function(){return hl(this,1,3)},208:function(){return jl(this,1)},218:function(){return this.D[1].gg}},Dj={96:U.prototype.vk,97:U.prototype.uk,100:U.prototype.wk,102:function(){return this.B[0][1]},103:function(){return this.B[1][1]}},Ij={72:function(){return Ul(this,1,0)},73:function(){return Ul(this,1,1)},74:function(){return Ul(this,1,2)},75:function(){return this.fa}},
|
||||
zj={0:function(a,b){gl(this,0,0,b)},1:function(a,b){il(this,0,0,b)},2:function(a,b){gl(this,0,1,b)},3:function(a,b){il(this,0,1,b)},4:function(a,b){gl(this,0,2,b)},5:function(a,b){il(this,0,2,b)},6:function(a,b){gl(this,0,3,b)},7:function(a,b){il(this,0,3,b)},8:function(a,b){this.D[0].eg=b},9:function(a,b){ml(this,0,b)},10:function(a,b){nl(this,0,b)},11:function(a,b){this.D[0].Tb[b&3].mode=b},12:function(){this.D[0].Ib=0},13:function(){rl(this,0)},32:function(a,b){Hl(this,Qj,b)},33:function(a,b){Ql(this,
|
||||
Qj,b)},64:function(a,b){Xl(this,$l,am,b)},65:function(a,b){Xl(this,$l,1,b)},66:function(a,b){Xl(this,$l,dm,b)},67:function(a,b){em(this,$l,b)},129:function(a,b){tl(this,0,2,b)},130:function(a,b){tl(this,0,3,b)},131:function(a,b){tl(this,0,1,b)},135:function(a,b){tl(this,0,0,b)}},Cj={96:U.prototype.Gm,97:U.prototype.Hm,98:U.prototype.Im,99:U.prototype.Jm,160:U.prototype.Cj},Gj={96:U.prototype.Ul,97:U.prototype.Vl,100:U.prototype.Tl,112:U.prototype.im,113:U.prototype.jm,128:function(a,b){this.G[7]=
|
||||
Qj,b)},64:function(a,b){Xl(this,$l,am,b)},65:function(a,b){Xl(this,$l,1,b)},66:function(a,b){Xl(this,$l,dm,b)},67:function(a,b){em(this,$l,b)},129:function(a,b){tl(this,0,2,b)},130:function(a,b){tl(this,0,3,b)},131:function(a,b){tl(this,0,1,b)},135:function(a,b){tl(this,0,0,b)}},Cj={96:U.prototype.Om,97:U.prototype.Pm,98:U.prototype.Qm,99:U.prototype.Rm,160:U.prototype.Cj},Gj={96:U.prototype.Yl,97:U.prototype.Zl,100:U.prototype.Xl,112:U.prototype.qm,113:U.prototype.rm,128:function(a,b){this.G[7]=
|
||||
b},132:function(a,b){this.G[0]=b},133:function(a,b){this.G[1]=b},134:function(a,b){this.G[2]=b},136:function(a,b){this.G[3]=b},137:function(a,b){tl(this,1,2,b)},138:function(a,b){tl(this,1,3,b)},139:function(a,b){tl(this,1,1,b)},140:function(a,b){this.G[4]=b},141:function(a,b){this.G[5]=b},142:function(a,b){this.G[6]=b},143:function(a,b){tl(this,1,0,b)},160:function(a,b){Hl(this,Sj,b)},161:function(a,b){Ql(this,Sj,b)},192:function(a,b){gl(this,1,0,b)},194:function(a,b){il(this,1,0,b)},196:function(a,
|
||||
b){gl(this,1,1,b)},198:function(a,b){il(this,1,1,b)},200:function(a,b){gl(this,1,2,b)},202:function(a,b){il(this,1,2,b)},204:function(a,b){gl(this,1,3,b)},206:function(a,b){il(this,1,3,b)},208:function(a,b){this.D[1].eg=b},210:function(a,b){ml(this,1,b)},212:function(a,b){nl(this,1,b)},214:function(a,b){this.D[1].Tb[b&3].mode=b},216:function(){this.D[1].Ib=0},218:function(){rl(this,1)},240:U.prototype.tm,241:U.prototype.um},Ej={96:U.prototype.Sl,97:U.prototype.Rl,160:U.prototype.Cj},Jj={72:function(a,
|
||||
b){gl(this,1,1,b)},198:function(a,b){il(this,1,1,b)},200:function(a,b){gl(this,1,2,b)},202:function(a,b){il(this,1,2,b)},204:function(a,b){gl(this,1,3,b)},206:function(a,b){il(this,1,3,b)},208:function(a,b){this.D[1].eg=b},210:function(a,b){ml(this,1,b)},212:function(a,b){nl(this,1,b)},214:function(a,b){this.D[1].Tb[b&3].mode=b},216:function(){this.D[1].Ib=0},218:function(){rl(this,1)},240:U.prototype.Bm,241:U.prototype.Cm},Ej={96:U.prototype.Wl,97:U.prototype.Vl,160:U.prototype.Cj},Jj={72:function(a,
|
||||
b){Xl(this,1,0,b)},73:function(a,b){Xl(this,1,1,b)},74:function(a,b){Xl(this,1,2,b)},75:function(a,b){em(this,1,b)}};Ma(function(){for(var a=cb(document,"pcx86","chipset"),b=0;b<a.length;b++){var c=a[b],d=db(c),d=new U(d);bb(d,c);dl(d)}});
|
||||
function Ln(a){u.call(this,"ROM",a);this.A=null;this.G=a.addr;this.C=a.size;this.F=a.alias;this.B=a.notify;this.I=null;if(this.B){var b=this.B.indexOf("[");if(0<b){try{this.I=eval(this.B.substr(b))}catch(c){}this.B=this.B.substr(0,b)}}if(this.D=this.J=a.file)a=la(ka(this.D)),"json"!=a&&"hex"!=a&&(this.D=xa()+"/api/v1/dump?file="+this.J+"&format=bytes&decimal=true")}ca(Ln,u);
|
||||
Ln.prototype.kc=function(a,b,c,d){this.na=a;this.oa=b;this.R=c;this.Ea=d;if(this.D){var e=this,f="Loading "+this.D+"...";wa(this.D,null,!0,function(a,b,c){Mn(e,a,b,c)},function(){e.qb(f,mb.ae)})}};Ln.prototype.Rb=function(){this.H&&(this.Ea&&this.Ea.A(this.id,0,this.G>>>4,0,this.G,this.C,this.H),delete this.H);return!0};Ln.prototype.Qb=function(){return!0};
|
||||
function Mn(a,b,c,d){if(d)a.wa("Unable to load system ROM (error "+d+": "+b+")",0>d);else{Va(a.Cd,b,c);if("["==c.charAt(0)||"{"==c.charAt(0))try{var e=eval("("+c+")"),f=e.bytes,g=e.longs||e.data;if(f)a.A=f;else if(g)for(a.A=Array(4*g.length),d=c=0;c<g.length;c++)a.A[d++]=g[c]&255,a.A[d++]=g[c]>>8&255,a.A[d++]=g[c]>>16&255,a.A[d++]=g[c]>>24&255;else a.A=e;a.H=e.symbols;if(!a.A.length){q("Empty ROM: "+b);return}if(1==a.A.length){q(a.A[0]);return}}catch(h){a.wa("ROM data error: "+h.message);return}else for(b=
|
||||
c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.A=Array(b.length),e=0;e<b.length;e++)a.A[e]=ia(b[e],16);Nn(a)}}
|
||||
function Nn(a){if(!ob(a))if(!a.J)v(a);else if(a.A&&a.oa){a.C||(a.C=a.A.length);if(a.A.length!=a.C)nb(a,"ROM size ("+ja(a.A.length,8,!0)+") does not match specified size ("+ja(a.C,8,!0)+")");else{var b;b=a.G;if(Jb(a.oa,b,a.C,Xb)){for(var c=0;c<a.A.length;c++){var d=a.oa,e=b+c;d.Y[(e&d.D)>>>d.B].ef(e&d.C,a.A[c]&255,e)}b=!0}else b=!1;if(b){b=[];"number"==typeof a.F?b.push(a.F):null!=a.F&&a.F.length&&(b=a.F);for(c=0;c<b.length;c++){var d=a,e=b[c],f=Rb(d.oa,d.G,d.C);Qb(d.oa,e,d.C,f)}a.B&&((b=fb(a.B,a.id))?
|
||||
function Nn(a){if(!ob(a))if(!a.J)v(a);else if(a.A&&a.oa){a.C||(a.C=a.A.length);if(a.A.length!=a.C)nb(a,"ROM size ("+ja(a.A.length,8,!0)+") does not match specified size ("+ja(a.C,8,!0)+")");else{var b;b=a.G;if(Jb(a.oa,b,a.C,Xb)){for(var c=0;c<a.A.length;c++){var d=a.oa,e=b+c;d.X[(e&d.D)>>>d.B].ef(e&d.C,a.A[c]&255,e)}b=!0}else b=!1;if(b){b=[];"number"==typeof a.F?b.push(a.F):null!=a.F&&a.F.length&&(b=a.F);for(c=0;c<b.length;c++){var d=a,e=b[c],f=Rb(d.oa,d.G,d.C);Qb(d.oa,e,d.C,f)}a.B&&((b=fb(a.B,a.id))?
|
||||
(c=a.A,d=a.I,b.Oa==On?Pn(b,c,d||[12640,8752],8):b.Oa==Qn&&Pn(b,c,d||[14221,16269],8),v(b)):a.wa("Unable to find component: "+a.B));delete a.A}}v(a)}}Ma(function(){for(var a=cb(document,"pcx86","rom"),b=0;b<a.length;b++){var c=a[b],d=db(c),d=new Ln(d);bb(d,c)}});function Rn(a){u.call(this,"RAM",a);this.B=a.addr;this.A=a.size;this.F=a.test;this.D=!!this.A;this.C=!1}ca(Rn,u);l=Rn.prototype;l.kc=function(a,b,c,d){this.oa=b;this.R=c;this.Ea=d;this.U=tb(a,"ChipSet");v(this)};
|
||||
l.Rb=function(a,b){return!b&&(this.reset(),a&&this.controller&&!this.restore(a))?!1:!0};l.Qb=function(a){return a&&this.controller?this.save():!0};
|
||||
l.reset=function(){if(!this.B&&!this.D&&this.U){var a=1024*Zj(this.U);this.A&&a!=this.A&&(Vb(this.oa,this.B,this.A),this.C=!1);this.A=a}!this.C&&this.A&&Jb(this.oa,this.B,this.A,1)&&(this.C=!0,"ramCPQ"==this.Ce&&(this.controller=new Sn(this),Jb(this.oa,Tn,4,4,this.controller)));if(this.C){if(this.F||cc(this.oa,1138,4660),"ramCPQ"!=this.Ce&&this.U&&(a=this.U,a.A)){var b=1048576>this.B?kk:23,c=a.A[b]|a.A[b+1]<<8,c=c+(this.A>>10);a.A[b]=c&255;a.A[b+1]=c>>8;uk(a)}}else q("No RAM allocated")};
|
||||
l.save=function(){var a=new Me(this);this.controller&&a.set(0,this.controller.save());return a.data()};l.restore=function(a){return this.controller?this.controller.restore(a[0]):!0};function Sn(a){this.F=a;this.C=Un;this.D=Vn;this.B=Wn;this.A=null}l=Sn.prototype;l.save=function(){return[this.C,this.B]};l.restore=function(a){this.Bb(0,a[0]&255);this.Bb(2,a[1]&255);return!0};l.Ia=function(a){var b=255;2>a?b=a&1?this.D>>8:this.D&255:4>a&&(b=a&1?this.B>>8:this.B&255);return b};
|
||||
l.Bb=function(a,b){if(a)2==a&&(this.B=this.B&-256|b);else if(b!=(this.C&255)){a=this.F.oa;if(b&Xn)this.A&&(Qb(a,Yn,Zn,this.A),this.A=null);else{this.A||(this.A=Rb(a,Yn,Zn));var c=Rb(a,$n,Zn);Qb(a,Yn,Zn,c,b&ao?1:Xb)}this.C=this.C&-256|b}};l.mi=function(){return bo};l.lg=function(){return co};var Tn=-2134900736,$n=16646144,Yn=917504,Zn=131072,Xn=1,ao=2,Un=65535,Vn=2575,Wn=2,bo=[null,0],co=[function(a){return this.controller.Ia(a)},null,null,function(a,b){this.controller.Bb(a,b)},null,null];
|
||||
Ma(function(){for(var a=cb(document,"pcx86","ram"),b=0;b<a.length;b++){var c=a[b],d=db(c),d=new Rn(d);bb(d,c)}});function eo(a){u.call(this,"Keyboard",a);fo(this,a.model);this.ba=Ea("Mobi");this.aa=Ea("MSIE");this.W=0;this.Y=this.jg=!1;this.A=[];this.fa=50;this.D=null;this.G=a.autoType;this.M=!1;this.J=this.K=null;this.exports={type:this.mg,wait:this.sn};v(this)}ca(eo,u);l=eo.prototype;
|
||||
Ma(function(){for(var a=cb(document,"pcx86","ram"),b=0;b<a.length;b++){var c=a[b],d=db(c),d=new Rn(d);bb(d,c)}});function eo(a){u.call(this,"Keyboard",a);fo(this,a.model);this.ba=Ea("Mobi");this.aa=Ea("MSIE");this.W=0;this.X=this.jg=!1;this.A=[];this.fa=50;this.D=null;this.G=a.autoType;this.M=!1;this.J=this.K=null;this.exports={type:this.mg,wait:this.An};v(this)}ca(eo,u);l=eo.prototype;
|
||||
l.Ab=function(a,b,c,d){var e=this,f=a+"-"+b;if(void 0===this.ia[f])switch(b){case "kbd":case "screen":return c.onkeydown=function(a){return go(e,a,!0)},c.onkeypress=function(a){a=a||window.event;a=a.which||a.keyCode;if(ho(e.na)){e.B="";var b=!W[a]||!!(e.Vb&io);b||jo(e,a,!0);a=b}else a=!1;return a},c.onkeyup=function(a){return go(e,a,!1)},!0;case "caps-lock":return this.ia[f]=c,c.onclick=function(a){a.preventDefault();e.na&&Tc(e.na);jo(e,ko,!0)},!0;case "num-lock":return this.ia[f]=c,c.onclick=function(a){a.preventDefault();
|
||||
e.na&&Tc(e.na);jo(e,lo,!0)},!0;case "scroll-lock":return this.ia[f]=c,c.onclick=function(a){a.preventDefault();e.na&&Tc(e.na);jo(e,mo,!0)},!0;default:var g=b.toUpperCase().replace(/-/g,"_");if(void 0!==no[g]&&"button"==a)return this.ia[f]=c,c.onclick=function(a,b,c){return function(b){b.preventDefault();a.na&&Tc(a.na);a.B="";oo(a,c,!0);jo(a,c,!0)}}(this,g,no[g]),!0;if(void 0!==po[b])return this.W++,this.ia[f]=c,a=function(a,b,c){return function(b){b.preventDefault();a.na&&Tc(a.na);a.B="";jo(a,c)}}(this,
|
||||
b,po[b]),b=function(a,b,c){return function(){qo(a,c)}}(this,b,po[b]),"ontouchstart"in window?(c.ontouchstart=a,c.ontouchend=b):(c.onmousedown=a,c.onmouseup=c.onmouseout=b),!0;if(d)return this.ia[f]=c,c.onclick=function(a){a.preventDefault();e.na&&Tc(e.na);return e.mg(d)},!0}return!1};
|
||||
function ro(a,b,c){if(a.W){for(var d in p)if(b==p[d]){b=+d;(d=ha[d])&&(b=d);break}for(var e in po)if((d=po[e]==b)||(d=b,d>=n.Fd&&d<=n.z&&(d-=n.Fd-n.Ed),d=po[e]==d),d){(a=a.ia["key-"+e])&&void 0!==c&&(a.style.color=c?"#ffffff":"#000000",a.style.backgroundColor=c?"#000000":"#ffffff");break}}}l.kc=function(a,b,c,d){this.na=a;this.oa=b;this.R=c;this.Ea=d;this.U=tb(a,"ChipSet");this.G=Fc(a,"autoType")||this.G;Ie(c,33,this.Bl.bind(this))};
|
||||
l.Bl=function(){if(10==(this.R.F>>8&255))if(this.M=!0,this.J)this.J(),this.J=null,this.M=!1;else{var a=this.G;!this.D&&a&&(this.D=a,this.mg(this.D))}return!0};function fo(a,b){var c=0;a.ca=null;"string"==typeof b&&(a.ca=b.toUpperCase(),c=so.indexOf(a.ca),0>c&&(c=0));if(b=so[c])a.da=parseInt(b.substr(2),10)}function Qm(a,b,c){a.L!==c&&(a.L=a.N=c)&&(a.H=!0);a.I!==b&&(a.I=b)&&!a.N&&Dn(a,!0);a.I&&a.N&&(a.Pb=[],en(a,fn),a.N=!1)}function en(a,b){a.U&&(a.Pb.unshift(b),a.H=!0,Bn(a.U,b))}
|
||||
function ro(a,b,c){if(a.W){for(var d in p)if(b==p[d]){b=+d;(d=ha[d])&&(b=d);break}for(var e in po)if((d=po[e]==b)||(d=b,d>=n.Fd&&d<=n.z&&(d-=n.Fd-n.Ed),d=po[e]==d),d){(a=a.ia["key-"+e])&&void 0!==c&&(a.style.color=c?"#ffffff":"#000000",a.style.backgroundColor=c?"#000000":"#ffffff");break}}}l.kc=function(a,b,c,d){this.na=a;this.oa=b;this.R=c;this.Ea=d;this.U=tb(a,"ChipSet");this.G=Fc(a,"autoType")||this.G;Ie(c,33,this.Fl.bind(this))};
|
||||
l.Fl=function(){if(10==(this.R.F>>8&255))if(this.M=!0,this.J)this.J(),this.J=null,this.M=!1;else{var a=this.G;!this.D&&a&&(this.D=a,this.mg(this.D))}return!0};function fo(a,b){var c=0;a.ca=null;"string"==typeof b&&(a.ca=b.toUpperCase(),c=so.indexOf(a.ca),0>c&&(c=0));if(b=so[c])a.da=parseInt(b.substr(2),10)}function Qm(a,b,c){a.L!==c&&(a.L=a.N=c)&&(a.H=!0);a.I!==b&&(a.I=b)&&!a.N&&Dn(a,!0);a.I&&a.N&&(a.Pb=[],en(a,fn),a.N=!1)}function en(a,b){a.U&&(a.Pb.unshift(b),a.H=!0,Bn(a.U,b))}
|
||||
function Xm(a){var b;a.Pb.length&&a.H&&(b=a.Pb[0],a.U&&Bn(a.U,b))}function Jm(a){var b=0;a.Pb.length&&(b=a.Pb[0]);return b}function Dn(a,b){0<a.Pb.length&&(a.Pb.shift(),(a.H=b)&&a.Pb.length&&a.U&&Bn(a.U,a.Pb[0]))}l.Rb=function(a,b){return!b&&(this.reset(),a&&this.restore&&!this.restore(a))?!1:!0};l.Qb=function(a){return a?this.save():!0};l.reset=function(){if(!this.ca&&this.U)switch(this.U.ca){case Lj:case 5160:fo(this,so[0]);break;default:fo(this,so[1])}to(this)};
|
||||
l.save=function(){var a=new Me(this),b=[];b[0]=this.L;b[1]=this.I;a.set(0,b);return a.data()};l.restore=function(a){return to(this,a[0])};function to(a,b){var c=0;b?a.D=a.G:(b=[],a.D=null);a.L=b[c++];a.I=b[c];a.F=0;a.Vb=a.C=0;a.Pb=[];a.H=!0;a.B="";return!0}
|
||||
l.mg=function(a,b){if(a&&!this.B){if(a){for(var c,d=/(?:^|[^$])\$([a-z]+)/g;c=d.exec(a);){var e;switch(c[1]){case "date":e=ra("n-j-Y");break;case "time":e=ra("h:i:s");break;default:continue}a=a.replace("$"+c[1],e)}a=a.replace(/\$\$/g,"$$")}this.B=a;uo(this,b||150);return!0}return!1};
|
||||
function uo(a,b){for(var c=0;0<a.B.length&&!c;)if(c=a.B.charAt(0),a.B=a.B.substr(1),c=c.charCodeAt(0),240<=c){b=100*(c-240)||150;c=0;break}c&&(10==c&&(c=13),jo(a,c,!0));a.B.length?setTimeout(function(a){return function(){uo(a,b)}}(a),b):a.K&&(a.K(),a.K=null)}l.sn=function(a,b){var c=!1;switch(b){case "DOS":this.M?c=!0:this.J=a;break;default:this.B.length?this.K=a:c=!0}return c};
|
||||
function uo(a,b){for(var c=0;0<a.B.length&&!c;)if(c=a.B.charAt(0),a.B=a.B.substr(1),c=c.charCodeAt(0),240<=c){b=100*(c-240)||150;c=0;break}c&&(10==c&&(c=13),jo(a,c,!0));a.B.length?setTimeout(function(a){return function(){uo(a,b)}}(a),b):a.K&&(a.K(),a.K=null)}l.An=function(a,b){var c=!1;switch(b){case "DOS":this.M?c=!0:this.J=a;break;default:this.B.length?this.K=a:c=!0}return c};
|
||||
function oo(a,b,c,d){if(W[b]){var e=Math.floor(b/1E3)&2;if(b=vo[b]||0){!e||b&wo||(b>>=1);if(b&xo){if(!1===d)return!0;d=null}null==d?d=!((c?a.C:a.Vb)&b):d||b&yo&&(b=yo);if(c){a.C&=~b;d&&(a.C|=b);c=b;var f,g;for(g in zo)d="led-"+g,e=zo[g],c&&c!=e||!(f=a.ia[d])||(f.style.backgroundColor=a.C&e?"#00ff00":"#000000")}else a.Vb&=~b,d&&(a.Vb|=b);return!0}}return!1}
|
||||
function jo(a,b,c){if((W[b]||W[b+=1E3])&&a.R&&a.R.X.cb){vo[b]&&a.A.length&&0<a.A[0].ad&&(a.A[0].ad=0);for(var d,e=0;e<a.A.length;e++)if(d=a.A[e],d.Xd==b){if(!c||0<=d.ad){e=-1;break}0<e&&(0<a.A[0].ad&&(a.A[0].ad=0),a.A.splice(e,1));break}0>e||(e==a.A.length&&(d={},d.Xd=b,d.Vb=a.Vb,ro(a,b,!0),e++),0<e&&a.A.splice(0,0,d),d.Je=!0,d.ad=c?-1:vo[b]?0:1,Ao(a,d))}}
|
||||
function qo(a,b,c){if(!W[b]||!(c||a.R&&a.R.X.cb))return!1;for(var d=!1,e=0;e<a.A.length;e++){var f=a.A[e];if(f.Xd==b||f.Xd==p[b]){a.A.splice(e,1);f.mh&&clearTimeout(f.mh);f.Je&&!c&&Bo(a,f.Xd,!1);ro(a,b,!1);d=!0;break}}!a.A.length&&a.Y&&(oo(a,ko),a.Y=!1);return d}function Ao(a,b){if(!a.R||!a.R.X.cb)qo(a,b.Xd,!0);else if(Bo(a,b.Xd,b.Je)&&b.ad){var c;if(0>b.ad){if(!b.Je){qo(a,b.Xd);return}b.Je=!1;c=a.fa}else c=1==b.ad++?500:100;b.mh=setTimeout(function(a){return function(){Ao(a,b)}}(a),c)}}
|
||||
function jo(a,b,c){if((W[b]||W[b+=1E3])&&a.R&&a.R.Y.cb){vo[b]&&a.A.length&&0<a.A[0].ad&&(a.A[0].ad=0);for(var d,e=0;e<a.A.length;e++)if(d=a.A[e],d.Xd==b){if(!c||0<=d.ad){e=-1;break}0<e&&(0<a.A[0].ad&&(a.A[0].ad=0),a.A.splice(e,1));break}0>e||(e==a.A.length&&(d={},d.Xd=b,d.Vb=a.Vb,ro(a,b,!0),e++),0<e&&a.A.splice(0,0,d),d.Je=!0,d.ad=c?-1:vo[b]?0:1,Ao(a,d))}}
|
||||
function qo(a,b,c){if(!W[b]||!(c||a.R&&a.R.Y.cb))return!1;for(var d=!1,e=0;e<a.A.length;e++){var f=a.A[e];if(f.Xd==b||f.Xd==p[b]){a.A.splice(e,1);f.mh&&clearTimeout(f.mh);f.Je&&!c&&Bo(a,f.Xd,!1);ro(a,b,!1);d=!0;break}}!a.A.length&&a.X&&(oo(a,ko),a.X=!1);return d}function Ao(a,b){if(!a.R||!a.R.Y.cb)qo(a,b.Xd,!0);else if(Bo(a,b.Xd,b.Je)&&b.ad){var c;if(0>b.ad){if(!b.Je){qo(a,b.Xd);return}b.Je=!1;c=a.fa}else c=1==b.ad++?500:100;b.mh=setTimeout(function(a){return function(){Ao(a,b)}}(a),c)}}
|
||||
function Co(a,b,c){var d=b;if(b>=n.Ed&&b<=n.qf)!(a.Vb&(Do|Eo|Fo))==c&&(d=b+(n.Fd-n.Ed));else if(b>=n.Fd&&b<=n.z)!!(a.Vb&(Do|Eo|Fo))==c&&(d=b-(n.Fd-n.Ed));else if(!!(a.Vb&(Do|Eo))==c){if(a=p[b])d=a}else if(a=ha[b])d=a;return d}l.Qf=function(a){a||(this.Vb&=~yo)};
|
||||
function go(a,b,c){var d=!0,e=!1,f=!1,g=b.keyCode;if(!ho(a.na))return!1;a.B="";gb(a.Cd);var h=Co(a,g,!0);a.jg&&h==n["`"]&&(g=h=27);if(W[g+1E3])if(h+=1E3,2==b.location&&(h+=2E3),oo(a,h,!1,c)){if(20==g||144==g||145==g)a.aa||(c=e=!0);if(!(c||91!=g&&93!=g))for(var k=0;k<a.A.length;k++){var m=a.A[k];m.Je=!1;0<m.ad&&(m.ad=0)}}else 8==g&&(a.Vb&(Go|Ho))==Go&&(h=Io),d=!1;else if(W[h]&&a.Vb&(Jo|Ko)&&(d=!1),d&&c||a.Vb&Lo)f=!0;d||b.preventDefault();f||a.ba&&d||(c?jo(a,h,e):qo(a,h)||(b=Co(a,g,!1),b!=h&&qo(a,b)));
|
||||
return d}
|
||||
|
|
@ -494,13 +494,13 @@ Bn(e.U,f)):e.Pb.length==Vo&&e.Pb.push(Wo));d=!0}return d}var so=["US83","US84","
|
|||
var no={TAB:1009,ESC:1027,F1:1112,F2:1113,F3:1114,F4:1115,F5:1116,F6:1117,F7:1118,F8:1119,F9:1120,F10:1121,LEFT:1037,UP:1038,RIGHT:1039,DOWN:1040,SYSREQ:4027,CTRL_C:Xo,CTRL_BREAK:Io,CTRL_ALT_DEL:4046,CTRL_ALT_INS:4045,CTRL_ALT_ENTER:4013},po={esc:1027,1:n["1"],2:n["2"],3:n["3"],4:n["4"],5:n["5"],6:n["6"],7:n["7"],8:n["8"],9:n["9"],0:n["0"],"-":n["-"],"=":n["="],bs:1008,tab:1009,q:n.Q,w:n.Mh,e:n.E,r:n.Hh,t:n.Jh,y:n.Ph,u:n.Kh,i:n.zh,o:n.Fh,p:n.Gh,"[":n["["],"]":n["]"],enter:13,ctrl:1017,a:n.Ed,s:n.Ih,
|
||||
d:n.vh,f:n.wh,g:n.xh,h:n.yh,j:n.Ah,k:n.Bh,l:n.Ch,";":n[";"],quote:n["'"],"`":n["`"],shift:1016,"\\":n["\\"],z:n.qf,x:n.Nh,c:n.th,v:n.Lh,b:n.sh,n:n.Eh,m:n.Dh,",":n[","],".":n["."],"/":n["/"],"right-shift":3016,prtsc:1044,alt:1018,space:1032,"caps-lock":ko,f1:1112,f2:1113,f3:1114,f4:1115,f5:1116,f6:1117,f7:1118,f8:1119,f9:1120,f10:1121,"num-lock":lo,"scroll-lock":mo,"num-home":1036,"num-up":1038,"num-pgup":1033,"num-sub":1109,"num-left":1037,"num-center":1101,"num-right":1039,"num-add":1107,"num-end":1035,
|
||||
"num-down":1040,"num-pgdn":1034,"num-ins":1045,"num-del":1046,sysreq:84},zo={"caps-lock":Fo,"num-lock":1024,"scroll-lock":2048},W={1027:1};W[n["1"]]=2;W[n["!"]]=2|X<<8;W[n["2"]]=3;W[n["@"]]=3|X<<8;W[n["3"]]=4;W[n["#"]]=4|X<<8;W[n["4"]]=5;W[n.$]=5|X<<8;W[n["5"]]=6;W[n["%"]]=6|X<<8;W[n["6"]]=7;W[n["^"]]=7|X<<8;W[n["7"]]=8;W[n["&"]]=8|X<<8;W[n["8"]]=9;W[n["*"]]=9|X<<8;W[n["9"]]=10;W[n["("]]=10|X<<8;W[n["0"]]=11;W[n[")"]]=11|X<<8;W[n["-"]]=12;W[n._]=12|X<<8;W[n["="]]=13;W[n["+"]]=13|X<<8;W[1008]=Mo;
|
||||
W[1009]=15;W[n.q]=16;W[n.Q]=16|X<<8;W[n.qn]=17;W[n.Mh]=17|X<<8;W[n.e]=18;W[n.E]=18|X<<8;W[n.r]=19;W[n.Hh]=19|X<<8;W[n.t]=20;W[n.Jh]=20|X<<8;W[n.y]=21;W[n.Ph]=21|X<<8;W[n.on]=22;W[n.Kh]=22|X<<8;W[n.rk]=23;W[n.zh]=23|X<<8;W[n.Ql]=24;W[n.Fh]=24|X<<8;W[n.p]=25;W[n.Gh]=25|X<<8;W[n["["]]=26;W[n["{"]]=26|X<<8;W[n["]"]]=27;W[n["}"]]=27|X<<8;W[13]=28;W[1017]=Ro;W[n.Fd]=30;W[n.Ed]=30|X<<8;W[n.ln]=31;W[n.Ih]=31|X<<8;W[n.d]=32;W[n.vh]=32|X<<8;W[n.nk]=33;W[n.wh]=33|X<<8;W[n.pk]=34;W[n.xh]=34|X<<8;W[n.qk]=35;
|
||||
W[n.yh]=35|X<<8;W[n.Cl]=36;W[n.Ah]=36|X<<8;W[n.k]=37;W[n.Bh]=37|X<<8;W[n.Dl]=38;W[n.Ch]=38|X<<8;W[n[";"]]=39;W[n[":"]]=39|X<<8;W[n["'"]]=40;W[n['"']]=40|X<<8;W[n["`"]]=41;W[n["~"]]=41|X<<8;W[1016]=X;W[n["\\"]]=43;W[n["|"]]=43|X<<8;W[n.z]=44;W[n.qf]=44|X<<8;W[n.x]=45;W[n.Nh]=45|X<<8;W[n.ek]=46;W[n.th]=46|X<<8;W[n.pn]=47;W[n.Lh]=47|X<<8;W[n.dk]=48;W[n.sh]=48|X<<8;W[n.n]=49;W[n.Eh]=49|X<<8;W[n.Hl]=50;W[n.Dh]=50|X<<8;W[n[","]]=51;W[n["<"]]=51|X<<8;W[n["."]]=52;W[n[">"]]=52|X<<8;W[n["/"]]=53;
|
||||
W[1009]=15;W[n.q]=16;W[n.Q]=16|X<<8;W[n.yn]=17;W[n.Mh]=17|X<<8;W[n.e]=18;W[n.E]=18|X<<8;W[n.r]=19;W[n.Hh]=19|X<<8;W[n.t]=20;W[n.Jh]=20|X<<8;W[n.y]=21;W[n.Ph]=21|X<<8;W[n.wn]=22;W[n.Kh]=22|X<<8;W[n.rk]=23;W[n.zh]=23|X<<8;W[n.Ul]=24;W[n.Fh]=24|X<<8;W[n.p]=25;W[n.Gh]=25|X<<8;W[n["["]]=26;W[n["{"]]=26|X<<8;W[n["]"]]=27;W[n["}"]]=27|X<<8;W[13]=28;W[1017]=Ro;W[n.Fd]=30;W[n.Ed]=30|X<<8;W[n.tn]=31;W[n.Ih]=31|X<<8;W[n.d]=32;W[n.vh]=32|X<<8;W[n.nk]=33;W[n.wh]=33|X<<8;W[n.pk]=34;W[n.xh]=34|X<<8;W[n.qk]=35;
|
||||
W[n.yh]=35|X<<8;W[n.Gl]=36;W[n.Ah]=36|X<<8;W[n.k]=37;W[n.Bh]=37|X<<8;W[n.Hl]=38;W[n.Ch]=38|X<<8;W[n[";"]]=39;W[n[":"]]=39|X<<8;W[n["'"]]=40;W[n['"']]=40|X<<8;W[n["`"]]=41;W[n["~"]]=41|X<<8;W[1016]=X;W[n["\\"]]=43;W[n["|"]]=43|X<<8;W[n.z]=44;W[n.qf]=44|X<<8;W[n.x]=45;W[n.Nh]=45|X<<8;W[n.ek]=46;W[n.th]=46|X<<8;W[n.xn]=47;W[n.Lh]=47|X<<8;W[n.dk]=48;W[n.sh]=48|X<<8;W[n.n]=49;W[n.Eh]=49|X<<8;W[n.Ll]=50;W[n.Dh]=50|X<<8;W[n[","]]=51;W[n["<"]]=51|X<<8;W[n["."]]=52;W[n[">"]]=52|X<<8;W[n["/"]]=53;
|
||||
W[n["?"]]=53|X<<8;W[3016]=54;W[1044]=55;W[1018]=To;W[1032]=57;W[ko]=58;W[1112]=59;W[1113]=60;W[1114]=61;W[1115]=62;W[1116]=63;W[1117]=64;W[1118]=65;W[1119]=66;W[1120]=67;W[1121]=68;W[lo]=69;W[mo]=70;W[1036]=71;W[1038]=72;W[1033]=73;W[1109]=74;W[1037]=75;W[1101]=76;W[1039]=77;W[1107]=78;W[1035]=79;W[1040]=80;W[1034]=81;W[1045]=82;W[1046]=No;W[4027]=84;W[1122]=87;W[1123]=88;W[1091]=91;W[1093]=93;W[1224]=91;W[Xo]=46|Ro<<8;W[Io]=70|Ro<<8;W[4046]=No|Ro<<8|To<<16;W[4045]=82|Ro<<8|To<<16;
|
||||
W[4013]=28|Ro<<8|To<<16;var cn=255,gn=243,hn=237,fn=170,dn=250,Wo=255,Vo=20;Ma(function(){for(var a=cb(document,"pcx86","keyboard"),b=0;b<a.length;b++){var c=a[b],d=db(c),d=new eo(d);bb(d,c)}});
|
||||
function Yo(a,b,c,d){if(void 0!==b&&(!c||c.length)){this.video=a;var e=Zo[b],f=a.da||e[5];if(!c||6>c.length)c=[!1,0,null,null,0,Array(b<On?$o:ap)];this.Oa=b;this.ab=e[2];this.Hb=e[3];this.Xc=d||e[4];65536<=this.Xc&&720896<=this.ab&&(this.Hb=Math.min(this.Xc>>2,32768));this.Wb=c[0];this.Ec=c[1];this.bf=c[2];this.Z=c[3];this.hc=c[4]&255;this.Tf=c[4]>>8&255;this.Ua=c[5];this.pg=$o;this.Ad=this.Ua[bp]|this.Ua[cp]<<8;this.sf=63;if(b>=On){this.sf=255;this.pg=ap;(b=c[6])||(b=[!1,0,Array(dp),0,f==ck?0:ep,
|
||||
0,0,Array(fp),0,0,0,Array(gp),0,[this.ab,this.Hb,this.Xc],Array(this.Xc>>2),hp|ip|jp|kp|lp,0,-1,0,-1,0,-1,0,0,0,0,mp,np,0,0,op,Array(pp)]);this.Ie=b[0];this.Sd=b[1];this.vc=b[2];this.ih=b[3];this.cf=b[4];this.Wf=b[5];this.Vd=b[6];this.Ud=b[7];this.Kj=b[8];this.Lj=b[9];this.Td=b[10];this.nd=b[11];this.pb=b[12];d=b[13];"number"==typeof d&&(d=[this.ab,this.Hb,d]);this.ab=d[0];this.Hb=d[1];d=this.Xc>>2;if((this.td=b[14])&&this.td.length<d){for(var e=this.td,g=0,h=Array(d),k=0;k<e.length-1;){for(var m=
|
||||
e[k++],r=e[k++];m--;)h[g]=r,g+=2;g==d&&(g=1)}this.td=h}(d=b[15])&&(d&lp?d&=~lp:d=qp[d&65280]|qp[d&255]);this.Yf(d);this.eh=b[16];this.Ya=b[17];this.Ac=b[18];this.ub=b[19];this.We=b[20];this.ld=b[21];this.zd=b[22];this.qg=b[23];this.rg=b[24];this.Ad=b[25];this.fh=this.Xe=0;this.Oa==Qn&&(this.jh=b[26],this.Uf=b[27],this.bd=b[28],this.wc=b[29],this.Vf=b[30],this.xe=b[31])}f=rp[f]||rp[ck];this.tg=a.R.V.yd/f.Mf|0;this.Ll=this.tg*f.Rf/100|0;this.ug=this.tg*f.Lf|0;this.Nl=this.ug*f.Sf/100|0;this.vg=c[7]||
|
||||
e[k++],r=e[k++];m--;)h[g]=r,g+=2;g==d&&(g=1)}this.td=h}(d=b[15])&&(d&lp?d&=~lp:d=qp[d&65280]|qp[d&255]);this.Yf(d);this.eh=b[16];this.Ya=b[17];this.Ac=b[18];this.ub=b[19];this.We=b[20];this.ld=b[21];this.zd=b[22];this.qg=b[23];this.rg=b[24];this.Ad=b[25];this.fh=this.Xe=0;this.Oa==Qn&&(this.jh=b[26],this.Uf=b[27],this.bd=b[28],this.wc=b[29],this.Vf=b[30],this.xe=b[31])}f=rp[f]||rp[ck];this.tg=a.R.V.yd/f.Mf|0;this.Pl=this.tg*f.Rf/100|0;this.ug=this.tg*f.Lf|0;this.Rl=this.ug*f.Sf/100|0;this.vg=c[7]||
|
||||
0}}
|
||||
function sp(a){var b=[];if(void 0!==a.Oa){b[0]=a.Wb;b[1]=a.Ec;b[2]=a.bf;b[3]=a.Z;b[4]=a.hc|a.Tf<<8;b[5]=a.Ua;if(a.Oa>=On){var c=[];c[0]=a.Ie;c[1]=a.Sd;c[2]=a.vc;c[3]=a.ih;c[4]=a.cf;c[5]=a.Wf;c[6]=a.Vd;c[7]=a.Ud;c[8]=a.Kj;c[9]=a.Lj;c[10]=a.Td;c[11]=a.nd;c[12]=a.pb;c[13]=[a.ab,a.Hb,a.Xc];var d;if(d=a.td){var e=0,f=[];if(void 0!==d[0])for(var g=0;2>g;g++)for(var h=g;h<d.length;){for(var k=d[h],m=h+2;m<d.length&&d[m]===k;)m+=2;f[e++]=m-h>>1;f[e++]=k;h=m}f.length<d.length&&(d=f)}c[14]=d;c[15]=a.og|lp;
|
||||
c[16]=a.eh;c[17]=a.Ya;c[18]=a.Ac;c[19]=a.ub;c[20]=a.We;c[21]=a.ld;c[22]=a.zd;c[23]=a.qg;c[24]=a.rg;c[25]=a.Ad;a.Oa==Qn&&(c[26]=a.jh,c[27]=a.Uf,c[28]=a.bd,c[29]=a.wc,c[30]=a.Vf,c[31]=a.xe);b[6]=c}b[7]=a.vg}return b}Yo.prototype.mi=function(a){return[this.td,a-this.ab]};Yo.prototype.lg=function(){return this.A};Yo.prototype.Yf=function(a){if(null!=a&&a!=this.og){var b=a&tp,c=up[b];c||b&ip&&(c=up[ip]);var b=a&vp,d=up[b];d||b&kp&&(d=up[kp]);this.A||(this.A=Array(6));this.A[0]=c;this.A[1]=d;this.og=a}};
|
||||
|
|
@ -516,17 +516,17 @@ up[jp|kp]=function(a,b){a+=this.G;var c=a&-2;b=(b|b<<8|b<<16|b<<24)&this.control
|
|||
up[1|kp]=function(a){a+=this.G;var b=a&-2;a=this.controller.Ya&(b==a?16711935:-16711936);a=this.S[b]&~a|this.controller.pb&a;this.S[b]!=a&&(this.S[b]=a,this.Fa=!0)};up[2]=function(a,b){a+=this.G;b=Sp[b&15];b=b&this.controller.ub|this.controller.pb&~this.controller.ub;b=b&this.controller.Ya|this.S[a]&~this.controller.Ya;this.S[a]!=b&&(this.S[a]=b,this.Fa=!0)};
|
||||
up[98]=function(a,b){a+=this.G;b=Sp[b&15];b&=this.controller.pb;b=b&this.controller.ub|this.controller.pb&~this.controller.ub;b=b&this.controller.Ya|this.S[a]&~this.controller.Ya;this.S[a]!=b&&(this.S[a]=b,this.Fa=!0)};up[162]=function(a,b){a+=this.G;b=Sp[b&15];b|=this.controller.pb;b=b&this.controller.ub|this.controller.pb&~this.controller.ub;b=b&this.controller.Ya|this.S[a]&~this.controller.Ya;this.S[a]!=b&&(this.S[a]=b,this.Fa=!0)};
|
||||
up[226]=function(a,b){a+=this.G;b=Sp[b&15];b^=this.controller.pb;b=b&this.controller.ub|this.controller.pb&~this.controller.ub;b=b&this.controller.Ya|this.S[a]&~this.controller.Ya;this.S[a]!=b&&(this.S[a]=b,this.Fa=!0)};up[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.ub;b=this.controller.We&b|this.controller.pb&~b;b=b&this.controller.Ya|this.S[a]&~this.controller.Ya;this.S[a]!=b&&(this.S[a]=b,this.Fa=!0)};
|
||||
function Y(a,b,c,d,e){u.call(this,"Video",a);var f=this,g;this.Oc=Ea("Gecko/");this.ca=a.model;var h=Tp[this.ca]||Tp.mda;this.Oa=h[0];this.Xc=a.memory||0;this.Uc=a.switches;this.Lb=a.randomize;null==this.Lb&&(this.Lb=1);this.ba=a.mode;if(null==this.ba||null==Up[this.ba])this.ba=h[1];this.Jb=a.charCols;this.sc=a.charRows;if(void 0===this.Jb||void 0===this.sc)this.Jb=Up[this.ba][0],this.sc=Up[this.ba][1];this.Y=a.screenWidth;this.ja=a.screenHeight;this.Qc=a.scale;this.qd=12<=Math.round(this.Y/this.Jb);
|
||||
function Y(a,b,c,d,e){u.call(this,"Video",a);var f=this,g;this.Oc=Ea("Gecko/");this.ca=a.model;var h=Tp[this.ca]||Tp.mda;this.Oa=h[0];this.Xc=a.memory||0;this.Uc=a.switches;this.Lb=a.randomize;null==this.Lb&&(this.Lb=1);this.ba=a.mode;if(null==this.ba||null==Up[this.ba])this.ba=h[1];this.Jb=a.charCols;this.sc=a.charRows;if(void 0===this.Jb||void 0===this.sc)this.Jb=Up[this.ba][0],this.sc=Up[this.ba][1];this.X=a.screenWidth;this.ja=a.screenHeight;this.Qc=a.scale;this.qd=12<=Math.round(this.X/this.Jb);
|
||||
this.M=b;this.J=c;this.F=(this.Ef=d)||b||null;this.Zb=a.screenColor||"black";this.Tc=(1-(Ia("flicker")||a.flicker||0)).toString();this.Eb=!1;b&&(b.style.backgroundColor=this.Zb);e&&(e.style.backgroundColor=this.Zb);b=a.smoothing;(c=Ia("smoothing"))&&(b="true"==c);null!=b&&(g=Fa(this.J,"imageSmoothingEnabled"))&&(this.J[g]=b);this.cd=a.touchScreen;this.gb=Vp;this.K=null;this.pd=a.autoLock;this.ab=this.Hb=0;this.pa=[];this.fa=Array(this.Oa==Qn?256:16);this.Ga=!1;if(this.N=e)if(g=Fa(e,"requestFullscreen")||
|
||||
Fa(e,"requestFullScreen")){this.N.A=e[g];if(e=Fa(document,"on","fullscreenchange")){var k=Fa(document,"fullscreenElement")||Fa(document,"fullScreenElement");document.addEventListener(e,function(){Wp(f,!!k)},!1)}(e=Fa(document,"on","fullscreenerror"))&&document.addEventListener(e,function(){Wp(f,null)},!1)}if(this.F&&(this.F.onfocus=function(){return f.Qf(!0)},this.F.onblur=function(){return f.Qf(!1)},this.F.Md=(g=Fa(this.F,"requestPointerLock"))&&this.F[g],this.F.B=(g=Fa(this.F,"exitPointerLock"))&&
|
||||
this.F[g],this.F.Md&&(e=Fa(document,"on","pointerlockchange")))){var m=Fa(document,"pointerLockElement");document.addEventListener(e,function(){f.Ye(!(!m||document[m]!==f.F))},!1)}(this.xa=a.fontROM)&&"json"!=la(this.xa)&&(this.xa=xa()+"/api/v1/dump?file="+this.xa+"&format=bytes")}ca(Y,u);l=Y.prototype;
|
||||
l.kc=function(a,b,c,d){var e=this;this.oa=b;this.R=c;this.Ea=d;c=+Fc(a,"randomize");0<=c&&1>=c&&(this.Lb=c);c=(c=Tp[this.ca])&&c[0];c!==Xp&&(ec(b,this,Yp),gc(b,this,Zp));c!==$p&&(ec(b,this,aq),gc(b,this,bq));this.Oa>=On&&(ec(b,this,cq),gc(b,this,dq));this.Oa==Qn&&(ec(b,this,eq),gc(b,this,fq));if((this.C=tb(a,"Keyboard"))&&this.M){for(var f in this.ia)0<f.indexOf("lock")&&this.C.Ab("led",f,this.ia[f]);this.C.Ab(this.Ef?"textarea":"canvas","screen",this.F)}this.wb=9;(this.U=tb(a,"ChipSet"))&&this.Uc&&
|
||||
this.Oa==On&&(this.wb=qj(this.Uc,this.wb));"mouse"==this.cd?(this.K=tb(a,"Mouse"))&&gq(this,hq):"keygrid"==this.cd&&this.C&&gq(this,iq);this.gb||gq(this,jq);if(this.xa){var g="Loading "+this.xa+"...";wa(this.xa,null,!0,function(a,b,c){kq(e,a,b,c)},function(){e.qb(g,mb.ae)})}Gc(this.R,this.id,function(){lq(e)},1E3/mq)};
|
||||
l.Ab=function(a,b,c){var d=this;if(!this.ia[b])switch(this.ia[b]=c,b){case "fullScreen":return this.N&&this.N.A?c.onclick=function(){if(d.N){if(d.N.A){var a="100%";if(screen&&screen.width&&screen.height){var b=screen.width/screen.height,c=d.Y/d.ja;b>c&&(a=Math.round(c/b*100)+"%")}d.Oc?(d.M.style.width=a,d.M.style.width=a,d.M.style.display="block",d.M.style.margin="auto"):(d.N.style.width=a,d.N.style.height="auto");d.N.style.backgroundColor=d.Zb;d.N.A()}d.F&&d.F.focus()}}:c.parentNode.removeChild(c),
|
||||
l.Ab=function(a,b,c){var d=this;if(!this.ia[b])switch(this.ia[b]=c,b){case "fullScreen":return this.N&&this.N.A?c.onclick=function(){if(d.N){if(d.N.A){var a="100%";if(screen&&screen.width&&screen.height){var b=screen.width/screen.height,c=d.X/d.ja;b>c&&(a=Math.round(c/b*100)+"%")}d.Oc?(d.M.style.width=a,d.M.style.width=a,d.M.style.display="block",d.M.style.margin="auto"):(d.N.style.width=a,d.N.style.height="auto");d.N.style.backgroundColor=d.Zb;d.N.A()}d.F&&d.F.focus()}}:c.parentNode.removeChild(c),
|
||||
!0;case "lockPointer":return this.sd=c.textContent,this.F&&this.F.Md?c.onclick=function(){d.Md(!0)}:c.parentNode.removeChild(c),!0;case "refresh":return c.onclick=function(){lq(d,!0)},!0}return!1};function Wp(a,b){!b&&a.N&&(a.Oc?a.M.style.width=a.M.style.height="":a.N.style.width=a.N.style.height="");a.C&&(a.C.jg=b)}l.Md=function(a){var b=!1;this.F&&(a?this.F.Md&&(this.F.Md(),this.K&&this.K.Ye(!0),b=!0):this.F.B&&(this.F.B(),this.K&&this.K.Ye(!1),b=!0),this.F&&this.F.focus());return b};
|
||||
l.Ye=function(a){this.K&&(this.K.Ye(a),this.C&&(this.C.jg=a));var b=this.ia.lockPointer;b&&(b.textContent=a?"Press Esc to Unlock Pointer":this.sd)};function gq(a,b){var c=a.F;c&&!a.gb&&(a.gb=b,c.addEventListener("touchstart",function(b){Kn(a.U,b);a.gb!=jq&&nq(a,b,!0)},!1),b!=jq&&(c.addEventListener("touchmove",function(b){nq(a,b)},!0),c.addEventListener("touchend",function(b){nq(a,b,!1)},!1),a.mb=a.rb=a.dd=-1,a.mc=!1,a.Cb=null,a.lc=!1,a.rd=function(){a.lc=!0;a.K.ie(oq,!0)}))}
|
||||
l.Qf=function(a){this.C&&this.C.Qf(a)};
|
||||
function nq(a,b,c){var d,e,f=0,g=0;d=a.M;do isNaN(d.offsetLeft)||(f+=d.offsetLeft,g+=d.offsetTop);while(d=d.offsetParent);var h=a.Y/a.M.offsetWidth,k=a.ja/a.M.offsetHeight;b.targetTouches&&b.targetTouches.length?(d=b.targetTouches[0].pageX,e=b.targetTouches[0].pageY):(d=b.pageX,e=b.pageY);d=(d-f)*h;e=(e-g)*k;if(a.gb==iq)c&&jo(a.C,pq[e/(a.ja/3)|0][d/(a.Y/3)|0],!0);else if(a.K){g=a.mc;f=b.timeStamp-a.dd;!0===c?(a.mc=500<f,a.dd=b.timeStamp,a.Cb=setTimeout(a.rd,500)):null!=a.Cb&&(clearTimeout(a.Cb),a.Cb=
|
||||
function nq(a,b,c){var d,e,f=0,g=0;d=a.M;do isNaN(d.offsetLeft)||(f+=d.offsetLeft,g+=d.offsetTop);while(d=d.offsetParent);var h=a.X/a.M.offsetWidth,k=a.ja/a.M.offsetHeight;b.targetTouches&&b.targetTouches.length?(d=b.targetTouches[0].pageX,e=b.targetTouches[0].pageY):(d=b.pageX,e=b.pageY);d=(d-f)*h;e=(e-g)*k;if(a.gb==iq)c&&jo(a.C,pq[e/(a.ja/3)|0][d/(a.X/3)|0],!0);else if(a.K){g=a.mc;f=b.timeStamp-a.dd;!0===c?(a.mc=500<f,a.dd=b.timeStamp,a.Cb=setTimeout(a.rd,500)):null!=a.Cb&&(clearTimeout(a.Cb),a.Cb=
|
||||
null);void 0===c&&(a.mc=!1);g||b.preventDefault();if(!1===c){a.lc?(a.K.ie(oq,!1),a.lc=!1,b=!0):b=!1;if(b)return;if(200>f){a.K.ie(oq,!0);a.K.ie(oq,!1);return}}if(c||0>a.mb||0>a.rb)a.mb=d,a.rb=e;c=Math.round(d-a.mb);b=Math.round(e-a.rb);a.mb=d;a.rb=e;a.K.ng(c,b,a.mb,a.rb)}}l.Rb=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.Qb=function(a){return a?this.save():!0};
|
||||
l.reset=function(){var a=0;this.U&&(a=+bk(this.U,uj,void 0));this.ca||(this.Oa=a==ck?$p:Xp);this.ba=qq;switch(this.Oa){case Qn:a=7;break;case On:var b=rq[this.wb];b&&(a=b[0]);a||(a=4);break;case $p:a=ck;this.ba=sq;break;default:a=2}this.da!==a&&(this.da=a);this.B=null;this.W=this.Xb=new Yo(this,$p);this.I=this.Db=new Yo(this,Xp);this.Oa<On?this.A=new Yo:(this.A=new Yo(this,this.Oa,null,this.Xc),tq(this));uq(this);this.ma=null;vq(this,this.ba);if(this.B.ab&&this.Lb){a=this.B.ab+this.Sa;for(b=this.B.ab;b<
|
||||
a;b+=2){var c=65536*Math.random()|0,d;4==this.da||7==this.da?(d=b>>1&255,c=c>>8&~wq,c>>4==(c&15)&&(c^=15)):(d=c&255,c=(c&256?xq|yq:zq|Aq)|Bq&c>>8);cc(this.oa,b,d|c<<8)}lq(this,!0)}};function tq(a){a.A.cf&ep?(a.W=a.Xb,a.I=a.A):(a.W=a.A,a.I=a.Db)}l.save=function(){var a=new Me(this);a.set(0,sp(this.Xb));a.set(1,sp(this.Db));a.set(2,[this.da,this.ba,this.ma]);a.set(3,sp(this.A));return a.data()};
|
||||
|
|
@ -535,180 +535,181 @@ function kq(a,b,c,d){if(d)a.wa("Unable to load font ROM (error "+d+": "+b+")",0>
|
|||
function Eq(a,b){if(1==b)return a.fa[0]=Fq[zq],a.fa[1]=Fq[xq],a.fa;if(2==b){var c=a.B.bf;if(a.B===a.A){var d=a.A.vc[0],c=d&7;d&16&&(c|=8);18!=a.A.vc[1]&&(c|=32)}a.fa[0]=Fq[c&15];c=c&32?Gq:Hq;for(d=0;d<c.length;d++)a.fa[d+1]=Fq[c[d]];return a.fa}if(a.I===a.Db)return Fq;a.Ga&&b&&!a.fa[16]&&(a.Ga=!1);if(!a.Ga){var c=a.A,d=c.xe,e,f,g,h;if(8==b)for(e=0;256>e;e++)f=d[e]||0,g=f<<2&252,h=f>>4&252,f=f>>10&252,a.fa[e]=[g,h,f,255];else{var k=d&&d[255];b=null!=c.vc[15]?c.vc:Iq;for(e=0;16>e;e++)f=b[e]&63,k?(f|=
|
||||
(c.vc[20]&12)<<4,c.vc[16]&128&&(f&=-49,f|=(c.vc[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.fa[e]=[g,h,f,255]}a.Ga=!0}return a.fa}function Pn(a,b,c,d){a.vb=b;a.Qa=c;a.Ca=d}
|
||||
function uq(a,b){var c=!1;if(window&&a.vb&&(!b||a.G)){var d=0,e=a.Ca?a.Ca:8,f=Eq(a);null!=a.Qa[0]&&Jq(a,Kq,a.Qa[0],d,e,8,a.vb,f)&&(c=!0);d=a.Ca?0:2048;e=a.Ca?a.Ca:9;null!=a.Qa[1]&&(Jq(a,Lq,a.Qa[1],d,e,14,a.vb,Mq,Nq)&&(c=!0),a.Ca&&Jq(a,a.Oa,a.Qa[1],0,a.Ca,14,a.vb,f)&&(c=!0))}b||(a.aa=-1,a.za=-1,a.ra=0);return c}function Jq(a,b,c,d,e,f,g,h,k){var m=!1;null!=c&&(Oq(a,b,c,d,e,f,g,h,k)&&(m=!0),a.qd&&Oq(a,b<<1,c,d,e,f,g,h,k)&&(m=!0));return m}
|
||||
function Oq(a,b,c,d,e,f,g,h,k){var m=!1,r=b&1?0:1,y=a.pa[b],t=16>h.length?h.length:16;y||(y={qc:e<<r,rc:f<<r,be:Array(t),Sh:h.slice(0,t),Fe:k,dg:Array(t)});for(k=0;k<t;k++){var z=h[k],D=y.be[k]?y.Sh[k]:[];if(z[0]!==D[0]||z[1]!==D[1]||z[2]!==D[2]){var m=y,D=k,N=r,P=c,aa=d,ya=e,Ha=f,Kc=g,Yh=[0,0,0,0],Vf=document.createElement("canvas");Vf.width=m.qc<<4;Vf.height=m.rc<<4;var Km=Vf.getContext("2d"),Ob,od,rc,Wf=8>Ha||!aa?Ha:8,Zh=Km.createImageData(m.qc,m.rc);for(Ob=0;256>Ob;Ob++){for(rc=0;rc<Ha;rc++)for(var Rt=
|
||||
m.Fe&&D&1&&rc>=Ha-2,St=Kc[rc<Wf?P+Ob*Wf+rc:aa+Ob*Wf+rc-Wf],$h=0;$h<=N;$h++)for(od=0;od<ya;od++){var Lm=od<<N,Mm=(rc<<N)+$h,Nm=Rt||St&128>>(8<=od&&192<=Ob&&223>=Ob?7:od)?z:Yh;Pq(Zh,Lm,Mm,Nm);N&&Pq(Zh,Lm+1,Mm,Nm)}Km.putImageData(Zh,(Ob&15)*m.qc,(Ob>>4)*m.rc)}m.be[D]="#"+ja(z[0],2)+ja(z[1],2)+ja(z[2],2);m.Sh[D]=z;m.dg[D]=Vf;m=!0}}a.pa[b]=y;return m}function Qq(a){0<a.ra||0<=a.aa?0>a.za&&(a.za=0):a.za=-1}
|
||||
function Oq(a,b,c,d,e,f,g,h,k){var m=!1,r=b&1?0:1,y=a.pa[b],t=16>h.length?h.length:16;y||(y={qc:e<<r,rc:f<<r,be:Array(t),Sh:h.slice(0,t),Fe:k,dg:Array(t)});for(k=0;k<t;k++){var z=h[k],D=y.be[k]?y.Sh[k]:[];if(z[0]!==D[0]||z[1]!==D[1]||z[2]!==D[2]){var m=y,D=k,N=r,P=c,aa=d,ya=e,Ha=f,Lc=g,Zh=[0,0,0,0],Wf=document.createElement("canvas");Wf.width=m.qc<<4;Wf.height=m.rc<<4;var Km=Wf.getContext("2d"),Pb,pd,sc,Xf=8>Ha||!aa?Ha:8,$h=Km.createImageData(m.qc,m.rc);for(Pb=0;256>Pb;Pb++){for(sc=0;sc<Ha;sc++)for(var Ut=
|
||||
m.Fe&&D&1&&sc>=Ha-2,Vt=Lc[sc<Xf?P+Pb*Xf+sc:aa+Pb*Xf+sc-Xf],ai=0;ai<=N;ai++)for(pd=0;pd<ya;pd++){var Lm=pd<<N,Mm=(sc<<N)+ai,Nm=Ut||Vt&128>>(8<=pd&&192<=Pb&&223>=Pb?7:pd)?z:Zh;Pq($h,Lm,Mm,Nm);N&&Pq($h,Lm+1,Mm,Nm)}Km.putImageData($h,(Pb&15)*m.qc,(Pb>>4)*m.rc)}m.be[D]="#"+ja(z[0],2)+ja(z[1],2)+ja(z[2],2);m.Sh[D]=z;m.dg[D]=Wf;m=!0}}a.pa[b]=y;return m}function Qq(a){0<a.ra||0<=a.aa?0>a.za&&(a.za=0):a.za=-1}
|
||||
function Dq(a){if(a.G){for(var b=10;15>=b;b++)if(null==a.B.Ua[b])return;var c=a.B.Ua[10],b=c&31,d=a.B.Ua[11]&Rp[11],e=a.B.Ua[9]&Rp[9],f=!1;a.B===a.A&&(f=!0,7!=e||4!=b||d||(d=7));if(c&32||b>d&&!f||b>e)Rq(a);else{c=a.B.Ua[15];c|=(a.B.Ua[14]&a.B.sf)<<8;a.aa!=c&&(Rq(a),a.aa=c);d=d-b+1;if(a.Vc!=b||a.Ic!=d)a.Vc=b,a.Ic=d;a.ua=e+1;Qq(a)}}}
|
||||
function Rq(a){if(0<=a.aa){if(void 0!==a.L){var b=Sq<<8,c=a.L[a.aa];if(c&b){var c=c&~b,b=a.aa%a.D,d=a.aa/a.D|0;a.G&&a.pa[a.G]&&(a.Ba&&Tq(a,b,d,c,a.Ba),Tq(a,b,d,c));a.L[a.aa]=c}}a.aa=-1}}
|
||||
function Uq(a){var b,c=a.B;a.Nc=!1;var d=c.nd[5];if(null!=d){b=hp;var e=jp,f=c.nd[3]&31;switch(d&3){case 0:if(f){e=jp|32;switch(f&24){case 8:e=jp|96;break;case 16:e=jp|160;break;case 24:e=jp|224}c.Ac=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.Oa==Qn&&(e=3,c.Ac=f&7)}d&8&&(b=1280);c=c.Ud[4];null!=c&&(c&4||(b|=ip,e|=kp),d&64&&(c&8&&(b|=16384,e|=4),a.Nc=!0));b|=e}return b}
|
||||
function Vq(a,b){var c=a.B;return c&&null!=b&&b!=c.og?(c.Yf(b),a.oa.Yf(c.ab,c.Hb,c.lg(),!0),!0):!1}
|
||||
function Cq(a,b){var c,d=a.ma,e=a.B;if(e)if(e.Oa==$p)d=sq;else if(e.Oa>=On){var d=null,f=e.Xc>>2,g=32768<f?32768:f,h=e.nd[6];if(null!=h){switch(h&12){case 0:e.ab=655360;e.Hb=f;d=Wq;break;case 4:e.ab=655360;e.Hb=f;d=a.da==ck?Xq:Yq;break;case 8:e.ab=720896;e.Hb=g;d=sq;break;case 12:e.ab=753664,e.Hb=g,d=a.da==ck?Zq:qq}c=80==(e.nd[5]&80);!c||e.ab==a.ab&&e.Hb==a.Hb||(b=!0);var f=wp(e,xp),g=e.Ua[Pp],k=e.Ua[23],m=e.Ud[1]&8;d!=Wq&&(h&1?655360==e.ab||c||k&1?e.nd[5]&64?d=g&31?143>=e.Ua[Fp]?$q:ar:br:g&128||
|
||||
350>f?d=m?cr:dr:480<=f&&(d=a.da==ck?er:fr):d=m?7-d:gr:d-=m?2:0);c=Uq(a)}}else e.Ec&8?(e.Ec&2?(d=e.Ec&16?gr:hr,e.Ec&4||--d):(d=e.Ec&1?qq:ir,e.Ec&4&&--d),a.Eb&&(a.M.style.opacity="1",a.Eb=!1)):!a.Eb&&1>+a.Tc&&(a.Eb=!0,a.M.style.opacity=a.Tc,e=a.R,e.X.Zf=!0,Lc(e));else a.ma=null,null==d&&(d=a.ba);if(!vq(a,d,b))return!1;Vq(a,c);return!0}
|
||||
350>f?d=m?cr:dr:480<=f&&(d=a.da==ck?er:fr):d=m?7-d:gr:d-=m?2:0);c=Uq(a)}}else e.Ec&8?(e.Ec&2?(d=e.Ec&16?gr:hr,e.Ec&4||--d):(d=e.Ec&1?qq:ir,e.Ec&4&&--d),a.Eb&&(a.M.style.opacity="1",a.Eb=!1)):!a.Eb&&1>+a.Tc&&(a.Eb=!0,a.M.style.opacity=a.Tc,e=a.R,e.Y.Zf=!0,Kc(e));else a.ma=null,null==d&&(d=a.ba);if(!vq(a,d,b))return!1;Vq(a,c);return!0}
|
||||
function vq(a,b,c){if(null!=b&&(b!=a.ma||c)){a.od=0;a.ma=b;a.Ga=!1;b=a.B||(b==sq?a.W:a.I);if(b!=a.B||b.ab!=a.ab||b.Hb!=a.Hb){Rq(a);if(a.ab){if(!Vb(a.oa,a.ab,a.Hb))return!1;a.B&&(a.B.Wb=!1)}a.B=b;b.Wb=!0;a.ab=b.ab;a.Hb=b.Hb;if(!Jb(a.oa,b.ab,b.Hb,3,b===a.A?b:null))return!1}a:{a.G=0;a.D=a.Jb;a.H=a.sc;a.Ma=a.D;a.Gb=Up[sq][2];b=0;if(c=Up[a.ma])a.D=c[0],a.H=c[1],a.Gb=c[2],b=c[3],a.G=c[4],4!=a.da&&7!=a.da||a.B!==a.A||a.G!=Kq||(7==(a.A.Ua[Pp]&31)?a.H=350>wp(a.A,Fp)?43:50:a.G=a.Oa);a.Sc=a.D*a.H|0;a.Rc=a.Sc/
|
||||
a.Gb|0;a.Sa=a.Rc;a.Yb=0;void 0!==b&&(a.Sa=(a.Sa<<1)+b|0,a.Yb=a.Sa+b>>1);if(a.pa.length){a.la=a.Y/a.D|0;a.qa=a.ja/a.H|0;if(a.G){b=a.pa[a.G];if(!b)break a;c=a.pa[a.G<<1];a.Qc&&80==a.D?c&&a.la>=3*c.qc>>2&&(a.G<<=1,b=c):(c&&a.la>=c.qc&&(a.G<<=1,b=c),a.Qc||(a.la=b.qc,a.qa=b.rc));a.eb=a.fb=0;b&&(a.eb=a.D*b.qc,a.fb=a.H*b.rc)}else a.la=a.qa=1,a.eb=a.D,a.fb=a.H;a.La=a.J.createImageData(a.eb,a.fb);a.Aa=document.createElement("canvas");a.Aa.width=a.eb;a.Aa.height=a.fb;a.Ba=a.Aa.getContext("2d");a.uc=a.Dc=0;
|
||||
a.ec=a.Y;a.fc=a.ja;b=a.Y-a.D*a.la;c=a.ja-a.H*a.qa;0<b&&(a.uc=b>>1,a.ec-=b);0<c&&(a.Dc=c>>1,a.fc-=c);if(b||c)a.J.fillStyle=a.M.style.backgroundColor,a.J.fillRect(0,0,a.Y,a.ja)}}jr(a,!0);lq(a)}return!0}function Pq(a,b,c,d){b=(b+c*a.width)*d.length;a.data[b]=d[0];a.data[b+1]=d[1];a.data[b+2]=d[2];a.data[b+3]=d[3]}function kr(a){a.ra=-1;a.Da=!1;var b=a.Rc;if(void 0===a.L||a.L.length!=b)a.L=Array(b)}function jr(a,b){b||(a.Ga=!1);kr(a)}
|
||||
a.Gb|0;a.Sa=a.Rc;a.Yb=0;void 0!==b&&(a.Sa=(a.Sa<<1)+b|0,a.Yb=a.Sa+b>>1);if(a.pa.length){a.la=a.X/a.D|0;a.qa=a.ja/a.H|0;if(a.G){b=a.pa[a.G];if(!b)break a;c=a.pa[a.G<<1];a.Qc&&80==a.D?c&&a.la>=3*c.qc>>2&&(a.G<<=1,b=c):(c&&a.la>=c.qc&&(a.G<<=1,b=c),a.Qc||(a.la=b.qc,a.qa=b.rc));a.eb=a.fb=0;b&&(a.eb=a.D*b.qc,a.fb=a.H*b.rc)}else a.la=a.qa=1,a.eb=a.D,a.fb=a.H;a.La=a.J.createImageData(a.eb,a.fb);a.Aa=document.createElement("canvas");a.Aa.width=a.eb;a.Aa.height=a.fb;a.Ba=a.Aa.getContext("2d");a.uc=a.Dc=0;
|
||||
a.ec=a.X;a.fc=a.ja;b=a.X-a.D*a.la;c=a.ja-a.H*a.qa;0<b&&(a.uc=b>>1,a.ec-=b);0<c&&(a.Dc=c>>1,a.fc-=c);if(b||c)a.J.fillStyle=a.M.style.backgroundColor,a.J.fillRect(0,0,a.X,a.ja)}}jr(a,!0);lq(a)}return!0}function Pq(a,b,c,d){b=(b+c*a.width)*d.length;a.data[b]=d[0];a.data[b+1]=d[1];a.data[b+2]=d[2];a.data[b+3]=d[3]}function kr(a){a.ra=-1;a.Da=!1;var b=a.Rc;if(void 0===a.L||a.L.length!=b)a.L=Array(b)}function jr(a,b){b||(a.Ga=!1);kr(a)}
|
||||
function Tq(a,b,c,d,e){var f=d&255,g=d>>8;d=g&15;var h=a.pa[a.G];h.Fe&&(d=h.Fe[d]);var k=g>>4&15;h.Fe&&(k=h.Fe[k]);e?(b*=h.qc,c*=h.rc,e.fillStyle=h.be[k],e.fillRect(b,c,h.qc,h.rc)):(b=b*a.la+a.uc,c=c*a.qa+a.Dc,a.J.fillStyle=h.be[k],a.J.fillRect(b,c,a.la,a.qa));g&lr&&(k=(f&15)*h.qc,f=(f>>4)*h.rc,e?e.drawImage(h.dg[d],k,f,h.qc,h.rc,b,c,h.qc,h.rc):a.J.drawImage(h.dg[d],k,f,h.qc,h.rc,b,c,a.la,a.qa));g&Sq&&(f=a.Vc,g=a.Ic,e?(a.ua&&a.ua!==h.rc&&(f=f*h.rc/a.ua|0,g=g*h.rc/a.ua|0),e.fillStyle=h.be[d],e.fillRect(b,
|
||||
c+f,h.qc,g)):(a.ua&&a.ua!==a.qa&&(f=f*a.qa/a.ua|0,g=g*a.qa/a.ua|0),a.J.fillStyle=h.be[d],a.J.fillRect(b,c+f,a.la,g)))}
|
||||
function lq(a,b){b=void 0===b?!1:b;if(a.X.Sb){var c=!1,d=a.B;d&&(d!==a.A?d.Ec&8&&(c=!0):d.Sd&32&&(c=!0));if(c||b){if(b)kr(a);else if(void 0===a.L)return;c=!1;!(b||++a.od&15)&&0<=a.za&&(a.za++,c=!0);var e=a.Sc,f=a.ab,g=f,h=g+a.Hb;a.ma>=$q&&(f=g=655360,h=g+65536);if(mr(a,d)&8||d.Xe&&d.Xe<d.fh){var k=d.Ua[bp],k=k|(d.Ua[cp]&d.sf)<<8;d.Ad!==k&&(d.Ad=k,jr(a));d.Xe=0}var m=d.Ad<<(a.G?1:0),g=g+m,k=a.Sa;a.Oa>=On&&d.Ua[19]&&d.Ua[19]<<1!=d.Ua[1]+1&&(a.Ma=d.Ua[19]<<(a.G?1:d.Ua[20]&64?3:4),k=(a.Ma*(a.H-1)+a.D)/
|
||||
function lq(a,b){b=void 0===b?!1:b;if(a.Y.Sb){var c=!1,d=a.B;d&&(d!==a.A?d.Ec&8&&(c=!0):d.Sd&32&&(c=!0));if(c||b){if(b)kr(a);else if(void 0===a.L)return;c=!1;!(b||++a.od&15)&&0<=a.za&&(a.za++,c=!0);var e=a.Sc,f=a.ab,g=f,h=g+a.Hb;a.ma>=$q&&(f=g=655360,h=g+65536);if(mr(a,d)&8||d.Xe&&d.Xe<d.fh){var k=d.Ua[bp],k=k|(d.Ua[cp]&d.sf)<<8;d.Ad!==k&&(d.Ad=k,jr(a));d.Xe=0}var m=d.Ad<<(a.G?1:0),g=g+m,k=a.Sa;a.Oa>=On&&d.Ua[19]&&d.Ua[19]<<1!=d.Ua[1]+1&&(a.Ma=d.Ua[19]<<(a.G?1:d.Ua[20]&64?3:4),k=(a.Ma*(a.H-1)+a.D)/
|
||||
a.Gb|0,a.ma<=sq&&(k<<=1));var r=d=0;g+k>h&&(r=k,g>=h?(d=f+(g-h),k=0):(d=f,k=h-g,r-=k));h=a.aa-(m>>1);g=nr(a,f,g,k,0,h,e,b,c);r&&(g+=nr(a,f,d,r,0+g,h,e,b,c));g&&(a.Da=!0)}}}
|
||||
function nr(a,b,c,d,e,f,g,h,k){var m=d>>1;m>g&&(m=g);var r=c+d;if(h=!h&&a.Da){h=a.oa;for(var y=!0,t=c>>>h.B,z=h.A-(c&h.C);0<d&&t<h.Y.length;)h.Y[t].Fa&&(h.Y[t].Fa=y=!1,h.Y[t].hi=!0),d-=z,z=h.A,t++;h=y}if(h){if(!k)return m;if(!a.ra){f-=e;if(0>f)return m;c+=f<<1;e+=f;g=e+1}}if(a.G){if(a.pa[a.G]){b=c;c=e;k=f=e=0;h=lr<<8;d=1048575;t=a.B.Ec&32;a.Oa>=On&&(t=a.B.vc[16]&8);y=a.aa-a.B.Ad;t&&(k=wq<<8,d&=~k,a.za&2||(d&=~h));for(a.ra=0;b<r&&c<g;)t=bc(a.oa,b),t|=h,t&k&&(a.ra++,t&=d),c==y&&(t|=a.za&1?Sq<<8:0),
|
||||
a.Da&&t===a.L[c]||(Tq(a,c%a.D,c/a.D|0,t,a.Ba),a.L[c]=t,f++),b+=2,e++,c++;f&&a.Ba&&a.J.drawImage(a.Aa,0,0,a.eb,a.fb,a.uc,a.Dc,a.ec,a.fc);Qq(a)}}else{if(a.Yb){b=c;m=r-b>>1;g=0;c=a.Gb;e=b;f=16==c?65536:196608;k=16==c?1:2;h=Eq(a,k);var y=d=0,t=a.D,z=0,D=a.H,N=0;for(a.ra=0;e<r;){var P=bc(a.oa,e);if(a.Da&&P===a.L[g])d+=c;else{a.L[g]=P;var P=P>>8|(P&255)<<8,aa=f,ya=16;d<t&&(t=d);for(var Ha=0;Ha<c;Ha++){var Kc=(P&(aa>>=k))>>(ya-=k);Pq(a.La,d++,y,h[Kc])}d>z&&(z=d);y<D&&(D=y);y>=N&&(N=y+1)}e+=2;g++;if(d>=a.D){d=
|
||||
0;y+=2;if(y>a.H)break;y==a.H&&(y=1,e=b+a.Yb)}}t<a.D&&(a.Ba.putImageData(a.La,0,0,t,D,z-t,N-D),a.J.drawImage(a.Aa,0,0,a.D,a.H,0,0,a.Y,a.ja));a=m}else{if(a.Nc){m=0;g=r-c;e=Eq(a,8);f=a.B.td;h=k=0;d=a.D;y=0;t=a.H;z=0;D=a.B.Ud[4]&8?4:1;N=a.B.vc[19]&15;P=a.Ma>a.D?a.Ma-a.D-N>>3:0;for(a.ra=0;c<r;){aa=f[c-b];Ha=4;N||(a.Da&&aa===a.L[m]?(k+=Ha,Ha=0):a.L[m]=aa,m++);if(Ha){k<d&&(d=k);for(ya=0;ya<Ha;ya++)Pq(a.La,k++,h,e[aa&255]),aa>>=8;k>y&&(y=k);h<t&&(t=h);h>=z&&(z=h+1)}c+=D;if(k>=a.D){k=0;if(++h>a.H)break;c+=
|
||||
function nr(a,b,c,d,e,f,g,h,k){var m=d>>1;m>g&&(m=g);var r=c+d;if(h=!h&&a.Da){h=a.oa;for(var y=!0,t=c>>>h.B,z=h.A-(c&h.C);0<d&&t<h.X.length;)h.X[t].Fa&&(h.X[t].Fa=y=!1,h.X[t].hi=!0),d-=z,z=h.A,t++;h=y}if(h){if(!k)return m;if(!a.ra){f-=e;if(0>f)return m;c+=f<<1;e+=f;g=e+1}}if(a.G){if(a.pa[a.G]){b=c;c=e;k=f=e=0;h=lr<<8;d=1048575;t=a.B.Ec&32;a.Oa>=On&&(t=a.B.vc[16]&8);y=a.aa-a.B.Ad;t&&(k=wq<<8,d&=~k,a.za&2||(d&=~h));for(a.ra=0;b<r&&c<g;)t=bc(a.oa,b),t|=h,t&k&&(a.ra++,t&=d),c==y&&(t|=a.za&1?Sq<<8:0),
|
||||
a.Da&&t===a.L[c]||(Tq(a,c%a.D,c/a.D|0,t,a.Ba),a.L[c]=t,f++),b+=2,e++,c++;f&&a.Ba&&a.J.drawImage(a.Aa,0,0,a.eb,a.fb,a.uc,a.Dc,a.ec,a.fc);Qq(a)}}else{if(a.Yb){b=c;m=r-b>>1;g=0;c=a.Gb;e=b;f=16==c?65536:196608;k=16==c?1:2;h=Eq(a,k);var y=d=0,t=a.D,z=0,D=a.H,N=0;for(a.ra=0;e<r;){var P=bc(a.oa,e);if(a.Da&&P===a.L[g])d+=c;else{a.L[g]=P;var P=P>>8|(P&255)<<8,aa=f,ya=16;d<t&&(t=d);for(var Ha=0;Ha<c;Ha++){var Lc=(P&(aa>>=k))>>(ya-=k);Pq(a.La,d++,y,h[Lc])}d>z&&(z=d);y<D&&(D=y);y>=N&&(N=y+1)}e+=2;g++;if(d>=a.D){d=
|
||||
0;y+=2;if(y>a.H)break;y==a.H&&(y=1,e=b+a.Yb)}}t<a.D&&(a.Ba.putImageData(a.La,0,0,t,D,z-t,N-D),a.J.drawImage(a.Aa,0,0,a.D,a.H,0,0,a.X,a.ja));a=m}else{if(a.Nc){m=0;g=r-c;e=Eq(a,8);f=a.B.td;h=k=0;d=a.D;y=0;t=a.H;z=0;D=a.B.Ud[4]&8?4:1;N=a.B.vc[19]&15;P=a.Ma>a.D?a.Ma-a.D-N>>3:0;for(a.ra=0;c<r;){aa=f[c-b];Ha=4;N||(a.Da&&aa===a.L[m]?(k+=Ha,Ha=0):a.L[m]=aa,m++);if(Ha){k<d&&(d=k);for(ya=0;ya<Ha;ya++)Pq(a.La,k++,h,e[aa&255]),aa>>=8;k>y&&(y=k);h<t&&(t=h);h>=z&&(z=h+1)}c+=D;if(k>=a.D){k=0;if(++h>a.H)break;c+=
|
||||
P}}N&&(g=0)}else{m=0;g=r-c;e=Eq(a);f=a.B.td;h=k=0;d=a.D;y=0;t=a.H;z=0;D=a.B.vc[19]&15;N=a.Ma>a.D?a.Ma-a.D-D>>3:0;for(a.ra=0;c<r;){P=c++-b;P=f[P];ya=8;D?k?(aa=a.D-k,ya>aa&&(ya=aa)):(P<<=D,ya-=D,a.Da=!1):(a.Da&&P===a.L[m]?(k+=ya,ya=0):a.L[m]=P,m++);if(ya){k<d&&(d=k);for(aa=0;aa<ya;aa++)Ha=or[P&2155905152]||0,Pq(a.La,k++,h,e[Ha]),P<<=1;k>y&&(y=k);h<t&&(t=h);h>=z&&(z=h+1)}if(k>=a.D){k=0;if(++h>a.H)break;c+=N}}D&&(g=0)}d<a.D&&(a.Ba.putImageData(a.La,0,0,d,t,y-d,z-t),a.J.drawImage(a.Aa,0,0,a.D,a.H,0,0,
|
||||
a.Y,a.ja));a=g}m=a}return m}function mr(a,b){var c=0;a=Sc(a.R)-b.vg;0>a&&(b.vg=a,a=-a|0);a%b.tg>b.Ll&&(c|=1);a%b.ug>b.Nl&&(c|=9);b.fh=a/b.ug|0;return c}l.fl=function(){var a=this.W,b;a.Wb&&(b=a.hc);return b};l.Dm=function(a,b){a=this.W;a.Tf=a.hc;a.hc=b&31};l.el=function(){return pr(this.W)};l.Cm=function(a,b){qr(this,this.W,b)};l.gl=function(){return this.W.Ec};l.Em=function(a,b){this.W.Ec=b;Cq(this,!1)};l.hl=function(){return rr(this,this.W)};l.Bj=function(a,b){this.A.Wf=this.A.Wf&-4|b&3};l.Ek=function(){return this.A.Sd};
|
||||
l.bk=function(){return this.A.vc[this.A.Sd&31]};l.Aj=function(a,b){a=this.A;var c=a.Sd&32;if(a.Ie){a.Ie=!1;var d=a.Sd&31;if(16<=d||!c)if(sr||a.vc[d]!==b)a.vc[d]=b,jr(this,!1)}else a.Sd=b,a.Ie=!0,b&32&&!c&&uq(this,!0)&&lq(this,!0),b=a.Ua[bp],b|=(a.Ua[cp]&a.sf)<<8,a.Ad!=b&&(a.Ad=b,jr(this)),a.Xe=0};l.rl=function(){var a=0;if(this.Oa==On)a=3-((this.A.cf&12)>>2),a=(this.wb&1<<a)<<4-a;else{var b=this.A.xe[0];45!=(b&63)&&2880!=(b&4032)&&184320!=(b&258048)&&(a|=16)}a|=this.A.ih&-17;return this.A.ih=a};
|
||||
l.Fm=function(a,b){this.A.cf=b;tq(this)};l.sl=function(){return this.A.jh};l.Nm=function(a,b){this.A.jh=b};l.pl=function(){return this.A.Vd};l.Lm=function(a,b){this.A.Vd=b};l.ol=function(){return this.A.Ud[this.A.Vd]};l.Km=function(a,b){if(sr||this.A.Ud[this.A.Vd]!==b)this.A.Ud[this.A.Vd]=b;switch(this.A.Vd){case 2:this.A.Ya=Sp[b&15];break;case 4:Vq(this,Uq(this))&&lq(this,!0)}};l.Rk=function(){return this.A.Uf};l.mm=function(a,b){if(sr||this.A.Uf!==b)this.A.Uf=b};l.Sk=function(){return this.A.Vf};
|
||||
l.nm=function(a,b){this.A.bd=b;this.A.Vf=3;this.A.wc=0};l.om=function(a,b){this.A.bd=b;this.A.Vf=op;this.A.wc=0};l.Qk=function(){var a=this.A.xe[this.A.bd]>>this.A.wc&63;this.A.wc+=6;12<this.A.wc&&(this.A.wc=0,this.A.bd=this.A.bd+1&pp-1);return a};l.lm=function(a,b){a=this.A.xe[this.A.bd];b=a&~(63<<this.A.wc)|(b&63)<<this.A.wc;a!==b&&(this.A.xe[this.A.bd]=b,jr(this,!1));this.A.wc+=6;12<this.A.wc&&(this.A.wc=0,this.A.bd=this.A.bd+1&pp-1)};l.tl=function(){return this.A.Wf};
|
||||
l.ym=function(a,b){this.A.Lj=b};l.ul=function(){return this.A.cf};l.xm=function(a,b){this.A.Kj=b};l.Zk=function(){return this.A.Td};l.wm=function(a,b){this.A.Td=b};l.Yk=function(){return this.A.nd[this.A.Td]};
|
||||
l.vm=function(a,b){if(sr||this.A.nd[this.A.Td]!==b)this.A.nd[this.A.Td]=b;switch(this.A.Td){case 0:this.A.We=Sp[b&15];this.A.zd=this.A.We&~this.A.ld;break;case 1:this.A.ld=~Sp[b&15];this.A.zd=this.A.We&~this.A.ld;break;case 2:this.A.qg=Sp[b&15]&-2139062144;break;case 3:case 5:Vq(this,Uq(this));break;case 4:this.A.eh=(b&3)<<3;break;case 6:Cq(this,!1);break;case 7:this.A.rg=Sp[b&15]&-2139062144;break;case 8:this.A.ub=b|b<<8|b<<16|b<<24}};l.Kk=function(){var a=this.I,b;a.Wb&&(b=a.hc);return b};
|
||||
l.gm=function(a,b){a=this.I;a.Tf=a.hc;a.hc=b&31};l.Jk=function(){return pr(this.I)};l.fm=function(a,b){qr(this,this.I,b)};l.Lk=function(){return this.I.Ec};l.hm=function(a,b){this.I.Ec=b;Cq(this,!1)};l.Ik=function(){return this.I.bf};l.em=function(a,b){this.I.bf!==b&&(this.I.bf=b,jr(this,!1))};l.Mk=function(){return rr(this,this.I)};function pr(a){var b;a.Wb&&a.hc<a.pg&&(b=a.Ua[a.hc]);return b}
|
||||
a.X,a.ja));a=g}m=a}return m}function mr(a,b){var c=0;a=Sc(a.R)-b.vg;0>a&&(b.vg=a,a=-a|0);a%b.tg>b.Pl&&(c|=1);a%b.ug>b.Rl&&(c|=9);b.fh=a/b.ug|0;return c}l.jl=function(){var a=this.W,b;a.Wb&&(b=a.hc);return b};l.Lm=function(a,b){a=this.W;a.Tf=a.hc;a.hc=b&31};l.il=function(){return pr(this.W)};l.Km=function(a,b){qr(this,this.W,b)};l.kl=function(){return this.W.Ec};l.Mm=function(a,b){this.W.Ec=b;Cq(this,!1)};l.ll=function(){return rr(this,this.W)};l.Bj=function(a,b){this.A.Wf=this.A.Wf&-4|b&3};l.Ek=function(){return this.A.Sd};
|
||||
l.bk=function(){return this.A.vc[this.A.Sd&31]};l.Aj=function(a,b){a=this.A;var c=a.Sd&32;if(a.Ie){a.Ie=!1;var d=a.Sd&31;if(16<=d||!c)if(sr||a.vc[d]!==b)a.vc[d]=b,jr(this,!1)}else a.Sd=b,a.Ie=!0,b&32&&!c&&uq(this,!0)&&lq(this,!0),b=a.Ua[bp],b|=(a.Ua[cp]&a.sf)<<8,a.Ad!=b&&(a.Ad=b,jr(this)),a.Xe=0};l.vl=function(){var a=0;if(this.Oa==On)a=3-((this.A.cf&12)>>2),a=(this.wb&1<<a)<<4-a;else{var b=this.A.xe[0];45!=(b&63)&&2880!=(b&4032)&&184320!=(b&258048)&&(a|=16)}a|=this.A.ih&-17;return this.A.ih=a};
|
||||
l.Nm=function(a,b){this.A.cf=b;tq(this)};l.wl=function(){return this.A.jh};l.Vm=function(a,b){this.A.jh=b};l.tl=function(){return this.A.Vd};l.Tm=function(a,b){this.A.Vd=b};l.sl=function(){return this.A.Ud[this.A.Vd]};l.Sm=function(a,b){if(sr||this.A.Ud[this.A.Vd]!==b)this.A.Ud[this.A.Vd]=b;switch(this.A.Vd){case 2:this.A.Ya=Sp[b&15];break;case 4:Vq(this,Uq(this))&&lq(this,!0)}};l.Vk=function(){return this.A.Uf};l.um=function(a,b){if(sr||this.A.Uf!==b)this.A.Uf=b};l.Wk=function(){return this.A.Vf};
|
||||
l.vm=function(a,b){this.A.bd=b;this.A.Vf=3;this.A.wc=0};l.wm=function(a,b){this.A.bd=b;this.A.Vf=op;this.A.wc=0};l.Uk=function(){var a=this.A.xe[this.A.bd]>>this.A.wc&63;this.A.wc+=6;12<this.A.wc&&(this.A.wc=0,this.A.bd=this.A.bd+1&pp-1);return a};l.tm=function(a,b){a=this.A.xe[this.A.bd];b=a&~(63<<this.A.wc)|(b&63)<<this.A.wc;a!==b&&(this.A.xe[this.A.bd]=b,jr(this,!1));this.A.wc+=6;12<this.A.wc&&(this.A.wc=0,this.A.bd=this.A.bd+1&pp-1)};l.xl=function(){return this.A.Wf};
|
||||
l.Gm=function(a,b){this.A.Lj=b};l.yl=function(){return this.A.cf};l.Fm=function(a,b){this.A.Kj=b};l.cl=function(){return this.A.Td};l.Em=function(a,b){this.A.Td=b};l.bl=function(){return this.A.nd[this.A.Td]};
|
||||
l.Dm=function(a,b){if(sr||this.A.nd[this.A.Td]!==b)this.A.nd[this.A.Td]=b;switch(this.A.Td){case 0:this.A.We=Sp[b&15];this.A.zd=this.A.We&~this.A.ld;break;case 1:this.A.ld=~Sp[b&15];this.A.zd=this.A.We&~this.A.ld;break;case 2:this.A.qg=Sp[b&15]&-2139062144;break;case 3:case 5:Vq(this,Uq(this));break;case 4:this.A.eh=(b&3)<<3;break;case 6:Cq(this,!1);break;case 7:this.A.rg=Sp[b&15]&-2139062144;break;case 8:this.A.ub=b|b<<8|b<<16|b<<24}};l.Ok=function(){var a=this.I,b;a.Wb&&(b=a.hc);return b};
|
||||
l.om=function(a,b){a=this.I;a.Tf=a.hc;a.hc=b&31};l.Nk=function(){return pr(this.I)};l.nm=function(a,b){qr(this,this.I,b)};l.Pk=function(){return this.I.Ec};l.pm=function(a,b){this.I.Ec=b;Cq(this,!1)};l.Mk=function(){return this.I.bf};l.mm=function(a,b){this.I.bf!==b&&(this.I.bf=b,jr(this,!1))};l.Qk=function(){return rr(this,this.I)};function pr(a){var b;a.Wb&&a.hc<a.pg&&(b=a.Ua[a.hc]);return b}
|
||||
function qr(a,b,c){if(b.hc<b.pg){if(sr||b.Ua[b.hc]!==c)b.Ua[b.hc]=c;if(b.hc==cp||b.hc==bp)mr(a,b),b.Xe=b.fh;(9==b.hc&&8!=b.Tf||b.hc==Fp&&223==c)&&Cq(a,!0);Dq(a)}}function rr(a,b){var c=mr(a,b);b===a.A?(c|=b.Z&48^48,b.Ie=!1):c=(b.Z^=9)|240;return b.Z=c}var sr=!0,ir=1,Zq=2,qq=3,hr=5,gr=6,sq=7,cr=13,dr=14,Xq=15,Yq=16,er=17,fr=18,$q=19,ar=20,br=21,Wq=255,mq=60,Lq=1,Kq=3,$p=Lq,Xp=Kq,On=5,Qn=7,Tp={mda:[$p,sq],cga:[Xp,qq],ega:[On,qq],vga:[Qn,qq]},rp={2:{Mf:15700,Lf:208,Rf:85,Sf:96}};
|
||||
rp[ck]={Mf:18432,Lf:364,Rf:85,Sf:96};rp[4]={Mf:21850,Lf:364,Rf:85,Sf:96};rp[7]={Mf:16700,Lf:480,Rf:85,Sf:83};var rq={6:[1,ck,!0],7:[2,ck,!0],8:[6,ck,!0],9:[4,ck,!0],10:[ck,1,!0],11:[ck,2,!0],0:[1,ck,!1],1:[2,ck,!1],2:[6,ck,!1],3:[4,ck,!1],4:[ck,1,!1],5:[ck,2,!1]},Up=[];Up[ir]=[40,25,1,0,Kq];Up[qq]=[80,25,1,0,Kq];Up[4]=[320,200,8,192];Up[gr]=[640,200,16,192];Up[sq]=[80,25,1,0,Lq];Up[cr]=[320,200,8];Up[dr]=[640,200,8];Up[Xq]=[640,350,8];Up[Yq]=[640,350,8];Up[er]=[640,480,8];Up[fr]=[640,480,8];
|
||||
Up[$q]=[320,200,1];Up[ar]=[320,240,4];Up[br]=[320,400,4];Up[0]=Up[ir];Up[Zq]=Up[qq];Up[hr]=Up[4];
|
||||
var zq=0,xq=7,Bq=8,yq=0,Aq=112,wq=128,lr=256,Sq=512,Mq=[[0,0,0,255],[127,192,127,255],[127,192,127,255],[127,255,127,255],[127,255,127,255]],Nq=[0,1,2,2,2,2,2,2,0,3,4,4,4,4,4,4],Fq=[[0,0,0,255],[0,0,170,255],[0,170,0,255],[0,170,170,255],[170,0,0,255],[170,0,170,255],[170,85,0,255],[170,170,170,255],[85,85,85,255],[85,85,255,255],[85,255,85,255],[85,255,255,255],[255,85,85,255],[255,85,255,255],[255,255,85,255],[255,255,255,255]],Hq=[2,4,6],Gq=[3,5,xq],Iq=[0,1,2,3,4,5,20,7,56,57,58,59,60,61,62,63],
|
||||
Sp=[0,255,65280,65535,16711680,16711935,16776960,16777215,-16777216,-16776961,-16711936,-16711681,-65536,-65281,-256,-1],or=[0];or[128]=1;or[32768]=2;or[32896]=3;or[8388608]=4;or[8388736]=5;or[8421376]=6;or[8421504]=7;or[-2147483648]=8;or[-2147483520]=9;or[-2147450880]=10;or[-2147450752]=11;or[-2139095040]=12;or[-2139094912]=13;or[-2139062272]=14;or[-2139062144]=15;var Zo=[];Zo[$p]=["MDA",948,720896,4096,0,ck];Zo[Xp]=["CGA",980,753664,16384,0,2];Zo[On]=["EGA",980,753664,16384,65536,4];
|
||||
Zo[Qn]=["VGA",980,753664,16384,262144,7];
|
||||
var Vp=0,jq=1,iq=2,hq=3,pq=[[1036,1038,1033],[1037,1032,1039],[1035,1040,1034]],Yp={948:Y.prototype.fl,949:Y.prototype.el,952:Y.prototype.gl,954:Y.prototype.hl},Zp={948:Y.prototype.Dm,949:Y.prototype.Cm,952:Y.prototype.Em},aq={980:Y.prototype.Kk,981:Y.prototype.Jk,984:Y.prototype.Lk,985:Y.prototype.Ik,986:Y.prototype.Mk},bq={980:Y.prototype.gm,981:Y.prototype.fm,984:Y.prototype.hm,985:Y.prototype.em},cq={960:Y.prototype.Ek,961:Y.prototype.bk,962:Y.prototype.rl,964:Y.prototype.pl,965:Y.prototype.ol,
|
||||
974:Y.prototype.Zk,975:Y.prototype.Yk},dq={954:Y.prototype.Bj,960:Y.prototype.Aj,961:Y.prototype.Aj,962:Y.prototype.Fm,964:Y.prototype.Lm,965:Y.prototype.Km,970:Y.prototype.ym,972:Y.prototype.xm,974:Y.prototype.wm,975:Y.prototype.vm,986:Y.prototype.Bj},eq={963:Y.prototype.sl,966:Y.prototype.Rk,967:Y.prototype.Sk,969:Y.prototype.Qk,970:Y.prototype.tl,972:Y.prototype.ul},fq={963:Y.prototype.Nm,966:Y.prototype.mm,967:Y.prototype.nm,968:Y.prototype.om,969:Y.prototype.lm};
|
||||
var Vp=0,jq=1,iq=2,hq=3,pq=[[1036,1038,1033],[1037,1032,1039],[1035,1040,1034]],Yp={948:Y.prototype.jl,949:Y.prototype.il,952:Y.prototype.kl,954:Y.prototype.ll},Zp={948:Y.prototype.Lm,949:Y.prototype.Km,952:Y.prototype.Mm},aq={980:Y.prototype.Ok,981:Y.prototype.Nk,984:Y.prototype.Pk,985:Y.prototype.Mk,986:Y.prototype.Qk},bq={980:Y.prototype.om,981:Y.prototype.nm,984:Y.prototype.pm,985:Y.prototype.mm},cq={960:Y.prototype.Ek,961:Y.prototype.bk,962:Y.prototype.vl,964:Y.prototype.tl,965:Y.prototype.sl,
|
||||
974:Y.prototype.cl,975:Y.prototype.bl},dq={954:Y.prototype.Bj,960:Y.prototype.Aj,961:Y.prototype.Aj,962:Y.prototype.Nm,964:Y.prototype.Tm,965:Y.prototype.Sm,970:Y.prototype.Gm,972:Y.prototype.Fm,974:Y.prototype.Em,975:Y.prototype.Dm,986:Y.prototype.Bj},eq={963:Y.prototype.wl,966:Y.prototype.Vk,967:Y.prototype.Wk,969:Y.prototype.Uk,970:Y.prototype.xl,972:Y.prototype.yl},fq={963:Y.prototype.Vm,966:Y.prototype.um,967:Y.prototype.vm,968:Y.prototype.wm,969:Y.prototype.tm};
|
||||
Ma(function(){for(var a=cb(document,"pcx86","video"),b=0;b<a.length;b++){var c=a[b],d=db(c),e=document.createElement("canvas");if(!e||!e.getContext){c.innerHTML="<br/>Missing <canvas> 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<=za().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=+(Ia("aspect")||d.aspect);f&&.3<=f&&3.33>=f&&(La("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");Ea("iOS")&&(f.setAttribute("autocapitalize","off"),f.setAttribute("autocorrect","off"),f.style.fontSize="16px");c.appendChild(f);var g=e.getContext("2d"),d=new Y(d,e,g,f,c);bb(d,c)}});
|
||||
function tr(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="":$a(this,a,ur)}ca(tr,u);l=tr.prototype;l.Ab=function(a,b,c){switch(b){case ur:return this.ia[b]=this.A=c,!0}return!1};
|
||||
l.kc=function(a,b,c,d){this.oa=b;this.R=c;this.Ea=d;this.U=tb(a,"ChipSet");ec(b,this,vr,this.D);gc(b,this,wr,this.D);v(this)};l.Rb=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.Qb=function(a){return a?this.save():!0};l.reset=function(){xr(this)};l.save=function(){var a=new Me(this),b=0,c=[];c[b++]=this.F;c[b++]=this.Fb;c[b]=this.Ge;a.set(0,c);return a.data()};l.restore=function(a){return xr(this,a[0])};
|
||||
function xr(a,b){var c=0;b||(b=[0,0,0]);a.F=b[c++];a.Fb=b[c++];a.Ge=b[c];return!0}l.Tk=function(){return this.F};l.ql=function(){return this.Fb};l.Pk=function(){return this.Ge};l.pm=function(a,b){this.F=b;this.Fb|=yr;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.qb(this.B),this.B="";10!=b&&(this.B+=String.fromCharCode(b));a=!0}a&&(this.Fb&=~yr);zr(this)};
|
||||
l.km=function(a,b){this.Ge=b;zr(this)};function zr(a){a.U&&a.C&&(a.Ge&Ar&&!(a.Fb&yr)?Ff(a.U,a.C):Df(a.U,a.C))}var ur="buffer",yr=64,Ar=16,vr={0:tr.prototype.Tk,1:tr.prototype.ql,2:tr.prototype.Pk},wr={0:tr.prototype.pm,2:tr.prototype.km};Ma(function(){for(var a=cb(document,"pcx86","parallel"),b=0;b<a.length;b++){var c=a[b],d=db(c),d=new tr(d);bb(d,c)}});
|
||||
function xr(a,b){var c=0;b||(b=[0,0,0]);a.F=b[c++];a.Fb=b[c++];a.Ge=b[c];return!0}l.Xk=function(){return this.F};l.ul=function(){return this.Fb};l.Tk=function(){return this.Ge};l.xm=function(a,b){this.F=b;this.Fb|=yr;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.qb(this.B),this.B="";10!=b&&(this.B+=String.fromCharCode(b));a=!0}a&&(this.Fb&=~yr);zr(this)};
|
||||
l.sm=function(a,b){this.Ge=b;zr(this)};function zr(a){a.U&&a.C&&(a.Ge&Ar&&!(a.Fb&yr)?Ff(a.U,a.C):Df(a.U,a.C))}var ur="buffer",yr=64,Ar=16,vr={0:tr.prototype.Xk,1:tr.prototype.ul,2:tr.prototype.Tk},wr={0:tr.prototype.xm,2:tr.prototype.sm};Ma(function(){for(var a=cb(document,"pcx86","parallel"),b=0;b<a.length;b++){var c=a[b],d=db(c),d=new tr(d);bb(d,c)}});
|
||||
function Br(a){u.call(this,"SerialPort",a);this.fa=a.adapter;switch(this.fa){case 1:this.ba=1016;this.M=4;break;case 2:this.ba=760;this.M=3;break;default:q("Unrecognized serial adapter #"+this.fa);return}this.C=this.I=null;this.ma=a.tabSize||0;this.la=a.charBOL||0;this.K=this.qa=0;this.pa=Cr|Dr;this.N=!0;a=a.binding;"console"==a?this.I="":$a(this,a,Er);this.F=this.aa=this.W=null;this.exports={connect:this.ri,receiveData:this.we,receiveStatus:this.ak}}ca(Br,u);l=Br.prototype;
|
||||
l.Wh=function(a,b,c){var d=null;a!=this.Ce||this.F||(this.F=b,this.W=c,this.N=!1,d=this);return d};l.Ab=function(a,b,c){var d=this;switch(b){case Er:return this.ia[b]=this.C=c,this.C.onkeydown=function(a){a=a||window.event;var b=a.keyCode;if(8===b||a.ctrlKey&&65<=b&&90>=b)a.preventDefault&&a.preventDefault(),64<b&&(b-=64),d.we(b);return!0},this.C.onkeypress=function(a){a=a||window.event;d.we(a.which||a.keyCode);a.preventDefault&&a.preventDefault();return!0},this.C.removeAttribute("readonly"),!0}return!1};
|
||||
l.kc=function(a,b,c,d){this.na=a;this.oa=b;this.R=c;this.Ea=d;var e=this;this.ra=Gc(this.R,this.id+".receive",function(){e.we()});this.ua=Gc(this.R,this.id+".transmit",function(){e.A=e.A|Fr|Gr});this.U=tb(a,"ChipSet");ec(b,this,Hr,this.ba);gc(b,this,Ir,this.ba);v(this)};
|
||||
l.ri=function(a){if(!this.F){var b=Fc(this.na,"connection");if(b){var c=b.split("->");if(2==c.length){var d=pa(c[0]);if(d!=this.Ce)return;c=pa(c[1]);if(this.F=fb(c)){var e=this.F.exports;if(e){var f=e.connect;f&&f.call(this.F,this.N);if(this.aa=e.receiveData){this.N=a;this.W=e.receiveStatus;this.status("Connected "+this.Cd+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};
|
||||
l.Rb=function(a,b){if(!b)if(this.ri(this.N),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.Qb=function(a){return a?this.save():!0};l.reset=function(){Jr(this)};l.save=function(){var a=new Me(this),b=0,c=[];c[b++]=this.da;c[b++]=this.ja;c[b++]=this.G;c[b++]=this.L;c[b++]=this.D;c[b++]=this.J;c[b++]=this.Y;c[b++]=this.A;c[b++]=this.B;c[b]=this.H;a.set(0,c);return a.data()};l.restore=function(a){return Jr(this,a[0])};
|
||||
function Jr(a,b){var c=0;b||(b=[0,0,Kr,0,Lr,0,0,Fr|Gr,a.pa,[]]);a.da=b[c++];a.ja=b[c++];a.G=b[c++];a.L=b[c++];a.D=b[c++];a.J=b[c++];a.Y=b[c++];a.A=b[c++];a.B=b[c++];a.H=b[c];return!0}l.we=function(a){if(null!=a)if("number"==typeof a)this.H.push(a);else if("string"==typeof a)for(var b=0;b<a.length;b++)this.H.push(a.charCodeAt(b));else this.H=this.H.concat(a);Mr(this);return!0};l.ak=function(a){var b=this.B;this.B&=~(Cr|Dr);a&32&&(this.B=this.B|Cr|Nr);a&64&&(this.B=this.B|Dr|Or);b!=this.B&&Pr(this)};
|
||||
function Mr(a){0<a.H.length&&!(a.A&Qr)&&(a.da=a.H.shift(),a.A|=Qr,a.H.length&&a.R&&Uc(a.R,a.ra,1E3/(1843200/((a.G||1)<<7))|0));Pr(a)}l.nl=function(){var a=this.J&Rr?this.G&255:this.da;this.A&=~Qr;Mr(this);return a};l.$k=function(){return this.J&Rr?this.G>>8:this.L};l.al=function(){var a=this.D;this.D|=Lr;return a};l.bl=function(){return this.J};l.dl=function(){return this.Y};l.cl=function(){return this.A};l.il=function(){var a=this.B;this.B&=~(Nr|Or);return a};
|
||||
l.Mm=function(a,b){if(this.J&Rr)this.G=this.G&-256|b;else{this.ja=b;this.A&=~(Fr|Gr);a=!1;this.aa&&this.aa.call(this.F,b)&&(a=!0);if(this.C){if(13==b)this.K=0;else if(8==b)this.C.value=this.C.value.slice(0,-1),0<this.K&&this.K--;else{var c;13!=b&&10!=b&&(c=qa[b]);c=c?"<"+c+">":String.fromCharCode(b);a=c.length;32>b&&1==a&&(a=0);9==b&&(a=this.ma||8,a-=this.K%a,this.ma&&(c=" ".slice(0,a)));!this.K&&a&&(10!=this.qa&&(c="\n"+c),this.la&&(c=String.fromCharCode(this.la)+
|
||||
c));this.C.value+=c;this.C.scrollTop=this.C.scrollHeight;this.K+=a}this.qa=b;a=!0}else if(null!=this.I){if(10==b||1024<=this.I.length)this.qb(this.I),this.I="";10!=b&&(this.I+=String.fromCharCode(b));a=!0}a&&(this.R&&Uc(this.R,this.ua,1E3/(1843200/((this.G||1)<<7))|0),Pr(this))}};l.zm=function(a,b){this.J&Rr?this.G=this.G&255|b<<8:this.L=b};l.Am=function(a,b){this.J=b};
|
||||
l.Bm=function(a,b){a=b^this.Y;this.Y=b;a&(Sr|Tr)&&this.W&&(a=0,this.N?(a|=b&Tr?32:0,a|=b&Sr?320:0):(a|=b&Tr?16:0,a|=b&Sr?1048576:0),this.W.call(this.F,a))};function Pr(a){var b=-1;a.A&Qr&&a.L&Ur?b=Vr:a.A&Fr&&a.L&Wr?b=Xr:a.B&(Nr|Or)&&a.L&Yr&&(b=Zr);0<=b?(a.D&=~(Lr|$r),a.D|=b,a.U&&a.M&&Ff(a.U,a.M,100)):(a.D|=Lr,a.U&&a.M&&Df(a.U,a.M))}
|
||||
var Er="buffer",Kr=384,Ur=1,Wr=2,Yr=8,Lr=1,Vr=4,Xr=2,Zr=0,$r=6,Rr=128,Sr=1,Tr=2,Qr=1,Fr=32,Gr=64,Nr=1,Or=2,Cr=16,Dr=32,Hr={0:Br.prototype.nl,1:Br.prototype.$k,2:Br.prototype.al,3:Br.prototype.bl,4:Br.prototype.dl,5:Br.prototype.cl,6:Br.prototype.il},Ir={0:Br.prototype.Mm,1:Br.prototype.zm,3:Br.prototype.Am,4:Br.prototype.Bm};Ma(function(){for(var a=cb(document,"pcx86","serial"),b=0;b<a.length;b++){var c=a[b],d=db(c),d=new Br(d);bb(d,c)}});
|
||||
function as(a){u.call(this,"Mouse",a);if(this.U=a.serial)this.W="SerialPort";this.J=a.scaleMouse;this.N=this.M=this.Wb=!1;this.F=[];this.D=[];v(this)}ca(as,u);l=as.prototype;l.kc=function(a,b,c,d){this.na=a;this.oa=b;this.R=c;this.Ea=d;this.J=Fc(a,"scaleMouse")||this.J;for(b=null;b=tb(a,"Video",b);)this.F.push(b)};
|
||||
l.Rb=function(a,b){if(!b){if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;if(this.W&&!this.G){for(a=null;(a=tb(this.na,this.W,a))&&(!a.Wh||!(this.G=a.Wh(this.U,this,this.$j))););if(this.G)for(this.D=[],a=0;a<this.F.length;a++)b=this.F[a],b.K=this,(b=b.F)&&this.D.push(b);else q(this.id+": "+this.W+" "+this.U+" unavailable")}this.Wb?bs(this):cs(this)}return!0};l.Qb=function(a){return a?this.save():!0};l.reset=function(){ds(this)};
|
||||
l.save=function(){var a=new Me(this),b=0,c=[];c[b++]=this.Wb;c[b++]=this.A;c[b++]=this.B;c[b++]=this.H;c[b++]=this.I;c[b++]=this.K;c[b++]=this.L;c[b]=this.C;a.set(0,c);return a.data()};l.restore=function(a){return ds(this,a[0])};function ds(a,b){var c=0;b||(b=[!1,-1,-1,0,0,!1,!1,0]);var d=b[c++];a.Wb=d;a.A=b[c++];a.B=b[c++];a.H=b[c++];a.I=b[c++];a.K=b[c++];a.L=b[c++];a.C=b[c];a.C&(Sr|Tr)&&(a.C=(a.C&Sr?1048576:0)|(a.C&Tr?16:0));return!0}l.Ye=function(a){this.M=a};
|
||||
function bs(a){if(!a.N)for(var b=0;b<a.D.length;b++)es(a,a.D[b])&&(a.N=!0)}function cs(a){if(a.N)for(var b=0;b<a.D.length;b++){var c=a.D[b];c&&(c.style.cursor="auto")}}function es(a,b){return b?(b.addEventListener("mousemove",function(b){fs(a,b)},!1),b.addEventListener("mousedown",function(b){fs(a,b,!0)},!1),b.addEventListener("mouseup",function(b){fs(a,b,!1)},!1),b.style.cursor="none",!0):!1}
|
||||
function fs(a,b,c){if(void 0!==c){var d;!(d=!1!==a.M)&&(d=a.F.length)&&(d=a.F[0],d=d.pd?d.Md(!0):!1);d||(a.M=null);a.ie(b.button,c)}else{if(0>a.A||0>a.B)a.A=b.screenX,a.B=b.screenY;a.M?(c=b.movementX||b.mozMovementX||b.webkitMovementX||0,d=b.movementY||b.mozMovementY||b.webkitMovementY||0):(c=b.screenX-a.A,d=b.screenY-a.B);a.A=b.screenX;a.B=b.screenY;a.ng(c,d,a.A,a.B)}}
|
||||
l.ie=function(a,b){if(this.Wb&&this.R&&this.R.X.cb)switch(a){case oq:this.K!=b&&(this.K=b,gs(this));break;case hs:this.L!=b&&(this.L=b,gs(this))}};l.ng=function(a,b){this.Wb&&this.R&&this.R.X.cb&&(a=Math.round(Math.abs(a)*this.J)*Math.sign(a)||Math.sign(a),b=Math.round(Math.abs(b)*this.J)*Math.sign(b)||Math.sign(b),a||b)&&(this.H=a,this.I=b,gs(this))};function gs(a){a.G.we([64|(a.K?32:0)|(a.L?16:0)|(a.I&192)>>4|(a.H&192)>>6,a.H&63,a.I&63]);a.H=a.I=0}
|
||||
l.$j=function(a){var b=1048592==(a&1048592);if(b){if(!this.Wb){var c=!1;this.C&16||(this.reset(),c=!0);this.C&1048576||(c=!0);c&&this.G.we([is,is]);bs(this);this.Wb=b}}else this.Wb&&(cs(this),this.Wb=b);this.C=a};var is=77,oq=0,hs=2;Ma(function(){for(var a=cb(document,"pcx86","mouse"),b=0;b<a.length;b++){var c=a[b],d=db(c),d=new as(d);bb(d,c)}});
|
||||
function js(a,b,c){u.call(this,"Disk",{id:a.Cd+".disk"+ja(++ks,4)});this.controller=a;this.wa=a.wa;this.qb=a.qb;this.na=a.na;this.Ea=a.Ea;this.B=b;this.Pc=b.name;this.me=b.me;this.Cf=this.C=!1;ls(this,c,b.kb,b.$a,b.Xa,b.ob);this.G=[];this.J=[];this.D=null;this.L=0;this.K=!1;v(this)}ca(js,u);l=js.prototype;l.kc=function(a,b,c,d){this.Ea=d};l.Rb=function(a,b){b||!this.Cf||this.C||(v(this,!1),this.load(this.Pc,this.F,null,this.mk,this));return!0};l.mk=function(){v(this,!0)};
|
||||
l.Qb=function(a,b){if(this.C){var c,d=0;if(this.K&&!Xa("Disk writes are still in progress, shut down anyway?"))return!1;for(;c=ms(this,!1);)if(d=c[0]){this.wa('Unable to save "'+this.Pc+'" (error '+d+")");break}b&&this.C&&(b="action=close&volume="+this.F,b+="&machine="+ns(this.controller),b+="&user="+os(this.controller),wa(xa()+"/api/v1/disk?"+b,null,!0),this.C=!1);!d&&a&&this.wa(this.Pc+" saved")}return!0};
|
||||
function ls(a,b,c,d,e,f){a.mode=b;a.kb=c;a.$a=d;a.Xa=e;a.ob=f;a.A=[];if("preload"!=a.mode){b=Array(a.kb);for(c=0;c<b.length;c++){d=Array(a.$a);for(e=0;e<d.length;e++){f=Array(a.Xa);for(var g=1;g<=f.length;g++)f[g-1]=ps(null,c,e,g,a.ob,"local"==a.mode?0:null);d[e]=f}b[c]=d}a.A=b}a.I=null}
|
||||
l.load=function(a,b,c,d,e){var f=b;if(this.H)return!0;this.Pc=a;this.F=b;this.kh=ka(b);var g=this;this.H=d;this.M=e||this.controller;if(c){var h=new FileReader;h.onload=function(){var a=h.result,b,c=a?a.byteLength:0,d=ga[c];if(d){g.kb=d[0];g.$a=d[1];g.Xa=d[2];g.ob=d[3]||512;b=g.ob>>2;var e=d=0,a=new DataView(a,0,c);g.A=Array(g.kb);for(c=0;c<g.A.length;c++)for(var f=g.A[c]=Array(g.$a),k=0;k<f.length;k++)for(var P=f[k]=Array(g.Xa),aa=0;aa<P.length;aa++){for(var ya=ps(null,c,k,aa+1,g.ob,0),Ha=ya.data,
|
||||
Kc=0;Kc<b;Kc++,e+=4)var Yh=Ha[Kc]=a.getInt32(e,!0),d=d+Yh&-1;ya.yc=b;P[aa]=ya}g.I=d;b=g}else g.wa("Unrecognized disk format ("+c+" bytes)");g.H&&(g.H.call(g.controller,g.B,b,g.Pc,g.F),g.H=null)};h.readAsArrayBuffer(c);return!0}0>b.indexOf("/api/v1/dump")&&(a=la(b),"json"==a||"gz"==a?f=encodeURI(b):"demandrw"==this.mode||"demandro"==this.mode?(f=qs(this,b),this.Cf=!0):(c="path",d="&mbhd=10",!b.indexOf("http:")||!b.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(a)?(c="disk",d="&mbhd=0"):
|
||||
ma(b,"/")&&(c="dir"),f=xa()+"/api/v1/dump?"+c+"="+encodeURIComponent(b)+(this.me?"":d)+"&format=json"));var k="Loading "+f+"...";return!!wa(f,null,!0,function(a,b,c){rs(g,a,b,c)},function(){g.qb(k,mb.ae)})};
|
||||
function rs(a,b,c,d){var e=null;a.pe=!1;var f=!(!(0>d&&a.na)||a.na.X.Sb);if(a.Cf)d?a.wa('Unable to connect to disk "'+a.F+'" (error '+d+": "+c+")",f):(a.C=!0,e=a);else if(d)a.wa('Unable to load disk "'+a.Pc+'" (error '+d+": "+b+")",f);else{Va(a.controller.Cd,b,c);try{if(0<ka(a.kh,!0).toLowerCase().indexOf("-readonly"))a.pe=!0;else{var g=c.indexOf("\n");0<g&&1024>g&&0<c.substring(0,g).indexOf("write-protected")&&(a.pe=!0)}var h;"<"==c.substr(0,1)?h=["Missing disk image: "+a.Pc]:h=0>c.indexOf("0x")&&
|
||||
l.Rb=function(a,b){if(!b)if(this.ri(this.N),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.Qb=function(a){return a?this.save():!0};l.reset=function(){Jr(this)};l.save=function(){var a=new Me(this),b=0,c=[];c[b++]=this.da;c[b++]=this.ja;c[b++]=this.G;c[b++]=this.L;c[b++]=this.D;c[b++]=this.J;c[b++]=this.X;c[b++]=this.A;c[b++]=this.B;c[b]=this.H;a.set(0,c);return a.data()};l.restore=function(a){return Jr(this,a[0])};
|
||||
function Jr(a,b){var c=0;b||(b=[0,0,Kr,0,Lr,0,0,Fr|Gr,a.pa,[]]);a.da=b[c++];a.ja=b[c++];a.G=b[c++];a.L=b[c++];a.D=b[c++];a.J=b[c++];a.X=b[c++];a.A=b[c++];a.B=b[c++];a.H=b[c];return!0}l.we=function(a){if(null!=a)if("number"==typeof a)this.H.push(a);else if("string"==typeof a)for(var b=0;b<a.length;b++)this.H.push(a.charCodeAt(b));else this.H=this.H.concat(a);Mr(this);return!0};l.ak=function(a){var b=this.B;this.B&=~(Cr|Dr);a&32&&(this.B=this.B|Cr|Nr);a&64&&(this.B=this.B|Dr|Or);b!=this.B&&Pr(this)};
|
||||
function Mr(a){0<a.H.length&&!(a.A&Qr)&&(a.da=a.H.shift(),a.A|=Qr,a.H.length&&a.R&&Uc(a.R,a.ra,1E3/(1843200/((a.G||1)<<7))|0));Pr(a)}l.rl=function(){var a=this.J&Rr?this.G&255:this.da;this.A&=~Qr;Mr(this);return a};l.dl=function(){return this.J&Rr?this.G>>8:this.L};l.el=function(){var a=this.D;this.D|=Lr;return a};l.fl=function(){return this.J};l.hl=function(){return this.X};l.gl=function(){return this.A};l.ml=function(){var a=this.B;this.B&=~(Nr|Or);return a};
|
||||
l.Um=function(a,b){if(this.J&Rr)this.G=this.G&-256|b;else{this.ja=b;this.A&=~(Fr|Gr);a=!1;this.aa&&this.aa.call(this.F,b)&&(a=!0);if(this.C){if(13==b)this.K=0;else if(8==b)this.C.value=this.C.value.slice(0,-1),0<this.K&&this.K--;else{var c;13!=b&&10!=b&&(c=qa[b]);c=c?"<"+c+">":String.fromCharCode(b);a=c.length;32>b&&1==a&&(a=0);9==b&&(a=this.ma||8,a-=this.K%a,this.ma&&(c=" ".slice(0,a)));!this.K&&a&&(10!=this.qa&&(c="\n"+c),this.la&&(c=String.fromCharCode(this.la)+
|
||||
c));this.C.value+=c;this.C.scrollTop=this.C.scrollHeight;this.K+=a}this.qa=b;a=!0}else if(null!=this.I){if(10==b||1024<=this.I.length)this.qb(this.I),this.I="";10!=b&&(this.I+=String.fromCharCode(b));a=!0}a&&(this.R&&Uc(this.R,this.ua,1E3/(1843200/((this.G||1)<<7))|0),Pr(this))}};l.Hm=function(a,b){this.J&Rr?this.G=this.G&255|b<<8:this.L=b};l.Im=function(a,b){this.J=b};
|
||||
l.Jm=function(a,b){a=b^this.X;this.X=b;a&(Sr|Tr)&&this.W&&(a=0,this.N?(a|=b&Tr?32:0,a|=b&Sr?320:0):(a|=b&Tr?16:0,a|=b&Sr?1048576:0),this.W.call(this.F,a))};function Pr(a){var b=-1;a.A&Qr&&a.L&Ur?b=Vr:a.A&Fr&&a.L&Wr?b=Xr:a.B&(Nr|Or)&&a.L&Yr&&(b=Zr);0<=b?(a.D&=~(Lr|$r),a.D|=b,a.U&&a.M&&Ff(a.U,a.M,100)):(a.D|=Lr,a.U&&a.M&&Df(a.U,a.M))}
|
||||
var Er="buffer",Kr=384,Ur=1,Wr=2,Yr=8,Lr=1,Vr=4,Xr=2,Zr=0,$r=6,Rr=128,Sr=1,Tr=2,Qr=1,Fr=32,Gr=64,Nr=1,Or=2,Cr=16,Dr=32,Hr={0:Br.prototype.rl,1:Br.prototype.dl,2:Br.prototype.el,3:Br.prototype.fl,4:Br.prototype.hl,5:Br.prototype.gl,6:Br.prototype.ml},Ir={0:Br.prototype.Um,1:Br.prototype.Hm,3:Br.prototype.Im,4:Br.prototype.Jm};Ma(function(){for(var a=cb(document,"pcx86","serial"),b=0;b<a.length;b++){var c=a[b],d=db(c),d=new Br(d);bb(d,c)}});
|
||||
function as(a){u.call(this,"Mouse",a);this.U=a.serial||a.binding;this.X=a.type||(this.U?bs:cs);this.W=this.X==bs?"SerialPort":null;this.F=null;this.J=a.scaleMouse;this.Wb=this.N=this.M=!1;this.G=[];this.D=[]}ca(as,u);l=as.prototype;l.kc=function(a,b,c,d){this.na=a;this.oa=b;this.R=c;this.Ea=d;this.J=Fc(a,"scaleMouse")||this.J;for(c=null;c=tb(a,"Video",c);)this.G.push(c);this.X==cs&&(ec(b,this,ds,es),gc(b,this,fs,es));v(this)};
|
||||
l.Rb=function(a,b){if(!b){if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;if(this.W&&!this.F){for(a=null;(a=tb(this.na,this.W,a))&&(!a.Wh||!(this.F=a.Wh(this.U,this,this.$j))););if(this.F)for(this.D=[],a=0;a<this.G.length;a++)b=this.G[a],b.K=this,(b=b.F)&&this.D.push(b);else q(this.id+": "+this.W+" "+this.U+" unavailable")}this.Wb?gs(this):hs(this)}return!0};l.Qb=function(a){return a?this.save():!0};l.reset=function(){is(this)};
|
||||
l.save=function(){var a=new Me(this),b=0,c=[];c[b++]=this.Wb;c[b++]=this.A;c[b++]=this.B;c[b++]=this.H;c[b++]=this.I;c[b++]=this.K;c[b++]=this.L;c[b]=this.C;a.set(0,c);return a.data()};l.restore=function(a){return is(this,a[0])};function is(a,b){var c=0;b||(b=[!1,-1,-1,0,0,!1,!1,0]);var d=b[c++];a.Wb=d;a.A=b[c++];a.B=b[c++];a.H=b[c++];a.I=b[c++];a.K=b[c++];a.L=b[c++];a.C=b[c];a.C&(Sr|Tr)&&(a.C=(a.C&Sr?1048576:0)|(a.C&Tr?16:0));return!0}l.Ye=function(a){this.M=a};
|
||||
function gs(a){if(!a.N)for(var b=0;b<a.D.length;b++)js(a,a.D[b])&&(a.N=!0)}function hs(a){if(a.N)for(var b=0;b<a.D.length;b++){var c=a.D[b];c&&(c.style.cursor="auto")}}function js(a,b){return b?(b.addEventListener("mousemove",function(b){ks(a,b)},!1),b.addEventListener("mousedown",function(b){ks(a,b,!0)},!1),b.addEventListener("mouseup",function(b){ks(a,b,!1)},!1),b.style.cursor="none",!0):!1}
|
||||
function ks(a,b,c){if(void 0!==c){var d;!(d=!1!==a.M)&&(d=a.G.length)&&(d=a.G[0],d=d.pd?d.Md(!0):!1);d||(a.M=null);a.ie(b.button,c)}else{if(0>a.A||0>a.B)a.A=b.screenX,a.B=b.screenY;a.M?(c=b.movementX||b.mozMovementX||b.webkitMovementX||0,d=b.movementY||b.mozMovementY||b.webkitMovementY||0):(c=b.screenX-a.A,d=b.screenY-a.B);a.A=b.screenX;a.B=b.screenY;a.ng(c,d,a.A,a.B)}}
|
||||
l.ie=function(a,b){if(this.Wb&&this.R&&this.R.Y.cb)switch(a){case oq:this.K!=b&&(this.K=b,ls(this));break;case ms:this.L!=b&&(this.L=b,ls(this))}};l.ng=function(a,b){this.Wb&&this.R&&this.R.Y.cb&&(a=Math.round(Math.abs(a)*this.J)*Math.sign(a)||Math.sign(a),b=Math.round(Math.abs(b)*this.J)*Math.sign(b)||Math.sign(b),a||b)&&(this.H=a,this.I=b,ls(this))};function ls(a){a.F.we([64|(a.K?32:0)|(a.L?16:0)|(a.I&192)>>4|(a.H&192)>>6,a.H&63,a.I&63]);a.H=a.I=0}
|
||||
l.$j=function(a){var b=1048592==(a&1048592);if(b){if(!this.Wb){var c=!1;this.C&16||(this.reset(),c=!0);this.C&1048576||(c=!0);c&&this.F.we([ns,ns]);gs(this);this.Wb=b}}else this.Wb&&(hs(this),this.Wb=b);this.C=a};l.Kk=function(){return 0};l.Lk=function(){return 0};l.Jk=function(){return 0};l.Ik=function(){return 0};l.km=function(){};l.lm=function(){};l.jm=function(){};l.im=function(){};
|
||||
var cs="bus",bs="serial",oq=0,ms=2,es=572,ds={0:as.prototype.Kk,1:as.prototype.Lk,2:as.prototype.Jk,3:as.prototype.Ik},fs={0:as.prototype.km,1:as.prototype.lm,2:as.prototype.jm,3:as.prototype.im},ns=77;Ma(function(){for(var a=cb(document,"pcx86","mouse"),b=0;b<a.length;b++){var c=a[b],d=db(c),d=new as(d);bb(d,c)}});
|
||||
function os(a,b,c){u.call(this,"Disk",{id:a.Cd+".disk"+ja(++ps,4)});this.controller=a;this.wa=a.wa;this.qb=a.qb;this.na=a.na;this.Ea=a.Ea;this.B=b;this.Pc=b.name;this.me=b.me;this.Cf=this.C=!1;qs(this,c,b.kb,b.$a,b.Xa,b.ob);this.G=[];this.J=[];this.D=null;this.L=0;this.K=!1;v(this)}ca(os,u);l=os.prototype;l.kc=function(a,b,c,d){this.Ea=d};l.Rb=function(a,b){b||!this.Cf||this.C||(v(this,!1),this.load(this.Pc,this.F,null,this.mk,this));return!0};l.mk=function(){v(this,!0)};
|
||||
l.Qb=function(a,b){if(this.C){var c,d=0;if(this.K&&!Xa("Disk writes are still in progress, shut down anyway?"))return!1;for(;c=rs(this,!1);)if(d=c[0]){this.wa('Unable to save "'+this.Pc+'" (error '+d+")");break}b&&this.C&&(b="action=close&volume="+this.F,b+="&machine="+ss(this.controller),b+="&user="+ts(this.controller),wa(xa()+"/api/v1/disk?"+b,null,!0),this.C=!1);!d&&a&&this.wa(this.Pc+" saved")}return!0};
|
||||
function qs(a,b,c,d,e,f){a.mode=b;a.kb=c;a.$a=d;a.Xa=e;a.ob=f;a.A=[];if("preload"!=a.mode){b=Array(a.kb);for(c=0;c<b.length;c++){d=Array(a.$a);for(e=0;e<d.length;e++){f=Array(a.Xa);for(var g=1;g<=f.length;g++)f[g-1]=us(null,c,e,g,a.ob,"local"==a.mode?0:null);d[e]=f}b[c]=d}a.A=b}a.I=null}
|
||||
l.load=function(a,b,c,d,e){var f=b;if(this.H)return!0;this.Pc=a;this.F=b;this.kh=ka(b);var g=this;this.H=d;this.M=e||this.controller;if(c){var h=new FileReader;h.onload=function(){var a=h.result,b,c=a?a.byteLength:0,d=ga[c];if(d){g.kb=d[0];g.$a=d[1];g.Xa=d[2];g.ob=d[3]||512;b=g.ob>>2;var e=d=0,a=new DataView(a,0,c);g.A=Array(g.kb);for(c=0;c<g.A.length;c++)for(var f=g.A[c]=Array(g.$a),k=0;k<f.length;k++)for(var P=f[k]=Array(g.Xa),aa=0;aa<P.length;aa++){for(var ya=us(null,c,k,aa+1,g.ob,0),Ha=ya.data,
|
||||
Lc=0;Lc<b;Lc++,e+=4)var Zh=Ha[Lc]=a.getInt32(e,!0),d=d+Zh&-1;ya.yc=b;P[aa]=ya}g.I=d;b=g}else g.wa("Unrecognized disk format ("+c+" bytes)");g.H&&(g.H.call(g.controller,g.B,b,g.Pc,g.F),g.H=null)};h.readAsArrayBuffer(c);return!0}0>b.indexOf("/api/v1/dump")&&(a=la(b),"json"==a||"gz"==a?f=encodeURI(b):"demandrw"==this.mode||"demandro"==this.mode?(f=vs(this,b),this.Cf=!0):(c="path",d="&mbhd=10",!b.indexOf("http:")||!b.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(a)?(c="disk",d="&mbhd=0"):
|
||||
ma(b,"/")&&(c="dir"),f=xa()+"/api/v1/dump?"+c+"="+encodeURIComponent(b)+(this.me?"":d)+"&format=json"));var k="Loading "+f+"...";return!!wa(f,null,!0,function(a,b,c){ws(g,a,b,c)},function(){g.qb(k,mb.ae)})};
|
||||
function ws(a,b,c,d){var e=null;a.pe=!1;var f=!(!(0>d&&a.na)||a.na.Y.Sb);if(a.Cf)d?a.wa('Unable to connect to disk "'+a.F+'" (error '+d+": "+c+")",f):(a.C=!0,e=a);else if(d)a.wa('Unable to load disk "'+a.Pc+'" (error '+d+": "+b+")",f);else{Va(a.controller.Cd,b,c);try{if(0<ka(a.kh,!0).toLowerCase().indexOf("-readonly"))a.pe=!0;else{var g=c.indexOf("\n");0<g&&1024>g&&0<c.substring(0,g).indexOf("write-protected")&&(a.pe=!0)}var h;"<"==c.substr(0,1)?h=["Missing disk image: "+a.Pc]:h=0>c.indexOf("0x")&&
|
||||
'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+c+")");if(h.length)if(1==h.length)q(h[0]);else{a.kb=h.length;a.$a=h[0].length;a.Xa=h[0][0].length;var k=h[0][0][0];a.ob=k&&k.length||512;for(d=c=0;d<a.kb;d++)for(f=0;f<a.$a;f++)for(g=0;g<a.Xa;g++)if(k=h[d][f][g]){var m=k.length;void 0===m&&(m=k.length=512);var m=m>>2,r=k.pattern;void 0===r&&(r=k.pattern=0);var y=k.data;if(void 0===y){var t=k.bytes;if(void 0!==t&&t.length){for(var z=m<<2,D=t.length;D<
|
||||
z;D++)t[D]=r;ss(k,t,0)}else k.data=y=[],t&&(k.pattern=r|r<<8|r<<16|r<<24);delete k.bytes}ps(k,d,f);for(z=0;z<y.length;z++)c=c+y[z]&-1}a.A=h;a.I=c;e=a}else q("Empty disk image: "+a.Pc)}catch(N){q("Disk image error ("+b+"): "+N.message)}}a.H&&(a.H.call(a.M,a.B,e,a.Pc,a.F),a.H=null)}function ts(a,b){var c=a.$a*a.Xa,d=b/c|0;return d<a.kb?(b%=c,a.seek(d,b/a.Xa|0,b%a.Xa+1)):null}function us(a,b,c){for(var d=1,e=0,f=0;d--;){var g=a.read(b,c++);if(0>g)break;e|=g<<f;f+=8}return e}
|
||||
function ps(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.sk=b;a.tk=c;a.Mc=a.yc=0;a.Fa=!1;return a}function qs(a,b){b="action=open&volume="+b+("&mode="+a.mode);b+="&chs="+a.kb+":"+a.$a+":"+a.Xa+":"+a.ob;b+="&machine="+ns(a.controller);b+="&user="+os(a.controller);return xa()+"/api/v1/disk?"+b}
|
||||
function vs(a,b,c,d,e,f,g){if(a.C){var h;h="action=read&volume="+a.F;h+="&chs="+a.kb+":"+a.$a+":"+a.Xa+":"+a.ob;h=h+("&addr="+b+":"+c+":"+d+":"+e)+("&machine="+ns(a.controller));h+="&user="+os(a.controller);wa(xa()+"/api/v1/disk?"+h,null,f,function(h,m,r){h=[b,c,d,e,f,g];var k=!1,t=h[0],z=h[1],D=h[2],N=h[3];if(!r){m=JSON.parse(m);for(k=0;N--;){var P=a.seek(t,z,D,!0);if(!P)break;ss(P,m,k);k+=P.length;D++}k=h[4]}(h=h[5])&&h(r,k)})}else g&&g(-1,!1)}
|
||||
function ws(a,b,c,d,e,f,g){if(a.C){var h={};a.K=!0;h.action="write";h.volume=a.F;h.chs=a.kb+":"+a.$a+":"+a.Xa+":"+a.ob;h.addr=b+":"+c+":"+d+":"+e;h.machine=ns(a.controller);h.user=os(a.controller);h.data=JSON.stringify(f);wa(xa()+"/api/v1/disk",h,g,function(f,h,r){var k=[b,c,d,e,g];f=k[0];h=k[1];var m=k[2],z=k[3],k=k[4];a.K=!1;if(0<=f&&f<a.A.length&&0<=h&&h<a.A[f].length)for(--m;0<z--&&0<=m&&m<a.A[f][h].length;m++){var D=a.A[f][h][m];r?xs(a,D,!1):D.Fa||(D.Mc=D.yc=0)}k&&ys(a)})}return!1}
|
||||
function xs(a,b,c){b.Fa=!0;var d=a.G.indexOf(b);0<=d&&(a.G.splice(d,1),a.J.splice(d,1));a.G.push(b);a.J.push(va());c&&ys(a)}function ys(a){if(a.G.length){var b=a.J[0]+2E3;a.D&&a.L<b&&(clearTimeout(a.D),a.D=null);if(!a.D){var c=va(),b=b-c;0>b&&(b=0);2E3<b&&(b=2E3);a.D=setTimeout(function(){ms(a,!0)},b);a.L=c+b}}else a.D&&(clearTimeout(a.D),a.D=null)}
|
||||
function ms(a,b){b&&(a.D=null);var c=a.G[0];if(c){for(var d=c.sk,e=c.tk,c=c.sector,f=0,g=[],h=c-1;h<a.A[d][e].length;h++){var k=a.A[d][e][h];if(!k.Fa)break;var m=a.G.indexOf(k);a.G.splice(m,1);a.J.splice(m,1);g=g.concat(zs(k));k.Fa=!1;f++}a=ws(a,d,e,c,f,g,b);return b||a}return!1}l.info=function(){return this.A.length?[this.A.length,this.A[0].length,this.A[0][0].length,this.A[0][0][0].length]:[0,0,0,0]};
|
||||
l.seek=function(a,b,c,d,e){var f=null,g=this.B,h=this.A[a];if(h){var k=h[b];if(!k&&g.fg&&b<g.$a){k=h[b]=Array(g.wd);for(h=0;h<k.length;h++)k[h]=ps(null,a,b,h+1,g.xb,0);this.$a<=b&&(this.$a=b+1)}if(k){for(h=0;h<k.length;h++)if(k[h]&&k[h].sector==c){f=k[h];if(null===f.pattern)if(d)f.pattern=0;else{for(d=1;++h<k.length;)null===k[h].pattern&&d++;vs(this,a,b,c,d,!!e,function(a,b){a&&(f=null);e&&e(f,b)});return e?null:f}break}!f&&g.fg&&9==g.bb&&(f=k[h]=ps(null,a,b,g.bb,g.xb,0),this.Xa<g.bb&&(this.Xa=g.bb))}}e&&
|
||||
e(f,!1);return f};function ss(a,b,c){for(var d=a.length>>2,e=Array(d),f=0;f<d;f++)e[f]=b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24,c+=4;a.data=e}function zs(a){var b=a.length,c=Array(b),d=0,b=b>>2,e=a.data;a=a.pattern;for(var f=0;f<b;f++){var g=f<e.length?e[f]:a;c[d++]=g&255;c[d++]=g>>8&255;c[d++]=g>>16&255;c[d++]=g>>24&255}return c}l.read=function(a,b){var c=-1;if(a&&b<a.length)var c=a.data,d=b>>2,c=(d<c.length?c[d]:a.pattern)>>((b&3)<<3)&255;return c};
|
||||
l.write=function(a,b,c){if(this.pe)return!1;if(b<a.length){if(c!=this.read(a,b,!0)){var d=a.data,e=a.pattern,f=b>>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.yc?f<a.Mc?(a.yc+=a.Mc-f,a.Mc=f):f>=a.Mc+a.yc&&(a.yc+=f-(a.Mc+a.yc)+1):(a.Mc=f,a.yc=1);d[f]=d[f]&~(255<<b)|c<<b;this.C&&xs(this,a,!0)}return!0}return null};function As(a){for(var b="",c=0,d;d=ts(a,c++);)for(var e=0,f=d.length;e<f;e++)b+=String.fromCharCode(us(a,d,e));return btoa(b)}
|
||||
z;D++)t[D]=r;xs(k,t,0)}else k.data=y=[],t&&(k.pattern=r|r<<8|r<<16|r<<24);delete k.bytes}us(k,d,f);for(z=0;z<y.length;z++)c=c+y[z]&-1}a.A=h;a.I=c;e=a}else q("Empty disk image: "+a.Pc)}catch(N){q("Disk image error ("+b+"): "+N.message)}}a.H&&(a.H.call(a.M,a.B,e,a.Pc,a.F),a.H=null)}function ys(a,b){var c=a.$a*a.Xa,d=b/c|0;return d<a.kb?(b%=c,a.seek(d,b/a.Xa|0,b%a.Xa+1)):null}function zs(a,b,c){for(var d=1,e=0,f=0;d--;){var g=a.read(b,c++);if(0>g)break;e|=g<<f;f+=8}return e}
|
||||
function us(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.sk=b;a.tk=c;a.Mc=a.yc=0;a.Fa=!1;return a}function vs(a,b){b="action=open&volume="+b+("&mode="+a.mode);b+="&chs="+a.kb+":"+a.$a+":"+a.Xa+":"+a.ob;b+="&machine="+ss(a.controller);b+="&user="+ts(a.controller);return xa()+"/api/v1/disk?"+b}
|
||||
function As(a,b,c,d,e,f,g){if(a.C){var h;h="action=read&volume="+a.F;h+="&chs="+a.kb+":"+a.$a+":"+a.Xa+":"+a.ob;h=h+("&addr="+b+":"+c+":"+d+":"+e)+("&machine="+ss(a.controller));h+="&user="+ts(a.controller);wa(xa()+"/api/v1/disk?"+h,null,f,function(h,m,r){h=[b,c,d,e,f,g];var k=!1,t=h[0],z=h[1],D=h[2],N=h[3];if(!r){m=JSON.parse(m);for(k=0;N--;){var P=a.seek(t,z,D,!0);if(!P)break;xs(P,m,k);k+=P.length;D++}k=h[4]}(h=h[5])&&h(r,k)})}else g&&g(-1,!1)}
|
||||
function Bs(a,b,c,d,e,f,g){if(a.C){var h={};a.K=!0;h.action="write";h.volume=a.F;h.chs=a.kb+":"+a.$a+":"+a.Xa+":"+a.ob;h.addr=b+":"+c+":"+d+":"+e;h.machine=ss(a.controller);h.user=ts(a.controller);h.data=JSON.stringify(f);wa(xa()+"/api/v1/disk",h,g,function(f,h,r){var k=[b,c,d,e,g];f=k[0];h=k[1];var m=k[2],z=k[3],k=k[4];a.K=!1;if(0<=f&&f<a.A.length&&0<=h&&h<a.A[f].length)for(--m;0<z--&&0<=m&&m<a.A[f][h].length;m++){var D=a.A[f][h][m];r?Cs(a,D,!1):D.Fa||(D.Mc=D.yc=0)}k&&Ds(a)})}return!1}
|
||||
function Cs(a,b,c){b.Fa=!0;var d=a.G.indexOf(b);0<=d&&(a.G.splice(d,1),a.J.splice(d,1));a.G.push(b);a.J.push(va());c&&Ds(a)}function Ds(a){if(a.G.length){var b=a.J[0]+2E3;a.D&&a.L<b&&(clearTimeout(a.D),a.D=null);if(!a.D){var c=va(),b=b-c;0>b&&(b=0);2E3<b&&(b=2E3);a.D=setTimeout(function(){rs(a,!0)},b);a.L=c+b}}else a.D&&(clearTimeout(a.D),a.D=null)}
|
||||
function rs(a,b){b&&(a.D=null);var c=a.G[0];if(c){for(var d=c.sk,e=c.tk,c=c.sector,f=0,g=[],h=c-1;h<a.A[d][e].length;h++){var k=a.A[d][e][h];if(!k.Fa)break;var m=a.G.indexOf(k);a.G.splice(m,1);a.J.splice(m,1);g=g.concat(Es(k));k.Fa=!1;f++}a=Bs(a,d,e,c,f,g,b);return b||a}return!1}l.info=function(){return this.A.length?[this.A.length,this.A[0].length,this.A[0][0].length,this.A[0][0][0].length]:[0,0,0,0]};
|
||||
l.seek=function(a,b,c,d,e){var f=null,g=this.B,h=this.A[a];if(h){var k=h[b];if(!k&&g.fg&&b<g.$a){k=h[b]=Array(g.wd);for(h=0;h<k.length;h++)k[h]=us(null,a,b,h+1,g.xb,0);this.$a<=b&&(this.$a=b+1)}if(k){for(h=0;h<k.length;h++)if(k[h]&&k[h].sector==c){f=k[h];if(null===f.pattern)if(d)f.pattern=0;else{for(d=1;++h<k.length;)null===k[h].pattern&&d++;As(this,a,b,c,d,!!e,function(a,b){a&&(f=null);e&&e(f,b)});return e?null:f}break}!f&&g.fg&&9==g.bb&&(f=k[h]=us(null,a,b,g.bb,g.xb,0),this.Xa<g.bb&&(this.Xa=g.bb))}}e&&
|
||||
e(f,!1);return f};function xs(a,b,c){for(var d=a.length>>2,e=Array(d),f=0;f<d;f++)e[f]=b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24,c+=4;a.data=e}function Es(a){var b=a.length,c=Array(b),d=0,b=b>>2,e=a.data;a=a.pattern;for(var f=0;f<b;f++){var g=f<e.length?e[f]:a;c[d++]=g&255;c[d++]=g>>8&255;c[d++]=g>>16&255;c[d++]=g>>24&255}return c}l.read=function(a,b){var c=-1;if(a&&b<a.length)var c=a.data,d=b>>2,c=(d<c.length?c[d]:a.pattern)>>((b&3)<<3)&255;return c};
|
||||
l.write=function(a,b,c){if(this.pe)return!1;if(b<a.length){if(c!=this.read(a,b,!0)){var d=a.data,e=a.pattern,f=b>>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.yc?f<a.Mc?(a.yc+=a.Mc-f,a.Mc=f):f>=a.Mc+a.yc&&(a.yc+=f-(a.Mc+a.yc)+1):(a.Mc=f,a.yc=1);d[f]=d[f]&~(255<<b)|c<<b;this.C&&Cs(this,a,!0)}return!0}return null};function Fs(a){for(var b="",c=0,d;d=ys(a,c++);)for(var e=0,f=d.length;e<f;e++)b+=String.fromCharCode(zs(a,d,e));return btoa(b)}
|
||||
l.save=function(){var a=0,b=[];b[a++]=[this.F,this.I,this.kb,this.$a,this.Xa,this.ob];if(!this.C&&!this.pe)for(var c=this.A,d=0;d<c.length;d++)for(var e=0;e<c[d].length;e++)for(var f=0;f<c[d][e].length;f++){var g=c[d][e][f];if(g&&g.yc){for(var h=[],k=0,m=g.Mc,r=g.Mc+g.yc;m<r;)h[k++]=g.data[m++];b[a++]=[d,e,f,g.Mc,h]}}return b};
|
||||
l.restore=function(a){var b=0,c="unsupported restore format";if(a&&0<a.length){var d=0,e=a[d++];e&&2<=e.length&&(!this.A.length&&6<=e.length?ls(this,"local",e[2],e[3],e[4],e[5]):null!=e[0]&&null!=e[1]&&null!=this.I&&e[1]!=this.I&&(c="original checksum ("+e[1]+") differs from current checksum ("+this.I+")",b=-2));for(this.A.length||(b=-1);d<a.length&&0<=b;){var f=0,g=a[d++],h=g[f++],k=g[f++],m=g[f++];if(h>=this.A.length||k>=this.A[h].length||m>=this.A[h][k].length){c="sector (CHS="+h+":"+k+":"+m+") out of range ("+
|
||||
l.restore=function(a){var b=0,c="unsupported restore format";if(a&&0<a.length){var d=0,e=a[d++];e&&2<=e.length&&(!this.A.length&&6<=e.length?qs(this,"local",e[2],e[3],e[4],e[5]):null!=e[0]&&null!=e[1]&&null!=this.I&&e[1]!=this.I&&(c="original checksum ("+e[1]+") differs from current checksum ("+this.I+")",b=-2));for(this.A.length||(b=-1);d<a.length&&0<=b;){var f=0,g=a[d++],h=g[f++],k=g[f++],m=g[f++];if(h>=this.A.length||k>=this.A[h].length||m>=this.A[h][k].length){c="sector (CHS="+h+":"+k+":"+m+") out of range ("+
|
||||
b+" changes applied)";b=-1;break}if(this.pe){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.A[h][k][m]){for(k=h.data.length;k<e;)h.data[k++]=h.pattern;k=0;h.Mc=e;for(h.yc=f.length;e<g;)h.data[e++]=f[k++];b++}}}0>b&&-2!=b&&this.wa("Unable to restore disk '"+this.Pc+": "+c);return b};
|
||||
l.toJSON=function(){var a;a=0;for(var b;b=ts(this,a++);)Bs(b);a=JSON.stringify(this.A,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")};
|
||||
function Bs(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}var ks=0;function Cs(a){u.call(this,"FDC",a);this.dmaRead=Cs.prototype.Uj;this.dmaWrite=Cs.prototype.Vj;this.dmaFormat=Cs.prototype.ik;this.M=Ds(a.autoMount);this.K=a.sortBy||"name";"none"==this.K&&(this.K=null);this.B=[];this.L=!Ea("Mobi")&&window&&"FileReader"in window;this.exports={loadDisk:this.xi,wait:this.rn}}ca(Cs,u);l=Cs.prototype;
|
||||
l.Ab=function(a,b,c){var d=this;switch(b){case "listDisks":this.ia[b]=c;if(this.K){b=[];for(a=0;a<c.options.length;a++)b.push(c.options[a]);b.sort(function(a,b){return"path"!=d.K?a.text.localeCompare(b.text):a.value.localeCompare(b.value)});for(a=0;a<b.length;a++)try{c.options[a]=b[a]}catch(e){break}}c.onchange=function(){Es(d)};return!0;case "descDisk":case "listDrives":return this.ia[b]=c,c.onchange=function(){var a=ia(c.value,10);null!=a&&Fs(d,a)},!0;case "loadDisk":return this.ia[b]=c,c.onclick=
|
||||
function(){d.xi()},!0;case "saveDisk":if(!this.L){c.parentNode.removeChild(c);break}this.ia[b]=c;c.onclick=function(){var a=d.ia.listDrives;a&&a.options&&d.A&&((a=d.A[ia(a.value,10)||0])?(a=a.sa)?(a=Ka(As(a),"octet-stream",!0,a.kh.replace(".json",".img")),q(a)):d.wa("No diskette loaded in drive."):d.wa("No diskette drive selected."))};return!0;case "mountDisk":if(this.L)return this.ia[b]=c,c.onchange=function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length},c.onsubmit=function(a){if(a=
|
||||
a.currentTarget[1].files[0]){var b=a.name;Gs(d,ka(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};l.kc=function(a,b,c,d){this.oa=b;this.R=c;this.Ea=d;this.na=a;this.U=tb(a,"ChipSet");Ds(Fc(this.na,"autoMount"),this.M);Hs(this);ec(b,this,Is);gc(b,this,Js);Ks(this,"None","",!0);this.L&&Ks(this,"Local Disk","?");Ks(this,"Remote Disk","??");Ls(this)||v(this)};
|
||||
function Ds(a,b){if(a){if("string"==typeof a)try{a=eval("("+a+")")}catch(d){q("FDC auto-mount error: "+d.message+" ("+a+")"),a={}}}else a={};for(var c in a)b&&(b[c]=a[c]);return a}
|
||||
l.Rb=function(a,b){if(!b){if(!a){if(this.reset(),this.na.W){this.B=[];for(a=0;a<this.A.length;a++)Ms(this,a,!0);Ls(this,!0)}}else if(!this.restore(a))return!1;if(a=this.ia.listDrives){for(;a.firstChild;)a.removeChild(a.firstChild);a.value="";for(b=0;b<this.N;b++){var c=document.createElement("option");c.value=b;c.text=String.fromCharCode(65+b)+":";a.appendChild(c)}0<this.N&&(a.value="0",Fs(this,0))}}return!0};l.Qb=function(a){return a?this.save():!0};l.reset=function(){Hs(this)};
|
||||
l.save=function(){var a=new Me(this);a.set(0,Ns(this));return a.data()};l.restore=function(a){return Hs(this,a[0])};
|
||||
function Hs(a,b){var c=0,d,e=!0;b||(b=[0,0,Os,Array(9),0,0,0,[]]);a.Na=b[c++];c++;a.Z=b[c++];a.G=b[c++];a.D=b[c++];a.C=b[c++];a.I=b[c++];var f=b[c++];d=b[c++];null!=d&&(a.B=d);void 0===a.A&&(a.N=4,a.U&&(a.N=+bk(a.U,tj,void 0)),a.A=Array(4));for(d=0;d<a.A.length;d++){var g=a.A[d];if(void 0===g){var g=a.A[d]={},h;if(a.U)a:{h=a.U;if(d<+bk(h,tj,void 0)){if(!h.L){h=360;break a}if(d<h.L.length){h=h.L[d];break a}}h=0}else h=0;switch(h){case 160:case 180:g.$a=1;default:g.kb=40;g.Xa=9;break;case 720:g.kb=
|
||||
80;g.Xa=9;break;case 1200:g.kb=80;g.Xa=15;break;case 1440:g.kb=80,g.Xa=18}}var k=a,m=d,r=f[d],y=0;h=!0;g.Na=m;g.Kd=g.le=!1;g.qe=null;r||(r=[Ps,!0,0,2,0]);"boolean"==typeof r[1]&&(r[1]=[Qs,g.kb||40,g.$a||r[3],g.Xa||9,g.ob||512,r[1],g.Kf,g.Pe,g.Qe]);g.lb=r[y++];var t=r[y++];g.name=t[0];g.kb=t[1];g.$a=t[2];g.Xa=t[3];g.ob=t[4];g.me=t[5];(g.Kf=t[6])?(g.Pe=t[7],g.Qe=t[8]):(g.Kf=g.kb,g.Pe=g.$a,g.Qe=g.Xa);g.Wa=r[y++];g.vd=r[y++];g.yb=r[y++];g.vd=100<=g.vd?g.vd-100:g.vd-g.yb;g.bb=r[y++];g.wd=r[y++];g.xb=r[y++];
|
||||
g.Ra=r[y++];g.Va=null;g.sa||(g.Wd="");var z=r[y++];102==z&&(z=!1);"boolean"==typeof z?(t=r[y++],r=r[y],z?(y=k.A[m],Ms(k,m,!0,!0),y.le=!0,m=new js(k,y,"preload"),k.fi(y,m,t,r,!0)):Rs(k,m,t,r,!0)?g.sa&&r&&Ss(k,t,r,g.sa):v(k,!1)):void 0!==z&&g.sa&&0>g.sa.restore(z)&&(h=!1);h&&g.sa&&void 0!==g.Ra&&(g.Va=g.sa.seek(g.yb,g.Wa,g.bb));h||(e=!1)}a.H=b[c++]||0;a.F=b[c]||Ts;return e}
|
||||
function Ns(a){var b=0,c=[];c[b++]=a.Na;c[b++]=0;c[b++]=a.Z;c[b++]=a.G;c[b++]=a.D;c[b++]=a.C;c[b++]=a.I;for(var d=b++,e=0,f=[],g=0;g<a.A.length;g++){var h=e++,k=a.A[g],m=0,r=[];r[m++]=k.lb;r[m++]=[k.name,k.kb,k.$a,k.Xa,k.ob,k.me,k.Kf,k.Pe,k.Qe];r[m++]=k.Wa;r[m++]=k.vd+100;r[m++]=k.yb;r[m++]=k.bb;r[m++]=k.wd;r[m++]=k.xb;r[m++]=k.Ra;r[m++]=k.le;r[m++]=k.Mj;r[m]=k.Wd;f[h]=r}c[d]=f;d=b++;for(e=0;e<a.A.length;e++)f=a.A[e],f.sa&&Us(a,f.Wd,f.sa);c[d]=a.B;c[b++]=a.H;c[b]=a.F;return c}
|
||||
function Ls(a,b){b||(a.J=0);for(var c in a.M){var d=a.M[c],e;if(!(e=d.path))a:{if(e=d.name){var f=a.ia.listDisks;if(f&&f.options)for(var g=0;g<f.options.length;g++){var h=f.options[g];if(h.text==e){e=h.value;break a}}}e=""}e&&(f=c.charCodeAt(0)-65,0<=f&&f<a.A.length?!Rs(a,f,d.name||Vs(a,e)||ka(e,!0),e,!0)&&b&&v(a,!1):a.wa("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")"))}return!!a.J}
|
||||
l.xi=function(){var a=this.ia.listDisks;return a?Gs(this,a.options[a.selectedIndex].text,a.value):!1};
|
||||
function Gs(a,b,c,d){var e,f=a.ia.listDrives;if(f&&!isNaN(e=ia(f.value,10))&&0<=e&&e<a.A.length){if(!c)return Ms(a,e),!0;if("?"==c)return a.wa('Use "Choose File" and "Mount" to select and load a local disk.'),!1;if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return!1;b=ka(c)}for(;0>Rs(a,e,b,c,!1,d);){if(!window.confirm("Click OK to reload the original disk and discard any changes."))return!1;var f=a,g=c,h;for(h=0;h<f.B.length;h++)if(f.B[h][1]==g){f.B.splice(h,1);
|
||||
break}Ms(a,e,!1,!0)}return!0}a.wa("Unable to load the selected drive");return!1}function Rs(a,b,c,d,e,f){var g=a.A[b];if(d&&(d=d.replace("/disks/pc/","/disks/pcx86/"),g.Wd.toLowerCase()!=d.toLowerCase())){Ms(a,b,e,!0);if(g.Kd)return a.wa("Drive "+b+" busy"),0;g.Kd=!0;e&&(g.Jd=!0,a.J++);g.le=!!f;return(new js(a,g,"preload")).load(c,d,f,a.fi)?1:0}return-1}
|
||||
l.fi=function(a,b,c,d,e){var f;a.Kd=!1;b&&(f=b.info(),b&&f[0]>a.kb||f[1]>a.$a)&&(this.wa('Diskette "'+c+'" too large for drive '+String.fromCharCode(65+a.Na)),b=null);b?(a.sa=b,a.Mj=c,a.Wd=d,Vs(this,d)||Ks(this,c,d),Ss(this,c,d,b),f=b.info(),this.H|=Ws,a.qe||this.wa('Mounted diskette "'+c+'" in drive '+String.fromCharCode(65+a.Na),a.Jd||e),a.Kf=f[0],a.Pe=f[1],a.Qe=f[2],this.na&&Tc(this.na)):a.le=!1;a.Jd&&(a.Jd=!1,--this.J||v(this));Fs(this,a.Na);a.qe&&(a.qe(),a.qe=null)};
|
||||
function Ks(a,b,c,d){if((a=a.ia.listDisks)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}function Vs(a,b){if((a=a.ia.listDisks)&&a.options)for(var c=0;c<a.options.length;c++){var d=a.options[c];if(d.value==b)return d.text}return null}
|
||||
function Fs(a,b){if(0<=b&&b<a.A.length){var c=a.A[b],d=a.ia.listDisks;a=a.ia.listDrives;if(d&&a&&d.options&&a.options&&(a=ia(a.value,10),c=c.le?"?":c.Wd,!isNaN(a)&&a==b)){for(b=0;b<d.options.length;b++)if(d.options[b].value==c){d.selectedIndex!=b&&(d.selectedIndex=b);break}b==d.options.length&&(d.selectedIndex=0)}}}
|
||||
function Es(a){var b=a.ia.listDisks,c=a.ia.descDisk,d=b.options[b.selectedIndex];if(c&&d){b={};if(d=d.getAttribute("data-value"))try{b=eval("("+d+")")}catch(e){q(a.type+" option error: "+e.message)}a=b.desc;void 0===a&&(a="");b=b.href;void 0!==b&&(a='<a href="'+b+'" target="_blank">'+a+"</a>");c.innerHTML=a}}l.rn=function(a){for(var b=0;b<this.A.length;b++){var c=this.A[b];if(c&&c.Kd)return c.qe||(c.qe=a),!1}return!0};
|
||||
function Ms(a,b,c,d){var e=a.A[b];e.sa&&(Us(a,e.Wd,e.sa),e.Mj="",e.Wd="",e.sa=null,e.le=!1,a.H|=Ws,d||a.wa("Drive "+String.fromCharCode(65+b)+" unloaded",c),c||d||Fs(a,b))}function Ss(a,b,c,d){var e;for(e=0;e<a.B.length;e++)if(a.B[e][1]==c){d.restore(a.B[e][2]);return}a.B[e]=[b,c,[]]}function Us(a,b,c){var d;for(d=0;d<a.B.length;d++)if(a.B[d][1]==b){a.B[d][2]=c.save();break}}l.sm=function(a,b){b&Xs?this.I&Xs||this.I&Ys&&this.U&&Ff(this.U,6):Hs(this);this.I=b};l.Vk=function(){return 80};l.Xk=function(){return this.Z};
|
||||
l.Uk=function(){var a=0;this.D<this.C&&(a=this.G[this.D]);this.I&Ys&&this.U&&Df(this.U,6);++this.D>=this.C&&(this.Z&=~(Zs|$s),this.D=this.C=0);return a};
|
||||
l.rm=function(a,b){this.C<this.G.length&&(this.G[this.C++]=b);a=this.G[0]&at;if(void 0!==bt[a]&&this.C>=bt[a].fd){b=!1;this.D=0;a=ct(this);var c,d,e,f,g,h=a&at;switch(h){case dt:ct(this);ct(this);et(this);break;case ft:d=ct(this);this.Na=d&3;c=this.A[this.Na];et(this);gt(this,(c.lb&ht)>>>24);break;case it:case jt:d=ct(this);b=d>>2&1;this.Na=d&3;c=this.A[this.Na];c.Wa=b;d=c.yb=ct(this);e=ct(this);f=c.bb=ct(this);g=ct(this);c.xb=128<<g;c.wd=ct(this);ct(this);ct(this);h==jt?(h=c,h.lb=kt|lt,h.sa&&(h.Va=
|
||||
null,h.lb=mt,this.U&&(ul(this.U,2,this,"dmaRead",h),ql(this.U,2)))):(h=c,h.lb=kt|lt,h.sa&&(h.sa.pe?h.lb=nt|lt:(h.Va=null,h.lb=mt,this.U&&(ul(this.U,2,this,"dmaWrite",h),ql(this.U,2)))));ot(this,c,a,b,d,e,f,g);b=!0;break;case pt:d=ct(this);this.Na=d&3;c=this.A[this.Na];c.yb=c.vd=0;c.lb=qt|rt;et(this);b=!0;break;case st:c=this.A[this.Na];c.Wa=0;et(this);gt(this,c.Na|c.Wa<<2|c.lb&tt);gt(this,c.yb);this.Na=this.Na+1&3;break;case ut:d=ct(this);b=d>>2&1;this.Na=d&3;c=this.A[this.Na];d=c.yb;e=c.Wa=b;f=c.bb=
|
||||
1;g=0;c.lb=mt;c.sa&&(c.Va=c.sa.seek(c.yb,c.Wa,c.bb))?g=c.Va.length>>8:c.lb=kt|lt;ot(this,c,a,b,d,e,f,g);b=!0;break;case vt:d=ct(this);b=d>>2&1;this.Na=d&3;c=this.A[this.Na];d=c.yb;e=c.Wa=b;f=1;g=ct(this);c.xb=128<<g;c.wd=ct(this);ct(this);c.Xh=ct(this);h=c;h.lb=kt|lt;h.sa&&(h.Va=null,h.lb=mt,this.U&&(h.he=0,h.Gc=Array(4),h.fg=!0,h.vf=0,ul(this.U,2,this,"dmaFormat",h),ql(this.U,2),h.fg=!1));ot(this,c,a,b,d,e,f,g);b=!0;break;case wt:d=ct(this),this.Na=d&3,c=this.A[this.Na],c.Wa=d>>2&1,d=ct(this),c.yb+=
|
||||
d-c.vd,0>c.yb&&(c.yb=0),c.yb>=c.kb&&(c.yb=c.kb-1),c.vd=d,c.lb=qt,c.yb||(c.lb|=rt),et(this),b=!0}0<this.C&&(this.Z=this.Z|Zs|$s);this.I&Ys&&(!c||c.lb&kt||!b||this.U&&Ff(this.U,6))}};l.Wk=function(){var a=this.H;this.H&=~Ws;return a};l.qm=function(a,b){this.F=b};function ot(a,b,c,d,e,f,g,h){et(a);gt(a,b.Na|b.Wa<<2|b.lb&tt);gt(a,(b.lb&xt)>>>8);gt(a,(b.lb&yt)>>>16);var k=0;if(e!=b.yb||f!=b.Wa)k=g=1;c&zt&&(f^=k,d||(k=0));gt(a,e+k);gt(a,f);gt(a,g);gt(a,h)}function ct(a){var b=a.G[a.D];a.D++;return b}
|
||||
function et(a){a.D=a.C=0}function gt(a,b){a.G[a.C++]=b}l.Uj=function(a,b,c){void 0===b||0>b?this.ve(a,c):c(-1,!1)};l.Vj=function(a,b){return void 0!==b&&0<=b?At(a,b):-1};l.ik=function(a,b){if(void 0!==b&&0<=b)a:if(a.lb)a=-1;else{a.Gc[a.he++]=b;if(a.he==a.Gc.length){a.yb=a.Gc[0];a.Wa=a.Gc[1];a.bb=a.Gc[2];a.xb=128<<a.Gc[3];for(var c=a.he=0;c<a.xb;c++)if(0>At(a,a.Xh)){a=-1;break a}a.vf++}a.vf>=a.wd&&(b=-1);a=b}else a=-1;return a};
|
||||
l.ve=function(a,b){var c=-1,d=null,e=0;if(!a.lb&&a.sa){do{if(a.Va&&(e=a.Ra,0<=(c=a.sa.read(a.Va,a.Ra++)))){d=a.Va;break}a.Va=a.sa.seek(a.yb,a.Wa,a.bb);if(!a.Va){a.lb=Bt|lt;break}a.Ra=0;Ct(a)}while(1)}b(c,!1,d,e)};function At(a,b){if(a.lb||!a.sa)return-1;do{if(a.Va&&a.sa.write(a.Va,a.Ra++,b))break;a.Va=a.sa.seek(a.yb,a.Wa,a.bb);if(!a.Va){a.lb=Dt|lt;b=-1;break}a.Ra=0;Ct(a)}while(1);return b}function Ct(a){a.bb++;a.bb>=a.Qe+1&&(a.bb=1,a.Wa++,a.Wa>=a.Pe&&(a.Wa=0,a.yb++))}
|
||||
var Qs="Floppy Drive",Xs=4,Ys=8,$s=16,Zs=64,Os=128,dt=3,ft=4,it=5,jt=6,pt=7,st=8,ut=10,vt=13,wt=15,at=31,zt=128,mt=0,kt=8,qt=32,lt=64,Ps=192,tt=255,nt=512,Bt=1024,Dt=8192,xt=65280,yt=16711680,rt=268435456,ht=-16777216,Ws=128,Ts=0;ba={};
|
||||
var bt={3:{fd:3,xd:0,name:ba.yo},4:{fd:2,xd:1,name:ba.wo},5:{fd:9,xd:7,name:ba.Do},6:{fd:9,xd:7,name:ba.so},7:{fd:2,xd:0,name:ba.uo},8:{fd:1,xd:2,name:ba.xo},10:{fd:2,xd:7,name:ba.to},13:{fd:6,xd:7,name:ba.oo},15:{fd:3,xd:0,name:ba.vo}},Is={1009:Cs.prototype.Vk,1012:Cs.prototype.Xk,1013:Cs.prototype.Uk,1015:Cs.prototype.Wk},Js={1010:Cs.prototype.sm,1013:Cs.prototype.rm,1015:Cs.prototype.qm};
|
||||
Ma(function(){for(var a=cb(document,"pcx86","fdc"),b=0;b<a.length;b++){var c=a[b],d=db(c),d=new Cs(d);bb(d,c)}});function Z(a){u.call(this,"HDC",a);this.dmaRead=Z.prototype.Wj;this.dmaWrite=Z.prototype.Xj;this.dmaWriteBuffer=Z.prototype.jk;this.dmaWriteFormat=Z.prototype.kk;this.Y=[];this.ja=a.drives;this.L="at"==a.type;this.ua=!Ea("Mobi")&&window&&"FileReader"in window}ca(Z,u);l=Z.prototype;
|
||||
l.Ab=function(a,b,c){var d=this;switch(b){case "saveHD0":case "saveHD1":if(this.ua)return this.ia[b]=c,c.onclick=function(a){return function(){var b=d.A&&d.A[a];if(b&&b.sa){var b=b.sa,c=b.kh||b.Pc,e=c.lastIndexOf(".");0<=e&&(c=c.substr(0,e));c+=".img";b=Ka(As(b),"octet-stream",!0,c);q(b)}else d.wa("Hard drive "+a+" is not available.")}}(+b.slice(-1)),!0;c.parentNode.removeChild(c)}return!1};
|
||||
l.kc=function(a,b,c,d){this.oa=b;this.R=c;this.Ea=d;this.na=a;if(d=Fc(a,"drives"))this.Y=d;else if(this.ja)try{this.Y=eval("("+this.ja+")")}catch(e){q("HDC drive configuration error: "+e.message+" ("+this.ja+")")}this.U=tb(a,"ChipSet");this.F=0;this.la=3;ec(b,this,this.L?Et:Ft);gc(b,this,this.L?Gt:Ht);this.L&&(this.F++,this.U&&this.U.ca==Hj&&this.F++,this.la=2,b.L[It]=2,b.M[It]=2);Ie(c,19,this.zl.bind(this));Ie(c,64,this.Al.bind(this));this.reset();Jt(this)||v(this)};
|
||||
l.Rb=function(a,b){if(!b)if(!a)Kt(this),this.na.W&&Jt(this,!0);else if(!this.restore(a))return!1;return!0};l.Qb=function(a){return a?this.save():!0};function ns(a){return a.na?a.na.ra:""}function os(a){return a.na?a.na.B||"":""}l.reset=function(){Kt(this,null,!0)};l.save=function(){var a=new Me(this);a.set(0,Lt(this));return a.data()};l.restore=function(a){return Kt(this,a[0])};
|
||||
function Kt(a,b,c){var d=0,e=!0;a.Na=-1;if(a.L){if(b||(b=[0,0,0,0,0,0,0,Mt,0,[0,-1]]),a.H=b[d++],a.ra=b[d++],a.I=b[d++],a.da=b[d++],a.ba=b[d++],a.aa=b[d++],a.N=b[d++],a.Z=b[d++],a.fa=b[d++],a.K=b[d++],"object"==typeof a.K){var f=a.K;a.K=f[0];a.Na=f[1]}}else b||(b=[0,Nt,Array(14),0,0]),a.W=b[d++],a.Z=b[d++],a.G=b[d++],a.D=b[d++],a.C=b[d++],a.pa=b[d++],a.ma=b[d++],a.qa=b[d++],f=b[d++],void 0!==f?a.M=f:void 0===a.M&&(a.M=-1);void 0===a.A&&(a.A=Array(a.Y.length));b=b[d];void 0===b&&(b=[]);for(d=0;d<a.A.length;d++){void 0===
|
||||
a.A[d]&&(a.A[d]={});var f=a.A[d],g=a,h=d,k=f,m=a.Y[d],r=b[d],y=c,t=0,z=!0;r||(r=[Ot,0,!1,Array(8)]);k.Na=h;k.errorCode=r[t++];k.Nj=r[t++];k.me=r[t++];k.ce=r[t++];k.de=r[t++];k.Wa=r[t++];k.$a=r[t++];k.Dd=r[t++];k.bb=r[t++];k.wd=r[t++];k.xb=r[t++];k.uf=g.L?0:1;k.name=m.name;void 0===k.name&&(k.name=Pt);k.path=m.path;k.mode=m.mode||(k.path?"preload":"local");"demandro"!=k.mode&&"demandrw"!=k.mode||os(g)||(k.mode="local");k.type=m.type;if(void 0===k.type||void 0===Qt[g.F][k.type])k.type=g.la;m=Qt[g.F][k.type];
|
||||
k.Xa=m[2]||17;k.ob=m[3]||512;if(y&&g.U){var m=g.U,D=k.type;if(m.A){var y=null,N=m.A[18];15<D&&(y=D,D=15);h?(N=N&240|D,D=26):(N=N&15|D<<4,D=25);var P=m;P.A&&(P.A[18]=N,uk(P));null!=y&&m.A&&(m.A[D]=y,uk(m))}}void 0===k.sa&&(k.sa=null,g.wa("Type "+k.type+' "'+k.name+'" is fixed disk '+h,!0));Tt(g,k);k.Ra=r[t++];k.Va=null;k.sa&&(g=r[t],void 0!==g&&0>k.sa.restore(g)&&(z=!1),z&&void 0!==k.Ra&&(k.Va=k.sa.seek(k.Dd,k.Wa,k.bb+k.uf)));z||(e=!1);null!=a.W&&1>=d&&(a.W|=(f.type&3)<<(1-d<<1))}0<=a.Na&&(a.B=a.A[a.Na]);
|
||||
l.toJSON=function(){var a;a=0;for(var b;b=ys(this,a++);)Gs(b);a=JSON.stringify(this.A,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")};
|
||||
function Gs(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}var ps=0;function Hs(a){u.call(this,"FDC",a);this.dmaRead=Hs.prototype.Uj;this.dmaWrite=Hs.prototype.Vj;this.dmaFormat=Hs.prototype.ik;this.M=Is(a.autoMount);this.K=a.sortBy||"name";"none"==this.K&&(this.K=null);this.B=[];this.L=!Ea("Mobi")&&window&&"FileReader"in window;this.exports={loadDisk:this.xi,wait:this.zn}}ca(Hs,u);l=Hs.prototype;
|
||||
l.Ab=function(a,b,c){var d=this;switch(b){case "listDisks":this.ia[b]=c;if(this.K){b=[];for(a=0;a<c.options.length;a++)b.push(c.options[a]);b.sort(function(a,b){return"path"!=d.K?a.text.localeCompare(b.text):a.value.localeCompare(b.value)});for(a=0;a<b.length;a++)try{c.options[a]=b[a]}catch(e){break}}c.onchange=function(){Js(d)};return!0;case "descDisk":case "listDrives":return this.ia[b]=c,c.onchange=function(){var a=ia(c.value,10);null!=a&&Ks(d,a)},!0;case "loadDisk":return this.ia[b]=c,c.onclick=
|
||||
function(){d.xi()},!0;case "saveDisk":if(!this.L){c.parentNode.removeChild(c);break}this.ia[b]=c;c.onclick=function(){var a=d.ia.listDrives;a&&a.options&&d.A&&((a=d.A[ia(a.value,10)||0])?(a=a.sa)?(a=Ka(Fs(a),"octet-stream",!0,a.kh.replace(".json",".img")),q(a)):d.wa("No diskette loaded in drive."):d.wa("No diskette drive selected."))};return!0;case "mountDisk":if(this.L)return this.ia[b]=c,c.onchange=function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length},c.onsubmit=function(a){if(a=
|
||||
a.currentTarget[1].files[0]){var b=a.name;Ls(d,ka(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};l.kc=function(a,b,c,d){this.oa=b;this.R=c;this.Ea=d;this.na=a;this.U=tb(a,"ChipSet");Is(Fc(this.na,"autoMount"),this.M);Ms(this);ec(b,this,Ns);gc(b,this,Os);Ps(this,"None","",!0);this.L&&Ps(this,"Local Disk","?");Ps(this,"Remote Disk","??");Qs(this)||v(this)};
|
||||
function Is(a,b){if(a){if("string"==typeof a)try{a=eval("("+a+")")}catch(d){q("FDC auto-mount error: "+d.message+" ("+a+")"),a={}}}else a={};for(var c in a)b&&(b[c]=a[c]);return a}
|
||||
l.Rb=function(a,b){if(!b){if(!a){if(this.reset(),this.na.W){this.B=[];for(a=0;a<this.A.length;a++)Rs(this,a,!0);Qs(this,!0)}}else if(!this.restore(a))return!1;if(a=this.ia.listDrives){for(;a.firstChild;)a.removeChild(a.firstChild);a.value="";for(b=0;b<this.N;b++){var c=document.createElement("option");c.value=b;c.text=String.fromCharCode(65+b)+":";a.appendChild(c)}0<this.N&&(a.value="0",Ks(this,0))}}return!0};l.Qb=function(a){return a?this.save():!0};l.reset=function(){Ms(this)};
|
||||
l.save=function(){var a=new Me(this);a.set(0,Ss(this));return a.data()};l.restore=function(a){return Ms(this,a[0])};
|
||||
function Ms(a,b){var c=0,d,e=!0;b||(b=[0,0,Ts,Array(9),0,0,0,[]]);a.Na=b[c++];c++;a.Z=b[c++];a.G=b[c++];a.D=b[c++];a.C=b[c++];a.I=b[c++];var f=b[c++];d=b[c++];null!=d&&(a.B=d);void 0===a.A&&(a.N=4,a.U&&(a.N=+bk(a.U,tj,void 0)),a.A=Array(4));for(d=0;d<a.A.length;d++){var g=a.A[d];if(void 0===g){var g=a.A[d]={},h;if(a.U)a:{h=a.U;if(d<+bk(h,tj,void 0)){if(!h.L){h=360;break a}if(d<h.L.length){h=h.L[d];break a}}h=0}else h=0;switch(h){case 160:case 180:g.$a=1;default:g.kb=40;g.Xa=9;break;case 720:g.kb=
|
||||
80;g.Xa=9;break;case 1200:g.kb=80;g.Xa=15;break;case 1440:g.kb=80,g.Xa=18}}var k=a,m=d,r=f[d],y=0;h=!0;g.Na=m;g.Kd=g.le=!1;g.qe=null;r||(r=[Us,!0,0,2,0]);"boolean"==typeof r[1]&&(r[1]=[Vs,g.kb||40,g.$a||r[3],g.Xa||9,g.ob||512,r[1],g.Kf,g.Pe,g.Qe]);g.lb=r[y++];var t=r[y++];g.name=t[0];g.kb=t[1];g.$a=t[2];g.Xa=t[3];g.ob=t[4];g.me=t[5];(g.Kf=t[6])?(g.Pe=t[7],g.Qe=t[8]):(g.Kf=g.kb,g.Pe=g.$a,g.Qe=g.Xa);g.Wa=r[y++];g.vd=r[y++];g.yb=r[y++];g.vd=100<=g.vd?g.vd-100:g.vd-g.yb;g.bb=r[y++];g.wd=r[y++];g.xb=r[y++];
|
||||
g.Ra=r[y++];g.Va=null;g.sa||(g.Wd="");var z=r[y++];102==z&&(z=!1);"boolean"==typeof z?(t=r[y++],r=r[y],z?(y=k.A[m],Rs(k,m,!0,!0),y.le=!0,m=new os(k,y,"preload"),k.fi(y,m,t,r,!0)):Ws(k,m,t,r,!0)?g.sa&&r&&Xs(k,t,r,g.sa):v(k,!1)):void 0!==z&&g.sa&&0>g.sa.restore(z)&&(h=!1);h&&g.sa&&void 0!==g.Ra&&(g.Va=g.sa.seek(g.yb,g.Wa,g.bb));h||(e=!1)}a.H=b[c++]||0;a.F=b[c]||Ys;return e}
|
||||
function Ss(a){var b=0,c=[];c[b++]=a.Na;c[b++]=0;c[b++]=a.Z;c[b++]=a.G;c[b++]=a.D;c[b++]=a.C;c[b++]=a.I;for(var d=b++,e=0,f=[],g=0;g<a.A.length;g++){var h=e++,k=a.A[g],m=0,r=[];r[m++]=k.lb;r[m++]=[k.name,k.kb,k.$a,k.Xa,k.ob,k.me,k.Kf,k.Pe,k.Qe];r[m++]=k.Wa;r[m++]=k.vd+100;r[m++]=k.yb;r[m++]=k.bb;r[m++]=k.wd;r[m++]=k.xb;r[m++]=k.Ra;r[m++]=k.le;r[m++]=k.Mj;r[m]=k.Wd;f[h]=r}c[d]=f;d=b++;for(e=0;e<a.A.length;e++)f=a.A[e],f.sa&&Zs(a,f.Wd,f.sa);c[d]=a.B;c[b++]=a.H;c[b]=a.F;return c}
|
||||
function Qs(a,b){b||(a.J=0);for(var c in a.M){var d=a.M[c],e;if(!(e=d.path))a:{if(e=d.name){var f=a.ia.listDisks;if(f&&f.options)for(var g=0;g<f.options.length;g++){var h=f.options[g];if(h.text==e){e=h.value;break a}}}e=""}e&&(f=c.charCodeAt(0)-65,0<=f&&f<a.A.length?!Ws(a,f,d.name||$s(a,e)||ka(e,!0),e,!0)&&b&&v(a,!1):a.wa("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")"))}return!!a.J}
|
||||
l.xi=function(){var a=this.ia.listDisks;return a?Ls(this,a.options[a.selectedIndex].text,a.value):!1};
|
||||
function Ls(a,b,c,d){var e,f=a.ia.listDrives;if(f&&!isNaN(e=ia(f.value,10))&&0<=e&&e<a.A.length){if(!c)return Rs(a,e),!0;if("?"==c)return a.wa('Use "Choose File" and "Mount" to select and load a local disk.'),!1;if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return!1;b=ka(c)}for(;0>Ws(a,e,b,c,!1,d);){if(!window.confirm("Click OK to reload the original disk and discard any changes."))return!1;var f=a,g=c,h;for(h=0;h<f.B.length;h++)if(f.B[h][1]==g){f.B.splice(h,1);
|
||||
break}Rs(a,e,!1,!0)}return!0}a.wa("Unable to load the selected drive");return!1}function Ws(a,b,c,d,e,f){var g=a.A[b];if(d&&(d=d.replace("/disks/pc/","/disks/pcx86/"),g.Wd.toLowerCase()!=d.toLowerCase())){Rs(a,b,e,!0);if(g.Kd)return a.wa("Drive "+b+" busy"),0;g.Kd=!0;e&&(g.Jd=!0,a.J++);g.le=!!f;return(new os(a,g,"preload")).load(c,d,f,a.fi)?1:0}return-1}
|
||||
l.fi=function(a,b,c,d,e){var f;a.Kd=!1;b&&(f=b.info(),b&&f[0]>a.kb||f[1]>a.$a)&&(this.wa('Diskette "'+c+'" too large for drive '+String.fromCharCode(65+a.Na)),b=null);b?(a.sa=b,a.Mj=c,a.Wd=d,$s(this,d)||Ps(this,c,d),Xs(this,c,d,b),f=b.info(),this.H|=at,a.qe||this.wa('Mounted diskette "'+c+'" in drive '+String.fromCharCode(65+a.Na),a.Jd||e),a.Kf=f[0],a.Pe=f[1],a.Qe=f[2],this.na&&Tc(this.na)):a.le=!1;a.Jd&&(a.Jd=!1,--this.J||v(this));Ks(this,a.Na);a.qe&&(a.qe(),a.qe=null)};
|
||||
function Ps(a,b,c,d){if((a=a.ia.listDisks)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}function $s(a,b){if((a=a.ia.listDisks)&&a.options)for(var c=0;c<a.options.length;c++){var d=a.options[c];if(d.value==b)return d.text}return null}
|
||||
function Ks(a,b){if(0<=b&&b<a.A.length){var c=a.A[b],d=a.ia.listDisks;a=a.ia.listDrives;if(d&&a&&d.options&&a.options&&(a=ia(a.value,10),c=c.le?"?":c.Wd,!isNaN(a)&&a==b)){for(b=0;b<d.options.length;b++)if(d.options[b].value==c){d.selectedIndex!=b&&(d.selectedIndex=b);break}b==d.options.length&&(d.selectedIndex=0)}}}
|
||||
function Js(a){var b=a.ia.listDisks,c=a.ia.descDisk,d=b.options[b.selectedIndex];if(c&&d){b={};if(d=d.getAttribute("data-value"))try{b=eval("("+d+")")}catch(e){q(a.type+" option error: "+e.message)}a=b.desc;void 0===a&&(a="");b=b.href;void 0!==b&&(a='<a href="'+b+'" target="_blank">'+a+"</a>");c.innerHTML=a}}l.zn=function(a){for(var b=0;b<this.A.length;b++){var c=this.A[b];if(c&&c.Kd)return c.qe||(c.qe=a),!1}return!0};
|
||||
function Rs(a,b,c,d){var e=a.A[b];e.sa&&(Zs(a,e.Wd,e.sa),e.Mj="",e.Wd="",e.sa=null,e.le=!1,a.H|=at,d||a.wa("Drive "+String.fromCharCode(65+b)+" unloaded",c),c||d||Ks(a,b))}function Xs(a,b,c,d){var e;for(e=0;e<a.B.length;e++)if(a.B[e][1]==c){d.restore(a.B[e][2]);return}a.B[e]=[b,c,[]]}function Zs(a,b,c){var d;for(d=0;d<a.B.length;d++)if(a.B[d][1]==b){a.B[d][2]=c.save();break}}l.Am=function(a,b){b&bt?this.I&bt||this.I&ct&&this.U&&Ff(this.U,6):Ms(this);this.I=b};l.Zk=function(){return 80};l.al=function(){return this.Z};
|
||||
l.Yk=function(){var a=0;this.D<this.C&&(a=this.G[this.D]);this.I&ct&&this.U&&Df(this.U,6);++this.D>=this.C&&(this.Z&=~(dt|et),this.D=this.C=0);return a};
|
||||
l.zm=function(a,b){this.C<this.G.length&&(this.G[this.C++]=b);a=this.G[0]&ft;if(void 0!==gt[a]&&this.C>=gt[a].fd){b=!1;this.D=0;a=ht(this);var c,d,e,f,g,h=a&ft;switch(h){case it:ht(this);ht(this);jt(this);break;case kt:d=ht(this);this.Na=d&3;c=this.A[this.Na];jt(this);lt(this,(c.lb&mt)>>>24);break;case nt:case ot:d=ht(this);b=d>>2&1;this.Na=d&3;c=this.A[this.Na];c.Wa=b;d=c.yb=ht(this);e=ht(this);f=c.bb=ht(this);g=ht(this);c.xb=128<<g;c.wd=ht(this);ht(this);ht(this);h==ot?(h=c,h.lb=pt|qt,h.sa&&(h.Va=
|
||||
null,h.lb=rt,this.U&&(ul(this.U,2,this,"dmaRead",h),ql(this.U,2)))):(h=c,h.lb=pt|qt,h.sa&&(h.sa.pe?h.lb=st|qt:(h.Va=null,h.lb=rt,this.U&&(ul(this.U,2,this,"dmaWrite",h),ql(this.U,2)))));tt(this,c,a,b,d,e,f,g);b=!0;break;case ut:d=ht(this);this.Na=d&3;c=this.A[this.Na];c.yb=c.vd=0;c.lb=vt|wt;jt(this);b=!0;break;case xt:c=this.A[this.Na];c.Wa=0;jt(this);lt(this,c.Na|c.Wa<<2|c.lb&yt);lt(this,c.yb);this.Na=this.Na+1&3;break;case zt:d=ht(this);b=d>>2&1;this.Na=d&3;c=this.A[this.Na];d=c.yb;e=c.Wa=b;f=c.bb=
|
||||
1;g=0;c.lb=rt;c.sa&&(c.Va=c.sa.seek(c.yb,c.Wa,c.bb))?g=c.Va.length>>8:c.lb=pt|qt;tt(this,c,a,b,d,e,f,g);b=!0;break;case At:d=ht(this);b=d>>2&1;this.Na=d&3;c=this.A[this.Na];d=c.yb;e=c.Wa=b;f=1;g=ht(this);c.xb=128<<g;c.wd=ht(this);ht(this);c.Xh=ht(this);h=c;h.lb=pt|qt;h.sa&&(h.Va=null,h.lb=rt,this.U&&(h.he=0,h.Gc=Array(4),h.fg=!0,h.vf=0,ul(this.U,2,this,"dmaFormat",h),ql(this.U,2),h.fg=!1));tt(this,c,a,b,d,e,f,g);b=!0;break;case Bt:d=ht(this),this.Na=d&3,c=this.A[this.Na],c.Wa=d>>2&1,d=ht(this),c.yb+=
|
||||
d-c.vd,0>c.yb&&(c.yb=0),c.yb>=c.kb&&(c.yb=c.kb-1),c.vd=d,c.lb=vt,c.yb||(c.lb|=wt),jt(this),b=!0}0<this.C&&(this.Z=this.Z|dt|et);this.I&ct&&(!c||c.lb&pt||!b||this.U&&Ff(this.U,6))}};l.$k=function(){var a=this.H;this.H&=~at;return a};l.ym=function(a,b){this.F=b};function tt(a,b,c,d,e,f,g,h){jt(a);lt(a,b.Na|b.Wa<<2|b.lb&yt);lt(a,(b.lb&Ct)>>>8);lt(a,(b.lb&Dt)>>>16);var k=0;if(e!=b.yb||f!=b.Wa)k=g=1;c&Et&&(f^=k,d||(k=0));lt(a,e+k);lt(a,f);lt(a,g);lt(a,h)}function ht(a){var b=a.G[a.D];a.D++;return b}
|
||||
function jt(a){a.D=a.C=0}function lt(a,b){a.G[a.C++]=b}l.Uj=function(a,b,c){void 0===b||0>b?this.ve(a,c):c(-1,!1)};l.Vj=function(a,b){return void 0!==b&&0<=b?Ft(a,b):-1};l.ik=function(a,b){if(void 0!==b&&0<=b)a:if(a.lb)a=-1;else{a.Gc[a.he++]=b;if(a.he==a.Gc.length){a.yb=a.Gc[0];a.Wa=a.Gc[1];a.bb=a.Gc[2];a.xb=128<<a.Gc[3];for(var c=a.he=0;c<a.xb;c++)if(0>Ft(a,a.Xh)){a=-1;break a}a.vf++}a.vf>=a.wd&&(b=-1);a=b}else a=-1;return a};
|
||||
l.ve=function(a,b){var c=-1,d=null,e=0;if(!a.lb&&a.sa){do{if(a.Va&&(e=a.Ra,0<=(c=a.sa.read(a.Va,a.Ra++)))){d=a.Va;break}a.Va=a.sa.seek(a.yb,a.Wa,a.bb);if(!a.Va){a.lb=Gt|qt;break}a.Ra=0;Ht(a)}while(1)}b(c,!1,d,e)};function Ft(a,b){if(a.lb||!a.sa)return-1;do{if(a.Va&&a.sa.write(a.Va,a.Ra++,b))break;a.Va=a.sa.seek(a.yb,a.Wa,a.bb);if(!a.Va){a.lb=It|qt;b=-1;break}a.Ra=0;Ht(a)}while(1);return b}function Ht(a){a.bb++;a.bb>=a.Qe+1&&(a.bb=1,a.Wa++,a.Wa>=a.Pe&&(a.Wa=0,a.yb++))}
|
||||
var Vs="Floppy Drive",bt=4,ct=8,et=16,dt=64,Ts=128,it=3,kt=4,nt=5,ot=6,ut=7,xt=8,zt=10,At=13,Bt=15,ft=31,Et=128,rt=0,pt=8,vt=32,qt=64,Us=192,yt=255,st=512,Gt=1024,It=8192,Ct=65280,Dt=16711680,wt=268435456,mt=-16777216,at=128,Ys=0;ba={};
|
||||
var gt={3:{fd:3,xd:0,name:ba.Go},4:{fd:2,xd:1,name:ba.Eo},5:{fd:9,xd:7,name:ba.Lo},6:{fd:9,xd:7,name:ba.Ao},7:{fd:2,xd:0,name:ba.Co},8:{fd:1,xd:2,name:ba.Fo},10:{fd:2,xd:7,name:ba.Bo},13:{fd:6,xd:7,name:ba.wo},15:{fd:3,xd:0,name:ba.Do}},Ns={1009:Hs.prototype.Zk,1012:Hs.prototype.al,1013:Hs.prototype.Yk,1015:Hs.prototype.$k},Os={1010:Hs.prototype.Am,1013:Hs.prototype.zm,1015:Hs.prototype.ym};
|
||||
Ma(function(){for(var a=cb(document,"pcx86","fdc"),b=0;b<a.length;b++){var c=a[b],d=db(c),d=new Hs(d);bb(d,c)}});function Z(a){u.call(this,"HDC",a);this.dmaRead=Z.prototype.Wj;this.dmaWrite=Z.prototype.Xj;this.dmaWriteBuffer=Z.prototype.jk;this.dmaWriteFormat=Z.prototype.kk;this.X=[];this.ja=a.drives;this.L="at"==a.type;this.ua=!Ea("Mobi")&&window&&"FileReader"in window}ca(Z,u);l=Z.prototype;
|
||||
l.Ab=function(a,b,c){var d=this;switch(b){case "saveHD0":case "saveHD1":if(this.ua)return this.ia[b]=c,c.onclick=function(a){return function(){var b=d.A&&d.A[a];if(b&&b.sa){var b=b.sa,c=b.kh||b.Pc,e=c.lastIndexOf(".");0<=e&&(c=c.substr(0,e));c+=".img";b=Ka(Fs(b),"octet-stream",!0,c);q(b)}else d.wa("Hard drive "+a+" is not available.")}}(+b.slice(-1)),!0;c.parentNode.removeChild(c)}return!1};
|
||||
l.kc=function(a,b,c,d){this.oa=b;this.R=c;this.Ea=d;this.na=a;if(d=Fc(a,"drives"))this.X=d;else if(this.ja)try{this.X=eval("("+this.ja+")")}catch(e){q("HDC drive configuration error: "+e.message+" ("+this.ja+")")}this.U=tb(a,"ChipSet");this.F=0;this.la=3;ec(b,this,this.L?Jt:Kt);gc(b,this,this.L?Lt:Mt);this.L&&(this.F++,this.U&&this.U.ca==Hj&&this.F++,this.la=2,b.L[Nt]=2,b.M[Nt]=2);Ie(c,19,this.Dl.bind(this));Ie(c,64,this.El.bind(this));this.reset();Ot(this)||v(this)};
|
||||
l.Rb=function(a,b){if(!b)if(!a)Pt(this),this.na.W&&Ot(this,!0);else if(!this.restore(a))return!1;return!0};l.Qb=function(a){return a?this.save():!0};function ss(a){return a.na?a.na.ra:""}function ts(a){return a.na?a.na.B||"":""}l.reset=function(){Pt(this,null,!0)};l.save=function(){var a=new Me(this);a.set(0,Qt(this));return a.data()};l.restore=function(a){return Pt(this,a[0])};
|
||||
function Pt(a,b,c){var d=0,e=!0;a.Na=-1;if(a.L){if(b||(b=[0,0,0,0,0,0,0,Rt,0,[0,-1]]),a.H=b[d++],a.ra=b[d++],a.I=b[d++],a.da=b[d++],a.ba=b[d++],a.aa=b[d++],a.N=b[d++],a.Z=b[d++],a.fa=b[d++],a.K=b[d++],"object"==typeof a.K){var f=a.K;a.K=f[0];a.Na=f[1]}}else b||(b=[0,St,Array(14),0,0]),a.W=b[d++],a.Z=b[d++],a.G=b[d++],a.D=b[d++],a.C=b[d++],a.pa=b[d++],a.ma=b[d++],a.qa=b[d++],f=b[d++],void 0!==f?a.M=f:void 0===a.M&&(a.M=-1);void 0===a.A&&(a.A=Array(a.X.length));b=b[d];void 0===b&&(b=[]);for(d=0;d<a.A.length;d++){void 0===
|
||||
a.A[d]&&(a.A[d]={});var f=a.A[d],g=a,h=d,k=f,m=a.X[d],r=b[d],y=c,t=0,z=!0;r||(r=[Tt,0,!1,Array(8)]);k.Na=h;k.errorCode=r[t++];k.Nj=r[t++];k.me=r[t++];k.ce=r[t++];k.de=r[t++];k.Wa=r[t++];k.$a=r[t++];k.Dd=r[t++];k.bb=r[t++];k.wd=r[t++];k.xb=r[t++];k.uf=g.L?0:1;k.name=m.name;void 0===k.name&&(k.name=Wt);k.path=m.path;k.mode=m.mode||(k.path?"preload":"local");"demandro"!=k.mode&&"demandrw"!=k.mode||ts(g)||(k.mode="local");k.type=m.type;if(void 0===k.type||void 0===Xt[g.F][k.type])k.type=g.la;m=Xt[g.F][k.type];
|
||||
k.Xa=m[2]||17;k.ob=m[3]||512;if(y&&g.U){var m=g.U,D=k.type;if(m.A){var y=null,N=m.A[18];15<D&&(y=D,D=15);h?(N=N&240|D,D=26):(N=N&15|D<<4,D=25);var P=m;P.A&&(P.A[18]=N,uk(P));null!=y&&m.A&&(m.A[D]=y,uk(m))}}void 0===k.sa&&(k.sa=null,g.wa("Type "+k.type+' "'+k.name+'" is fixed disk '+h,!0));Yt(g,k);k.Ra=r[t++];k.Va=null;k.sa&&(g=r[t],void 0!==g&&0>k.sa.restore(g)&&(z=!1),z&&void 0!==k.Ra&&(k.Va=k.sa.seek(k.Dd,k.Wa,k.bb+k.uf)));z||(e=!1);null!=a.W&&1>=d&&(a.W|=(f.type&3)<<(1-d<<1))}0<=a.Na&&(a.B=a.A[a.Na]);
|
||||
return e}
|
||||
function Lt(a){var b=0,c=[];a.L?(c[b++]=a.H,c[b++]=a.ra,c[b++]=a.I,c[b++]=a.da,c[b++]=a.ba,c[b++]=a.aa,c[b++]=a.N,c[b++]=a.Z,c[b++]=a.fa,c[b++]=[a.K,a.Na]):(c[b++]=a.W,c[b++]=a.Z,c[b++]=a.G,c[b++]=a.D,c[b++]=a.C,c[b++]=a.pa,c[b++]=a.ma,c[b++]=a.qa,c[b++]=a.M);for(var d=0,e=[],f=0;f<a.A.length;f++){var g=d++,h=a.A[f],k=0,m=[];m[k++]=h.errorCode;m[k++]=h.Nj;m[k++]=h.me;m[k++]=h.ce;m[k++]=h.de;m[k++]=h.Wa;m[k++]=h.$a;m[k++]=h.Dd;m[k++]=h.bb;m[k++]=h.wd;m[k++]=h.xb;m[k++]=h.Ra;m[k]=h.sa?h.sa.save():null;
|
||||
e[g]=m}c[b]=e;return c}function Tt(a,b,c){if(b){var d=0,e=0;null==c&&((d=b.ce[2])?e=b.ce[0]<<8|b.ce[1]:c=b.type);null==c||d||(d=Qt[a.F][c][1],e=Qt[a.F][c][0]);d&&((c=Qt[a.F][b.type])&&e!=c[0]&&d!=c[1]&&a.wa("Warning: drive parameters ("+e+","+d+") do not match drive type "+b.type+" ("+c[0]+","+c[1]+")"),b.kb=e,b.$a=d,null==b.sa&&(b.sa=new js(a,b,b.mode)))}}
|
||||
function Jt(a,b){b||(a.J=0);for(var c=0;c<a.A.length;c++){var d=a.A[c];d.name&&d.path?b&&d.sa&&d.sa.Cf||!a.El(c,d.name,d.path,!0)&&b&&v(a,!1):b&&void 0!==d.type&&(d.sa=null,Tt(a,d,d.type))}return!!a.J}l.El=function(a,b,c,d){var e=this.A[a];if(e.Kd)return this.wa("Drive "+a+" busy"),!0;e.Kd=!0;d&&(e.Jd=!0,this.J++);(e.sa||new js(this,e,e.mode)).load(b,c,null,this.lk);return!1};
|
||||
l.lk=function(a,b,c){a.Kd=!1;if(a.sa=b)this.wa('Mounted disk "'+c+'" in drive '+String.fromCharCode(67+a.Na),a.Jd),b=b.info(),b[0]==a.kb&&b[1]==a.$a&&b[2]==a.Xa&&b[3]==a.ob||this.wa("Warning: disk geometry ("+b[0]+":"+b[1]+":"+b[2]+") does not match "+Ut[this.F]+" drive type "+a.type+" ("+a.kb+":"+a.$a+":"+a.Xa+")");a.Jd&&(a.Jd=!1,--this.J||v(this))};l.wl=function(){var a=0;this.D<this.C&&(a=this.G[this.D]);this.U&&Df(this.U,5);this.Z&=~Vt;++this.D>=this.C&&(this.D=this.C=0,this.Z&=~(Wt|Xt|Yt));return a};
|
||||
l.Om=function(a,b){this.C<this.G.length&&(this.G[this.C++]=b);a=this.G[0]!=Zt?6:this.G.length;6==this.C&&(this.Z&=~$t);this.C>=a&&(this.Z|=Wt,this.Z&=~$t,au(this))};l.xl=function(){var a=this.Z;this.D<this.C&&(this.Z|=$t);return a};l.Rm=function(a,b){this.pa=b;this.U&&Df(this.U,5);Kt(this)};l.vl=function(){return this.W};l.Qm=function(a,b){this.ma=b;this.Z=$t|Xt|Yt};l.Pm=function(a,b){this.qa=b};l.gh=function(){};
|
||||
function bu(a){var b=-1;a.B&&(b=a.ve(a.B,function(){}),(1==a.B.Ra||a.B.Ra==a.B.ob)&&1<a.B.Ra&&(a.B.xb-=a.B.ob,a.I=a.I-1&255,a.B.xb>=a.B.ob?(a.Z=cu,a.ve(a.B,function(b){0<=b?(du(a),a.U&&a.U.ca==Hj&&(a.Z=0),a.Z=a.Z|Mt|eu|fu):(a.Z=gu,a.H=hu)},!1)):a.Z=Mt|eu));return b}l.Yj=function(){return bu(this)|bu(this)<<8};function iu(a,b){a.B&&a.B.xb>=a.B.ob&&(0>ju(a.B,b)?(a.Z=gu,a.H=hu):(1==a.B.Ra||a.B.Ra==a.B.ob)&&1<a.B.Ra&&(a.B.xb-=a.B.ob,a.I=a.I-1&255,du(a),a.Z=Mt|eu,a.B.xb>=a.B.ob&&(a.Z|=fu)))}
|
||||
l.Zl=function(a,b){iu(this,b&255);iu(this,b>>8&255)};l.Dk=function(){return this.H};l.dm=function(a,b){this.ra=b};l.Fk=function(){return this.I};l.bm=function(a,b){this.I=b};l.Gk=function(){return this.da};l.cm=function(a,b){this.da=b};l.Bk=function(){return this.ba};l.Yl=function(a,b){this.ba=b};l.Ak=function(){return this.aa};l.Xl=function(a,b){this.aa=b};l.Ck=function(){return this.N};l.$l=function(a,b){this.N=b;this.Z=this.A[this.N&ku?1:0]?this.Z|Mt|eu:this.Z&~Mt};
|
||||
l.Hk=function(){var a=this.Z;this.Z&Mt&&(this.Z&=~cu);return a};l.Wl=function(a,b){this.fa=b;this.U&&Df(this.U,14);lu(this)};l.am=function(a,b){this.K&mu&&!(b&mu)&&(this.H=nu);this.K=b};
|
||||
function lu(a){var b=!1,c=a.fa,d=a.N&ku?1:0,e=a.N&ou,f=a.ba|(a.aa&pu)<<8,g=a.da,h=a.I||256;a.Na=-1;a.B=null;a.H=qu;a.Z=Mt|eu;var k=a.A[d];k?(k.Dd=f,k.Wa=e,k.bb=g,k.xb=h*k.ob,c=c>=ru?c:c&su,k.Va=null,k.Ra=0,k.errorCode=0,a.Na=d,a.B=k):c=-1;switch(c&su){case tu:b=!0;break;case uu:a.Z=cu;a.ve(k,function(b){0<=b&&a.U?(du(a),a.Z=Mt|eu|fu):(a.Z=gu,a.H=hu)},!1);break;case vu:a.Z=fu;break;case wu:b=!0;break;case xu:b=!0;break;case ru:a.H=nu;b=!0;break;case yu:k.$a=e+1,k.Xa=h,b=!0}b&&du(a)}
|
||||
function du(a){!a.U||a.K&zu||Ff(a.U,14,120)}
|
||||
function au(a){a.D=0;var b=Au(a),c=Au(a),d=c&32,e=d>>5,f=c&31,g=Au(a),h=Au(a),k=g<<2&768|h,m=g&63,r=Au(a),y=Au(a),t=a.A[e];t&&(t.Dd=k,t.Wa=f,t.bb=m,t.xb=r*t.ob);switch(b){case Bu:Cu(a,t?t.errorCode:Du);Eu(a,c);Eu(a,g);Eu(a,h);Eu(a,Fu|d);b=-1;break;case Zt:for(c=0;0<=(b=Au(a));)t&&c<t.ce.length&&(t.ce[c++]=b);t&&Tt(a,t);b=Fu;t||a.M!=e||(a.M=-1,b=Gu);Cu(a,b|d);b=-1;break;case Hu:case Iu:Cu(a,Fu|d),b=-1}if(0<=b)switch(void 0===t?b=-1:(t.errorCode=Ot,t.Nj=0),b){case Ju:Cu(a,Fu|d);break;case Ku:t.Ge=y;
|
||||
Cu(a,Fu|d);break;case Lu:Cu(a,Fu|d);break;case Mu:Nu(a,t,function(b){Cu(a,b|d)});break;case Ou:Pu(a,t,function(b){Cu(a,b|d)});break;case Qu:Ru(a,t,function(b){Cu(a,b|d)});break;default:Cu(a,Gu|d)}}function Au(a){var b=-1;a.D<a.C&&(b=a.G[a.D++]);return b}function Cu(a,b){a.D=a.C=0;void 0!==b&&Eu(a,b);a.U&&Ff(a.U,5);a.Z|=Vt}function Eu(a,b){a.G[a.C++]=b}l.Wj=function(a,b,c){void 0===b||0>b?this.ve(a,c):c(-1,!1)};l.Xj=function(a,b){return void 0!==b&&0<=b?ju(a,b):-1};
|
||||
l.jk=function(a,b){void 0!==b&&0<=b?(a.Ra<a.de.length?a.de[a.Ra++]=b:(a.errorCode=Su,b=-1),a=b):a=-1;return a};l.kk=function(a,b){if(void 0!==b&&0<=b)a:if(a.errorCode)a=-1;else{a.Gc[a.he++]=b;if(a.he==a.Gc.length){a.Dd=a.Gc[0];a.Wa=a.Gc[1];a.bb=a.Gc[2];a.xb=128<<a.Gc[3];for(var c=a.he=0;c<a.xb;c++)if(0>ju(a,a.Xh)){a=-1;break a}a.vf++}a.vf>=a.wd&&(b=-1);a=b}else a=-1;return a};
|
||||
function Nu(a,b,c){b.errorCode=Du;if(b.sa&&(b.Va=null,a.U)){b.errorCode=Ot;ul(a.U,3,a,"dmaRead",b);ql(a.U,3,function(a){a||b.errorCode!=Ot||(b.errorCode=Du);c(b.errorCode?Gu:Fu)});return}c(b.errorCode?Gu:Fu)}function Pu(a,b,c){b.errorCode=Du;if(b.sa&&(b.Va=null,a.U)){b.errorCode=Ot;ul(a.U,3,a,"dmaWrite",b);ql(a.U,3,function(a){a||(b.errorCode==Ot&&(b.errorCode=Du),b.errorCode==Su&&(b.errorCode=Ot));c(b.errorCode?Gu:Fu)});return}c(b.errorCode?Gu:Fu)}
|
||||
function Ru(a,b,c){b.errorCode=Du;b.de&&b.de.length==b.xb||(b.de=Array(b.xb));b.Ra=0;a.U?(b.errorCode=Ot,ul(a.U,3,a,"dmaWriteBuffer",b),ql(a.U,3,function(a){a||b.errorCode!=Ot||(b.errorCode=Du);c(b.errorCode?Gu:Fu)})):c(b.errorCode?Gu:Fu)}
|
||||
l.ve=function(a,b,c){var d=-1,e=null,f=0;if(a.errorCode)return b&&b(d,!1,e,f),d;var g=!1!==c?1:0;if(a.Va&&(f=a.Ra,d=a.sa.read(a.Va,a.Ra),a.Ra+=g,0<=d))return e=a.Va,b&&b(d,!1,e,f),d;if(b){if(a.sa)return a.sa.seek(a.Dd,a.Wa,a.bb+a.uf,!1,function(c,k){(a.Va=c)?(e=c,f=a.Ra=0,Tu(a),d=a.sa.read(a.Va,a.Ra),a.Ra+=g):a.errorCode=Su;b(d,k,e,f)}),d;a.errorCode=Su;b(d,!1,e,f)}return d};
|
||||
function ju(a,b){if(a.errorCode)return-1;do{if(a.Va&&a.sa.write(a.Va,a.Ra++,b))break;a.sa&&a.sa.seek(a.Dd,a.Wa,a.bb+a.uf,!0,function(b){a.Va=b});if(!a.Va){a.errorCode=Su;b=-1;break}a.Ra=0;Tu(a)}while(1);return b}function Tu(a){a.bb++;var b=1-a.uf;a.bb>=a.Xa+b&&(a.bb=b,a.Wa++,a.Wa>=a.$a&&(a.Wa=0,a.Dd++))}l.zl=function(){var a=this.R.L&255;!(this.R.F>>8)&&128<a&&(this.M=a-128);return!0};l.Al=function(){var a;(a=this.R.F>>8||!this.U)||(a=!(this.U.bc[0].Wc&64));return a?!0:!1};
|
||||
var Pt="Hard Drive",Ut=["XTC","ATC","COMPAQ"],Qt=[{0:[306,2],1:[375,8],2:[306,6],3:[306,4]},{1:[306,4],2:[615,4],3:[615,6],4:[940,8],5:[940,6],6:[615,4],7:[462,8],8:[733,5],9:[900,15],10:[820,3],11:[855,5],12:[855,7],13:[306,8],14:[733,7],16:[612,4],17:[977,5],18:[977,7],19:[1024,7],20:[733,5],21:[733,7],22:[733,5],23:[306,4]},{1:[306,4],2:[615,4],3:[615,6],4:[1023,8],5:[940,6],6:[697,5],7:[462,8],8:[925,5],9:[900,15],10:[980,5],11:[925,7],12:[925,9],13:[612,8],14:[980,4],16:[612,4],17:[980,5],18:[966,
|
||||
6],19:[1023,8],20:[733,5],21:[733,7],22:[524,4,40],23:[924,8],24:[966,14],25:[966,16],26:[1023,14],27:[832,6,33],28:[1222,15,34],29:[1240,7,34],30:[615,4,25],31:[615,8,25],32:[905,9,25],33:[832,8,33],34:[966,7,34],35:[966,8,34],36:[966,9,34],37:[966,5,34],38:[612,16,63],39:[1023,11,33],40:[1023,15,34],41:[1630,15,52],42:[1023,16,63],43:[805,4,26],44:[805,2,26],45:[748,8,33],46:[748,6,33],47:[966,5,25]}],It=496,nu=1,qu=0,hu=16,pu=3,ou=15,ku=16,gu=1,fu=8,eu=16,Mt=64,cu=128,tu=16,uu=32,vu=48,wu=64,xu=
|
||||
112,ru=144,yu=145,su=240,zu=2,mu=4,Fu=0,Gu=2,Ju=0,Ku=1,Bu=3,Lu=5,Mu=8,Ou=10,Zt=12,Qu=15,Hu=224,Iu=228,Ot=0,Du=4,Su=20,Nt=0,$t=1,Wt=2,Xt=4,Yt=8,Vt=32,Ft={800:Z.prototype.wl,801:Z.prototype.xl,802:Z.prototype.vl},Et={496:Z.prototype.Yj,497:Z.prototype.Dk,498:Z.prototype.Fk,499:Z.prototype.Gk,500:Z.prototype.Bk,501:Z.prototype.Ak,502:Z.prototype.Ck,503:Z.prototype.Hk},Ht={800:Z.prototype.Om,801:Z.prototype.Rm,802:Z.prototype.Qm,803:Z.prototype.Pm,807:Z.prototype.gh,811:Z.prototype.gh,815:Z.prototype.gh},
|
||||
Gt={496:Z.prototype.Zl,497:Z.prototype.dm,498:Z.prototype.bm,499:Z.prototype.cm,500:Z.prototype.Yl,501:Z.prototype.Xl,502:Z.prototype.$l,503:Z.prototype.Wl,1014:Z.prototype.am};Ma(function(){for(var a=cb(document,"pcx86","hdc"),b=0;b<a.length;b++){var c=a[b],d=db(c),d=new Z(d);bb(d,c)}});
|
||||
function Uu(a,b,c){u.call(this,"Computer",a);var d=this;Vu(this,b);this.U=Fc(this,"autoPower",a);this.D=+Fc(this,"diagnostics",a);0<=this.D&&2>=this.D||(this.D=1);this.F=0;this.ma=a.busWidth||a.buswidth;this.A=Wu;this.M=null;this.J=this.fa=!1;this.pa=Fc(this,"url")||"";this.ra=(Math.random()+.1).toString(36).substr(2,12);this.B=Xu(this);if(this.R=ab("CPU",this.id)){this.Ea=ab("Debugger",this.id);this.C=[];for(b=null;b=tb(this,"Video",b);)this.C.push(b);this.oa=new Gb({id:this.Cd+".bus",busWidth:this.ma},
|
||||
this.R,this.Ea);var e,f=eb(this.id);this.ba=(this.I=ab("Panel",this.id))&&this.I.ia.print;this.ja=this.wa;this.la=this.print;this.qa=this.qb;this.ba&&(this.ja=this.I.wa,this.la=this.I.print,this.qa=this.I.qb);for(b=0;b<f.length;b++)e=f[b],e.wa=function(a,b,c){Yu(d,a);return d.ja.call(this,a,b,c)}.bind(e),e.print=function(a){return d.la.call(this,a)}.bind(e),e.qb=function(a,b,c){Yu(d,a,b);return d.qa.call(this,a,b,c)}.bind(e);this.H=0;!this.ba&&this.D&&Zu(this);this.qb("PCx86 v1.36.2\nCopyright \u00a9 2012-2017 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");
|
||||
for(b=0;b<f.length;b++)e=f[b],e.kc&&e.kc(this,this.oa,this.R,this.Ea);Gc(this.R,this.id,function(){bd(d)},1E3/$u);b=null;e=Fc(this,"resume");void 0!==e&&(1<e.length?b=this.L=e:this.A=parseInt(e,10));e=!1;f=Ia("state");f||(e=!0,f=Fc(this,"state",a));f&&(b=this.Y=f,e||(this.J=!0,this.A=Wu),this.A&&(this.N=new Me(this,"1.36.2"),this.N.load()?b=null:delete this.N));!b&&this.A&&(b=av(this))&&(this.J=!0);if(this.aa=b){var g="Loading "+this.aa+"...";wa(this.aa,null,!0,function(a,b,c){c?(d.L=null,d.J=!1,
|
||||
d.wa("Unable to load machine state from server (error "+c+(b?": "+pa(b):"")+")")):(d.M=b,d.fa=!0);v(d)},function(){d.qb(g,mb.ae)})}else v(this);this.ia.power||(this.U=!0);!c&&this.U&&this.ze(this.ue)}else q("Unable to find CPU component")}ca(Uu,u);function Zu(a){if(!a.H)for(var b=0;b<a.C.length;b++){var c=a.C[b];c&&(c=c.Ef)&&(c.style.opacity="1",c.style.lineHeight="1",a.H++)}}
|
||||
function Yu(a,b,c){if(a.H)for(var d=0;d<a.C.length;d++){var e=a.C[d];e&&(e=e.Ef)&&(c!=mb.ae||"..."!=b.slice(-3)?Ya(e,b+"\n"):Za(e,b,b+"."))}}function ho(a){var b=a.D;3==a.D&&(a.D++,v(a));return!b}function Vu(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){q(d.message+" ("+c+")")}}a.K=b}function Fc(a,b,c){var d=Ia(b);void 0===d&&a.K&&(d=a.K[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}l=Uu.prototype;
|
||||
l.ze=function(a,b){for(var c=this,d=eb(this.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:this;if(!ob(f)){ob(f,function(){c.ze(a,b)});return}}a.call(this,b)};function bv(a,b){var c=new Me(a,"1.36.2",cv);if(c.load()&&dv(c)){var d=c.get(ev),e=b?b.get(ev):"unknown";d!=e&&(a.wa("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}
|
||||
l.ue=function(a){void 0===a&&(a=this.A||(this.M?fv:Wu));if(!this.F){this.F++;var b=!1,c=!1;this.da=!1;var d=this.N||new Me(this,"1.36.2");if(a==Oc)b=!0;else if(a>Wu){if(d.load(this.M)){this.G=new Me(this,"1.36.2",gv);this.G.load()&&(a!=fv&&hv(this,d)&&(a=iv),jv(this.G));this.G.set(ev,ra("Y-m-d H:i:s"));kv(this.G);var e=this.A&&!this.J;if(a==fv||Xa("Click OK to restore the previous PCx86 machine state.")){if(c=dv(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g):("error"==f&&"no machine state"!=
|
||||
g?(this.wa("Error: "+g),"unable to verify user"==g&&(Da(lv,""),this.B=null)):this.qb(f+": "+g),jv(d),d.load()?(c=dv(d),e=!0):c=!1))}e&&bv(this,c?d:null)}else a==iv&&d.clear()}else bv(this);delete this.M;delete this.N}e=eb(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.R&&(c=mv(this,g,d,b,c));b=[d,a,c];a!=Oc?this.ze(this.ig,b):this.ig(b)}};
|
||||
function mv(a,b,c,d,e){if(!b.X.Sb){b.X.Sb=!0;if(b.Rb){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/-[0-9]+\./i,"."))));"string"===typeof f&&(f=null);!b.Rb(f,d)&&f&&(b.wa("Unable to restore hardware state")&&(a.Y&&!a.fa?(c.clear(),a.A=Wu,window&&window.location.reload()):a.da=!0),b.Rb(null),e=!1)}b.X.Ke=!0;if(!d&&b.ki)for(a=b.ki.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
|
||||
l.ig=function(a){if(!this.X.Ke){var b;a:{if(this.H){if(2==this.D){this.D++;this.qb("Press any key to continue...");b=!1;break a}for(b=0;b<this.C.length;b++){var c=this.C[b];if(c&&(c=c.Ef)){var d=za();c.style.opacity="0";c.style.lineHeight="0";if(0<=d.indexOf("MSIE")||0<=d.indexOf("Trident"))c.style.fontSize="0";c.value=""}}this.H=0}this.D=0;b=!0}if(!b){v(this,!1);this.ze(this.ig,a);return}this.X.Ke=!0}b=a[0];c=0>a[1];a=a[2];if(d=this.ia.power)d.textContent="Shutdown";this.X.Sb=!0;this.R&&(mv(this,
|
||||
this.R,b,c,a),this.R.Gd());this.da&&(hv(this,b),b.clear());!c&&this.G&&(this.G.clear(),delete this.G);this.F=0;gb(this.Cd,Fc(this,"autoScript"))};function hv(a,b){if(!a.X.Yd){if(Xa("There may be a problem with your PCx86 machine.\n\nTo help us diagnose it, click OK to send this PCx86 machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PCx86",ver:"1.36.2"};d.url=a.pa;d.user=c;d.type="bug";d.data=b;wa("http://www.pcjs.org/api/v1/report",d,!0)}return!0}return!1}
|
||||
function nv(a,b,c){var d,e="none";if(a.F)return null;a.F--;var f=new Me(a,"1.36.2"),g=new Me(a,"1.36.2",cv),h=ra("Y-m-d H:i:s");g.set(ev,h);f.set(ev,h);f.set(ov,"1.36.2");f.set(pv,window?window.location.href:null);f.set(qv,za());a.R&&a.R.Qb&&(d=a.R.Qb(b,c),"object"===typeof d&&f.set(a.R.id,d),c&&(a.R.X.Sb=!1,!1===d&&(e=null)));for(var h=eb(a.id),k=0;k<h.length;k++){var m=h[k];m.X.Sb&&(m.Qb&&(d=m.Qb(b,c),"object"===typeof d&&f.set(m.id,d)),c&&(m.X.Sb=!1,!1===d&&(e=null)))}e&&(c?(h=d=!1,b?(a.B&&rv(a,
|
||||
a.B,f.toString()),kv(g)&&kv(f)||(e=null,d=h=!0)):a.A&&(d=!0,h=a.A==sv),d&&f.clear(h)):e=f.toString());c&&(a.X.Sb=!1,b=a.ia.power)&&(b.textContent="Power");a.F=0;return e}l.reset=function(){this.oa&&this.oa.reset&&this.oa.reset();for(var a=eb(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.oa&&c.reset&&c.reset()}};l.start=function(a,b){for(var c=eb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}};
|
||||
function Qt(a){var b=0,c=[];a.L?(c[b++]=a.H,c[b++]=a.ra,c[b++]=a.I,c[b++]=a.da,c[b++]=a.ba,c[b++]=a.aa,c[b++]=a.N,c[b++]=a.Z,c[b++]=a.fa,c[b++]=[a.K,a.Na]):(c[b++]=a.W,c[b++]=a.Z,c[b++]=a.G,c[b++]=a.D,c[b++]=a.C,c[b++]=a.pa,c[b++]=a.ma,c[b++]=a.qa,c[b++]=a.M);for(var d=0,e=[],f=0;f<a.A.length;f++){var g=d++,h=a.A[f],k=0,m=[];m[k++]=h.errorCode;m[k++]=h.Nj;m[k++]=h.me;m[k++]=h.ce;m[k++]=h.de;m[k++]=h.Wa;m[k++]=h.$a;m[k++]=h.Dd;m[k++]=h.bb;m[k++]=h.wd;m[k++]=h.xb;m[k++]=h.Ra;m[k]=h.sa?h.sa.save():null;
|
||||
e[g]=m}c[b]=e;return c}function Yt(a,b,c){if(b){var d=0,e=0;null==c&&((d=b.ce[2])?e=b.ce[0]<<8|b.ce[1]:c=b.type);null==c||d||(d=Xt[a.F][c][1],e=Xt[a.F][c][0]);d&&((c=Xt[a.F][b.type])&&e!=c[0]&&d!=c[1]&&a.wa("Warning: drive parameters ("+e+","+d+") do not match drive type "+b.type+" ("+c[0]+","+c[1]+")"),b.kb=e,b.$a=d,null==b.sa&&(b.sa=new os(a,b,b.mode)))}}
|
||||
function Ot(a,b){b||(a.J=0);for(var c=0;c<a.A.length;c++){var d=a.A[c];d.name&&d.path?b&&d.sa&&d.sa.Cf||!a.Il(c,d.name,d.path,!0)&&b&&v(a,!1):b&&void 0!==d.type&&(d.sa=null,Yt(a,d,d.type))}return!!a.J}l.Il=function(a,b,c,d){var e=this.A[a];if(e.Kd)return this.wa("Drive "+a+" busy"),!0;e.Kd=!0;d&&(e.Jd=!0,this.J++);(e.sa||new os(this,e,e.mode)).load(b,c,null,this.lk);return!1};
|
||||
l.lk=function(a,b,c){a.Kd=!1;if(a.sa=b)this.wa('Mounted disk "'+c+'" in drive '+String.fromCharCode(67+a.Na),a.Jd),b=b.info(),b[0]==a.kb&&b[1]==a.$a&&b[2]==a.Xa&&b[3]==a.ob||this.wa("Warning: disk geometry ("+b[0]+":"+b[1]+":"+b[2]+") does not match "+Zt[this.F]+" drive type "+a.type+" ("+a.kb+":"+a.$a+":"+a.Xa+")");a.Jd&&(a.Jd=!1,--this.J||v(this))};l.Al=function(){var a=0;this.D<this.C&&(a=this.G[this.D]);this.U&&Df(this.U,5);this.Z&=~$t;++this.D>=this.C&&(this.D=this.C=0,this.Z&=~(au|bu|cu));return a};
|
||||
l.Wm=function(a,b){this.C<this.G.length&&(this.G[this.C++]=b);a=this.G[0]!=du?6:this.G.length;6==this.C&&(this.Z&=~eu);this.C>=a&&(this.Z|=au,this.Z&=~eu,fu(this))};l.Bl=function(){var a=this.Z;this.D<this.C&&(this.Z|=eu);return a};l.Zm=function(a,b){this.pa=b;this.U&&Df(this.U,5);Pt(this)};l.zl=function(){return this.W};l.Ym=function(a,b){this.ma=b;this.Z=eu|bu|cu};l.Xm=function(a,b){this.qa=b};l.gh=function(){};
|
||||
function gu(a){var b=-1;a.B&&(b=a.ve(a.B,function(){}),(1==a.B.Ra||a.B.Ra==a.B.ob)&&1<a.B.Ra&&(a.B.xb-=a.B.ob,a.I=a.I-1&255,a.B.xb>=a.B.ob?(a.Z=hu,a.ve(a.B,function(b){0<=b?(iu(a),a.U&&a.U.ca==Hj&&(a.Z=0),a.Z=a.Z|Rt|ju|ku):(a.Z=lu,a.H=mu)},!1)):a.Z=Rt|ju));return b}l.Yj=function(){return gu(this)|gu(this)<<8};function nu(a,b){a.B&&a.B.xb>=a.B.ob&&(0>ou(a.B,b)?(a.Z=lu,a.H=mu):(1==a.B.Ra||a.B.Ra==a.B.ob)&&1<a.B.Ra&&(a.B.xb-=a.B.ob,a.I=a.I-1&255,iu(a),a.Z=Rt|ju,a.B.xb>=a.B.ob&&(a.Z|=ku)))}
|
||||
l.cm=function(a,b){nu(this,b&255);nu(this,b>>8&255)};l.Dk=function(){return this.H};l.hm=function(a,b){this.ra=b};l.Fk=function(){return this.I};l.fm=function(a,b){this.I=b};l.Gk=function(){return this.da};l.gm=function(a,b){this.da=b};l.Bk=function(){return this.ba};l.bm=function(a,b){this.ba=b};l.Ak=function(){return this.aa};l.am=function(a,b){this.aa=b};l.Ck=function(){return this.N};l.dm=function(a,b){this.N=b;this.Z=this.A[this.N&pu?1:0]?this.Z|Rt|ju:this.Z&~Rt};
|
||||
l.Hk=function(){var a=this.Z;this.Z&Rt&&(this.Z&=~hu);return a};l.$l=function(a,b){this.fa=b;this.U&&Df(this.U,14);qu(this)};l.em=function(a,b){this.K&ru&&!(b&ru)&&(this.H=su);this.K=b};
|
||||
function qu(a){var b=!1,c=a.fa,d=a.N&pu?1:0,e=a.N&tu,f=a.ba|(a.aa&uu)<<8,g=a.da,h=a.I||256;a.Na=-1;a.B=null;a.H=vu;a.Z=Rt|ju;var k=a.A[d];k?(k.Dd=f,k.Wa=e,k.bb=g,k.xb=h*k.ob,c=c>=wu?c:c&xu,k.Va=null,k.Ra=0,k.errorCode=0,a.Na=d,a.B=k):c=-1;switch(c&xu){case yu:b=!0;break;case zu:a.Z=hu;a.ve(k,function(b){0<=b&&a.U?(iu(a),a.Z=Rt|ju|ku):(a.Z=lu,a.H=mu)},!1);break;case Au:a.Z=ku;break;case Bu:b=!0;break;case Cu:b=!0;break;case wu:a.H=su;b=!0;break;case Du:k.$a=e+1,k.Xa=h,b=!0}b&&iu(a)}
|
||||
function iu(a){!a.U||a.K&Eu||Ff(a.U,14,120)}
|
||||
function fu(a){a.D=0;var b=Fu(a),c=Fu(a),d=c&32,e=d>>5,f=c&31,g=Fu(a),h=Fu(a),k=g<<2&768|h,m=g&63,r=Fu(a),y=Fu(a),t=a.A[e];t&&(t.Dd=k,t.Wa=f,t.bb=m,t.xb=r*t.ob);switch(b){case Gu:Hu(a,t?t.errorCode:Iu);Ju(a,c);Ju(a,g);Ju(a,h);Ju(a,Ku|d);b=-1;break;case du:for(c=0;0<=(b=Fu(a));)t&&c<t.ce.length&&(t.ce[c++]=b);t&&Yt(a,t);b=Ku;t||a.M!=e||(a.M=-1,b=Lu);Hu(a,b|d);b=-1;break;case Mu:case Nu:Hu(a,Ku|d),b=-1}if(0<=b)switch(void 0===t?b=-1:(t.errorCode=Tt,t.Nj=0),b){case Ou:Hu(a,Ku|d);break;case Pu:t.Ge=y;
|
||||
Hu(a,Ku|d);break;case Qu:Hu(a,Ku|d);break;case Ru:Su(a,t,function(b){Hu(a,b|d)});break;case Tu:Uu(a,t,function(b){Hu(a,b|d)});break;case Vu:Wu(a,t,function(b){Hu(a,b|d)});break;default:Hu(a,Lu|d)}}function Fu(a){var b=-1;a.D<a.C&&(b=a.G[a.D++]);return b}function Hu(a,b){a.D=a.C=0;void 0!==b&&Ju(a,b);a.U&&Ff(a.U,5);a.Z|=$t}function Ju(a,b){a.G[a.C++]=b}l.Wj=function(a,b,c){void 0===b||0>b?this.ve(a,c):c(-1,!1)};l.Xj=function(a,b){return void 0!==b&&0<=b?ou(a,b):-1};
|
||||
l.jk=function(a,b){void 0!==b&&0<=b?(a.Ra<a.de.length?a.de[a.Ra++]=b:(a.errorCode=Xu,b=-1),a=b):a=-1;return a};l.kk=function(a,b){if(void 0!==b&&0<=b)a:if(a.errorCode)a=-1;else{a.Gc[a.he++]=b;if(a.he==a.Gc.length){a.Dd=a.Gc[0];a.Wa=a.Gc[1];a.bb=a.Gc[2];a.xb=128<<a.Gc[3];for(var c=a.he=0;c<a.xb;c++)if(0>ou(a,a.Xh)){a=-1;break a}a.vf++}a.vf>=a.wd&&(b=-1);a=b}else a=-1;return a};
|
||||
function Su(a,b,c){b.errorCode=Iu;if(b.sa&&(b.Va=null,a.U)){b.errorCode=Tt;ul(a.U,3,a,"dmaRead",b);ql(a.U,3,function(a){a||b.errorCode!=Tt||(b.errorCode=Iu);c(b.errorCode?Lu:Ku)});return}c(b.errorCode?Lu:Ku)}function Uu(a,b,c){b.errorCode=Iu;if(b.sa&&(b.Va=null,a.U)){b.errorCode=Tt;ul(a.U,3,a,"dmaWrite",b);ql(a.U,3,function(a){a||(b.errorCode==Tt&&(b.errorCode=Iu),b.errorCode==Xu&&(b.errorCode=Tt));c(b.errorCode?Lu:Ku)});return}c(b.errorCode?Lu:Ku)}
|
||||
function Wu(a,b,c){b.errorCode=Iu;b.de&&b.de.length==b.xb||(b.de=Array(b.xb));b.Ra=0;a.U?(b.errorCode=Tt,ul(a.U,3,a,"dmaWriteBuffer",b),ql(a.U,3,function(a){a||b.errorCode!=Tt||(b.errorCode=Iu);c(b.errorCode?Lu:Ku)})):c(b.errorCode?Lu:Ku)}
|
||||
l.ve=function(a,b,c){var d=-1,e=null,f=0;if(a.errorCode)return b&&b(d,!1,e,f),d;var g=!1!==c?1:0;if(a.Va&&(f=a.Ra,d=a.sa.read(a.Va,a.Ra),a.Ra+=g,0<=d))return e=a.Va,b&&b(d,!1,e,f),d;if(b){if(a.sa)return a.sa.seek(a.Dd,a.Wa,a.bb+a.uf,!1,function(c,k){(a.Va=c)?(e=c,f=a.Ra=0,Yu(a),d=a.sa.read(a.Va,a.Ra),a.Ra+=g):a.errorCode=Xu;b(d,k,e,f)}),d;a.errorCode=Xu;b(d,!1,e,f)}return d};
|
||||
function ou(a,b){if(a.errorCode)return-1;do{if(a.Va&&a.sa.write(a.Va,a.Ra++,b))break;a.sa&&a.sa.seek(a.Dd,a.Wa,a.bb+a.uf,!0,function(b){a.Va=b});if(!a.Va){a.errorCode=Xu;b=-1;break}a.Ra=0;Yu(a)}while(1);return b}function Yu(a){a.bb++;var b=1-a.uf;a.bb>=a.Xa+b&&(a.bb=b,a.Wa++,a.Wa>=a.$a&&(a.Wa=0,a.Dd++))}l.Dl=function(){var a=this.R.L&255;!(this.R.F>>8)&&128<a&&(this.M=a-128);return!0};l.El=function(){var a;(a=this.R.F>>8||!this.U)||(a=!(this.U.bc[0].Wc&64));return a?!0:!1};
|
||||
var Wt="Hard Drive",Zt=["XTC","ATC","COMPAQ"],Xt=[{0:[306,2],1:[375,8],2:[306,6],3:[306,4]},{1:[306,4],2:[615,4],3:[615,6],4:[940,8],5:[940,6],6:[615,4],7:[462,8],8:[733,5],9:[900,15],10:[820,3],11:[855,5],12:[855,7],13:[306,8],14:[733,7],16:[612,4],17:[977,5],18:[977,7],19:[1024,7],20:[733,5],21:[733,7],22:[733,5],23:[306,4]},{1:[306,4],2:[615,4],3:[615,6],4:[1023,8],5:[940,6],6:[697,5],7:[462,8],8:[925,5],9:[900,15],10:[980,5],11:[925,7],12:[925,9],13:[612,8],14:[980,4],16:[612,4],17:[980,5],18:[966,
|
||||
6],19:[1023,8],20:[733,5],21:[733,7],22:[524,4,40],23:[924,8],24:[966,14],25:[966,16],26:[1023,14],27:[832,6,33],28:[1222,15,34],29:[1240,7,34],30:[615,4,25],31:[615,8,25],32:[905,9,25],33:[832,8,33],34:[966,7,34],35:[966,8,34],36:[966,9,34],37:[966,5,34],38:[612,16,63],39:[1023,11,33],40:[1023,15,34],41:[1630,15,52],42:[1023,16,63],43:[805,4,26],44:[805,2,26],45:[748,8,33],46:[748,6,33],47:[966,5,25]}],Nt=496,su=1,vu=0,mu=16,uu=3,tu=15,pu=16,lu=1,ku=8,ju=16,Rt=64,hu=128,yu=16,zu=32,Au=48,Bu=64,Cu=
|
||||
112,wu=144,Du=145,xu=240,Eu=2,ru=4,Ku=0,Lu=2,Ou=0,Pu=1,Gu=3,Qu=5,Ru=8,Tu=10,du=12,Vu=15,Mu=224,Nu=228,Tt=0,Iu=4,Xu=20,St=0,eu=1,au=2,bu=4,cu=8,$t=32,Kt={800:Z.prototype.Al,801:Z.prototype.Bl,802:Z.prototype.zl},Jt={496:Z.prototype.Yj,497:Z.prototype.Dk,498:Z.prototype.Fk,499:Z.prototype.Gk,500:Z.prototype.Bk,501:Z.prototype.Ak,502:Z.prototype.Ck,503:Z.prototype.Hk},Mt={800:Z.prototype.Wm,801:Z.prototype.Zm,802:Z.prototype.Ym,803:Z.prototype.Xm,807:Z.prototype.gh,811:Z.prototype.gh,815:Z.prototype.gh},
|
||||
Lt={496:Z.prototype.cm,497:Z.prototype.hm,498:Z.prototype.fm,499:Z.prototype.gm,500:Z.prototype.bm,501:Z.prototype.am,502:Z.prototype.dm,503:Z.prototype.$l,1014:Z.prototype.em};Ma(function(){for(var a=cb(document,"pcx86","hdc"),b=0;b<a.length;b++){var c=a[b],d=db(c),d=new Z(d);bb(d,c)}});
|
||||
function Zu(a,b,c){u.call(this,"Computer",a);var d=this;$u(this,b);this.U=Fc(this,"autoPower",a);this.D=+Fc(this,"diagnostics",a);0<=this.D&&2>=this.D||(this.D=1);this.F=0;this.ma=a.busWidth||a.buswidth;this.A=av;this.M=null;this.J=this.fa=!1;this.pa=Fc(this,"url")||"";this.ra=(Math.random()+.1).toString(36).substr(2,12);this.B=bv(this);if(this.R=ab("CPU",this.id)){this.Ea=ab("Debugger",this.id);this.C=[];for(b=null;b=tb(this,"Video",b);)this.C.push(b);this.oa=new Gb({id:this.Cd+".bus",busWidth:this.ma},
|
||||
this.R,this.Ea);var e,f=eb(this.id);this.ba=(this.I=ab("Panel",this.id))&&this.I.ia.print;this.ja=this.wa;this.la=this.print;this.qa=this.qb;this.ba&&(this.ja=this.I.wa,this.la=this.I.print,this.qa=this.I.qb);for(b=0;b<f.length;b++)e=f[b],e.wa=function(a,b,c){cv(d,a);return d.ja.call(this,a,b,c)}.bind(e),e.print=function(a){return d.la.call(this,a)}.bind(e),e.qb=function(a,b,c){cv(d,a,b);return d.qa.call(this,a,b,c)}.bind(e);this.H=0;!this.ba&&this.D&&dv(this);this.qb("PCx86 v1.36.2\nCopyright \u00a9 2012-2017 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");
|
||||
for(b=0;b<f.length;b++)e=f[b],e.kc&&e.kc(this,this.oa,this.R,this.Ea);Gc(this.R,this.id,function(){bd(d)},1E3/ev);b=null;e=Fc(this,"resume");void 0!==e&&(1<e.length?b=this.L=e:this.A=parseInt(e,10));e=!1;f=Ia("state");f||(e=!0,f=Fc(this,"state",a));f&&(b=this.X=f,e||(this.J=!0,this.A=av),this.A&&(this.N=new Me(this,"1.36.2"),this.N.load()?b=null:delete this.N));!b&&this.A&&(b=fv(this))&&(this.J=!0);if(this.aa=b){var g="Loading "+this.aa+"...";wa(this.aa,null,!0,function(a,b,c){c?(d.L=null,d.J=!1,
|
||||
d.wa("Unable to load machine state from server (error "+c+(b?": "+pa(b):"")+")")):(d.M=b,d.fa=!0);v(d)},function(){d.qb(g,mb.ae)})}else v(this);this.ia.power||(this.U=!0);!c&&this.U&&this.ze(this.ue)}else q("Unable to find CPU component")}ca(Zu,u);function dv(a){if(!a.H)for(var b=0;b<a.C.length;b++){var c=a.C[b];c&&(c=c.Ef)&&(c.style.opacity="1",c.style.lineHeight="1",a.H++)}}
|
||||
function cv(a,b,c){if(a.H)for(var d=0;d<a.C.length;d++){var e=a.C[d];e&&(e=e.Ef)&&(c!=mb.ae||"..."!=b.slice(-3)?Ya(e,b+"\n"):Za(e,b,b+"."))}}function ho(a){var b=a.D;3==a.D&&(a.D++,v(a));return!b}function $u(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){q(d.message+" ("+c+")")}}a.K=b}function Fc(a,b,c){var d=Ia(b);void 0===d&&a.K&&(d=a.K[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}l=Zu.prototype;
|
||||
l.ze=function(a,b){for(var c=this,d=eb(this.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:this;if(!ob(f)){ob(f,function(){c.ze(a,b)});return}}a.call(this,b)};function gv(a,b){var c=new Me(a,"1.36.2",hv);if(c.load()&&iv(c)){var d=c.get(jv),e=b?b.get(jv):"unknown";d!=e&&(a.wa("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}
|
||||
l.ue=function(a){void 0===a&&(a=this.A||(this.M?kv:av));if(!this.F){this.F++;var b=!1,c=!1;this.da=!1;var d=this.N||new Me(this,"1.36.2");if(a==Oc)b=!0;else if(a>av){if(d.load(this.M)){this.G=new Me(this,"1.36.2",lv);this.G.load()&&(a!=kv&&mv(this,d)&&(a=nv),ov(this.G));this.G.set(jv,ra("Y-m-d H:i:s"));pv(this.G);var e=this.A&&!this.J;if(a==kv||Xa("Click OK to restore the previous PCx86 machine state.")){if(c=iv(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g):("error"==f&&"no machine state"!=
|
||||
g?(this.wa("Error: "+g),"unable to verify user"==g&&(Da(qv,""),this.B=null)):this.qb(f+": "+g),ov(d),d.load()?(c=iv(d),e=!0):c=!1))}e&&gv(this,c?d:null)}else a==nv&&d.clear()}else gv(this);delete this.M;delete this.N}e=eb(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.R&&(c=rv(this,g,d,b,c));b=[d,a,c];a!=Oc?this.ze(this.ig,b):this.ig(b)}};
|
||||
function rv(a,b,c,d,e){if(!b.Y.Sb){b.Y.Sb=!0;if(b.Rb){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/-[0-9]+\./i,"."))));"string"===typeof f&&(f=null);!b.Rb(f,d)&&f&&(b.wa("Unable to restore hardware state")&&(a.X&&!a.fa?(c.clear(),a.A=av,window&&window.location.reload()):a.da=!0),b.Rb(null),e=!1)}b.Y.Ke=!0;if(!d&&b.ki)for(a=b.ki.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
|
||||
l.ig=function(a){if(!this.Y.Ke){var b;a:{if(this.H){if(2==this.D){this.D++;this.qb("Press any key to continue...");b=!1;break a}for(b=0;b<this.C.length;b++){var c=this.C[b];if(c&&(c=c.Ef)){var d=za();c.style.opacity="0";c.style.lineHeight="0";if(0<=d.indexOf("MSIE")||0<=d.indexOf("Trident"))c.style.fontSize="0";c.value=""}}this.H=0}this.D=0;b=!0}if(!b){v(this,!1);this.ze(this.ig,a);return}this.Y.Ke=!0}b=a[0];c=0>a[1];a=a[2];if(d=this.ia.power)d.textContent="Shutdown";this.Y.Sb=!0;this.R&&(rv(this,
|
||||
this.R,b,c,a),this.R.Gd());this.da&&(mv(this,b),b.clear());!c&&this.G&&(this.G.clear(),delete this.G);this.F=0;gb(this.Cd,Fc(this,"autoScript"))};function mv(a,b){if(!a.Y.Yd){if(Xa("There may be a problem with your PCx86 machine.\n\nTo help us diagnose it, click OK to send this PCx86 machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PCx86",ver:"1.36.2"};d.url=a.pa;d.user=c;d.type="bug";d.data=b;wa("http://www.pcjs.org/api/v1/report",d,!0)}return!0}return!1}
|
||||
function sv(a,b,c){var d,e="none";if(a.F)return null;a.F--;var f=new Me(a,"1.36.2"),g=new Me(a,"1.36.2",hv),h=ra("Y-m-d H:i:s");g.set(jv,h);f.set(jv,h);f.set(tv,"1.36.2");f.set(uv,window?window.location.href:null);f.set(vv,za());a.R&&a.R.Qb&&(d=a.R.Qb(b,c),"object"===typeof d&&f.set(a.R.id,d),c&&(a.R.Y.Sb=!1,!1===d&&(e=null)));for(var h=eb(a.id),k=0;k<h.length;k++){var m=h[k];m.Y.Sb&&(m.Qb&&(d=m.Qb(b,c),"object"===typeof d&&f.set(m.id,d)),c&&(m.Y.Sb=!1,!1===d&&(e=null)))}e&&(c?(h=d=!1,b?(a.B&&wv(a,
|
||||
a.B,f.toString()),pv(g)&&pv(f)||(e=null,d=h=!0)):a.A&&(d=!0,h=a.A==xv),d&&f.clear(h)):e=f.toString());c&&(a.Y.Sb=!1,b=a.ia.power)&&(b.textContent="Power");a.F=0;return e}l.reset=function(){this.oa&&this.oa.reset&&this.oa.reset();for(var a=eb(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.oa&&c.reset&&c.reset()}};l.start=function(a,b){for(var c=eb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}};
|
||||
l.stop=function(a,b){for(var c=eb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}};
|
||||
l.Ab=function(a,b,c){var d=this;switch(b){case "power":return this.ia[b]=c,c.onclick=function(){d.F||(d.X.Sb?nv(d,!1,!0):d.ze(d.ue))},!0;case "reset":return this.ia[b]=c,c.onclick=function(){if(d.X.Sb&&!d.F)if(d.R&&(d.R.X.Gd=d.R.X.cb),d.A&&!d.L){var a=d.X.Yd||!Xa("Click OK to reset this PCx86 machine and discard all disk modifications.");nv(d,a,!0);!a&&d.Y?window&&window.location.reload():(a||(d.W=!0),d.ue(Wu),d.W=!1)}else d.reset(),d.R&&d.R.Gd()},!0;case "save":if(ma(xa(),"pcjs.org"))c.parentNode.removeChild(c);
|
||||
else return this.ia[b]=c,c.onclick=function(){var a=Xu(d,!0);if(a){var b=!!(d.A&&!d.L||d.Y),c=nv(d,b);b?rv(d,a,c):d.wa("Resume disabled, machine state not saved")}},!0}return!1};
|
||||
function Xu(a,b){var c=a.B;c||((c=Ca(lv),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=tv(a,c))||a.wa("The user ID is invalid.")):b&&a.wa("Browser local storage is not available"));return c}
|
||||
function tv(a,b){a.B=null;b=wa(xa()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Da(lv,b.data),a.B=b.data)}catch(d){q(d.message+" ("+c+")")}return a.B}function av(a){var b=null;a.B&&(b=xa()+"/api/v1/user?req=load&user="+a.B+"&state="+uv(a,"1.36.2"));return b}
|
||||
function rv(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=uv(a,"1.36.2");d.data=c;b=wa(xa()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.wa("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.wa(c),Da(lv,""),a.B=null)}}
|
||||
l.Ab=function(a,b,c){var d=this;switch(b){case "power":return this.ia[b]=c,c.onclick=function(){d.F||(d.Y.Sb?sv(d,!1,!0):d.ze(d.ue))},!0;case "reset":return this.ia[b]=c,c.onclick=function(){if(d.Y.Sb&&!d.F)if(d.R&&(d.R.Y.Gd=d.R.Y.cb),d.A&&!d.L){var a=d.Y.Yd||!Xa("Click OK to reset this PCx86 machine and discard all disk modifications.");sv(d,a,!0);!a&&d.X?window&&window.location.reload():(a||(d.W=!0),d.ue(av),d.W=!1)}else d.reset(),d.R&&d.R.Gd()},!0;case "save":if(ma(xa(),"pcjs.org"))c.parentNode.removeChild(c);
|
||||
else return this.ia[b]=c,c.onclick=function(){var a=bv(d,!0);if(a){var b=!!(d.A&&!d.L||d.X),c=sv(d,b);b?wv(d,a,c):d.wa("Resume disabled, machine state not saved")}},!0}return!1};
|
||||
function bv(a,b){var c=a.B;c||((c=Ca(qv),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=yv(a,c))||a.wa("The user ID is invalid.")):b&&a.wa("Browser local storage is not available"));return c}
|
||||
function yv(a,b){a.B=null;b=wa(xa()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Da(qv,b.data),a.B=b.data)}catch(d){q(d.message+" ("+c+")")}return a.B}function fv(a){var b=null;a.B&&(b=xa()+"/api/v1/user?req=load&user="+a.B+"&state="+zv(a,"1.36.2"));return b}
|
||||
function wv(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=zv(a,"1.36.2");d.data=c;b=wa(xa()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.wa("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.wa(c),Da(qv,""),a.B=null)}}
|
||||
function tb(a,b,c){a=eb(a.id);for(var d=0;d<a.length;d++){var e=a[d];if(c)c==e&&(c=null);else if(e.type==b)return e}return null}function Tc(a,b){if(a.C.length){var c=0,d=0;!b&&window&&(c=window.scrollX,d=window.scrollY);a=a.C[0];a.F&&a.F.focus();!b&&window&&window.scrollTo(c,d)}}
|
||||
function bd(a,b){if(a.R){var c=a.R;if(c.ji&&(b||!c.X.cb||c.X.ei)){uf(c,"EAX",c.F);uf(c,"EBX",c.G);uf(c,"ECX",c.H);uf(c,"EDX",c.L);uf(c,"ESP",C(c));uf(c,"EBP",c.M);uf(c,"ESI",c.J);uf(c,"EDI",c.I);uf(c,"CS",c.fa.ha);uf(c,"DS",c.Ga.ha);uf(c,"SS",c.W.ha);uf(c,"ES",c.xa.ha);uf(c,"EIP",F(c));var d=wd(c);uf(c,"PS",d);uf(c,"V",d&2048);uf(c,"D",d&1024);uf(c,"I",d&512);uf(c,"T",d&256);uf(c,"S",d&128);uf(c,"Z",d&64);uf(c,"A",d&16);uf(c,"P",d&4);uf(c,"C",d&1);80386==c.ca&&(uf(c,"FS",c.rb.ha),uf(c,"GS",c.vb.ha),
|
||||
uf(c,"CR0",c.pa),uf(c,"CR2",c.rd),uf(c,"CR3",c.Vc))}if(d=c.ia.speed)d.textContent=c.X.cb&&c.V.hd?c.V.hd.toFixed(2)+"Mhz":"Stopped"}for(c=0;c<a.C.length;c++)lq(a.C[c],b)}var gv="failsafe",cv="validate",ev="timestamp",ov="version",pv="url",qv="browser",lv="user",Oc=-1,Wu=0,fv=1,iv=2,sv=3,$u=2;Ma(function(){for(var a=cb(document,"pcx86-machine"),b=0;b<a.length;b++)for(var c=a[b],d=db(c),c=cb(c,"pcx86","computer"),e=0;e<c.length;e++){var f=c[e],g=db(f),g=new Uu(g,d,!0);bb(g,f);g.U&&g.ze(g.ue)}});
|
||||
Na.show.push(function(){for(var a=cb(document,"pcx86","computer"),b=0;b<a.length;b++){var c=db(a[b]);if(c=ab("Computer",c.id))c.X.Yd=!1,c.X.Ke&&!c.X.Sb&&c.ue(Oc)}});Na.exit.push(function(){for(var a=cb(document,"pcx86","computer"),b=0;b<a.length;b++){var c=db(a[b]);if(c=ab("Computer",c.id))c.X.Yd=!0,c.X.Sb&&nv(c,!(!c.A||c.L),!0)}});function Me(a,b,c){this.id=a.id;this.Ea=a.Ea;this.A="";this.state={};this.B=this.C=!1;this.key=uv(a,b,c);jv(this,a.Dj)}l=Me.prototype;
|
||||
l.set=function(a,b){try{this.state[a]=b}catch(c){}};l.get=function(a){return this.state[a]||null};l.data=function(){return this.state};l.load=function(a){return a?(this.A=a,this.B=!0,this.C=!1,!0):this.B?!0:Aa()&&(a=Ca(this.key))?(this.A=a,this.B=!0):!1};function dv(a){var b=!0;if(!a.C)try{a.state=JSON.parse(a.A),a.C=!0}catch(c){q(c.message||c),b=!1}return b}
|
||||
function kv(a){var b=!0;if(Aa()){var c=JSON.stringify(a.state);Da(a.key,c)||(q("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}l.toString=function(){return this.state?JSON.stringify(this.state):this.A};function jv(a,b){a.A="";a.state={};a.B=a.C=!1;b&&a.set("parms",b)}
|
||||
l.clear=function(a){jv(this);var b=[];try{for(var c=0,d=window.localStorage.length;c<d;c++)b.push(window.localStorage.key(c))}catch(e){}for(c=0;c<b.length;c++)if((d=b[c])&&(a||d.substr(0,this.key.length)==this.key)){try{window.localStorage.removeItem(d)}catch(e){}b.splice(c,1);c=0}};function uv(a,b,c){a=a.id;if(b){var d=b.indexOf(".");0<d&&(a+=".v"+b.substr(0,d))}c&&(a+="."+c);return a}var vv=0;
|
||||
function wv(a,b,c,d,e,f){e("Loading "+a+"...");wa(a,null,!0,function(g,h,k){k?(h||(h="unable to load "+a+" ("+k+")"),f(h,null)):xv(h,a,b,c,d,e,f)})}
|
||||
function xv(a,b,c,d,e,f,g){function h(a,f){if(f)g(f,null);else{c&&(Va(c,b,a),(f=b)&&0>f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1<d.length&&(d+=",")):d='{state:"'+d+'",':d="{",d+='url:"'+f+'"}',"object"==typeof resources&&(f=null),d=d.replace(/\$/g,"$$$$"),a=a.replace(/(<machine[^>]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/(<xsl:variable name="APPNAME">).*?(<\/xsl:variable>)/,
|
||||
"$1PCx86$2"),a=a.replace(/(<xsl:variable name="APPCLASS">).*?(<\/xsl:variable>)/,"$1pcx86$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/<!DOCTYPE(.|[\r\n])*]>\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(r){f=null,a=r.message}else a="unrecognized XML: "+(255<a.length?a.substr(0,255)+"...":a);g(a,f)}}a?e?yv(a,f,h):h(a,null):g("no data"+(b?" for file: "+
|
||||
function bd(a,b){if(a.R){var c=a.R;if(c.ji&&(b||!c.Y.cb||c.Y.ei)){uf(c,"EAX",c.F);uf(c,"EBX",c.G);uf(c,"ECX",c.H);uf(c,"EDX",c.L);uf(c,"ESP",C(c));uf(c,"EBP",c.M);uf(c,"ESI",c.J);uf(c,"EDI",c.I);uf(c,"CS",c.fa.ha);uf(c,"DS",c.Ga.ha);uf(c,"SS",c.W.ha);uf(c,"ES",c.xa.ha);uf(c,"EIP",F(c));var d=wd(c);uf(c,"PS",d);uf(c,"V",d&2048);uf(c,"D",d&1024);uf(c,"I",d&512);uf(c,"T",d&256);uf(c,"S",d&128);uf(c,"Z",d&64);uf(c,"A",d&16);uf(c,"P",d&4);uf(c,"C",d&1);80386==c.ca&&(uf(c,"FS",c.rb.ha),uf(c,"GS",c.vb.ha),
|
||||
uf(c,"CR0",c.pa),uf(c,"CR2",c.rd),uf(c,"CR3",c.Vc))}if(d=c.ia.speed)d.textContent=c.Y.cb&&c.V.hd?c.V.hd.toFixed(2)+"Mhz":"Stopped"}for(c=0;c<a.C.length;c++)lq(a.C[c],b)}var lv="failsafe",hv="validate",jv="timestamp",tv="version",uv="url",vv="browser",qv="user",Oc=-1,av=0,kv=1,nv=2,xv=3,ev=2;Ma(function(){for(var a=cb(document,"pcx86-machine"),b=0;b<a.length;b++)for(var c=a[b],d=db(c),c=cb(c,"pcx86","computer"),e=0;e<c.length;e++){var f=c[e],g=db(f),g=new Zu(g,d,!0);bb(g,f);g.U&&g.ze(g.ue)}});
|
||||
Na.show.push(function(){for(var a=cb(document,"pcx86","computer"),b=0;b<a.length;b++){var c=db(a[b]);if(c=ab("Computer",c.id))c.Y.Yd=!1,c.Y.Ke&&!c.Y.Sb&&c.ue(Oc)}});Na.exit.push(function(){for(var a=cb(document,"pcx86","computer"),b=0;b<a.length;b++){var c=db(a[b]);if(c=ab("Computer",c.id))c.Y.Yd=!0,c.Y.Sb&&sv(c,!(!c.A||c.L),!0)}});function Me(a,b,c){this.id=a.id;this.Ea=a.Ea;this.A="";this.state={};this.B=this.C=!1;this.key=zv(a,b,c);ov(this,a.Dj)}l=Me.prototype;
|
||||
l.set=function(a,b){try{this.state[a]=b}catch(c){}};l.get=function(a){return this.state[a]||null};l.data=function(){return this.state};l.load=function(a){return a?(this.A=a,this.B=!0,this.C=!1,!0):this.B?!0:Aa()&&(a=Ca(this.key))?(this.A=a,this.B=!0):!1};function iv(a){var b=!0;if(!a.C)try{a.state=JSON.parse(a.A),a.C=!0}catch(c){q(c.message||c),b=!1}return b}
|
||||
function pv(a){var b=!0;if(Aa()){var c=JSON.stringify(a.state);Da(a.key,c)||(q("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}l.toString=function(){return this.state?JSON.stringify(this.state):this.A};function ov(a,b){a.A="";a.state={};a.B=a.C=!1;b&&a.set("parms",b)}
|
||||
l.clear=function(a){ov(this);var b=[];try{for(var c=0,d=window.localStorage.length;c<d;c++)b.push(window.localStorage.key(c))}catch(e){}for(c=0;c<b.length;c++)if((d=b[c])&&(a||d.substr(0,this.key.length)==this.key)){try{window.localStorage.removeItem(d)}catch(e){}b.splice(c,1);c=0}};function zv(a,b,c){a=a.id;if(b){var d=b.indexOf(".");0<d&&(a+=".v"+b.substr(0,d))}c&&(a+="."+c);return a}var Av=0;
|
||||
function Bv(a,b,c,d,e,f){e("Loading "+a+"...");wa(a,null,!0,function(g,h,k){k?(h||(h="unable to load "+a+" ("+k+")"),f(h,null)):Cv(h,a,b,c,d,e,f)})}
|
||||
function Cv(a,b,c,d,e,f,g){function h(a,f){if(f)g(f,null);else{c&&(Va(c,b,a),(f=b)&&0>f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1<d.length&&(d+=",")):d='{state:"'+d+'",':d="{",d+='url:"'+f+'"}',"object"==typeof resources&&(f=null),d=d.replace(/\$/g,"$$$$"),a=a.replace(/(<machine[^>]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/(<xsl:variable name="APPNAME">).*?(<\/xsl:variable>)/,
|
||||
"$1PCx86$2"),a=a.replace(/(<xsl:variable name="APPCLASS">).*?(<\/xsl:variable>)/,"$1pcx86$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/<!DOCTYPE(.|[\r\n])*]>\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(r){f=null,a=r.message}else a="unrecognized XML: "+(255<a.length?a.substr(0,255)+"...":a);g(a,f)}}a?e?Dv(a,f,h):h(a,null):g("no data"+(b?" for file: "+
|
||||
b:""),null)}
|
||||
function yv(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");wa(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var k=h[0],m,r=/( [a-z]+=)(['"])(.*?)\2/gi;m=r.exec(f);)k=0>k.toLowerCase().indexOf(m[1].toLowerCase())?k.replace(">",m[0]+">"):k.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=k&&(g=g.replace(h[0],k))}else{c(a,"missing <"+d[1]+
|
||||
"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/,"");a=a.replace(d[0],g);yv(a,b,c)}})}else c(a,null)}
|
||||
function zv(a,b,c,d){function e(a){if(void 0===h){var b=g&&cb(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=na(a))}function f(a){e("Error: "+a);k&&(--vv||Qa(!0));k=!1}var g,h,k=!0;vv++;Wa[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var r=document.head||document.getElementsByTagName("head")[0],y=document.createElement("style");y.type="text/css";y.styleSheet?y.styleSheet.cssText=m:y.appendChild(document.createTextNode(m));r.appendChild(y)}c||
|
||||
(c="/versions/pcx86/1.36.2/components.xsl");m=function(d,h){h?wv(c,null,null,!1,e,function(d,k){k?(Va(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(k=h.transformNode(k))?(g.outerHTML=k,--vv||Qa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(k),(k=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(k,g),--vv||Qa(!0)):f("invalid machine element: "+
|
||||
a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?wv(b,a,d,!0,e,m):xv(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return k}function Av(a,b,c,d){Qa(!1);return zv(a,b,c,d)}window.embedPC=Av;window.embedPCx86=Av;
|
||||
function Dv(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");wa(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var k=h[0],m,r=/( [a-z]+=)(['"])(.*?)\2/gi;m=r.exec(f);)k=0>k.toLowerCase().indexOf(m[1].toLowerCase())?k.replace(">",m[0]+">"):k.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=k&&(g=g.replace(h[0],k))}else{c(a,"missing <"+d[1]+
|
||||
"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/,"");a=a.replace(d[0],g);Dv(a,b,c)}})}else c(a,null)}
|
||||
function Ev(a,b,c,d){function e(a){if(void 0===h){var b=g&&cb(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=na(a))}function f(a){e("Error: "+a);k&&(--Av||Qa(!0));k=!1}var g,h,k=!0;Av++;Wa[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var r=document.head||document.getElementsByTagName("head")[0],y=document.createElement("style");y.type="text/css";y.styleSheet?y.styleSheet.cssText=m:y.appendChild(document.createTextNode(m));r.appendChild(y)}c||
|
||||
(c="/versions/pcx86/1.36.2/components.xsl");m=function(d,h){h?Bv(c,null,null,!1,e,function(d,k){k?(Va(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(k=h.transformNode(k))?(g.outerHTML=k,--Av||Qa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(k),(k=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(k,g),--Av||Qa(!0)):f("invalid machine element: "+
|
||||
a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Bv(b,a,d,!0,e,m):Cv(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return k}function Fv(a,b,c,d){Qa(!1);return Ev(a,b,c,d)}window.embedPC=Fv;window.embedPCx86=Fv;
|
||||
window.commandMachine=function(a,b,c,d,e,f){if("script"==e)return gb(c,f)?(b&&(a.disabled=!0),!0):!1;if(d){var g=ab(d,c+".machine");if(g){var h=g.exports;if(h&&(h=h[e]))return h.call(g,f)?(b&&(a.disabled=!0),!0):!1}}console.log("unimplemented: commandMachine('"+c+"','"+d+"','"+e+"','"+f+"')");return!1};window.enableEvents=Qa;window.sendEvent=Sa;
|
||||
function Bv(a,b,c,d){if(!c&&b){d.push(b);a=Wa[d[0]];b=null;for(var e in a)if(ma(e,"components.xsl")){b=e.replace(".xsl",".css");break}b?wa(b,null,!0,function(a,b){Cv(b,d)}):Cv(null,d)}else q("Error ("+c+") requesting "+a)}
|
||||
function Cv(a,b){var c,d,e,f=b[0],g=b[1];c=b[4];if(c=c.match(/^(\s*\(function\(\)\{)([\s\S]*)(}\)\(\);)/)){var h=Wa[f],k={},m;for(m in h){var r=h[m],y=la(m);if("xml"==y){for(y=/[ \t]*<disk [^>]*path=(['"])(.*?)\1.*?<\/disk>\n?/g;d=y.exec(h[m]);){var t=d[2];t&&(h[t]||(r=r.replace(d[0],"")))}d=m=ka(m)}else"xsl"==y&&(e=m=ka(m));k[m]=r}a&&(k[m="css"]=a);b[2]&&(k[m="parms"]=b[2]);b[3]&&(k[m="state"]=b[3]);d&&e?(a=JSON.stringify(k),g+=".js",c=c[1]+"var resources="+a+";"+c[2]+c[3],c=c.replace(/\u00A9/g,
|
||||
function Gv(a,b,c,d){if(!c&&b){d.push(b);a=Wa[d[0]];b=null;for(var e in a)if(ma(e,"components.xsl")){b=e.replace(".xsl",".css");break}b?wa(b,null,!0,function(a,b){Hv(b,d)}):Hv(null,d)}else q("Error ("+c+") requesting "+a)}
|
||||
function Hv(a,b){var c,d,e,f=b[0],g=b[1];c=b[4];if(c=c.match(/^(\s*\(function\(\)\{)([\s\S]*)(}\)\(\);)/)){var h=Wa[f],k={},m;for(m in h){var r=h[m],y=la(m);if("xml"==y){for(y=/[ \t]*<disk [^>]*path=(['"])(.*?)\1.*?<\/disk>\n?/g;d=y.exec(h[m]);){var t=d[2];t&&(h[t]||(r=r.replace(d[0],"")))}d=m=ka(m)}else"xsl"==y&&(e=m=ka(m));k[m]=r}a&&(k[m="css"]=a);b[2]&&(k[m="parms"]=b[2]);b[3]&&(k[m="state"]=b[3]);d&&e?(a=JSON.stringify(k),g+=".js",c=c[1]+"var resources="+a+";"+c[2]+c[3],c=c.replace(/\u00A9/g,
|
||||
"©"),a=Ka(c,"javascript",!1,g),a=a+(', copy it to your web server as "'+g+'", and then add the following to your web page:\n\n')+('<div id="'+f+'"></div>\n')+"...\n",a=a+('<script type="text/javascript" src="'+g+'">\x3c/script>\n')+('<script type="text/javascript">embedPC("'+f+'","'+d+'","'+e+'");\x3c/script>\n\n')+"The machine should appear where the <div> is located.",q(a)):q("Missing XML/XSL resources")}else q("Unsupported script")}
|
||||
window.savePC=function(a,b,c){var d=ab("Computer",a),e=ab("Debugger",a);if(d){var f=nv(d,!0),g=d.K?JSON.stringify(d.K):null;b||(b="/versions/pcx86/1.36.2/pcx86"+(e?"-dbg":"")+".js");if(c&&c({state:f,Dj:g}))return!0;wa(b,null,!0,function(c,d,e){Bv(c,d,e,[a,ka(b,!0),g,f])});return!0}q("Unable to identify machine '"+a+"'");return!1};})();//# sourceMappingURL=/versions/pcx86/1.36.2/pcx86.map
|
||||
window.savePC=function(a,b,c){var d=ab("Computer",a),e=ab("Debugger",a);if(d){var f=sv(d,!0),g=d.K?JSON.stringify(d.K):null;b||(b="/versions/pcx86/1.36.2/pcx86"+(e?"-dbg":"")+".js");if(c&&c({state:f,Dj:g}))return!0;wa(b,null,!0,function(c,d,e){Gv(c,d,e,[a,ka(b,!0),g,f])});return!0}q("Unable to identify machine '"+a+"'");return!1};})();//# sourceMappingURL=/versions/pcx86/1.36.2/pcx86.map
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -922,9 +922,21 @@
|
|||
|
||||
<xsl:template match="mouse[not(@ref)]">
|
||||
<xsl:param name="machine" select="''"/>
|
||||
<xsl:variable name="serial">
|
||||
<xsl:variable name="adapter">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@serial"><xsl:value-of select="@serial"/></xsl:when>
|
||||
<xsl:when test="@adapter"><xsl:value-of select="@adapter"/></xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="binding">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@binding"><xsl:value-of select="@binding"/></xsl:when>
|
||||
<xsl:otherwise/>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="type">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@type"><xsl:value-of select="@type"/></xsl:when>
|
||||
<xsl:otherwise/>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
|
@ -934,10 +946,16 @@
|
|||
<xsl:otherwise>0.5</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="serial">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@serial"><xsl:value-of select="@serial"/></xsl:when>
|
||||
<xsl:otherwise/>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:call-template name="component">
|
||||
<xsl:with-param name="machine" select="$machine"/>
|
||||
<xsl:with-param name="class">mouse</xsl:with-param>
|
||||
<xsl:with-param name="parms">,serial:'<xsl:value-of select="$serial"/>',scaleMouse:<xsl:value-of select="$scaleMouse"/></xsl:with-param>
|
||||
<xsl:with-param name="parms">,adapter:<xsl:value-of select="$adapter"/>,binding:'<xsl:value-of select="$binding"/>',type:'<xsl:value-of select="$type"/>',scaleMouse:<xsl:value-of select="$scaleMouse"/>,serial:'<xsl:value-of select="$serial"/>'</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue