From d5b21be7824a0f8cf7ad530be37aebc41adf3fdf Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Thu, 15 Jun 2017 16:03:05 -0700 Subject: [PATCH] Updated v1.35.0 files --- _posts/2017-06-15-adventures-in-archiving.md | 29 +-- .../pcx86/keyboard/us83-buttons-functions.xml | 4 + .../pcx86/machine/5150/cga/64kb/machine.xml | 3 +- versions/pc8080/1.35.0/pc8080-dbg.js | 180 +++++++++--------- versions/pcx86/1.35.0/pcx86-dbg.js | 2 +- 5 files changed, 113 insertions(+), 105 deletions(-) diff --git a/_posts/2017-06-15-adventures-in-archiving.md b/_posts/2017-06-15-adventures-in-archiving.md index f21887845..e4ed7011f 100644 --- a/_posts/2017-06-15-adventures-in-archiving.md +++ b/_posts/2017-06-15-adventures-in-archiving.md @@ -47,30 +47,33 @@ something one could easily determine using the Internet Archive's own search eng ### Emulation Challenges -There are also some fundamental problems with the Internet Archive's approach to emulation. They load sets of files, -along with custom batch files, into tightly coupled machine configurations, with no indication which files were part -of the original software distribution, and no hardware details regarding their "mystery" machine configurations. +There are a few issues with the Internet Archive's approach to emulation that I'd like to discuss. First, they load +sets of files, along with custom batch files, into tightly coupled machine configurations, with no indication which +files were part of the original software distribution, and no hardware details regarding their "mystery" machine +configurations. -And the Internet Archive's overall "emulation experience" is often not very faithful. Their rendering of -"Adventures in Math" gives the impression that the game ran *much* faster than it actually ran on a 4.77Mhz IBM PC. -While their emulator can be configured operate at different speeds, it's unclear which of their holdings have already -been "tuned". As a fallback, they do provide some user controls: +Second, the Internet Archive's overall emulation experience doesn't represent the original hardware and software very +accurately. Their rendering of "Adventures in Math" gives the impression that the game ran *much* faster than it +actually ran on a circa 1983 4.77Mhz IBM PC. Their emulator can be configured operate at different speeds, but it's +unclear which of their holdings have already been "tuned" and which have not. "Adventures in Math" has not. + +As a fallback, they do provide some user controls: > "While the program is running, press CTRL-F11 to slow the program down. Pressing CTRL-F11 repeatedly will slow it down further, until the speed is more reasonable. (Pressing CTRL-F12 repeatedly will attempt to speed things up.)" but in general, the user has no idea what speed they have currently selected, or what the target speed should be. -For users who simply want "to play the game," that may be fine, but an historian would probably prefer to see how the +For users who simply want "to play the game," that may be fine, but historians would probably prefer to see how the game originally operated and how each screen was painstakingly rendered, to better understand both the original user experience and the challenges that early software developers faced. The failure to archive software exactly as it was originally distributed, generally as one or more disk image (IMG) -files along with scanned (PDF) copies of the documentation, is the most serious problem we collectively face. I don't -blame the Internet Archive, because in most cases, they're simply archiving what someone else archived before them, -and those earlier "archivists" often didn't take the time to thoroughly preserve and document everything. +files along with scanned (PDF) copies of the documentation, is one of the most important problems we collectively face. +I don't blame the Internet Archive, because in most cases, they're simply archiving what someone else archived before +them, and those earlier "archivists" often didn't take the time to thoroughly preserve and document everything. -On the other hand, the Internet Archive could do a better job of cataloging its holdings, recording the provenance of -everything they have archived, maintaining a clear separation of original material from subsequent modifications +On the other hand, the Internet Archive could probably do a better job cataloging its holdings, recording the provenance +of everything they have archived, maintaining a clear separation of original material from subsequent modifications (including any modifications created solely for ease of emulation), providing more control over machine configurations, and enabling the use of third-party emulators -- like PCjs -- which may be able to perform a more faithful rendering of certain software packages. diff --git a/devices/pcx86/keyboard/us83-buttons-functions.xml b/devices/pcx86/keyboard/us83-buttons-functions.xml index 923343c9c..ec4f77285 100644 --- a/devices/pcx86/keyboard/us83-buttons-functions.xml +++ b/devices/pcx86/keyboard/us83-buttons-functions.xml @@ -13,4 +13,8 @@ F8 F9 F10 + + + + diff --git a/devices/pcx86/machine/5150/cga/64kb/machine.xml b/devices/pcx86/machine/5150/cga/64kb/machine.xml index 9b604a4d3..ba98780d1 100644 --- a/devices/pcx86/machine/5150/cga/64kb/machine.xml +++ b/devices/pcx86/machine/5150/cga/64kb/machine.xml @@ -11,7 +11,8 @@ Run Reset + Speed - + diff --git a/versions/pc8080/1.35.0/pc8080-dbg.js b/versions/pc8080/1.35.0/pc8080-dbg.js index e0d1b01b3..0ae212406 100644 --- a/versions/pc8080/1.35.0/pc8080-dbg.js +++ b/versions/pc8080/1.35.0/pc8080-dbg.js @@ -49,7 +49,7 @@ function ta(){return"http://"+(window?window.location.host:"www.pcjs.org")}funct function La(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Oa(a){if(window){var b=Ha();return"iOS"==a&&!!b.match(/(iPod|iPhone|iPad)/)&&!!b.match(/AppleWebKit/)||"MSIE"==a&&!!b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)}return!1}function Pa(a){if(!Qa){var b,c={};if(window){b||(b=window.location.search.substr(1));for(var d,e=/\+/g,f=/([^&=]+)=?([^&]*)/g;d=f.exec(b);)c[decodeURIComponent(d[1].replace(e," "))]=decodeURIComponent(d[2].replace(e," "))}Qa=c}return Qa[a]} function Ra(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0a?this.cb=this.id:(this.eb=this.id.substr(0,a),this.cb=this.id.substr(a+1));this.G={ready:!1,mb:!1,Ib:!1,ja:!1,error:!1};this.zb=null;this.G.error=!1;this.ha=c||0;this.K=this.u=this.I=this.R=this.ua=null;fb.push(this)} +Ta(Oa("Opera")||Oa("iOS")?"onunload":"onbeforeunload",function(){Wa(Va.exit)});function t(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.vc=b.comment;this.Ad=b;this.exports={};this.P=this.bindings={};a=this.id.indexOf(".");0>a?this.cb=this.id:(this.eb=this.id.substr(0,a),this.cb=this.id.substr(a+1));this.G={ready:!1,mb:!1,Ib:!1,ja:!1,error:!1};this.zb=null;this.G.error=!1;this.ha=c||0;this.K=this.w=this.I=this.R=this.ua=null;fb.push(this)} function gb(a,b,c){hb[a]&&b&&(hb[a][b]=c)}function ib(){return Date.now()||+new Date}function Ya(a,b,c){b||r((c?c+": ":"")+a)}function r(a){window&&window.alert(a)}function jb(a){var b=!1;window&&(b=window.confirm(a));return b}function kb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.g&&(this.g=10);15>2;this.j=this.w-1;this.L=this.N/this.w|0;this.H=this.L-1;this.A=[];this.B=[];this.D=this.F=!1;this.S=[];this.T=[];a=new z;Mb(a,this.K);this.b=Array(this.L);for(b=0;b>>a.g;0f&&(p=f);if(h&&h.size){if(h.type==d){if(e+f<=h.J)return h.pb+=h.J-e,h.J=e,!0;if(e>=h.J+h.pb){p=h.size-(e-k);p>f&&(p=f);h.pb=e-h.J+p;e=k+a.w;f-=p;g++;continue}}return Ob(Rb,e,f)}e=new z(e,p,a.w,d);Mb(e,a.K,h);a.b[g++]=e;e=k+a.w;f-=p}return 0>=f?(a.status(Math.floor(c/1024)+"Kb "+Sb[d]+" at "+q(b)),!0):Ob(Tb,b,c)} +function Lb(a,b,c){t.call(this,"Bus",a);this.w=b;this.K=c;this.M=a.busWidth||16;this.N=Math.pow(2,this.M);this.C=this.N-1|0;this.g=(this.M>>1)+2;10>this.g&&(this.g=10);15>2;this.j=this.u-1;this.L=this.N/this.u|0;this.H=this.L-1;this.A=[];this.B=[];this.D=this.F=!1;this.S=[];this.T=[];a=new z;Mb(a,this.K);this.b=Array(this.L);for(b=0;b>>a.g;0f&&(p=f);if(h&&h.size){if(h.type==d){if(e+f<=h.J)return h.pb+=h.J-e,h.J=e,!0;if(e>=h.J+h.pb){p=h.size-(e-k);p>f&&(p=f);h.pb=e-h.J+p;e=k+a.u;f-=p;g++;continue}}return Ob(Rb,e,f)}e=new z(e,p,a.u,d);Mb(e,a.K,h);a.b[g++]=e;e=k+a.u;f-=p}return 0>=f?(a.status(Math.floor(c/1024)+"Kb "+Sb[d]+" at "+q(b)),!0):Ob(Tb,b,c)} function Ub(a,b){return a.b[(b&a.C)>>>a.g].ob(b&a.j,b)}function Vb(a,b){var c=b&a.j,d=(b&a.C)>>>a.g;return c!=a.j?a.b[d].Hc(c,b):a.b[d++].Ya(c,b)|a.b[d&a.H].Ya(0,b+1)<<8}function Wb(a,b){var c=b&a.j,d=(b&a.C)>>>a.g;return c!=a.j?a.b[d].Nb(c,b):a.b[d++].ob(c,b)|a.b[d&a.H].ob(0,b+1)<<8}function Xb(a,b,c){a.b[(b&a.C)>>>a.g].qb(b&a.j,c&255,b)}function Yb(a,b,c){var d=b&a.j,e=(b&a.C)>>>a.g;d!=a.j?a.b[e].Kc(d,c&65535,b):(a.b[e++].$a(d,c&255,b),a.b[e&a.H].$a(0,c>>8&255,b+1))} function Zb(a){for(var b=0,c=[],d=0;d>>=f)&k;if(void 0!==g){if(g[0])g[0](b,k,d);a.K&&a.F!=g[1]&&gc(a.K,b,k)}else a.K&&(Eb(a.K,a,b,k,d),a.F&&gc(a.K,b,k));f+=h<<3;b+=h;e-=h}}function Ob(a,b,c){r("Memory block error ("+a+": "+n(b)+","+n(c)+")");return!1}var Rb=1,Tb=2,ic;if(Fb){var jc=new ArrayBuffer(2);(new DataView(jc)).setUint16(0,256,!0);ic=256===(new Uint16Array(jc))[0]}else ic=!1;var kc=ic; -function z(a,b,c,d){this.id=lc+=2;this.b=null;this.J=a;this.pb=b;this.size=c||0;this.type=d||vc;this.u=d==wc;Mb(this);this.Ea=this.Dc=!1;if(c)if(Fb)this.j=new ArrayBuffer(c),this.R=new DataView(this.j,0,c),this.g=new Uint8Array(this.j,0,c),this.w=new Uint16Array(this.j,0,c>>1),this.b=new Int32Array(this.j,0,c>>2),xc(this,kc?yc:zc);else{this.b=Array(c>>2);for(a=0;a>1),this.b=new Int32Array(this.j,0,c>>2),xc(this,kc?yc:zc);else{this.b=Array(c>>2);for(a=0;a>2),b=0;b>8,c)};l.ie=function(a){return this.b[a>>2]>>>((a&3)<<3)&255};l.me=function(a){var b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8};l.we=function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Ea=!0};l.ge=function(a,b){if(this.K&&null!=this.J){var c=this.K;Gc(c,this.J+a,1,c.M)&&c.ea(!0)}return this.ob(a,b)};l.ke=function(a,b){if(this.K&&null!=this.J){var c=this.K;Gc(c,this.J+a,2,c.M)&&c.ea(!0)}return this.Nb(a,b)}; -l.ue=function(a,b,c){if(this.K&&null!=this.J){var d=this.K;Gc(d,this.J+a,1,d.B)&&d.ea(!0)}this.u?this.rb(0,b):this.qb(a,b,c)};l.ye=function(a,b,c){if(this.K&&null!=this.J){var d=this.K;Gc(d,this.J+a,2,d.B)&&d.ea(!0)}this.u?this.rb(0,b):this.Sb(a,b,c)};l.fe=function(a){return this.g[a]};l.he=function(a){return this.g[a]};l.je=function(a){return this.R.getUint16(a,!0)};l.le=function(a){return a&1?this.g[a]|this.g[a+1]<<8:this.w[a>>1]};l.te=function(a,b){this.g[a]=b;this.Ea=!0}; -l.ve=function(a,b){this.g[a]=b;this.Ea=!0};l.xe=function(a,b){this.R.setUint16(a,b,!0);this.Ea=!0};l.ze=function(a,b){a&1?(this.g[a]=b,this.g[a+1]=b>>8):this.w[a>>1]=b;this.Ea=!0};var vc=0,wc=2,Sb=["NONE","RAM","ROM","VID","H/W"],lc=0,Bc=[],Ac=[z.prototype.ie,z.prototype.we,z.prototype.me,z.prototype.Ae],Ec=[z.prototype.ge,z.prototype.ue,z.prototype.ke,z.prototype.ye];if(Fb)var zc=[z.prototype.fe,z.prototype.te,z.prototype.je,z.prototype.xe],yc=[z.prototype.he,z.prototype.ve,z.prototype.le,z.prototype.ze]; +l.ue=function(a,b,c){if(this.K&&null!=this.J){var d=this.K;Gc(d,this.J+a,1,d.B)&&d.ea(!0)}this.w?this.rb(0,b):this.qb(a,b,c)};l.ye=function(a,b,c){if(this.K&&null!=this.J){var d=this.K;Gc(d,this.J+a,2,d.B)&&d.ea(!0)}this.w?this.rb(0,b):this.Sb(a,b,c)};l.fe=function(a){return this.g[a]};l.he=function(a){return this.g[a]};l.je=function(a){return this.R.getUint16(a,!0)};l.le=function(a){return a&1?this.g[a]|this.g[a+1]<<8:this.u[a>>1]};l.te=function(a,b){this.g[a]=b;this.Ea=!0}; +l.ve=function(a,b){this.g[a]=b;this.Ea=!0};l.xe=function(a,b){this.R.setUint16(a,b,!0);this.Ea=!0};l.ze=function(a,b){a&1?(this.g[a]=b,this.g[a+1]=b>>8):this.u[a>>1]=b;this.Ea=!0};var vc=0,wc=2,Sb=["NONE","RAM","ROM","VID","H/W"],lc=0,Bc=[],Ac=[z.prototype.ie,z.prototype.we,z.prototype.me,z.prototype.Ae],Ec=[z.prototype.ge,z.prototype.ue,z.prototype.ke,z.prototype.ye];if(Fb)var zc=[z.prototype.fe,z.prototype.te,z.prototype.je,z.prototype.xe],yc=[z.prototype.he,z.prototype.ve,z.prototype.le,z.prototype.ze]; function Hc(a,b){t.call(this,"CPU",a,1);var c=a.multiplier||1;this.Aa=a.cycles||b;this.U=c;this.Ta=Math.round(this.Aa/1E4)/100;this.Z=this.Ta*this.U;this.G.ma=!1;this.G.Qb=!1;this.G.lb=a.autoStart;this.G.Bc=!1;this.G.Wa=!1;this.xa=this.oa=0;this.za=a.csStart;this.na=a.csInterval;this.sa=a.csStop;this.T=[];this.Db=this.tb.bind(this);zb(this)}aa(Hc,t);l=Hc.prototype; l.Ga=function(a,b,c,d){this.R=a;this.I=b;this.K=d;for(b=0;ba.Y/a.Z?b=1:d=!0;a.U=b;b=a.Ta*a.U; l.tb=function(a){if(Bb(this,!0)){if(!this.G.ma){Rc(this);this.R&&this.R.start(this.W,Qc(this));this.G.ma=!0;this.G.Qb=!0;this.V&&this.V.start();var b=this.P.run;b&&(b.textContent="Halt");this.R&&(Yc(this.R,!0),a&&this.R.Za(!0))}this.Va>=this.Aa&&Tc(this,!0);this.Da=0;this.Ma=ib();this.ba&&(a=this.Ma-this.ba,a>this.jb&&(this.W+=a,this.W>this.Ma&&(this.W=this.Ma)));try{do{for(var c,d=this.G.Wa?1:this.Na,e=this.T.length-1;0<=e;e--){var f=this.T[e];0>f[0]||d>f[0]&&(d=f[0])}c=d;this.Eb(c);c=Xc(this,!0); this.Da+=c;this.X+=c;Pc(this,c);a=c;for(var g=this.T.length-1;0<=g;g--){var h=this.T[g];0>h[0]||(h[0]-=a,0>=h[0]&&(h[0]=-1,h[1]()))}this.ta-=c;if(0>=this.ta){this.ta+=this.Na;++this.kb>=Zc&&(this.R&&Yc(this.R),this.kb=0);break}}while(this.G.ma)}catch(k){this.ea();Oc(this);this.R&&this.R.stop(ib(),Qc(this));Bb(this,!1);xb(this,k.stack||k.message);return}c=setTimeout;d=this.Db;this.ba=ib();e=this.jb;this.Da&&(e=Math.round(e*this.Da/this.Na));e-=this.ba-this.Ma;if(f=this.ba-this.W)this.Y=Math.round(this.X/ (10*f))/100,864E5<=f&&(this.ka=0,Rc(this));if(0>e||this.Ye&&(this.W-=e),e=0;this.Va+=this.Da;this.ba+=e;c(d,e)}else Oc(this),this.R&&this.R.stop(ib(),Qc(this))};l.Eb=function(){return 0};l.ea=function(a){Ab(this,!0);Xc(this);Sc(this,this.X);this.X=0;if(this.G.ma){this.G.ma=!1;this.V&&this.V.stop();var b=this.P.run;b&&(b.textContent="Run")}this.G.complete=a};function Oc(a,b){if(a.R){for(var c=a.R,d=0;d>8&255;a.A=b&255}function wd(a){return a.B<<8|a.C}function xd(a,b){a.B=b>>8&255;a.C=b&255}function D(a){return a.D<<8|a.F} +function ad(a){var b=+a.model||8080;Hc.call(this,a,1E6);this.xb=b;this.gb=bd;Kc(this);this.G.complete=this.G.zd=!1;this.ib=0;this.La=[];this.hb=0;od(this)}aa(ad,Hc);function pd(a,b){a.La.push(b)}l=ad.prototype;l.reset=function(){this.G.ma&&this.ea();od(this);Kc(this);this.G.error=!1;Hc.prototype.reset.call(this)};function od(a){a.g=0;a.u=0;a.A=0;a.B=0;a.C=0;a.D=0;a.F=0;a.M=0;A(a,a.hb);qd(a,0);a.S=0}function rd(a,b){a.hb=b;A(a,b)} +l.Ec=function(){var a=this.g+this.u+this.A+this.B+this.C+this.D+this.F|0;return a=a+this.M+this.j+sd(this)|0};l.save=function(){var a=new td(this);a.set(0,[this.g,this.u,this.A,this.B,this.C,this.D,this.F,this.M,this.j,sd(this)]);a.set(1,[this.S,this.ka,this.U]);a.set(2,Zb(this.I));return a.data()}; +l.restore=function(a){var b=a[0];this.g=b[0];this.u=b[1];this.A=b[2];this.B=b[3];this.C=b[4];this.D=b[5];this.F=b[6];this.M=b[7]&65535;A(this,b[8]);qd(this,b[9]);b=a[1];this.S=b[0];this.ka=b[1];Rc(this,b[3]);a:{b=this.I;a=a[2];var c;for(c=0;c>8&255;a.A=b&255}function wd(a){return a.B<<8|a.C}function xd(a,b){a.B=b>>8&255;a.C=b&255}function D(a){return a.D<<8|a.F} function yd(a,b){a.D=b>>8&255;a.F=b&255}function A(a,b){a.j=b&65535}function zd(a){return a.H&256?1:0}function Ad(a,b){a.H=a.H&255|b}function Bd(a){return Gb[a.L&255]?4:0}function Cd(a){return(a.L^a.O)&16?16:0}function Dd(a){return a.H&255?0:64}function Ed(a){return a.L&128?128:0}function sd(a){return a.N&-214|Ed(a)|Dd(a)|Cd(a)|Bd(a)|zd(a)}function qd(a,b){a.H=a.L=a.O=0;b&1&&(a.H|=256);b&4||(a.L|=1);b&16&&(a.O|=16);b&64||(a.H|=255);b&128&&(a.L^=192);a.N=a.N&-726|b&512|2} function Fd(a,b){a.O=a.g^b;return a.L=(a.H=a.g+b)&255}function Gd(a,b){a.O=a.g^b;return a.L=(a.H=a.g+b+(a.H&256?1:0))&255}function Hd(a,b){a.H=a.L=a.O=a.g&b;(a.g|b)&8&&(a.O^=16);return a.H}function Id(a,b){a.O=b^255;b=a.L=b+255&255;a.H=a.H&-256|b;return b}function Jd(a,b){a.O=b;b=a.L=b+1&255;a.H=a.H&-256|b;return b}function Kd(a,b){return a.L=a.H=a.O=a.g|b}function Ld(a,b){b^=255;a.O=a.g^b;return a.L=(a.H=a.g+b+1^256)&255} function Md(a,b){b^=255;a.O=a.g^b;return a.L=(a.H=a.g+b+(a.H&256?0:1)^256)&255}function Nd(a,b){return a.L=a.H=a.O=a.g^b}function E(a,b){a=a.I;return a.b[(b&a.C)>>>a.g].Ya(b&a.j,b)}function Od(a,b,c){a=a.I;a.b[(b&a.C)>>>a.g].$a(b&a.j,c&255,b)}function F(a){var b=E(a,a.j);A(a,a.j+1);return b}function G(a){var b=Vb(a.I,a.j);A(a,a.j+2);return b}function Pd(a){var b=Vb(a.I,a.M);a.M=a.M+2&65535;return b}function H(a,b){a.M=a.M-2&65535;Yb(a.I,a.M,b)} function Qd(a){if(a.b&&a.S&255&&a.N&512){for(var b=0;8>b&&!(a.S&1<b?255:1<>8;Ad(this,a&256);this.b-=4},Ud,function(){var a;yd(this,a=D(this)+ud(this));Ad(this,a>>8&256);this.b-=10},function(){this.g=E(this,ud(this));this.b-=7},function(){vd(this,ud(this)-1);this.b-= +var bd=[Ud,function(){vd(this,G(this));this.b-=10},function(){Od(this,ud(this),this.g);this.b-=7},function(){vd(this,ud(this)+1);this.b-=5},function(){this.u=Jd(this,this.u);this.b-=5},function(){this.u=Id(this,this.u);this.b-=5},function(){this.u=F(this);this.b-=7},function(){var a=this.g<<1;this.g=a&255|a>>8;Ad(this,a&256);this.b-=4},Ud,function(){var a;yd(this,a=D(this)+ud(this));Ad(this,a>>8&256);this.b-=10},function(){this.g=E(this,ud(this));this.b-=7},function(){vd(this,ud(this)-1);this.b-= 5},function(){this.A=Jd(this,this.A);this.b-=5},function(){this.A=Id(this,this.A);this.b-=5},function(){this.A=F(this);this.b-=7},function(){var a=this.g<<8&256;this.g=(a|this.g)>>1;Ad(this,a);this.b-=4},Ud,function(){xd(this,G(this));this.b-=10},function(){Od(this,wd(this),this.g);this.b-=7},function(){xd(this,wd(this)+1);this.b-=5},function(){this.B=Jd(this,this.B);this.b-=5},function(){this.B=Id(this,this.B);this.b-=5},function(){this.B=F(this);this.b-=7},function(){var a=this.g<<1;this.g=a&255| zd(this);Ad(this,a&256);this.b-=4},Ud,function(){var a;yd(this,a=D(this)+wd(this));Ad(this,a>>8&256);this.b-=10},function(){this.g=E(this,wd(this));this.b-=7},function(){xd(this,wd(this)-1);this.b-=5},function(){this.C=Jd(this,this.C);this.b-=5},function(){this.C=Id(this,this.C);this.b-=5},function(){this.C=F(this);this.b-=7},function(){var a=this.g<<8;this.g=(zd(this)<<8|this.g)>>1;Ad(this,a&256);this.b-=4},Ud,function(){yd(this,G(this));this.b-=10},function(){var a=G(this);Yb(this.I,a,D(this)); this.b-=16},function(){yd(this,D(this)+1);this.b-=5},function(){this.D=Jd(this,this.D);this.b-=5},function(){this.D=Id(this,this.D);this.b-=5},function(){this.D=F(this);this.b-=7},function(){var a=0,b=zd(this);if(Cd(this)||9<(this.g&15))a|=6;if(b||154<=this.g)a|=96,b=1;this.g=Fd(this,a);Ad(this,b?256:0);this.b-=4},Ud,function(){var a;yd(this,a=D(this)+D(this));Ad(this,a>>8&256);this.b-=10},function(){var a;a=G(this);a=Vb(this.I,a);yd(this,a);this.b-=16},function(){yd(this,D(this)-1);this.b-=5},function(){this.F= Jd(this,this.F);this.b-=5},function(){this.F=Id(this,this.F);this.b-=5},function(){this.F=F(this);this.b-=7},function(){this.g=~this.g&255;this.b-=4},Ud,function(){this.M=G(this)&65535;this.b-=10},function(){Od(this,G(this),this.g);this.b-=13},function(){this.M=this.M+1&65535;this.b-=5},function(){var a=D(this);Od(this,a,Jd(this,E(this,a)));this.b-=10},function(){var a=D(this);Od(this,a,Id(this,E(this,a)));this.b-=10},function(){Od(this,D(this),F(this));this.b-=10},function(){this.H|=256;this.b-= -4},Ud,function(){var a;yd(this,a=D(this)+this.M);Ad(this,a>>8&256);this.b-=10},function(){this.g=E(this,G(this));this.b-=13},function(){this.M=this.M-1&65535;this.b-=5},function(){this.g=Jd(this,this.g);this.b-=5},function(){this.g=Id(this,this.g);this.b-=5},function(){this.g=F(this);this.b-=7},function(){Ad(this,zd(this)?0:256);this.b-=4},function(){this.b-=5},function(){this.w=this.A;this.b-=5},function(){this.w=this.B;this.b-=5},function(){this.w=this.C;this.b-=5},function(){this.w=this.D;this.b-= -5},function(){this.w=this.F;this.b-=5},function(){this.w=E(this,D(this));this.b-=7},function(){this.w=this.g;this.b-=5},function(){this.A=this.w;this.b-=5},function(){this.b-=5},function(){this.A=this.B;this.b-=5},function(){this.A=this.C;this.b-=5},function(){this.A=this.D;this.b-=5},function(){this.A=this.F;this.b-=5},function(){this.A=E(this,D(this));this.b-=7},function(){this.A=this.g;this.b-=5},function(){this.B=this.w;this.b-=5},function(){this.B=this.A;this.b-=5},function(){this.b-=5},function(){this.B= -this.C;this.b-=5},function(){this.B=this.D;this.b-=5},function(){this.B=this.F;this.b-=5},function(){this.B=E(this,D(this));this.b-=7},function(){this.B=this.g;this.b-=5},function(){this.C=this.w;this.b-=5},function(){this.C=this.A;this.b-=5},function(){this.C=this.B;this.b-=5},function(){this.b-=5},function(){this.C=this.D;this.b-=5},function(){this.C=this.F;this.b-=5},function(){this.C=E(this,D(this));this.b-=7},function(){this.C=this.g;this.b-=5},function(){this.D=this.w;this.b-=5},function(){this.D= -this.A;this.b-=5},function(){this.D=this.B;this.b-=5},function(){this.D=this.C;this.b-=5},function(){this.b-=5},function(){this.D=this.F;this.b-=5},function(){this.D=E(this,D(this));this.b-=7},function(){this.D=this.g;this.b-=5},function(){this.F=this.w;this.b-=5},function(){this.F=this.A;this.b-=5},function(){this.F=this.B;this.b-=5},function(){this.F=this.C;this.b-=5},function(){this.F=this.D;this.b-=5},function(){this.b-=5},function(){this.F=E(this,D(this));this.b-=7},function(){this.F=this.g; -this.b-=5},function(){Od(this,D(this),this.w);this.b-=7},function(){Od(this,D(this),this.A);this.b-=7},function(){Od(this,D(this),this.B);this.b-=7},function(){Od(this,D(this),this.C);this.b-=7},function(){Od(this,D(this),this.D);this.b-=7},function(){Od(this,D(this),this.F);this.b-=7},function(){var a=this.j-1;if(this.La.length)for(var b=0;b>8&256);this.b-=10},function(){this.g=E(this,G(this));this.b-=13},function(){this.M=this.M-1&65535;this.b-=5},function(){this.g=Jd(this,this.g);this.b-=5},function(){this.g=Id(this,this.g);this.b-=5},function(){this.g=F(this);this.b-=7},function(){Ad(this,zd(this)?0:256);this.b-=4},function(){this.b-=5},function(){this.u=this.A;this.b-=5},function(){this.u=this.B;this.b-=5},function(){this.u=this.C;this.b-=5},function(){this.u=this.D;this.b-= +5},function(){this.u=this.F;this.b-=5},function(){this.u=E(this,D(this));this.b-=7},function(){this.u=this.g;this.b-=5},function(){this.A=this.u;this.b-=5},function(){this.b-=5},function(){this.A=this.B;this.b-=5},function(){this.A=this.C;this.b-=5},function(){this.A=this.D;this.b-=5},function(){this.A=this.F;this.b-=5},function(){this.A=E(this,D(this));this.b-=7},function(){this.A=this.g;this.b-=5},function(){this.B=this.u;this.b-=5},function(){this.B=this.A;this.b-=5},function(){this.b-=5},function(){this.B= +this.C;this.b-=5},function(){this.B=this.D;this.b-=5},function(){this.B=this.F;this.b-=5},function(){this.B=E(this,D(this));this.b-=7},function(){this.B=this.g;this.b-=5},function(){this.C=this.u;this.b-=5},function(){this.C=this.A;this.b-=5},function(){this.C=this.B;this.b-=5},function(){this.b-=5},function(){this.C=this.D;this.b-=5},function(){this.C=this.F;this.b-=5},function(){this.C=E(this,D(this));this.b-=7},function(){this.C=this.g;this.b-=5},function(){this.D=this.u;this.b-=5},function(){this.D= +this.A;this.b-=5},function(){this.D=this.B;this.b-=5},function(){this.D=this.C;this.b-=5},function(){this.b-=5},function(){this.D=this.F;this.b-=5},function(){this.D=E(this,D(this));this.b-=7},function(){this.D=this.g;this.b-=5},function(){this.F=this.u;this.b-=5},function(){this.F=this.A;this.b-=5},function(){this.F=this.B;this.b-=5},function(){this.F=this.C;this.b-=5},function(){this.F=this.D;this.b-=5},function(){this.b-=5},function(){this.F=E(this,D(this));this.b-=7},function(){this.F=this.g; +this.b-=5},function(){Od(this,D(this),this.u);this.b-=7},function(){Od(this,D(this),this.A);this.b-=7},function(){Od(this,D(this),this.B);this.b-=7},function(){Od(this,D(this),this.C);this.b-=7},function(){Od(this,D(this),this.D);this.b-=7},function(){Od(this,D(this),this.F);this.b-=7},function(){var a=this.j-1;if(this.La.length)for(var b=0;b>8;this.b-=10},function(){var a=G(this);Ed(this)||A(this,a);this.b-=10},function(){this.N&=-513;this.b-=4},function(){var a=G(this);Ed(this)||(H(this,this.j),A(this,a),this.b-=6);this.b-=11},function(){H(this,sd(this)&255|this.g<<8);this.b-=11},function(){this.g=Kd(this,F(this));this.b-=7},function(){H(this,this.j);A(this,48);this.b-=11},function(){Ed(this)&& (A(this,Pd(this)),this.b-=6);this.b-=5},function(){this.M=D(this)&65535;this.b-=5},function(){var a=G(this);Ed(this)&&A(this,a);this.b-=10},function(){this.N|=512;this.b-=4;Qd(this)},function(){var a=G(this);Ed(this)&&(H(this,this.j),A(this,a),this.b-=6);this.b-=11},Xd,function(){Ld(this,F(this));this.b-=7},function(){H(this,this.j);A(this,56);this.b-=11}]; function Yd(a){t.call(this,"ChipSet",a,32768);var b=a.model;b&&!Zd[b]&&Ya("Unrecognized ChipSet model: "+b);this.g=Zd[b]||{};a.sound&&(this.U=null,window&&(this.U=window.AudioContext||window.webkitAudioContext),this.U&&new this.U);zb(this)}aa(Yd,t);l=Yd.prototype;l.da=function(){return!1}; -l.Ga=function(a,b,c,d){this.I=b;this.u=c;this.K=d;this.R=a;this.B=Jb(a,"Keyboard");this.C=Jb(a,"SerialPort");this.video=Jb(a,"Video");ac(b,this,this.g.Bb);ec(b,this,this.g.Cb);if(d){var e=this;$d(d,16384,function(){for(var a="",b=0;b>8-this.T&255;x(this,a,null,b,"SHIFT.RESULT",c,!0);return c};l.Wd=function(a,b,c){x(this,a,b,c,"SHIFT.COUNT",null,!0);this.T=b};l.Yd=function(a,b,c){x(this,a,b,c,"SOUND1",null,!0);this.Y=b};l.Xd=function(a,b,c){x(this,a,b,c,"SHIFT.DATA",null,!0);this.N=b<<8|this.N>>8}; l.Zd=function(a,b,c){x(this,a,b,c,"SOUND2",null,!0);this.Z=b};l.$d=function(a,b,c){x(this,a,b,c,"WATCHDOG",null,!0)};function be(a){var b=0,c=0,d=~a.M;for(a=0;10>a;a++)d&1&&(b=9-a),d>>=1;for(a=0;10>a;a++)d&1&&(c=9-a),d>>=1;return 10*b+c} -l.Md=function(a,b){var c=this.D,c=c&~J.ya.jc;if((Qc(this.u)&64)<<1&&(c|=J.ya.jc,c!=this.D)){var d,e;d=this.L&1;e=this.L>>1&7;switch(e){case J.Ba.Ja.nd:break;case J.Ba.Ja.Lc:this.M=this.M<<1|d;break;case J.Ba.Ja.Rc:d=be(this);this.j[d]=J.Ba.vb;Db(this,"doNVRCommand(): erase data at addr "+q(d));break;case J.Ba.Ja.Mc:this.b=this.b<<1|d;break;case J.Ba.Ja.rd:d=be(this);e=this.b&J.Ba.vb;this.j[d]=e;Db(this,"doNVRCommand(): write data "+q(e)+" to addr "+q(d));break;case J.Ba.Ja.ld:d=be(this);e=this.j[d]; -null==e&&(e=J.Ba.vb);this.b=e;Db(this,"doNVRCommand(): read data "+q(e)+" from addr "+q(d));break;case J.Ba.Ja.md:this.b<<=1;this.S=this.b&J.Ba.vb+1;break;default:Db(this,"doNVRCommand(): unrecognized command "+pa(e))}}c&=~J.ya.kc;this.S&&(c|=J.ya.kc);c&=~J.ya.dc;if(d=this.B){d=this.B;if(e=d.A)e=d.u,e=Qc(d.u)>=d.F+e.Aa*e.U/1E3*1.2731488;e&&(d.A=!1);d=!d.A}d&&(c|=J.ya.dc);c&=~J.ya.sc;this.C&&this.C.ia&ce&&(c|=J.ya.sc);this.D=c;x(this,a,null,b,"FLAGS",c);return c}; -l.ae=function(a,b,c){x(this,a,b,c,"BRIGHTNESS");this.V=b};l.de=function(a,b,c){x(this,a,b,c,"NVR.LATCH");this.L=b};l.ce=function(a,b,c){x(this,a,b,c,"DC012");a=b&3;switch(b>>2&3){case 0:this.w=this.w&-4|a;break;case 1:this.w=this.w&-13|a<<2;this.video&&(b=this.video,a=this.w,Db(b,"updateScrollOffset("+a+")"),b.sa!==a&&((b.sa=a)?$c(b,!0):b.xa=!0));break;case 2:switch(a){case 0:this.O=~this.O;break;case 2:case 3:this.X=3-a}break;case 3:this.W=a}}; +l.Md=function(a,b){var c=this.D,c=c&~J.ya.jc;if((Qc(this.w)&64)<<1&&(c|=J.ya.jc,c!=this.D)){var d,e;d=this.L&1;e=this.L>>1&7;switch(e){case J.Ba.Ja.nd:break;case J.Ba.Ja.Lc:this.M=this.M<<1|d;break;case J.Ba.Ja.Rc:d=be(this);this.j[d]=J.Ba.vb;Db(this,"doNVRCommand(): erase data at addr "+q(d));break;case J.Ba.Ja.Mc:this.b=this.b<<1|d;break;case J.Ba.Ja.rd:d=be(this);e=this.b&J.Ba.vb;this.j[d]=e;Db(this,"doNVRCommand(): write data "+q(e)+" to addr "+q(d));break;case J.Ba.Ja.ld:d=be(this);e=this.j[d]; +null==e&&(e=J.Ba.vb);this.b=e;Db(this,"doNVRCommand(): read data "+q(e)+" from addr "+q(d));break;case J.Ba.Ja.md:this.b<<=1;this.S=this.b&J.Ba.vb+1;break;default:Db(this,"doNVRCommand(): unrecognized command "+pa(e))}}c&=~J.ya.kc;this.S&&(c|=J.ya.kc);c&=~J.ya.dc;if(d=this.B){d=this.B;if(e=d.A)e=d.w,e=Qc(d.w)>=d.F+e.Aa*e.U/1E3*1.2731488;e&&(d.A=!1);d=!d.A}d&&(c|=J.ya.dc);c&=~J.ya.sc;this.C&&this.C.ia&ce&&(c|=J.ya.sc);this.D=c;x(this,a,null,b,"FLAGS",c);return c}; +l.ae=function(a,b,c){x(this,a,b,c,"BRIGHTNESS");this.V=b};l.de=function(a,b,c){x(this,a,b,c,"NVR.LATCH");this.L=b};l.ce=function(a,b,c){x(this,a,b,c,"DC012");a=b&3;switch(b>>2&3){case 0:this.u=this.u&-4|a;break;case 1:this.u=this.u&-13|a<<2;this.video&&(b=this.video,a=this.u,Db(b,"updateScrollOffset("+a+")"),b.sa!==a&&((b.sa=a)?$c(b,!0):b.xa=!0));break;case 2:switch(a){case 0:this.O=~this.O;break;case 2:case 3:this.X=3-a}break;case 3:this.W=a}}; l.be=function(a,b,c){x(this,a,b,c,"DC011");b&J.Ka.kd?(b&=J.Ka.oc,this.H!=b&&(this.H=b,this.video&&(a=this.video,b=this.H==J.Ka.oc?50:60,Db(a,"updateRate("+b+")"),a.jb=b))):(b&=J.Ka.Wb,this.F!=b&&(this.F=b,this.video&&(a=this.F==J.Ka.Wb?132:80,b=this.video,Db(b,"updateDimensions("+a+","+(80>>0,g],v=Ca(u,k,a.Ac);0>v&&u.splice(-(v+1),0,k)}p&&(h.a=p.replace(/''/g,'"'))}a.C.push({Of:b,J:c,Qd:d,ra:e,zc:f})}delete this.ra}return!0};fe.prototype.va=function(){return!0}; function ge(a,b,c,d){if(d)a.aa("Unable to load system ROM (error "+d+": "+b+")");else{gb(a.eb,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.b=f;else if(g)for(a.b=Array(4*g.length),d=c=0;c>8&255,a.b[d++]=g[c]>>16&255,a.b[d++]=g[c]>>24&255;else a.b=e;a.ra=e.symbols;if(!a.b.length){r("Empty ROM: "+b);return}if(1==a.b.length){r(a.b[0]);return}}catch(h){a.aa("ROM data error: "+h.message);return}else for(b= c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e>>f.g;0>>= -f.g;0>>f.g;0>>= +f.g;0=m.ab&&a<=m.wb?d.g&(Qe|Re)||(d.g|=Re,Ne(d,20,!0),Se(d)):a>=m.yc&&a<=m.z&&d.g&Re&&(d.g&=~Re,Ne(d,20,!1),Se(d));return!0}),c.onpaste=function(a){a:{if(d.C&&d.C.Ra&&(a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),a=a.clipboardData||window.clipboardData)){Te(d.C,a.getData("Text"));a=!1;break a}a=!0}return a},!0;default:if(this.b.Ua&&void 0!==this.b.Ua[b])return this.P[e]=c,c.onclick= -function(a,b){return function(d){d.preventDefault&&d.preventDefault();d=!0;var e=0;17==b?e=Ue:20==b&&(e=Re);if(e){c.style.fontWeight="normal";if(d=!(a.g&e))c.style.fontWeight="bold";Ve(a,b,d)}Ne(a,b,d,!e);a.R&&a.R.Za()}}(this,this.b.Ua[b]),!0}}return!1};l.Ga=function(a,b,c,d){this.R=a;this.u=c;this.K=d;var e=this;this.L=Vc(this.u,function(){We(e)});this.V=Jb(a,"ChipSet");this.C=Jb(a,"SerialPort");ac(b,this,this.b.Bb);ec(b,this,this.b.Cb)}; +function(a,b){return function(d){d.preventDefault&&d.preventDefault();d=!0;var e=0;17==b?e=Ue:20==b&&(e=Re);if(e){c.style.fontWeight="normal";if(d=!(a.g&e))c.style.fontWeight="bold";Ve(a,b,d)}Ne(a,b,d,!e);a.R&&a.R.Za()}}(this,this.b.Ua[b]),!0}}return!1};l.Ga=function(a,b,c,d){this.R=a;this.w=c;this.K=d;var e=this;this.L=Vc(this.w,function(){We(e)});this.V=Jb(a,"ChipSet");this.C=Jb(a,"SerialPort");ac(b,this,this.b.Bb);ec(b,this,this.b.Cb)}; l.wa=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};l.va=function(a){return a?this.save():!0};l.reset=function(){this.j=[];this.g=0;this.b.INIT&&!this.restore(this.b.INIT)&&this.aa("reset error")};l.save=function(){var a=new td(this);switch(this.b.pa){case K.pa:a.set(0,[this.D,this.B,this.A,this.F,-1])}return a.data()}; -l.restore=function(a){var b;if(a&&(b=a[0])&&b.length)switch(this.b.pa){case Xe.pa:return!0;case K.pa:return this.D=b[0],Se(this,this.D&K.Ca.ec),this.B=b[1],this.A=b[2],this.F=b[3],this.w=b[4],!0}return!1};function Se(a,b){var c;null!=b?a.H=b:b=a.H;for(var d in a.b.fb)if(c="led-"+d,c=a.P[c]){var e=a.b.fb[d],f=!!(b&e);e&e-1&&(f=!(b&~e));c.style.backgroundColor=f?"#"+n(16711680,6):"#000000"}if(c=a.P["led-caps-lock"])c.style.backgroundColor=a.g&Re?"#"+n(65280,6):"#000000"} +l.restore=function(a){var b;if(a&&(b=a[0])&&b.length)switch(this.b.pa){case Xe.pa:return!0;case K.pa:return this.D=b[0],Se(this,this.D&K.Ca.ec),this.B=b[1],this.A=b[2],this.F=b[3],this.u=b[4],!0}return!1};function Se(a,b){var c;null!=b?a.H=b:b=a.H;for(var d in a.b.fb)if(c="led-"+d,c=a.P[c]){var e=a.b.fb[d],f=!!(b&e);e&e-1&&(f=!(b&~e));c.style.backgroundColor=f?"#"+n(16711680,6):"#000000"}if(c=a.P["led-caps-lock"])c.style.backgroundColor=a.g&Re?"#"+n(65280,6):"#000000"} function Ve(a,b,c,d){var e=0;switch(b){case 16:e=d?Ye:Ze;break;case 17:e=d?$e:Ue;break;case 18:e=d?af:bf;break;case 91:e=d?cf:df;break;case 20:e=Re,c=!(a.g&e)}e&&(a.g=c?a.g|e:a.g&~e);return c} function Pe(a,b,c){var d=!0,e=b.keyCode,e=la[e]||e;c=Ve(a,e,c,2==b.location);var f;a:if(e=a.b.Tb[e]||e,a.b.Sa[e])f=e;else{for(f in a.b.Ua)if(a.b.Ua[f]===e)break a;f=null}f&&!b.metaKey&&(d=!1,a.g&(ef|ff)&&(13==f?(f=118,d=!0):8==f&&(f=46,d=!0),d&&(a.g=c?a.g|ff:a.g&~ff)),d=Ne(a,f,c),(!(f>=m.ab&&f<=m.wb)||a.g|gf)&&b.preventDefault&&b.preventDefault());return d} function Oe(a,b,c){var d=!0;if(c){var e=b.keyCode,f=a.b.Sa[e],g;if(g=f){a:{for(var h in a.b.sb)if(a.b.sb[h]==f){f=+h;break a}f=0}g=!f}g&&(d=Ne(a,e,c,!0),b.preventDefault&&b.preventDefault())}return d} function Ne(a,b,c,d){var e;a:{for(e=0;ee?a.j.push({Pb:b,Mb:Date.now(),yb:d||!1}):(a.j[e].Mb=Date.now(),a.j[e].yb=d||!1),d&&We(a);else if(0<=e){if(!a.j[e].yb&&(d=a.j[e].Mb)&&Date.now()-dc||c>e)c=e}else{Ne(a,d,!1);b=0;continue}}b++}0<=c&&Wc(a.u,a.L,c)}l.Nd=function(a,b){var c=this.B;0<=this.w&&(this.wc||c>e)c=e}else{Ne(a,d,!1);b=0;continue}}b++}0<=c&&Wc(a.w,a.L,c)}l.Nd=function(a,b){var c=this.B;0<=this.u&&(this.u>3)*a.N,!Nb(a.I,a.ka,a.L,3)))return!1;a.L?(a.Va=a.j.createImageData(b,c),a.hb=16/a.na|0,pf(a,a.L>>1)):pf(a,(a.O+1)*a.Z);a.D=document.createElement("canvas");a.D.width=b;a.D.height=c;a.ta=a.D.getContext("2d");a.T={};a.X=1<=a.Da?8:16,f=8>(7>4)*c)}return k}l.wa=function(a,b){return b||!a||this.restore(a)?!0:!1};l.va=function(a){return!a||this.save()};l.save=function(){var a=new td(this);a.set(0,[]);return a.data()};l.restore=function(){return!0}; l.Xa=function(){var a=!1;if(this.b){if(this.b.Xa){a="100%";if(screen&&screen.width&&screen.height){var b=screen.width/screen.height,c=this.M/this.H;b>c&&(a=Math.round(c/b*100)+"%")}this.Ta?(this.F.style.width=a,this.F.style.width=a,this.F.style.display="block",this.F.style.margin="auto"):(this.b.style.width=a,this.b.style.height="auto");this.b.style.backgroundColor="black";this.b.Xa();a=!0}this.W&&this.W.focus()}return a}; function nf(a,b){!b&&a.b&&(a.Ta?a.F.style.width=a.F.style.height="":a.b.style.width=a.b.style.height="");Db(a,"notifyFullScreen("+b+")")}function pf(a,b){a.gb=b;a.V=!1;if(void 0===a.A||a.A.length!=a.gb)a.A=Array(a.gb)}function Af(a,b,c,d,e){d=a.g?(b.height-c-1)*b.width+d:c+d*b.width;e&&a.Y==rf&&(208<=c&&236>c?e=a.X+sf:28<=c&&72>c&&(e=a.X+tf));a=a.U[e];d*=a.length;b.data[d]=a[0];b.data[d+1]=a[1];b.data[d+2]=a[2];b.data[d+3]=a[3]} -function $c(a,b){var c=!0;if(!b){a.oa&&(120==a.oa?a.ib&1?(Rd(a.u,2),c=!1):Rd(a.u,1):Rd(a.u,4));if(c&&a.V&&a.L){for(var d=a.I,e=a.L,f=!0,g=a.ka>>>d.g;0>=1);;){var y=Ub(a.I,u++);if((y&Bf)==Bf){var w=Ub(a.I,u++),d=w&Cf,c=(w&Df)<<8|Ub(a.I,u),c=c+(w&Ef? +function $c(a,b){var c=!0;if(!b){a.oa&&(120==a.oa?a.ib&1?(Rd(a.w,2),c=!1):Rd(a.w,1):Rd(a.w,4));if(c&&a.V&&a.L){for(var d=a.I,e=a.L,f=!0,g=a.ka>>>d.g;0>=1);;){var y=Ub(a.I,u++);if((y&Bf)==Bf){var w=Ub(a.I,u++),d=w&Cf,c=(w&Df)<<8|Ub(a.I,u),c=c+(w&Ef? Ff:Gf);break}if(p>4)*y.ca,L,ja,ua,na,Ma=y.ga,hc=y.ca;C?(L=B*w.ga,ja=e*w.ca,ua=w.ga,na=w.ca):(L=B*w.La,ja=e*w.Ma,ua=w.La,na=w.Ma);y.ga>w.ga&&(L*=2,ua*=2);y.ca>w.ca&&(v==zf&&(T+=w.ca),hc=w.ca);C?C.drawImage(y.canvas,za,T,Ma,hc,L,ja,ua,na):(L+=0,ja+=0,w.j.drawImage(y.canvas, za,T,Ma,hc,L,ja,ua,na))}h++}g++}e++}}a.V=!0;!b&&a.xa&&1==h&&(a.A[k]=-1,h=0);a.xa=!1;(h||b)&&a.ta&&a.j.drawImage(a.D,0,a.sa,a.C,a.N-a.ca,0,0,a.Db,a.td)}else{e=a.ka;f=e+a.L;k=h=g=0;b=a.C;p=0;c=a.N;v=d=0;u=a.na;B=(1<>8|(w&255)<<8);h>C&B,Af(a,a.Va,h++,k,za),C+=u;h>p&&(p=h);k=d&&(d=k+1)}e+=2;g++;if(h>=a.C&&(h=0,k++,k>a.N))break}a.V=!0;bMissing <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.backgroundColor=d.screenColor;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());var f=+(d.aspect||Pa("aspect"));f&&.3<=f&&3.33>=f&&(Ta("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");Oa("iOS")&&(f.setAttribute("autocapitalize","off"),f.setAttribute("autocorrect","off"),f.style.fontSize="16px");c.appendChild(f);var g=e.getContext("2d"),d=new kf(d,e,g,f,c);pb(d,c)}}); -function Hf(a){t.call(this,"SerialPort",a,8388608);this.T=+a.adapter;switch(this.T){case 0:this.U=0;this.X=2;break;default:r("Unrecognized serial adapter #"+this.T);return}this.g=this.j=null;this.W=a.tabSize;this.S=a.charBOL;this.w=0;this.N=!1;this.D=!0;var b=a.binding;if("console"==b)this.j="";else{var c;a=If;b&&(void 0===c&&(c="Panel"),(c=mb(c,this.id))&&(b=c.P[b])&&this.da(null,a,b))}this.A="";this.b=this.Ra=this.H=null;this.exports={connect:this.Fc,receiveData:this.Ob,receiveStatus:this.ne}} +function Hf(a){t.call(this,"SerialPort",a,8388608);this.T=+a.adapter;switch(this.T){case 0:this.U=0;this.X=2;break;default:r("Unrecognized serial adapter #"+this.T);return}this.g=this.j=null;this.W=a.tabSize;this.S=a.charBOL;this.u=0;this.N=!1;this.D=!0;var b=a.binding;if("console"==b)this.j="";else{var c;a=If;b&&(void 0===c&&(c="Panel"),(c=mb(c,this.id))&&(b=c.P[b])&&this.da(null,a,b))}this.A="";this.b=this.Ra=this.H=null;this.exports={connect:this.Fc,receiveData:this.Ob,receiveStatus:this.ne}} aa(Hf,t);l=Hf.prototype;l.da=function(a,b,c,d){var e=this;switch(b){case If:return this.P[b]=this.g=c,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");if(2==c.length){var d=ya(c[0]);if(d!=this.cb)return;c=ya(c[1]);if(this.b=lb(c)){var e=this.b.exports;if(e){var f=e.connect;f&&f.call(this.b,this.D);if(this.Ra=e.receiveData){this.D=a;this.H=e.receiveStatus;this.status("Connected "+this.eb+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}}; l.wa=function(a,b){if(!b)if(this.Fc(this.D),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.va=function(a){return a?this.save():!0};l.reset=function(){Mf(this)};l.save=function(){var a=new td(this),b=0,c=[];c[b++]=this.F;c[b++]=this.M;c[b++]=this.O;c[b++]=this.ia;c[b++]=this.B;c[b++]=this.C;c[b]=this.L;a.set(0,c);return a.data()};l.restore=function(a){return Mf(this,a[0])}; -function Mf(a,b){var c=0;b||(b=Nf);a.F=b[c++];a.M=b[c++];a.O=b[c++];a.ia=b[c++];a.B=b[c++];a.C=b[c++];a.L=b[c];return!0}function Of(a,b){var c=a.L&b;b&15||(c>>=4);b=Pf[c];c=((a.B&Qf)>>2)+6;a.B&Rf&&c++;c+=((a.B&Sf)>>6)+1>>1;return 1E3/Math.round(b/c)}function Jf(a,b){Db(a,"receiveByte("+pa(b)+"), status="+pa(a.ia));return a.N||a.ia&Tf?!1:(a.M=b,a.ia|=Tf,Rd(a.u,a.X),!0)} -l.Ob=function(a){null!=a&&(this.A="number"!=typeof a?a:this.A+String.fromCharCode(a));this.A&&(Jf(this,this.A.charCodeAt(0))&&(this.A=this.A.substr(1)),this.A&&this.u&&Wc(this.u,this.Y,Of(this,Uf)));return!0};l.ne=function(a){this.ia&=~Vf;a&64&&(this.ia|=Vf)};function Te(a,b){a.ia=a.ia|ce|Wf;b&&a.Ra&&a.Ra.call(a.b,b)}l.Hd=function(a,b){var c=this.M;x(this,a,null,b,"DATA",c);this.ia&=~Tf;return c};l.Gd=function(a,b){var c=this.ia;x(this,a,null,b,"STATUS",c);return c}; -l.Vd=function(a,b,c){x(this,a,b,c,"DATA");this.O=b;this.ia&=~(ce|Wf);Db(this,"transmitByte("+pa(b)+")");if(19==b)this.N=!0;else if(17==b)this.N=!1;else if(this.Ra&&this.Ra.call(this.b,b),this.g)if(8==b)this.g.value=this.g.value.slice(0,-1),0":String.fromCharCode(b);c=a.length;9==b?(b=this.W||8,c=b-this.w%b,this.W&&(a=xa("",c))):13==b&&(this.w=c=0,a="\n");this.S&&!this.w&&c&&(a=String.fromCharCode(this.S)+a);this.g.value+=a;this.g.scrollTop= -this.g.scrollHeight;this.w+=c}else if(null!=this.j){if(10==b||1024<=this.j.length)this.i(this.j),this.j="";10!=b&&(this.j+=String.fromCharCode(b))}this.u&&Wc(this.u,this.Z,Of(this,Xf))};l.Ud=function(a,b,c){x(this,a,b,c,"CONTROL");this.F?(this.H&&(b^this.C)&(Yf|Zf)&&(a=0,this.D?(a|=b&Yf?32:0,a|=b&Zf?320:0):(a|=b&Yf?16:0,a|=b&Zf?1048576:0),this.H.call(this.b,a)),this.C=b,this.C&$f&&(this.F=!1)):(this.B=b,this.F=!0)};l.Td=function(a,b,c){x(this,a,b,c,"BAUDRATES");this.L=b}; +function Mf(a,b){var c=0;b||(b=Nf);a.F=b[c++];a.M=b[c++];a.O=b[c++];a.ia=b[c++];a.B=b[c++];a.C=b[c++];a.L=b[c];return!0}function Of(a,b){var c=a.L&b;b&15||(c>>=4);b=Pf[c];c=((a.B&Qf)>>2)+6;a.B&Rf&&c++;c+=((a.B&Sf)>>6)+1>>1;return 1E3/Math.round(b/c)}function Jf(a,b){Db(a,"receiveByte("+pa(b)+"), status="+pa(a.ia));return a.N||a.ia&Tf?!1:(a.M=b,a.ia|=Tf,Rd(a.w,a.X),!0)} +l.Ob=function(a){null!=a&&(this.A="number"!=typeof a?a:this.A+String.fromCharCode(a));this.A&&(Jf(this,this.A.charCodeAt(0))&&(this.A=this.A.substr(1)),this.A&&this.w&&Wc(this.w,this.Y,Of(this,Uf)));return!0};l.ne=function(a){this.ia&=~Vf;a&64&&(this.ia|=Vf)};function Te(a,b){a.ia=a.ia|ce|Wf;b&&a.Ra&&a.Ra.call(a.b,b)}l.Hd=function(a,b){var c=this.M;x(this,a,null,b,"DATA",c);this.ia&=~Tf;return c};l.Gd=function(a,b){var c=this.ia;x(this,a,null,b,"STATUS",c);return c}; +l.Vd=function(a,b,c){x(this,a,b,c,"DATA");this.O=b;this.ia&=~(ce|Wf);Db(this,"transmitByte("+pa(b)+")");if(19==b)this.N=!0;else if(17==b)this.N=!1;else if(this.Ra&&this.Ra.call(this.b,b),this.g)if(8==b)this.g.value=this.g.value.slice(0,-1),0":String.fromCharCode(b);c=a.length;9==b?(b=this.W||8,c=b-this.u%b,this.W&&(a=xa("",c))):13==b&&(this.u=c=0,a="\n");this.S&&!this.u&&c&&(a=String.fromCharCode(this.S)+a);this.g.value+=a;this.g.scrollTop= +this.g.scrollHeight;this.u+=c}else if(null!=this.j){if(10==b||1024<=this.j.length)this.i(this.j),this.j="";10!=b&&(this.j+=String.fromCharCode(b))}this.w&&Wc(this.w,this.Z,Of(this,Xf))};l.Ud=function(a,b,c){x(this,a,b,c,"CONTROL");this.F?(this.H&&(b^this.C)&(Yf|Zf)&&(a=0,this.D?(a|=b&Yf?32:0,a|=b&Zf?320:0):(a|=b&Yf?16:0,a|=b&Zf?1048576:0),this.H.call(this.b,a)),this.C=b,this.C&$f&&(this.F=!1)):(this.B=b,this.F=!0)};l.Td=function(a,b,c){x(this,a,b,c,"BAUDRATES");this.L=b}; var Qf=12,Rf=16,Sf=192,Zf=2,Yf=32,$f=64,ce=1,Tf=2,Wf=4,Vf=128,Uf=15,Xf=240,Pf=[50,75,110,134.5,150,200,300,600,1200,1800,2E3,2400,3600,4800,9600,19200],Nf=[!1,0,0,133,142,39,238],If="buffer",Kf={0:Hf.prototype.Hd,1:Hf.prototype.Gd},Lf={0:Hf.prototype.Vd,1:Hf.prototype.Ud,2:Hf.prototype.Td};Ua(function(){for(var a=qb(document,"pc8080","serial"),b=0;bthis.b&&this.g.length&&(this.b=0);if(0>this.b||a!=this.g[this.b])this.g.splice(0,0,a),this.b=0;this.b--}else this.N?a="end":a=this.g[this.b+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(ya(a.substring(d,f))),d=f+1}}return b}; function bg(a,b,c){var d=a;b=b||32;if(c)if(32==b)d=a>>>0;else if(32>b)d=a&(1<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 cg(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":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=bg(e,18,!0)*Math.pow(2,18)+bg(f,18,!0);break;case "_":case "^_":"^_"==d&&(f=35-(f&255));f&&(e=bg(e,0,!0),e=0=|>>>|>>|>|<=|<<|<|-|\+|\^\/|\/|\*|,,| )/);d=dg(a,b,0,b.length,a.A,c);void 0!==d&&e&&lg(a,null,d)}return d} +function kg(a,b,c){var d=void 0,e=!1===c;c=Array.isArray(c)?c:void 0;if(b){"{"!=a.U[0]&&(b=b.split(a.U[0]).join("{").split(a.U[1]).join("}"));b=ig(a,b,'"',7,5);if(!b)return d;b=ig(a,b,"'",6,6);if(!b)return d;16!=a.u&&(b=b.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/,"$1$2^_").replace(/\s+/g," "));b=b.split(/({|}|\|\||&&|\||\^!|\^B|\^O|\^D|\^L|\^-|~|\^_|_|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|\^\/|\/|\*|,,| )/);d=dg(a,b,0,b.length,a.u,c);void 0!==d&&e&&lg(a,null,d)}return d} function mg(a,b){var c,d=a.U[0],e=a.U[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=kg(a,c[1]);if(void 0===g)return;b=b.replace(d+c[1]+e,null!=g?jg(a,g):"undefined")}if(a.fa.length)for(d=a.fa[0],e=a.fa[1],c="("==d||"{"==d||"["==d?"\\":"",f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);)b=b.replace("["+c[1]+"]","unimplemented");for(;d=b.match(/\$([a-z]+)/i);){e=null;switch(d[1].toLowerCase()){case "ops":e= a.S-a.ba}if(null==e)break;b=b.replace(d[0],e.toString())}return b}function fg(a,b){for(;b;){switch(b&3){case 1:a=-bg(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 eg(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.Kb(b);if(0<=f)f=a.Lb(f);else if(f=b,a.w[f]?f=a.w[f].value:(f=f.substr(0,6),f=a.w[f]&&a.w[f].value),null!=f){var h=a.w[b]&&a.w[b].pe;h&&(g?g.push(h):(g=kg(a,h,d),void 0!==g?f+=g:(d||a.i("undefined "+(c||"value")+": "+b+" ("+h+")"),f=void 0)))}else f=ma(b,1c&&(d+=" '"+String.fromCharCode(c)+"'"));a.i((null!=b?b+": ":"")+d);return e}function ng(a,b){var c=0;if(a.w){if(b)return lg(a,b,a.w[b]&&a.w[b].value);b=Object.keys(a.w);b.sort();for(var d=0;d=a?8:262143>=a?18:36);b=oa(b,2,a,"",e);break;case 8:(a=0=a?6:16777215>=a?8:12);b=oa(b,8,a,e?"0o":"");break;case 10:(e=0=Math.abs(b)?5:11;b=oa(b,10,e);break;default:b=n(b,0>2:0,!!e)}0>c?c=b.replace(/^0+([0-9A-F]+)$/i,"$1"):c=b;return c} +function eg(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.Kb(b);if(0<=f)f=a.Lb(f);else if(f=b,a.A[f]?f=a.A[f].value:(f=f.substr(0,6),f=a.A[f]&&a.A[f].value),null!=f){var h=a.A[b]&&a.A[b].pe;h&&(g?g.push(h):(g=kg(a,h,d),void 0!==g?f+=g:(d||a.i("undefined "+(c||"value")+": "+b+" ("+h+")"),f=void 0)))}else f=ma(b,1c&&(d+=" '"+String.fromCharCode(c)+"'"));a.i((null!=b?b+": ":"")+d);return e}function ng(a,b){var c=0;if(a.A){if(b)return lg(a,b,a.A[b]&&a.A[b].value);b=Object.keys(a.A);b.sort();for(var d=0;d=a?8:262143>=a?18:36);b=oa(b,2,a,"",e);break;case 8:(a=0=a?6:16777215>=a?8:12);b=oa(b,8,a,e?"0o":"");break;case 10:(e=0=Math.abs(b)?5:11;b=oa(b,10,e);break;default:b=n(b,0>2:0,!!e)}0>c?c=b.replace(/^0+([0-9A-F]+)$/i,"$1"):c=b;return c} var hg={"||":5,"&&":6,"!":7,"|":7,"^!":8,"&":9,"!=":10,"==":10,">=":11,">":11,"<=":11,"<":11,">>>":12,">>":12,"<<":12,"-":13,"+":13,"^/":14,"/":14,"*":14,_:19,"^_":19,"{":20,"}":20},gg={",,":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 og(a){ag.call(this,a);this.style=pg;this.L=qg();this.sa=qg();this.T=qg();this.C=[];this.j=this.M=this.B=[];rg(this);this.X=0;sg(this);this.ka={};tg(this,a.messages);this.na=a.commands;var b=this;window?void 0===window.pc8080&&(window.pc8080=function(a){return Nc(b,a)}):void 0===global.pc8080&&(global.pc8080=function(a){return Nc(b,a)})}aa(og,ag);l=og.prototype; -l.Ga=function(a,b,c,d){this.I=b;this.u=c;this.R=a;(a=Jc(a,"messages"))&&tg(this,a);this.oa=ug;$d(this,64,function(a){a:{var b=d.I.b,c=a[0],e=a=0,k=b.length;if(c){a=vg(wg(d,c));if(-1===a){d.i("invalid address: "+c);break a}e=a>>>d.I.g;k=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;k--;){var u=b[e];u.type==c?p++||d.i("..."):(c=u.type,p=Sb[c],u&&d.i(n(u.id)+" %"+n(e<>>d.I.g;k=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;k--;){var u=b[e];u.type==c?p++||d.i("..."):(c=u.type,p=Sb[c],u&&d.i(n(u.id)+" %"+n(e<>>e.g;f!=e.j?e.b[g].Sb(f,b&65535,d):(e.b[g++].qb(f,b&255,d),e.b[g&e.H].qb(0,b>>8&255,d+1));c&&yg(a,c);Oc(this.u,!0)}};function qg(a){return{J:a,Fa:!1}}function Wg(a){return[a.J,a.Fa]}function Yg(a){return{J:a[0],Fa:a[1]}} +"";Nc(d,a,!0);return!0}return!1}),!0;case "step":return this.P[b]=c,Sa(c,function(a){var b=!1;Ab(d,!0)||(Bb(d,!0),b=xg(d,a?1:0),Bb(d,!1));return b}),!0}return!1};l.Za=function(){this.W&&this.W.focus()};function vg(a){a=a&&a.J;null==a&&(a=-1);return a}l.Ha=function(a,b){var c=255,d=vg(a);-1!==d&&(c=Ub(this.I,d),b&&yg(a,b));return c};l.Gb=function(a,b){var c=65535,d=vg(a);-1!==d&&(c=Wb(this.I,d),b&&yg(a,b));return c};l.Xb=function(a,b,c){var d=vg(a);-1!==d&&(Xb(this.I,d,b),c&&yg(a,c),Oc(this.w,!0))}; +l.Qc=function(a,b,c){var d=vg(a);if(-1!==d){var e=this.I,f=d&e.j,g=(d&e.C)>>>e.g;f!=e.j?e.b[g].Sb(f,b&65535,d):(e.b[g++].qb(f,b&255,d),e.b[g&e.H].qb(0,b>>8&255,d+1));c&&yg(a,c);Oc(this.w,!0)}};function qg(a){return{J:a,Fa:!1}}function Wg(a){return[a.J,a.Fa]}function Yg(a){return{J:a[0],Fa:a[1]}} function wg(a,b,c){var d;c=(c?a.L:a.sa).J;if(void 0!==b){d=b=mg(a,b)||b;var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;cc&&(c=Ea(bh,a.substr(b,1))));return c};function ch(a,b){var c=0;a=a.Lb(b);if(void 0!==a)switch(b){case dh:case eh:case fh:case gh:case hh:case ih:case jh:case kh:c=2;break;case lh:case mh:case nh:case oh:case ph:case qh:case rh:c=4}return c?n(a,c):"??"} -l.Lb=function(a){var b;if(0<=a){var c=this.u;switch(a){case dh:b=c.g;break;case eh:b=c.w;break;case fh:b=c.A;break;case lh:b=ud(c);break;case gh:b=c.B;break;case hh:b=c.C;break;case mh:b=wd(c);break;case ih:b=c.D;break;case jh:b=c.F;break;case nh:b=D(c);break;case kh:b=E(c,D(c));break;case oh:b=c.M;break;case ph:b=c.j;break;case qh:b=sd(c);break;case rh:b=sd(c)&255|c.g<<8}}return b}; +l.Lb=function(a){var b;if(0<=a){var c=this.w;switch(a){case dh:b=c.g;break;case eh:b=c.u;break;case fh:b=c.A;break;case lh:b=ud(c);break;case gh:b=c.B;break;case hh:b=c.C;break;case mh:b=wd(c);break;case ih:b=c.D;break;case jh:b=c.F;break;case nh:b=D(c);break;case kh:b=E(c,D(c));break;case oh:b=c.M;break;case ph:b=c.j;break;case qh:b=sd(c);break;case rh:b=sd(c)&255|c.g<<8}}return b}; function sh(a,b){b=mg(a,b)||b;for(var c=0,d,e;0<=(c=b.indexOf("@",c));)e=a.Kb(b,c+1),0<=e&&(b=b.substr(0,c)+ch(a,e)+b.substr(c+1+bh[e].length)),c++;for(c=0;0<=(c=b.indexOf("#",c));)e=b.substr(c+1,2),d=ma(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=wg(a,e))?(d=e+' "'+ah(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=wg(a,e))?(yg(d),d= -e+' "'+ah(a,d,11)+'"',b=b.replace("^"+e,d),c+=d.length):c++;return b}l.message=function(a,b){b&&(a+=" at "+$g(qg(this.u.j).J));this.ha&1073741824?this.Z.push(a):this.Y&&a==this.Y||(this.Y=a,this.ha&-2147483648&&(this.ea(),a+=" (cpu halted)"),this.i(a),this.u&&(a=this.u,Xc(a),a.ta=0,Oc(a)))}; +e+' "'+ah(a,d,11)+'"',b=b.replace("^"+e,d),c+=d.length):c++;return b}l.message=function(a,b){b&&(a+=" at "+$g(qg(this.w.j).J));this.ha&1073741824?this.Z.push(a):this.Y&&a==this.Y||(this.Y=a,this.ha&-2147483648&&(this.ea(),a+=" (cpu halted)"),this.i(a),this.w&&(a=this.w,Xc(a),a.ta=0,Oc(a)))}; function Eb(a,b,c,d,e,f,g,h){h|=256;null!=f&&(a.ha&h)!=h||a.message(b.cb+"."+(null!=d?"outPort":"inPort")+"("+q(c)+","+(f?f:"unknown")+(null!=d?","+pa(d):"")+")"+(null!=g?": "+pa(g):"")+(null!=e?" at "+$g(e):""))} -function sg(a){var b;if(Sd(a)){if(!a.H||!a.H.length){a.H=Array(th);for(b=0;b>>d.g],!1)}a.M=["br"];if(a.B)for(b=1;b>>d.g],!0);a.B=["bw"];a.ta=0}l.Pa=function(a,b,c){var d=!0;c||zh(this,a,b,!1,!0);if(a!=this.j){var e=vg(b);if(-1===e)this.i("invalid address: "+$g(b.J)),d=!1;else{var f=this.I;f.b[e>>>f.g].Pa(e&f.j,a==this.B)}}d&&(a.push(b),c?b.Fa=!0:(Ah(this,a,a.length-1,"set"),sg(this)));return d}; function zh(a,b,c,d,e){var f=!1;c=vg(c);for(var g=1;g>>d.g],b==a.B));h.Fa||sg(a);break}}return f}function Bh(a,b){for(var c=1;c>24,4);break;case Oh:C=n(y.Gb(C,2),4);break;default:y="imm("+q(w)+")";break a}y.style==Eh&&w&Ph?C="["+C+"]":w&Qh||(C=(y.style==pg?"$":"0x")+C);y=C}else w&Qh?(y=(v&Rh)>>8, -w=bh[y],a.style==Eh&&v&Ph&&(y==kh&&(w="HL"),w="["+w+"]"),y=w):w&Sh&&(y=(f>>3&7).toString());if(!y||!y.length){h="INVALID";break}0b[0]?1:a[0]>3&7).toString());if(!y||!y.length){h="INVALID";break}0b[0]?1:a[0]>>0;for(b=0;b>>0,h=f.Qd;if(e>=g&&e>8&255;case "C":d.A=f&255;break;case "D":d.B=f&255;break; +function wh(a,b){var c;if(b&&"?"==b[1])a.i("register commands:"),a.i("\tr\tdump registers"),a.i("\trx [#]\tset flag or register x to [#]");else{var d=a.w;null==c&&(c=!0);if(b&&1>8&255;case "C":d.A=f&255;break;case "D":d.B=f&255;break; case "DE":d.B=f>>8&255;case "E":d.C=f&255;break;case "H":d.D=f&255;break;case "HL":d.D=f>>8&255;case "L":d.F=f&255;break;case "SP":d.M=f&65535;break;case "PC":A(d,f);a.L=qg(d.j);break;case "PS":qd(d,f);break;case "PSW":qd(d,f&255|d.N&-256);d.g=f>>8;break;case "CF":d.H=f?d.H|256:d.H&255;break;case "PF":f?Bd(d)||(d.L^=1):Bd(d)&&(d.L^=1);break;case "AF":d.O=f?~d.L&16|d.O&-17:d.L&16|d.O&-17;break;case "ZF":d.H=f?d.H&-256:d.H|255;break;case "SF":f?Ed(d)||(d.L^=192):Ed(d)&&(d.L^=192);break;case "IF":d.N= -f?d.N|512:d.N&-513;break;default:a.i("unknown register: "+e);return}Oc(d);a.i("updated registers:")}a.i(Wh(a));c&&(a.L=qg(d.j),xh(a,$g(a.L.J)))}}function ci(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?a.i(sh(a,c[2])):kg(a,b,!1)}function di(a,b,c){var d="t"!=b;c=eg(a,c,null,!0)||1;var e=1==c?0:1;"tc"==b&&(e=c,c=1);Ra(c,function(){return Bb(a,!0)&&xg(a,e,d,!1)},function(){Oc(a.u);Bb(a,!1)})} +f?d.N|512:d.N&-513;break;default:a.i("unknown register: "+e);return}Oc(d);a.i("updated registers:")}a.i(Wh(a));c&&(a.L=qg(d.j),xh(a,$g(a.L.J)))}}function ci(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?a.i(sh(a,c[2])):kg(a,b,!1)}function di(a,b,c){var d="t"!=b;c=eg(a,c,null,!0)||1;var e=1==c?0:1;"tc"==b&&(e=c,c=1);Ra(c,function(){return Bb(a,!0)&&xg(a,e,d,!1)},function(){Oc(a.w);Bb(a,!1)})} function xh(a,b,c,d){if(b=wg(a,b,!0)){void 0===d&&(d=1);var e=256;if(void 0!==c){d=wg(a,c,!0);if(!d||d.Jh[0].indexOf("+"))){var p=h[0]+":";h[2]&&(p+=" "+h[2]);a.i(p)}h[3]&&(g=h[3],f=null);f=Dh(a,b,g,f);a.i(f);a.L=b;e-=b.J-k;c++}}} l.Ab=function(a,b,c){if(b)if(a){0>this.b&&this.g.length&&(this.b=0);if(0>this.b||a!=this.g[this.b])this.g.splice(0,0,a),this.b=0;this.b--}else this.N?a="end":a=this.g[this.b+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(ya(a.substring(d,f))),d=f+1}}return b}; function Ch(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.N&&(a.i("ended assemble at "+$g(a.T.J)),a.L=a.T,a.N=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.Y=null;if(yb(a)&&0p||"z"=$a.length&&(Na=0);a.xa=Ba;Fg++;mc--}}Fg||(a.i("no "+Eg+"history available"),a.xa=void 0)}else{var cd=wg(a,na);if(cd){var dd=0;Ma&&("l"==Ma.charAt(0)&&(Ma=Ma.substr(1)||hc),dd=eg(a,Ma)>>>0,65536>4||1;Ji--&&0< fd;){var gd=0,ve=0,pc,we="",Ig="",na=$g(cd.J);for(pc=16;0hd?String.fromCharCode(hd):".";fd--}oc&&(oc+="\n");oc+=na+" "+we+(pc?"":" "+Ig)}oc&&a.i(oc);a.sa=cd}}}}break;case "e":if("else"==f[0])break;var id=1,Jg=255,Kg=a.Ha,Lg=a.Xb;"ew"==f[0]&&(id=2,Jg=65535,Kg=a.Gb,Lg=a.Qc);var Mg=id<<1,Ng=f[1];if(null==Ng)a.i("edit memory commands:"),a.i("\teb [a] [...] edit bytes at address a"), a.i("\tew [a] [...] edit words at address a");else{var jd=wg(a,Ng);if(jd)for(var kd=2;kdDe;){for(var vb=null,Pi=256;65536>sc.J>>>0;){Pg.J=a.Gb(sc,2);if(null==sc.J||!Pi--)break;for(var Qi=a,md=Pg, +case "h":a:{var ye;if(a.G.ma)ye="halting",a.ea();else{if(Ab(a,!0))break a;ye="already halted"}c||a.i(ye)}break;case "i":if("if"==f[0]){var ze;var rc=b.substr(2),rc=ya(rc);kg(a,rc)?(c||a.i("true: "+rc),ze=!0):(c||a.i("false: "+rc),ze=!1);ze||(d=!1);break}if("int"==f[0]){var ld;var Mi=f[1];if(a.w.N&512){var Ae=kg(a,Mi);null==Ae?ld=!1:(a.i("requesting interrupt level "+Ae),Rd(a.w,Ae),ld=!0)}else a.i("interrupts disabled (use rif=1 to enable)"),ld=!1;ld||(d=!1);break}var Be=f[1];if(Be&&"?"!=Be){var Ce= +eg(a,Be);if(void 0!==Ce){var Ni=bc(a.I,Ce);a.i(q(Ce)+": "+pa(Ni))}}else a.i("input commands:"),a.i("\ti [p]\tread port [p]"),a.i("warning: port accesses can affect hardware state");break;case "k":var Oi=f[0];if("?"==f[1])a.i("stack trace commands:"),a.i("\tk\tshow frame addresses"),a.i("\tks\tshow symbol information");else{var De=0,Pg=qg(),sc=qg(a.w.M);for(a.i("stack trace for "+$g(sc.J));10>De;){for(var vb=null,Pi=256;65536>sc.J>>>0;){Pg.J=a.Gb(sc,2);if(null==sc.J||!Pi--)break;for(var Qi=a,md=Pg, Qg=null,tc=md.J,Rg=tc,Ee=1;6>=Ee&&tc;Ee++){if(2\nLicense: GPL version 3 or later ");for(b=0;b\nLicense: GPL version 3 or later ");for(b=0;bni){if(pi(d,this.F)){this.w=new td(this,"1.35.0",yi);pi(this.w)&&(zi(this,d),a=Ai,Bi(this.w));this.w.set(vi,Da());Ci(this.w);var e=this.b&&!this.C;if(a==wi||jb("Click OK to restore the previous PC8080 machine state, or CANCEL to reset the machine.")){if(c=ui(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?pi(d,g):("error"==f&&"no machine state"!= -g?(this.aa("Error: "+g),"unable to verify user"==g&&(La(Di,""),this.g=null)):this.i(f+": "+g),Bi(d),pi(d)?(c=ui(d),e=!0):c=!1))}e&&si(this,c?d:null)}else a==Ai&&d.clear()}else si(this);delete this.F;delete this.H}e=kb(this.id);for(f=0;fni){if(pi(d,this.F)){this.u=new td(this,"1.35.0",yi);pi(this.u)&&(zi(this,d),a=Ai,Bi(this.u));this.u.set(vi,Da());Ci(this.u);var e=this.b&&!this.C;if(a==wi||jb("Click OK to restore the previous PC8080 machine state, or CANCEL to reset the machine.")){if(c=ui(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?pi(d,g):("error"==f&&"no machine state"!= +g?(this.aa("Error: "+g),"unable to verify user"==g&&(La(Di,""),this.g=null)):this.i(f+": "+g),Bi(d),pi(d)?(c=ui(d),e=!0):c=!1))}e&&si(this,c?d:null)}else a==Ai&&d.clear()}else si(this);delete this.F;delete this.H}e=kb(this.id);for(f=0;fa[1];a=a[2];this.V=!0;this.G.ja=!0;var d=this.P.power;d&&(d.textContent="Shutdown");this.u&&(Ei(this,this.u,b,c,a),this.u.lb());this.N&&(zi(this,b),b.clear());!c&&this.w&&(this.w.clear(),delete this.w);this.j=0}; +l.Cc=function(a){var b=a[0],c=0>a[1];a=a[2];this.V=!0;this.G.ja=!0;var d=this.P.power;d&&(d.textContent="Shutdown");this.w&&(Ei(this,this.w,b,c,a),this.w.lb());this.N&&(zi(this,b),b.clear());!c&&this.u&&(this.u.clear(),delete this.u);this.j=0}; function zi(a,b){if(jb("There may be a problem with your PC8080 machine.\n\nTo help us diagnose it, click OK to send this PC8080 machine state to http://www.pcjs.org.")){var c=a.g||"";b=b.toString();var d={app:"PC8080",ver:"1.35.0"};d.url=a.U;d.user=c;d.type="bug";d.data=b;Fa("http://www.pcjs.org/api/v1/report",d,!0)}} -function ei(a,b,c){var d,e="none";if(a.j)return null;a.j--;var f=new td(a,"1.35.0"),g=new td(a,"1.35.0",ti),h=Da();g.set(vi,h);f.set(vi,h);f.set(Fi,"1.35.0");f.set(Gi,window?window.location.href:null);f.set(Hi,Ha());a.u&&a.u.va&&(c&&a.u.ea(),d=a.u.va(b,c),"object"===typeof d&&f.set(a.u.id,d),c&&(a.u.G.ja=!1,!1===d&&(e=null)));for(var h=kb(a.id),k=0;kf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PC8080$2"), diff --git a/versions/pcx86/1.35.0/pcx86-dbg.js b/versions/pcx86/1.35.0/pcx86-dbg.js index e51608c0f..21d43966d 100644 --- a/versions/pcx86/1.35.0/pcx86-dbg.js +++ b/versions/pcx86/1.35.0/pcx86-dbg.js @@ -723,7 +723,7 @@ f;break;case "!":case "|":e|=f;break;case "^!":e|=f;break;case "&&":e=e&&f?1:0;b function Zx(a,b,c,d,e,f){var g,h,k,m=!1,p=0,v=[],u=[],E=a.D;for(a.D=e;c=|>>>|>>|>|<=|<<|<|-|\+|\^\/|\/|\*|,,| )/);d=Zx(a,b,0,b.length,a.D,c);void 0!==d&&e&&gy(a,null,d)}return d} +function fy(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=dy(a,b,'"',7,5);if(!b)return d;b=dy(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=Zx(a,b,0,b.length,a.D,c);void 0!==d&&e&&gy(a,null,d)}return d} function hy(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=fy(a,c[1]);if(void 0===g)return;b=b.replace(d+c[1]+e,null!=g?ey(a,g):"undefined")}if(a.Aa.length)for(d=a.Aa[0],e=a.Aa[1],c="("==d||"{"==d||"["==d?"\\":"",f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);)b=a.Qk(b,c[1]);for(;d=b.match(/\$([a-z]+)/i);){e=null;switch(d[1].toLowerCase()){case "ops":e=a.Z-a.la}if(null== e)break;b=b.replace(d[0],e.toString())}return b}function ay(a,b){for(;b;){switch(b&3){case 1:a=-Xx(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 $x(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.hh(b);if(0<=f)f=a.ih(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].So;h&&(g?g.push(h):(g=fy(a,h,d),void 0!==g?f+=g:(d||a.P("undefined "+(c||"value")+": "+b+" ("+h+")"),f=void 0)))}else f=oa(b,1