(function(){var k;function aa(a){var b=16,c;if(a){b||(b=16);if("$"==a.charAt(0))b=16,a=a.substr(1);else if("0x"==a.substr(0,2))b=16,a=a.substr(2);else{var d=a.charAt(a.length-1).toLowerCase();"h"==d?(b=16,d=null):"."==d&&(b=10,d=null);null==d&&(a=a.substr(0,a.length-1))}var e,d=a,f=b;(f&&10!=f?16==f?null!==d.match(/^[0-9a-f]+$/i):2==f&&null!==d.match(/^[01]+$/i):null!==d.match(/^[0-9]+$/))&&!isNaN(e=parseInt(a,b))&&(c=e|0)}return c} function n(a,b){var c="";void 0===b?b=8:8=d?48:55),c=String.fromCharCode(d)+c;a>>=4}return c}function ba(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function ga(a){return a.replace(/[&<>"']/g,function(a){return fa[a]})}var ha=Date.now||function(){return+new Date};function ia(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function q(a,b,c,d){var e=0,f=null,h=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),h;var g=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(g.onreadystatechange=function(){4===g.readyState&&(f=g.responseText,200==g.status||!g.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=g.status||-1),d&&d(a,f,e))});if(b&&"object"== typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");g.open("POST",a,!!c);g.setRequestHeader("Content-type","application/x-www-form-urlencoded");g.send(l)}else g.open("GET",a,!!c),"bytes"==b&&g.overrideMimeType("text/plain; charset=x-user-defined"),g.send();c||(f=g.responseText,200!=g.status&&(e=g.status||-1),d&&d(a,f,e),h=[f,e]);return h}function ja(){return"http://"+(window?window.location.host:"www.pcjs.org")} function r(a){window&&window.alert(a)}function ka(a){var b=!1;window&&(b=window.confirm(a));return b}var la=null;function ma(){if(null==la){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}la=a}return la}function na(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} function oa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function pa(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var qa={init:[],show:[],exit:[]},ra=!1,sa=!0;function ta(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function ua(a){qa.init.push(a)} function va(a){if(sa)try{for(var b=0;b=this.i?10:20>=this.i?12:24>=this.i?14:15;this.m=1<>2;this.g=this.m-1;this.l=this.u/this.m|0;this.A=this.l-1;this.o=[];this.s=[];this.B=[];this.F=[];a=new C;Sa(a,this.L);this.b=Array(this.l);for(b=0;b>>a.c;0f&&(m=f);if(g&&g.size){if(g.type==d){if(e+f<=g.Ea)return g.ab+=g.Ea-e,g.Ea=e,!0;if(e>=g.Ea+g.ab){m=g.size-(e-l);m>f&&(m=f);g.ab=e-g.Ea+m;e=l+a.m;f-=m;h++;continue}}return Ua(1,e,f)}e=new C(e,m,a.m,d);Sa(e,a.L,g);a.b[h++]=e;e=l+a.m;f-=m}return 0>=f?(a.status(Math.floor(c/1024)+"Kb "+Va[d]+" at "+("0x"+n(b,4))),!0):Ua(2,b,c)} Ra.prototype.I=function(a){return this.b[(a&this.h)>>>this.c].Na(a&this.g,a)};function Wa(a,b){return a.b[(b&a.h)>>>a.c].$a(b&a.g,b)}function Xa(a,b){var c=b&a.g,d=(b&a.h)>>>a.c;return c!=a.g?a.b[d].Vc(c,b):a.b[d++].Na(c,b)|a.b[d&a.A].Na(0,b+1)<<8}Ra.prototype.T=function(a,b){this.b[(a&this.h)>>>this.c].Oa(a&this.g,b&255,a)};function Ya(a,b,c){a.b[(b&a.h)>>>a.c].Qb(b&a.g,c&255,b)} function Za(a,b,c){var d=b&a.g,e=(b&a.h)>>>a.c;d!=a.g?a.b[e].Wc(d,c&65535,b):(a.b[e++].Oa(d,c&255,b),a.b[e&a.A].Oa(0,c>>8&255,b+1))}function $a(a,b,c,d){void 0===d&&(d=0);if(c)for(var e in c){var f=a,h=+e+d,g=c[e].bind(b);if(void 0!==g)for(var l=+e+d;l<=h;l++)void 0!==f.o[l]?r("Input port 0x"+n(l,4)+" already registered"):f.o[l]=[g,!1]}} function ab(a,b,c,d){void 0===d&&(d=0);if(c)for(var e in c){var f=a,h=+e+d,g=c[e].bind(b);if(void 0!==g)for(var l=+e+d;l<=h;l++)void 0!==f.s[l]?r("Output port 0x"+n(l,4)+" already registered"):f.s[l]=[g,!1]}}function Ua(a,b,c){r("Memory block error ("+a+": "+n(b)+","+n(c)+")");return!1}var bb;if(Ma){var cb=new ArrayBuffer(2);(new DataView(cb)).setUint16(0,256,!0);bb=256===(new Uint16Array(cb))[0]}else bb=!1;var db=bb; function C(a,b,c,d){this.id=eb+=2;this.a=null;this.Ea=a;this.ab=b;this.size=c||0;this.type=d||fb;this.w=d==gb;Sa(this);this.ea=this.Gb=!1;if(c)if(Ma)this.c=new ArrayBuffer(c),this.m=new DataView(this.c,0,c),this.b=new Uint8Array(this.c,0,c),this.i=new Uint16Array(this.c,0,c>>1),this.a=new Int32Array(this.c,0,c>>2),hb(this,db?ib:jb);else{this.a=Array(c>>2);for(a=0;a>2),b=0;b>8,c)},F:function(a){return this.a[a>> 2]>>>((a&3)<<3)&255},N:function(a){var b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},ga:function(a,b){var c=a>>2,d=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2,d=(a&3)<<3;24>d?this.a[c]=this.a[c]&~(65535<>8);this.ea=!0},v:function(a,b){return this.$a(a,b)},H:function(a,b){return this.Ob(a,b)},U:function(a,b,c){this.w||this.Qb(a,b,c)},ca:function(a, b,c){this.w||this.ja(a,b,c)},u:function(a){return this.b[a]},B:function(a){return this.b[a]},G:function(a){return this.m.getUint16(a,!0)},K:function(a){return a&1?this.b[a]|this.b[a+1]<<8:this.i[a>>1]},O:function(a,b){this.b[a]=b;this.ea=!0},V:function(a,b){this.b[a]=b;this.ea=!0},ha:function(a,b){this.m.setUint16(a,b,!0);this.ea=!0},ka:function(a,b){a&1?(this.b[a]=b,this.b[a+1]=b>>8):this.i[a>>1]=b;this.ea=!0}}; function Sa(a,b,c){a.L=b;a.g=a.h=0;c&&((a.g=c.g)&&lb(a,mb,!1),(a.h=c.h)&&nb(a,mb,!1))}function nb(a,b,c){c&&a.h||(a.Oa=!a.w&&b[2]||a.s,a.Wc=!a.w&&b[3]||a.A);if(c||void 0===c)a.Qb=b[2]||a.s,a.ja=b[3]||a.A}function lb(a,b,c){c&&a.g||(a.Na=b[0]||a.l,a.Vc=b[1]||a.o);if(c||void 0===c)a.$a=b[0]||a.l,a.Ob=b[1]||a.o}function hb(a,b){b||(b=ob);lb(a,b,void 0);nb(a,b,void 0)}var ob=[],kb=[C.prototype.F,C.prototype.N,C.prototype.ga,C.prototype.ta],mb=[C.prototype.v,C.prototype.H,C.prototype.U,C.prototype.ca]; if(Ma)var jb=[C.prototype.u,C.prototype.G,C.prototype.O,C.prototype.ha],ib=[C.prototype.B,C.prototype.K,C.prototype.V,C.prototype.ka]; function pb(a,b){u.call(this,"CPU",a,pb);var c=a.cycles||b,d=a.multiplier||1;this.c={};this.c.Aa=c;this.c.Xa=0;this.c.za=d;this.c.kb=Math.round(this.c.Aa/1E4)/100;this.c.wa=this.c.kb*this.c.za;this.j.fa=!1;this.j.Ib=!1;this.j.Fb=a.autoStart;this.j.Hb=!1;this.j.Ra=!1;this.c.Va=this.c.ya=0;this.c.Wa=a.csStart;this.c.Ga=a.csInterval;this.c.Ha=a.csStop;this.ka=this.ob.bind(this);B(this)}y(pb);var qb=["power","reset"];k=pb.prototype; k.ia=function(a,b,c,d){this.A=a;this.m=b;this.L=d;for(b=0;bc&&(c=2);var d=1;b&&1a.c.pa/a.c.wa&&(b=1);a.c.za=b;b=a.c.kb*a.c.za;if(a.c.wa!=b){a.c.wa=b;b=a.c.wa.toFixed(2)+"Mhz";var d=a.w.setSpeed;d&&(d.textContent=b);a.Z("target speed: "+b)}c&&a.A&&Bb(a.A)}yb(a,a.K);a.K=0;a.c.xa=ha();a.c.qa=0;zb(a)} k.ob=function(a){if(Ka(this,!0)){if(!this.j.fa){xb(this);this.A&&this.A.start(this.c.xa,Ab(this));this.j.fa=!0;this.j.Ib=!0;this.G&&this.G.start();var b=this.w.run;b&&(b.textContent="Halt");this.A&&(this.A.ra(!0),a&&Bb(this.A,!0))}this.c.nb>=this.c.Aa&&zb(this,!0);this.c.La=0;this.c.Ua=ha();this.c.qa&&(a=this.c.Ua-this.c.qa,a>this.c.Kb&&(this.c.xa+=a,this.c.xa>this.c.Ua&&(this.c.xa=this.c.Ua)));try{do{this.Pb(this.j.Ra?1:this.c.Hc);var c=this.N-this.a;this.K+=c;this.c.La+=c;yb(this,0,!0);a=c;this.j.Ra&& (b=!1,this.c.Va=this.c.Va+this.Jb()|0,this.c.ya-=a,0>=this.c.ya&&(this.c.ya+=this.c.Ga,b=!0),0<=this.c.Ha&&this.c.Ha<=Ab(this)&&(this.c.Ga=this.c.Ha=-1,tb(this),wb(this),b=!0),b&&this.Z(Ab(this)+" cycles: checksum="+n(this.c.Va)));this.c.Ja-=c;0>=this.c.Ja&&(this.c.Ja+=this.c.Mb,this.A&&Cb(this.A,this.c.Xa++),this.c.Xa>this.V&&(this.c.Xa=0));this.c.Ia-=c;0>=this.c.Ia&&(this.c.Ia+=this.c.Lb,this.A&&this.A.ra());this.c.Ka-=c;if(0>=this.c.Ka){this.c.Ka+=this.c.mb;break}}while(this.j.fa)}catch(e){wb(this); ub(this);this.A&&this.A.stop(ha(),Ab(this));Ka(this,!1);c=e.stack||e.message;this.j.oa=!0;this.J(c);return}c=setTimeout;a=this.ka;this.c.qa=ha();b=this.c.Kb;this.c.La&&(b=Math.round(b*this.c.La/this.c.mb));var b=b-(this.c.qa-this.c.Ua),d=this.c.qa-this.c.xa;d&&(this.c.pa=Math.round(this.K/(10*d))/100,864E5<=d&&(this.O=0,xb(this)));if(0>b||this.c.pa>8&255;a.C=b&255}function Nb(a){return a.h<<8|a.D}function Ob(a,b){a.h=b>>8&255;a.D=b&255}function H(a){return a.i<<8|a.l} function K(a,b){a.i=b>>8&255;a.l=b&255}function D(a,b){a.s=b&65535}function L(a){return a.o&256?1:0}function M(a,b){a.o=a.o&255|b}function Pb(a){return Na[a.u&255]?4:0}function Kb(a){return a.H&-214|(a.u&128?128:0)|(a.o&255?0:64)|((a.u^a.B)&16?16:0)|Pb(a)|L(a)}function Ib(a,b){a.o=a.u=a.B=0;b&1&&(a.o|=256);b&4||(a.u|=1);b&16&&(a.B|=16);b&64||(a.o|=255);b&128&&(a.u^=192);a.H=a.H&-726|b&512|2}function Qb(a,b){a.B=a.b^b;return a.u=(a.o=a.b+b)&255} function Rb(a,b){a.B=a.b^b;return a.u=(a.o=a.b+b+(a.o&256?1:0))&255}function Sb(a,b){a.o=a.u=a.B=a.b&b;(a.b|b)&8&&(a.B^=16);return a.o}function Tb(a,b){a.B=b^255;b=a.u=b+255&255;a.o=a.o&-256|b;return b}function Ub(a,b){a.B=b;b=a.u=b+1&255;a.o=a.o&-256|b;return b}function Vb(a,b){return a.u=a.o=a.B=a.b|b}function N(a,b){b^=255;a.B=a.b^b;return a.u=(a.o=a.b+b+1^256)&255}function Wb(a,b){b^=255;a.B=a.b^b;return a.u=(a.o=a.b+b+(a.o&256?0:1)^256)&255}function Xb(a,b){return a.u=a.o=a.B=a.b^b}k.I=function(a){return this.m.I(a)}; k.T=function(a,b){this.m.T(a,b)};function O(a){var b=a.I(a.s);D(a,a.s+1);return b}function P(a){var b=Xa(a.m,a.s);D(a,a.s+2);return b}function R(a){var b=Xa(a.m,a.v);a.v=a.v+2&65535;return b}function T(a,b){a.v=a.v-2&65535;Za(a.m,a.v,b)}function Yb(a,b){a.F=a.F&-8|b|8}function U(a,b,c,d){d=d||2;a.w[b]&&(void 0===c&&(a.j.oa=!0,a.J("Value for "+b+" is invalid"),wb(a)),c=!a.j.fa||a.j.Hb?n(c,d):"--------".substr(0,d),a.w[b].textContent!=c&&(a.w[b].textContent=c))} k.ra=function(a){this.ca&&(a||!this.j.fa||this.j.Hb)&&(U(this,"A",this.b),U(this,"B",this.g),U(this,"C",this.C),U(this,"BC",Lb(this),4),U(this,"D",this.h),U(this,"E",this.D),U(this,"DE",Nb(this),4),U(this,"H",this.i),U(this,"L",this.l),U(this,"HL",H(this),4),U(this,"SP",this.v,4),U(this,"PC",this.s,4),a=Kb(this),U(this,"PS",a,4),U(this,"IF",a&512?1:0,1),U(this,"SF",a&128?1:0,1),U(this,"ZF",a&64?1:0,1),U(this,"AF",a&16?1:0,1),U(this,"PF",a&4?1:0,1),U(this,"CF",a&1?1:0,1));if(a=this.w.speed)a.textContent= this.j.fa&&this.c.pa?this.c.pa.toFixed(2)+"Mhz":"Stopped"};k.Pb=function(a){this.j.Sa=!0;this.j.yc=!1;this.j.Ib=!1;this.N=this.a=a;do{if(this.F){if(a&&this.F&8&&this.H&512){var b=199|(this.F&7)<<3;this.F&=-17;this.F&=-16;this.H&=-513;this.ga[b].call(this)}if(this.F&16){this.a=0;break}}this.ga[O(this)].call(this)}while(0>8;M(this,a&256);this.a-=4},Zb,function(){var a;K(this,a=H(this)+Lb(this));M(this,a>>8&256);this.a-=10},function(){this.b=this.I(Lb(this));this.a-=7},function(){Mb(this,Lb(this)-1);this.a-=5},function(){this.C= Ub(this,this.C);this.a-=5},function(){this.C=Tb(this,this.C);this.a-=5},function(){this.C=O(this);this.a-=7},function(){var a=this.b<<8&256;this.b=(a|this.b)>>1;M(this,a);this.a-=4},Zb,function(){Ob(this,P(this));this.a-=10},function(){this.T(Nb(this),this.b);this.a-=7},function(){Ob(this,Nb(this)+1);this.a-=5},function(){this.h=Ub(this,this.h);this.a-=5},function(){this.h=Tb(this,this.h);this.a-=5},function(){this.h=O(this);this.a-=7},function(){var a=this.b<<1;this.b=a&255|L(this);M(this,a&256); this.a-=4},Zb,function(){var a;K(this,a=H(this)+Nb(this));M(this,a>>8&256);this.a-=10},function(){this.b=this.I(Nb(this));this.a-=7},function(){Ob(this,Nb(this)-1);this.a-=5},function(){this.D=Ub(this,this.D);this.a-=5},function(){this.D=Tb(this,this.D);this.a-=5},function(){this.D=O(this);this.a-=7},function(){var a=this.b<<8;this.b=(L(this)<<8|this.b)>>1;M(this,a&256);this.a-=4},Zb,function(){K(this,P(this));this.a-=10},function(){var a=P(this);Za(this.m,a,H(this));this.a-=16},function(){K(this, H(this)+1);this.a-=5},function(){this.i=Ub(this,this.i);this.a-=5},function(){this.i=Tb(this,this.i);this.a-=5},function(){this.i=O(this);this.a-=7},function(){var a=0,b=L(this);if((this.u^this.B)&16||9<(this.b&15))a|=6;if(b||154<=this.b)a|=96,b=1;this.b=Qb(this,a);M(this,b?256:0);this.a-=4},Zb,function(){var a;K(this,a=H(this)+H(this));M(this,a>>8&256);this.a-=10},function(){var a;a=P(this);a=Xa(this.m,a);K(this,a);this.a-=16},function(){K(this,H(this)-1);this.a-=5},function(){this.l=Ub(this,this.l); this.a-=5},function(){this.l=Tb(this,this.l);this.a-=5},function(){this.l=O(this);this.a-=7},function(){this.b=~this.b&255;this.a-=4},Zb,function(){this.v=P(this)&65535;this.a-=10},function(){this.T(P(this),this.b);this.a-=13},function(){this.v=this.v+1&65535;this.a-=5},function(){var a=H(this);this.T(a,Ub(this,this.I(a)));this.a-=10},function(){var a=H(this);this.T(a,Tb(this,this.I(a)));this.a-=10},function(){this.T(H(this),O(this));this.a-=10},function(){this.o|=256;this.a-=4},Zb,function(){var a; K(this,a=H(this)+this.v);M(this,a>>8&256);this.a-=10},function(){this.b=this.I(P(this));this.a-=13},function(){this.v=this.v-1&65535;this.a-=5},function(){this.b=Ub(this,this.b);this.a-=5},function(){this.b=Tb(this,this.b);this.a-=5},function(){this.b=O(this);this.a-=7},function(){M(this,L(this)?0:256);this.a-=4},function(){this.a-=5},function(){this.g=this.C;this.a-=5},function(){this.g=this.h;this.a-=5},function(){this.g=this.D;this.a-=5},function(){this.g=this.i;this.a-=5},function(){this.g=this.l; this.a-=5},function(){this.g=this.I(H(this));this.a-=7},function(){this.g=this.b;this.a-=5},function(){this.C=this.g;this.a-=5},function(){this.a-=5},function(){this.C=this.h;this.a-=5},function(){this.C=this.D;this.a-=5},function(){this.C=this.i;this.a-=5},function(){this.C=this.l;this.a-=5},function(){this.C=this.I(H(this));this.a-=7},function(){this.C=this.b;this.a-=5},function(){this.h=this.g;this.a-=5},function(){this.h=this.C;this.a-=5},function(){this.a-=5},function(){this.h=this.D;this.a-= 5},function(){this.h=this.i;this.a-=5},function(){this.h=this.l;this.a-=5},function(){this.h=this.I(H(this));this.a-=7},function(){this.h=this.b;this.a-=5},function(){this.D=this.g;this.a-=5},function(){this.D=this.C;this.a-=5},function(){this.D=this.h;this.a-=5},function(){this.a-=5},function(){this.D=this.i;this.a-=5},function(){this.D=this.l;this.a-=5},function(){this.D=this.I(H(this));this.a-=7},function(){this.D=this.b;this.a-=5},function(){this.i=this.g;this.a-=5},function(){this.i=this.C;this.a-= 5},function(){this.i=this.h;this.a-=5},function(){this.i=this.D;this.a-=5},function(){this.a-=5},function(){this.i=this.l;this.a-=5},function(){this.i=this.I(H(this));this.a-=7},function(){this.i=this.b;this.a-=5},function(){this.l=this.g;this.a-=5},function(){this.l=this.C;this.a-=5},function(){this.l=this.h;this.a-=5},function(){this.l=this.D;this.a-=5},function(){this.l=this.i;this.a-=5},function(){this.a-=5},function(){this.l=this.I(H(this));this.a-=7},function(){this.l=this.b;this.a-=5},function(){this.T(H(this), this.g);this.a-=7},function(){this.T(H(this),this.C);this.a-=7},function(){this.T(H(this),this.h);this.a-=7},function(){this.T(H(this),this.D);this.a-=7},function(){this.T(H(this),this.i);this.a-=7},function(){this.T(H(this),this.l);this.a-=7},function(){var a=this.s-1;if(this.U.length)for(var b=0;b>>=f)&l;if(void 0!==h&&h[0])h[0](a,l,d);f+=g<<3;a+=g;e-=g}this.a-=10},function(){var a=P(this);L(this)||(T(this,this.s),D(this,a),this.a-=6);this.a-=11},function(){T(this,Nb(this));this.a-=11},function(){this.b=N(this,O(this));this.a-=7},function(){T(this,this.s);D(this,16);this.a-=11},function(){L(this)&&(D(this,R(this)),this.a-=6);this.a-=5},ac,function(){var a=P(this);L(this)&&D(this,a);this.a-=10},function(){for(var a=O(this),b=this.m,c=this.s+-2&65535,d=1,e=0, f=0;0>8;this.a-=10},function(){var a=P(this);this.u&128||D(this,a);this.a-=10},function(){this.H&=-513;this.a-=4},function(){var a=P(this);this.u&128||(T(this,this.s),D(this,a),this.a-=6);this.a-=11},function(){T(this, Kb(this)&255|this.b<<8);this.a-=11},function(){this.b=Vb(this,O(this));this.a-=7},function(){T(this,this.s);D(this,48);this.a-=11},function(){this.u&128&&(D(this,R(this)),this.a-=6);this.a-=5},function(){this.v=H(this)&65535;this.a-=5},function(){var a=P(this);this.u&128&&D(this,a);this.a-=10},function(){this.H|=512;this.a-=4},function(){var a=P(this);this.u&128&&(T(this,this.s),D(this,a),this.a-=6);this.a-=11},bc,function(){N(this,O(this));this.a-=7},function(){T(this,this.s);D(this,56);this.a-= 11}];function V(a){u.call(this,"ChipSet",a,V);var b=a.model;b&&!cc[b]&&wa("Unrecognized ChipSet model: "+b);this.c=cc[b]||{};a.sound&&(this.F=null,window&&(this.F=window.AudioContext||window.webkitAudioContext),this.F&&new this.F);B(this)}y(V); var W={W:1978.1,pc:{X:0,gd:1,md:16,zd:32,Nd:64,Ld:128,Ba:14},na:{X:1,Wb:1,lc:2,hc:4,ic:16,jc:32,kc:64,Ba:8},qc:{X:2,fd:3,Xd:4,hd:8,Hd:16,Id:32,Jd:64,jd:128,Ba:0},Rd:{X:3},Pd:{X:2,Bd:7},Td:{X:3,Zd:1,Sd:2,Kd:4,ud:8,kd:16,Yc:32},Qd:{X:4},Ud:{X:5,nd:1,od:2,pd:4,qd:8,$d:16}},X={W:100,la:{X:66,de:1,fc:2,gc:4,Fd:8,Dd:16,vb:32,ub:64,qb:128},Vb:{X:66,INIT:0},da:{yd:{X:98},sa:{Tb:0,Sb:1,nc:2,tc:4,Zb:5,mc:6,Vd:7},Pa:16383},Yb:{X:162,INIT:0},Xb:{X:194,INIT:0}},cc={SI1978:W,VT100:X};V.prototype.R=function(){return!1}; V.prototype.ia=function(a,b,c,d){this.m=b;this.a=c;this.L=d;this.A=a;this.o=Pa(a,"Keyboard");$a(b,this,this.c.Ya);ab(b,this,this.c.Za)};V.prototype.Y=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};V.prototype.ba=function(a){return a?this.save():!0};W.INIT=[[W.pc.Ba,W.na.Ba,W.qc.Ba,0,0,0,0]]; X.INIT=[[X.Vb.INIT,X.la.fc|X.la.gc,X.Yb.INIT,X.Xb.INIT],[0,0,0,0,[11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11776,11784,11918,11776,11856,11824,11840,11808,11776,12E3,12E3,11857,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]]];k=V.prototype; k.reset=function(){this.c.INIT&&!this.restore(this.c.INIT)&&this.J("reset error")};k.save=function(){var a=new E(this);switch(this.c.W){case W.W:G(a,0,[this.U,this.g,this.V,this.u,this.B,this.N,this.O]);break;case X.W:G(a,0,[this.G,this.i,this.K,this.H]),G(a,1,[this.s,this.b,this.l,this.v,this.h])}return a.data()}; k.restore=function(a){var b;if(a&&(b=a[0])&&b.length)switch(this.c.W){case W.W:return this.U=b[0],this.g=b[1],this.V=b[2],this.u=b[3],this.B=b[4],this.N=b[5],this.O=b[6],!0;case X.W:return this.G=b[0],this.i=b[1],this.K=b[2],this.H=b[3],b=a[1],this.s=b[0],this.b=b[1],this.l=b[2],this.v=b[3],this.h=b[4],!0}return!1};k.start=function(){};k.stop=function(){};function dc(a,b,c){a.g&=~b;c&&(a.g|=b)}k.Cc=function(){return this.U};k.Dc=function(){return this.g};k.Ec=function(){return this.V}; k.Bc=function(){return this.u>>8-this.B&255};k.Lc=function(a,b){this.B=b};k.Nc=function(a,b){this.N=b};k.Mc=function(a,b){this.u=b<<8|this.u>>8};k.Oc=function(a,b){this.O=b};k.Pc=function(){};function ec(a){var b=0,c=0,d=~a.s;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} k.Fc=function(){var a=this.i,a=a&~X.la.ub;if((Ab(this.a)&64)<<1&&(a|=X.la.ub,a!=this.i)){var b,c;b=this.l&1;switch(this.l>>1&7){case X.da.sa.Sb:this.s=this.s<<1|b;break;case X.da.sa.Zb:b=ec(this);this.h[b]=X.da.Pa;break;case X.da.sa.Tb:this.b=this.b<<1|b;break;case X.da.sa.tc:b=ec(this);c=this.b&X.da.Pa;this.h[b]=c;break;case X.da.sa.mc:b=ec(this);c=this.h[b];null==c&&(c=X.da.Pa);this.b=c;break;case X.da.sa.nc:this.b<<=1,this.v=this.b&X.da.Pa+1}}a&=~X.la.vb;this.v&&(a|=X.la.vb);a&=~X.la.qb;this.o&& (a|=X.la.qb);return this.i=a};k.Qc=function(a,b){this.G=b};k.Tc=function(a,b){this.l=b};k.Sc=function(a,b){this.K=b};k.Rc=function(a,b){this.H=b};W.Ya={0:V.prototype.Cc,1:V.prototype.Dc,2:V.prototype.Ec,3:V.prototype.Bc};W.Za={2:V.prototype.Lc,3:V.prototype.Nc,4:V.prototype.Mc,5:V.prototype.Oc,6:V.prototype.Pc};X.Ya={66:V.prototype.Fc};X.Za={66:V.prototype.Qc,98:V.prototype.Tc,162:V.prototype.Sc,194:V.prototype.Rc}; ua(function(){for(var a=A(document,"pc8080","chipset"),b=0;b>8&255,a.b[d++]=h[c]>>16&255,a.b[d++]=h[c]>>24&255;else a.b=e;a.i=e.symbols;if(!a.b.length){r("Empty ROM: "+b);return}if(1==a.b.length){r(a.b[0]);return}}catch(g){a.J("ROM data error: "+g.message);return}else for(b=c.replace(/\n/gm, " ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e>>f.c;0>>=f.c;0":62,"?":63,"@":64,Xc:65,Zc:66,$c:67,ed:68,E:69,ld:70,rd:71,sd:72,td:73,vd:74,wd:75,xd:76,Ad:77,Cd:78,Ed:79,Gd:80,Q:81,Md:82,Od:83,Wd:84,Yd:85,ae:86,be:87,ce:88,ee:89,fe:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,ge:97,he:98,ie:99,d:100,e:101,je:102,ke:103,le:104,me:105,ne:106,k:107,oe:108, pe:109,n:110,qe:111,p:112,q:113,r:114,re:115,t:116,se:117,te:118,ue:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126},oc={65:37,68:39,76:32},pc={W:1978.1,f:{},Ca:{},Da:{"1p":49,"2p":50,coin:51,left:37,right:39,fire:32}},Z={W:100,f:{},Ca:{},Da:{},Ub:{X:130,INIT:127},aa:{X:130,dc:1,cc:2,bc:4,ac:8,ec:16,xb:32,rb:63,oc:64,ad:128,INIT:0},$b:127};Z.f[46]=3;Z.f[80]=5;Z.f[79]=6;Z.f[89]=7;Z.f[84]=8;Z.f[87]=9;Z.f[81]=10;Z.f[39]=16;Z.f[Y["]"]]=20;Z.f[Y["}"]]=148;Z.f[Y["["]]=21;Z.f[Y["{"]]=149;Z.f[73]=22; Z.f[85]=23;Z.f[82]=24;Z.f[69]=25;Z.f[Y["1"]]=26;Z.f[Y["!"]]=154;Z.f[37]=32;Z.f[40]=34;Z.f[117]=35;Z.f[19]=35;Z.f[Y["`"]]=36;Z.f[Y["~"]]=164;Z.f[Y["-"]]=37;Z.f[Y._]=165;Z.f[Y["9"]]=38;Z.f[Y["("]]=166;Z.f[Y["7"]]=39;Z.f[Y["&"]]=167;Z.f[Y["4"]]=40;Z.f[Y.$]=168;Z.f[Y["3"]]=41;Z.f[Y["#"]]=169;Z.f[27]=42;Z.f[38]=48;Z.f[114]=49;Z.f[112]=50;Z.f[8]=51;Z.f[Y["="]]=52;Z.f[Y["+"]]=180;Z.f[Y["0"]]=53;Z.f[Y[")"]]=181;Z.f[Y["8"]]=54;Z.f[Y["*"]]=182;Z.f[Y["6"]]=55;Z.f[Y["^"]]=183;Z.f[Y["5"]]=56;Z.f[Y["%"]]=184; Z.f[Y["2"]]=57;Z.f[Y["@"]]=185;Z.f[9]=58;Z.f[103]=64;Z.f[115]=65;Z.f[113]=66;Z.f[96]=67;Z.f[118]=68;Z.f[Y["\\"]]=69;Z.f[Y["|"]]=197;Z.f[76]=70;Z.f[75]=71;Z.f[71]=72;Z.f[70]=73;Z.f[65]=74;Z.f[104]=80;Z.f[2013]=81;Z.f[98]=82;Z.f[97]=83;Z.f[Y["'"]]=85;Z.f[Y['"']]=213;Z.f[Y[";"]]=86;Z.f[Y[":"]]=214;Z.f[74]=87;Z.f[72]=88;Z.f[68]=89;Z.f[83]=90;Z.f[110]=96;Z.f[116]=97;Z.f[101]=98;Z.f[100]=99;Z.f[13]=100;Z.f[Y["."]]=101;Z.f[Y[">"]]=229;Z.f[Y[","]]=102;Z.f[Y["<"]]=230;Z.f[78]=103;Z.f[66]=104;Z.f[88]=105; Z.f[119]=106;Z.f[105]=112;Z.f[99]=113;Z.f[102]=114;Z.f[109]=115;Z.f[Y["/"]]=117;Z.f[Y["?"]]=245;Z.f[77]=118;Z.f[Y[" "]]=119;Z.f[86]=120;Z.f[67]=121;Z.f[90]=122;Z.f[120]=123;Z.f[17]=124;Z.f[16]=125;Z.f[20]=126;Z.Ca={l4:Z.aa.dc,l3:Z.aa.cc,l2:Z.aa.bc,l1:Z.aa.ac,locked:Z.aa.ec,online:Z.aa.xb,local:~Z.aa.xb};var nc={SI1978:pc,VT100:Z}; mc.prototype.R=function(a,b,c){var d=this,e=a+"-"+b;if(void 0===this.w[e]){if("led"==a&&this.c.Ca[b])return this.w[e]=c,!0;switch(b){case "kbd":return c.onkeydown=function(a){return qc(d,a,!0)},c.onkeyup=function(a){return qc(d,a,!1)},!0;default:if(this.c.Da&&void 0!==this.c.Da[b])return this.w[e]=c,a=function(a,b){return function(){rc(a,b,!0)}}(this,b),b=function(a,b){return function(){rc(a,b,!1)}}(this,b),"ontouchstart"in window?(c.ontouchstart=a,c.ontouchend=b):(c.onmousedown=a,c.onmouseup=c.onmouseout= b),!0}}return!1};mc.prototype.ia=function(a,b,c,d){this.a=c;this.L=d;this.G=Pa(a,"ChipSet");$a(b,this,this.c.Ya);ab(b,this,this.c.Za)};mc.prototype.Y=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};mc.prototype.ba=function(a){return a?this.save():!0};Z.INIT=[[Z.aa.INIT,Z.Ub.INIT,-1]];k=mc.prototype;k.reset=function(){this.b=[];this.c.INIT&&!this.restore(this.c.INIT)&&this.J("reset error")}; k.save=function(){var a=new E(this);switch(this.c.W){case Z.W:G(a,0,[this.h,this.g,-1])}return a.data()};k.restore=function(a){var b;if(a&&(b=a[0])&&b.length)switch(this.c.W){case pc.W:return!0;case Z.W:return this.h=b[0],sc(this,this.h&Z.aa.rb),this.g=b[1],this.m=b[2],!0}return!1};function sc(a,b){for(var c in a.c.Ca){var d=a.w["led-"+c];if(d){var e=a.c.Ca[c],f=!!(b&e);e&e-1&&(f=!(b&~e));d.style.backgroundColor=f?"#ff0000":"#000000"}}} function qc(a,b,c){var d=!0,e;a:if(e=b.keyCode,e=oc[e]||e,!a.c.f[e]){for(var f in a.c.Da)if(a.c.Da[f]===e){e=f;break a}e=null}e&&(d=rc(a,e,c),b.preventDefault());return d} function rc(a,b,c){var d;a:{for(d=0;dd?a.b.push({pb:b,lb:Date.now(),Qa:!1}):(a.b[d].lb=Date.now(),a.b[d].Qa=!1);else if(0<=d){if(!a.b[d].Qa){var e=a.b[d].lb;if(e&&100>Date.now()-e)return a.b[d].Qa=!0,uc(a),!0}a.b.splice(d,1)}if(a.G)switch(b){case "1p":dc(a.G,W.na.hc,c);break;case "2p":dc(a.G,W.na.lc,c);break;case "coin":dc(a.G,W.na.Wb,c);break;case "left":dc(a.G,W.na.jc,c);break;case "right":dc(a.G,W.na.kc,c);break;case "fire":dc(a.G,W.na.ic,c)}return!0} function uc(a){for(var b=0,c=-1;bc||c>e)c=e}else{rc(a,d,!1);b=0;continue}}b++}0<=c&&setTimeout(function(){uc(a)},c)}k.Gc=function(){var a=this.g;0<=this.m&&(this.m>3)*this.F;if(this.vc||Ta(this.m,this.U,this.ta,3))1>1)),this.s=document.createElement("canvas"),this.s.width=b,this.s.height=c,this.cb=this.s.getContext("2d"),this.N={},this.ha=1<=a.rc?8:16,f=8>(7>4)*c)}return l} vc.prototype.Y=function(){if(2==this.G){for(var a={0:[32,"SET-UP A"],2:[64,'TO EXIT PRESS "SET-UP"'],22:[96," T T T T T T T T T"],23:[96,"1234567890","1234567890","1234567890","1234567890","1234567890","1234567890","1234567890","1234567890"],24:[]},b=this.U,c=-1,d=-1,e,f=-(60==this.Db?2:5);f>8&15|16;Ya(this.m,b++,e);Ya(this.m,b++,c&255); if(g)break}if(h)for(c=0,e=1;ec&&(a=Math.round(c/b*100)+"%")}this.zb?(this.u.style.width=a,this.u.style.width=a,this.u.style.display="block",this.u.style.margin="auto"):(this.b.style.width=a,this.b.style.height="auto");this.b.style.backgroundColor="black";this.b.ua();a=!0}this.ga&&this.ga.focus()}return a}; function yc(a,b){!b&&a.b&&(a.zb?a.u.style.width=a.u.style.height="":a.b.style.width=a.b.style.height="")}function Ac(a,b){a.Bb=b;a.V=!1;if(void 0===a.i||a.i.length!=a.Bb)a.i=Array(a.Bb)}function Dc(a,b,c,d,e){d=a.c?(b.height-c-1)*b.width+d:c+d*b.width;e&&1==a.G&&(208<=c&&236>c?e=a.ha+0:28<=c&&72>c&&(e=a.ha+1));a=a.O[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 Ec(a){for(var b=a.U,c=-1,d=0,e=60==a.Db?2:5,f=0,h=0;d>=1);;){var p=Wa(a.m,l++);if(127==(p&127)){var w=Wa(a.m,l++),c=w&96,b=(w&15)<<8|Wa(a.m,l),b=b+(w&16?8192:16384);break}if(g>4)*p.M,v=void 0,F=void 0,J=void 0,Q=void 0, tc=p.P,Hb=p.M;ca?(v=t*w.P,F=d*w.M,J=w.P,Q=w.M):(v=t*w.tb,F=d*w.wb,J=w.tb,Q=w.wb);p.P>w.P&&(v*=2,J*=2);p.M>w.M&&(0==m&&(I+=w.M),Hb=w.M);ca?ca.drawImage(p.canvas,S,I,tc,Hb,v,F,J,Q):(v+=0,F+=0,w.g.drawImage(p.canvas,S,I,tc,Hb,v,F,J,Q))}h++}f++}d++}}a.V=!0;h&&a.cb&&a.g.drawImage(a.s,0,0,a.l,a.F-a.M,0,0,a.sc,a.uc)} ua(function(){for(var a=A(document,"pc8080","video"),b=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<=(window?window.navigator.userAgent:"").indexOf("MSIE")&&(c.onresize=function(a, b,c,d){return function(){b.style.height=(a.clientWidth*d/c|0)+"px"}}(c,e,d.screenWidth,d.screenHeight),c.onresize());var f=+(d.aspect||Aa.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");pa("iOS")&&(f.setAttribute("autocapitalize","off"),f.setAttribute("autocorrect","off"));c.appendChild(f);var h=e.getContext("2d"),d=new vc(d,e,h,f,c);Ja(d,c)}}); function Fc(a){this.h=+a.adapter;switch(this.h){case 0:this.i=0;break;default:r("Unrecognized serial adapter #"+this.h);return}u.call(this,"SerialPort",a,Fc);var b=a.binding;if("console"!=b){var c;a=Gc;b&&(void 0===c&&(c="Panel"),(c=Ia(c,this.id))&&(b=c.w[b])&&this.R(null,a,b))}}y(Fc);var Gc="buffer";k=Fc.prototype; k.R=function(a,b,c){switch(b){case Gc:return this.w[b]=c,c.onkeydown=function(a){a=a||window.event;var b=a.keyCode;(8===b||a.ctrlKey&&65<=b&&90>=b)&&a.preventDefault&&a.preventDefault();return!0},c.onkeypress=function(a){a=a||window.event;a.preventDefault&&a.preventDefault();return!0},c.removeAttribute("readonly"),!0}return!1};k.ia=function(a,b,c,d){this.m=b;this.a=c;this.L=d;this.G=Pa(a,"ChipSet");$a(b,this,Hc,this.i);ab(b,this,Ic,this.i);B(this)}; k.Y=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};k.ba=function(a){return a?this.save():!0};k.reset=function(){Jc(this)};k.save=function(){var a=new E(this),b=0,c=[];c[b++]=this.c;c[b++]=this.b;c[b++]=this.g;G(a,0,c);return a.data()};k.restore=function(a){return Jc(this,a[0])};function Jc(a,b){var c=0;void 0===b&&(b=[0,0,0]);a.c=b[c++];a.b=b[c++];a.g=b[c++];return!0}k.Ac=function(){return this.c};k.zc=function(){return this.b}; k.Kc=function(a,b){this.c=b};k.Jc=function(a,b){this.b=b};k.Ic=function(a,b){this.g=b};var Hc={0:Fc.prototype.Ac,1:Fc.prototype.zc},Ic={0:Fc.prototype.Kc,1:Fc.prototype.Jc,2:Fc.prototype.Ic};ua(function(){for(var a=A(document,"pc8080","serial"),b=0;b\nLicense: GPL version 3 or later ");for(b=0;bSc){if(Oc(d,this.u)){this.i=new E(this,"1.23.3","failsafe");Oc(this.i)&&(Xc(this,d),a=2,Lc(this.i));G(this.i,"timestamp",ia());Mc(this.i);var e=this.b&&!this.o;if(1==a||ka("Click OK to restore the previous PC8080 machine state, or CANCEL to reset the machine.")){if(c=Nc(d)){var f=Pc(d,"code"),h=Pc(d,"data");f&&("ok"==f?Oc(d,h):("error"==f&& "no machine state"!=h?(this.J("Error: "+h),"unable to verify user"==h&&(oa("user",""),this.c=null)):this.Z(f+": "+h),Lc(d),Oc(d)?(c=Nc(d),e=!0):c=!1))}e&&Wc(this,c?d:null)}else 2==a&&d.clear()}else Wc(this);delete this.u;delete this.v}e=Ha(this.id);for(f=0;fa[1];a=a[2];this.O=!0;this.j.S=!0;var d=this.w.power;d&&(d.textContent="Shutdown");this.a&&(Yc(this,this.a,b,c,a),vb(this.a));this.G&&(Xc(this,b),b.clear());!c&&this.i&&(this.i.clear(),delete this.i);this.g=0}; function Xc(a,b){if(ka("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.c||"",d=b.toString(),e={app:"PC8080",ver:"1.23.3"};e.url=a.N;e.user=c;e.type="bug";e.data=d;q("http://www.pcjs.org/api/v1/report",e,!0)}} function Zc(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new E(a,"1.23.3"),h=new E(a,"1.23.3","validate"),g=ia();G(h,"timestamp",g);G(f,"timestamp",g);G(f,"version","1.23.3");G(f,"url",window?window.location.href:null);G(f,"browser",window?window.navigator.userAgent:"");a.a&&a.a.ba&&(c&&wb(a.a),d=a.a.ba(b,c),"object"===typeof d&&G(f,a.a.id,d),c&&(a.a.j.S=!1,!1===d&&(e=null)));for(var g=Ha(a.id),l=0;l>>f.c;0>>v.c;v=J!=v.g?v.b[Q].Ob(J,F):v.b[Q++].$a(J, F)|v.b[Q&v.A].$a(0,F+1)<<8;if(d.V&&v===d.i[m])t+=d.Cb;else{d.i[m]=v;(F=ca)&&(v=v>>8|(v&255)<<8);t>F&S,Dc(d,d.Ab,t++,p,Q),F+=I;t>w&&(w=t);p=h&&(h=p+1)}g+=2;m++;if(t>=d.l&&(t=0,p++,p>d.F))break}d.V=!0;eg.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(g=window.location.pathname+g);d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(g?' url="'+g+'"':""))}e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1pc8080$2")); g=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(g=new window.ActiveXObject("Microsoft.XMLDOM"),g.async=!1,g.loadXML(a)):g=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){g=null,a=p.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");q(e,null,!0,function(f,h,g){if(g||!h)c(a,"unable to resolve XML reference: "+d[0]+" ("+g+")");else{if(f=d[3])if(g=h.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=g[0],m,t=/( [a-z]+=)(['"])(.*?)\2/g;m=t.exec(f);)l=0>l.indexOf(m[1])?l.replace(">",m[0]+">"):l.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);g[0]!=l&&(h=h.replace(g[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}h=h.replace(/<\?xml[^>]*>[\r\n]*/, "");a=a.replace(d[0],h);ed(a,b,c)}})}else c(a,null)} function fd(a,b,c,d){function e(a){if(void 0===g){var b=h&&A(h,"machine-warning");g=b&&b[0]||h}g&&(g.innerHTML=ga(a))}function f(a){e("Error: "+a);l&&(--bd||xa(!0));l=!1}var h,g,l=!0;bd++;Fa[a]={};try{if(h=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],p=document.createElement("style");p.type="text/css";p.styleSheet?p.styleSheet.cssText=m:p.appendChild(document.createTextNode(m));t.appendChild(p)}c|| (c="/versions/pc8080/1.23.3/components.xsl");m=function(d,g){g?cd(c,null,null,!1,e,function(d,l){if(l)if(Ga(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window){var m=g.transformNode(l);m?(h.outerHTML=m,--bd||xa(!0)):f("transformNodeToObject failed")}else document.implementation&&document.implementation.createDocument?(m=new XSLTProcessor,m.importStylesheet(l),(m=m.transformToFragment(g,document))?h.parentNode?(h.parentNode.replaceChild(m,h),--bd||xa(!0)):f("invalid machine element: "+ a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser");else f(d)}):f(d)};"<"!=b.charAt(0)?cd(b,a,d,!0,e,m):dd(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(w){f(w.message)}return l}window.embedPC8080=function(a,b,c,d){xa(!1);return fd(a,b,c,d)};window.enableEvents=xa;window.sendEvent=ya; function gd(a,b,c,d){if(!c&&b){d.push(b);a=Fa[d[0]];b=null;for(var e in a)if(ea(e,"components.xsl")){b=e.replace(".xsl",".css");break}b?q(b,null,!0,function(a,b){hd(b,d)}):hd(null,d)}else r("Error ("+c+") requesting "+a)} function hd(a,b){var c,d,e,f=b[0],h=b[1];c=b[4];c=c.match(/^(\s*\(function\(\)\{)([\s\S]*)(}\)\(\);\s*)$/);var g=Fa[f],l={},m;for(m in g){var t=g[m],p=da(m);if("xml"==p){for(p=/[ \t]*]*path=(['"])(.*?)\1.*?<\/disk>\n?/g;d=p.exec(g[m]);){var w=d[2];w&&(g[w]||(t=t.replace(d[0],"")))}d=m=ba(m)}else"xsl"==p&&(e=m=ba(m));l[m]=t}a&&(l[m="css"]=a);b[2]&&(l[m="parms"]=b[2]);b[3]&&(l[m="state"]=b[3]);d&&e?(m=JSON.stringify(l),h+=".js",c=c[1]+"var resources="+m+";"+c[2]+c[3],c=c.replace(/\u00A9/g, "©"),m=h,g=null,l="data:application/javascript,",l=pa("Firefox")?l+encodeURIComponent(c):l+encodeURI(c),m&&(g=document.createElement("a"),"string"!=typeof g.download&&(g=null)),g?(g.href=l,g.download=m,document.body.appendChild(g),g.click(),document.body.removeChild(g),c="Check your Downloads folder for "+m+"."):(window.open(l),c="Check your browser for a new window/tab containing the requested data"+(m?" ("+m+")":"")+"."),c+=', copy it to your web server as "'+h+'", and then add the following to your web page:\n\n', c+='
\n',c+="...\n",c+='