Changed the RESET button to *not* autoStart a machine when a Debugger is present, so that the Debugger can "cleanly" load bootstrap sequences and boot without side-effects (eg, unexpected interrupts)
This commit is contained in:
parent
4be8640af8
commit
5940ef866d
2 changed files with 257 additions and 256 deletions
|
|
@ -38,15 +38,15 @@ var h,aa="function"==typeof Object.defineProperties?Object.defineProperty:functi
|
|||
function fa(){ca();var a=ba.Symbol.iterator;a||(a=ba.Symbol.iterator=ba.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&aa(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return ga(this)}});fa=function(){}}function ga(a){var b=0;return ha(function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}})}function ha(a){fa();a={next:a};a[ba.Symbol.iterator]=function(){return this};return a}function ia(a){fa();ca();fa();var b=a[Symbol.iterator];return b?b.call(a):ga(a)}
|
||||
function p(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a;for(var d in b)if(Object.defineProperties){var e=Object.getOwnPropertyDescriptor(b,d);e&&Object.defineProperty(a,d,e)}else a[d]=b[d]}function ja(a,b){if(b){var c=ba;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&aa(c,a,{configurable:!0,writable:!0,value:b})}}
|
||||
ja("Math.log2",function(a){return a?a:function(a){return Math.log(a)/Math.LN2}});ja("Array.prototype.fill",function(a){return a?a:function(a,c,d){var b=this.length||0;0>c&&(c=Math.max(0,b+c));if(null==d||d>b)d=b;d=Number(d);0>d&&(d=Math.max(0,b+d));for(c=Number(c||0);c<d;c++)this[c]=a;return this}});
|
||||
var ka={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[40,2,9,,253],737280:[80,2,9,,249],1228800:[80,2,15,,249],1474560:[80,2,18,,240],2949120:[80,2,36,,240],21368320:[615,4,17],256256:[77,1,26,128],2494464:[203,2,12,512],5242880:[256,2,40,256],10485760:[512,2,40,256]},la={pi:0,Ae:1,xi:2,yi:3,zi:4,Ai:5,Bi:6,Ci:7,Jd:8,Di:9,Be:10,Ei:11,Fi:12,Ce:13,Gi:14,Hi:15,Ii:16,Ji:17,Ki:18,Li:19,Mi:20,Ni:21,Oi:22,Pi:23,Qi:24,Ri:25,Si:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,
|
||||
"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,Fd:65,li:66,si:67,Ti:68,E:69,Zi:70,bj:71,nj:72,pj:73,qj:74,rj:75,sj:76,vj:77,xj:78,Dj:79,Gj:80,Q:81,Ij:82,Lj:83,Uj:84,Wj:85,Yj:86,Zj:87,ck:88,dk:89,sf:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,ek:97,fk:98,ik:99,d:100,e:101,jk:102,kk:103,lk:104,mk:105,rk:106,k:107,sk:108,tk:109,n:110,uk:111,p:112,q:113,r:114,vk:115,t:116,yk:117,zk:118,Ak:119,x:120,
|
||||
y:121,z:122,"{":123,"|":124,"}":125,"~":126,bc:127};function r(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Sd=b.comment;this.qf=b;this.exports={};this.H=this.bindings={};a=this.id.indexOf(".");0>a?this.Lb=this.id:(this.wb=this.id.substr(0,a),this.Lb=this.id.substr(a+1));this.A={ready:!1,gb:!1,td:!1,aa:!1,error:!1};this.Kc=null;this.A.error=!1;this.ha=c||0;this.F=this.f=this.D=this.K=this.Ta=null;ma.push(this)}function oa(a,b,c){pa[a]&&b&&(pa[a][b]=c)}
|
||||
var ka={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[40,2,9,,253],737280:[80,2,9,,249],1228800:[80,2,15,,249],1474560:[80,2,18,,240],2949120:[80,2,36,,240],21368320:[615,4,17],256256:[77,1,26,128],2494464:[203,2,12,512],5242880:[256,2,40,256],10485760:[512,2,40,256]},la={ri:0,Be:1,yi:2,zi:3,Ai:4,Bi:5,Ci:6,Di:7,Jd:8,Ei:9,Ce:10,Fi:11,Gi:12,De:13,Hi:14,Ii:15,Ji:16,Ki:17,Li:18,Mi:19,Ni:20,Oi:21,Pi:22,Qi:23,Ri:24,Si:25,Ti:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,
|
||||
"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,Fd:65,mi:66,ti:67,Ui:68,E:69,$i:70,cj:71,oj:72,qj:73,rj:74,sj:75,tj:76,wj:77,yj:78,Ej:79,Hj:80,Q:81,Jj:82,Mj:83,Vj:84,Xj:85,Zj:86,$j:87,dk:88,ek:89,tf:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,fk:97,gk:98,jk:99,d:100,e:101,kk:102,lk:103,mk:104,nk:105,sk:106,k:107,tk:108,uk:109,n:110,vk:111,p:112,q:113,r:114,wk:115,t:116,zk:117,Ak:118,Bk:119,x:120,
|
||||
y:121,z:122,"{":123,"|":124,"}":125,"~":126,cc:127};function r(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Sd=b.comment;this.rf=b;this.exports={};this.H=this.bindings={};a=this.id.indexOf(".");0>a?this.Mb=this.id:(this.wb=this.id.substr(0,a),this.Mb=this.id.substr(a+1));this.A={ready:!1,gb:!1,td:!1,aa:!1,error:!1};this.Kc=null;this.A.error=!1;this.ha=c||0;this.F=this.f=this.D=this.K=this.Ta=null;ma.push(this)}function oa(a,b,c){pa[a]&&b&&(pa[a][b]=c)}
|
||||
function qa(){return Date.now()||+new Date}function v(a){window&&window.alert(a)}function ra(a){var b=!1;window&&(b=window.confirm(a));return b}function ta(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b<ma.length;b++){var d=ma[b];a&&d.id.indexOf(a)||c.push(d)}return c}function ua(a){if(void 0!==a){var b;for(b=0;b<ma.length;b++)if(ma[b].id===a)return ma[b]}return null}
|
||||
function va(a,b){var c;if(void 0!==a){var d;b&&(b=0<(d=b.indexOf("."))?b.substr(0,d+1):"");for(d=0;d<ma.length;d++)if(c)c==ma[d]&&(c=null);else if(!(a!=ma[d].type||b&&ma[d].id.indexOf(b)))return ma[d]}return null}function wa(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")}catch(c){v(c.message+" ("+a+")")}return b}
|
||||
function xa(a,b){var c=w;b=x(b.parentNode,c+"-control");for(var d=0;d<b.length;d++)for(var e=b[d].childNodes,f=0;f<e.length;f++){var g=e[f];if(1===g.nodeType){var k=g.getAttribute("class");if(k)for(var l=k.split(" "),m=0;m<l.length;m++)switch(k=l[m],k){case c+"-binding":(k=wa(g))&&k.binding&&a.va(k.type,k.binding,g,k.value),m=l.length}}}}
|
||||
function x(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.getElementsByClassName(b);var d;c=[];a=a.getElementsByTagName("*");var e=new RegExp("(^| )"+b+"( |$)");b=0;for(d=a.length;b<d;b++)e.test(a[b].className)&&c.push(a[b]);return c}h=r.prototype;h.toString=function(){return this.name?this.name:this.id||this.type};
|
||||
h.va=function(a,b,c){switch(b){case "clear":return this.H[b]||(this.H[b]=c,c.onclick=function(a){return function(){a.H.print&&(a.H.print.value="")}}(this)),!0;case "print":return this.H[b]||(this.Ta=this.H[b]=c,c.value="",this.v=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),this.T=function(a){this.v(a,this.Lb)}),!0;default:return!1}};h.log=function(){};h.v=function(){};
|
||||
h.status=function(a){this.v(this.Lb+": "+a)};h.T=function(a,b,c){c=c||this.type;b||v((c?c+": ":"")+a)};function ya(a,b){a.A.error=!0;a.T(b)}function za(a){return a.A.error?(a.v(a.toString()+" error"),!0):!1}function Aa(a,b){b&&(a.A.ready?b():a.Kc=b);return a.A.ready}function y(a,b){a.A.error||(a.A.ready=!1!==b,a.A.ready&&(b=a.Kc,a.Kc=null,b&&b()))}function Ba(a,b){a.A.gb&&(b?a.A.td=!0:void 0===b&&a.v(a.toString()+" busy"));return a.A.gb}
|
||||
h.va=function(a,b,c){switch(b){case "clear":return this.H[b]||(this.H[b]=c,c.onclick=function(a){return function(){a.H.print&&(a.H.print.value="")}}(this)),!0;case "print":return this.H[b]||(this.Ta=this.H[b]=c,c.value="",this.v=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),this.T=function(a){this.v(a,this.Mb)}),!0;default:return!1}};h.log=function(){};h.v=function(){};
|
||||
h.status=function(a){this.v(this.Mb+": "+a)};h.T=function(a,b,c){c=c||this.type;b||v((c?c+": ":"")+a)};function ya(a,b){a.A.error=!0;a.T(b)}function za(a){return a.A.error?(a.v(a.toString()+" error"),!0):!1}function Aa(a,b){b&&(a.A.ready?b():a.Kc=b);return a.A.ready}function y(a,b){a.A.error||(a.A.ready=!1!==b,a.A.ready&&(b=a.Kc,a.Kc=null,b&&b()))}function Ba(a,b){a.A.gb&&(b?a.A.td=!0:void 0===b&&a.v(a.toString()+" busy"));return a.A.gb}
|
||||
function Da(a,b){if(a.A.td)return a.A.gb=!1,a.A.td=!1;if(a.A.error)return a.v(a.toString()+" error"),!1;a.A.gb=b;return a.A.gb}h.Da=function(){return this.A.aa=!0};h.Ca=function(a,b){b&&(this.A.aa=!1);return!0};function z(a,b){if(a.F){a===a.F?b|=0:b=b||a.ha;var c=a.F.ha&b;return!!b&&c===b||!!(c&a.F.ge)}return!1}function D(a,b,c,d){a.F&&(!0===c||z(a,c|0))&&a.F.message(b,d)}
|
||||
window&&(window.PCjs||(window.PCjs={}),window.PCjs.Machines||(window.PCjs.Machines={}),window.PCjs.Components||(window.PCjs.Components=[]));var pa=window?window.PCjs.Machines:{},ma=window?window.PCjs.Components:[];Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});
|
||||
Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});
|
||||
|
|
@ -65,31 +65,31 @@ function cb(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return
|
|||
function eb(a){if(!fb){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," "))}fb=c}return fb[a]}function gb(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0<a?setTimeout(d,0):c()}d()}
|
||||
function hb(a,b){function c(){b(100===d)&&(e=setTimeout(c,d),d=100)}var d=0,e=null,f=!1;a.onmousedown=function(){f||e||(d=500,c())};a.ontouchstart=function(){e||(d=500,c())};a.onmouseup=a.onmouseout=function(){e&&(clearTimeout(e),e=null)};a.ontouchend=a.ontouchcancel=function(){e&&(clearTimeout(e),e=null);f=!0}}function lb(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function mb(a){nb.init.push(a)}
|
||||
function ob(a){if(pb)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){v(""+("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks."))}}function qb(a){!pb&&a?(pb=!0,rb&&sb("init"),tb&&sb("show")):pb=a}function sb(a){nb[a]&&ob(nb[a])}var fb=null,nb={init:[],show:[],exit:[]},rb=!1,tb=!1,pb=!0,ab=null;lb("onload",function(){rb=!0;ob(nb.init)});lb("onpageshow",function(){tb=!0;ob(nb.show)});lb(db("Opera")||db("iOS")?"onunload":"onbeforeunload",function(){ob(nb.exit)});
|
||||
var ub="undefined"!==typeof ArrayBuffer,w="pdp11",wb="PDPjs",Cb=!1,Db=ub,Eb=!0,Fb=!0,Gb="UNKNOWN PANIC ABORT ILLEGAL RED YELLOW FAULT TRACE HALT OPCODE INTERRUPT".split(" "),Hb={nd:5,rd:144,Wc:8,Fc:{jf:15,Mj:16,bk:32,Wd:64,Fa:128,$d:256,Qj:512,Xi:1024,Ec:2048,Wi:4096,gd:57344,ma:{gd:13}},Xe:{ce:1,wi:2,kf:3,Jb:28,Dc:32,Cc:64,Qd:128,Vj:256,De:512,dc:1024,Hj:2048,Zd:4096,$j:8192,Fj:16384,Ee:32768,bd:32736},Ve:{cc:1,wa:14,Ib:48,Hb:64,$a:128,Tj:256,Yi:512,$i:1024,Le:2048,pd:8192,bd:16384,jb:32768,Jb:4608,
|
||||
ec:61438,Sa:3967,ma:{wa:1,Ib:4}},We:{od:15,ed:16,ac:8160,tb:57344,ma:{ed:4,ac:5,tb:13}},wa:{ze:0,gc:2,ub:4,sd:6,Ic:8,Pe:10,Fe:12,ak:14}},Ib={nd:5,rd:112,Wc:4,Oe:"DY",bf:{Fa:1,wa:14,Za:48,Hb:64,$a:128,tb:768,Md:15360,Vi:16384,jb:32768,ti:16254,Pj:128,ec:65535,Sa:1022,ma:{wa:1,Za:4,tb:8}},$e:{Sa:65534},cf:{lf:1,mf:4,nf:16,Nj:65408,Xd:63,Hc:64,fc:65408,He:3,gj:8,ma:{Hc:6,fc:7}},Gc:{Ke:{tj:0,Sj:1,ri:2,uj:3,Ic:4,Me:5,Xj:6,Rj:7},Nd:8,Je:16,dj:32,fj:64,Ie:128,ej:256,jj:512,lj:1024,ij:2048,hj:4096,mj:8192,
|
||||
cj:16384,kj:32768},af:{bb:63},Md:{Ej:1024,Ui:2048,ce:2048,oj:3072,De:4096,ab:5120,dc:8192,wj:9216},wa:{yj:0,sd:2,pf:4,Ic:6,Te:8,rf:10,Qe:12,Jj:14}},Jb={nd:5,rd:180,Wc:2,Oe:"DX",ef:{cc:1,wa:14,qd:16,DONE:32,Hb:64,fb:128,INIT:16384,jb:32768,Jb:16128,ec:32992,Sa:16479},Kj:{},hf:{bb:127},gf:{bb:31},ff:{Id:1,Td:2,gd:4,bc:64,Fa:128},wa:{Zc:0,EMPTY:2,gc:4,ub:6,Jb:8,Se:10,Jc:12,Re:14},ERROR:{cd:8,dd:16,mi:24,Ne:32,aj:40,Oj:48,md:56,Cj:72,Bj:80,Aj:88,vi:96,oi:104,zj:112,ld:120,ui:128,ni:136}},Kb={48:"DL11R",
|
||||
52:"DL11X",56:"PC11R",60:"PC11X",64:"KW11",112:"RL11",144:"RK11",180:"RX11"};Jb.df=["DX",77,1,26,128,1,0,0,128,0];Hb.Ec=["RK",203,2,12,512,0,0,0,512,Hb.Fc.Ec|Hb.Fc.$d|Hb.Fc.Wd];Ib.Ye=["RL",512,2,40,256,0,0,0,256,Ib.Gc.Ke.Me|Ib.Gc.Nd|Ib.Gc.Je];
|
||||
var ub="undefined"!==typeof ArrayBuffer,w="pdp11",wb="PDPjs",Cb=!1,Db=ub,Eb=!0,Fb=!0,Gb="UNKNOWN PANIC ABORT ILLEGAL RED YELLOW FAULT TRACE HALT OPCODE INTERRUPT".split(" "),Hb={nd:5,rd:144,Wc:8,Fc:{kf:15,Nj:16,ck:32,Wd:64,Fa:128,$d:256,Rj:512,Yi:1024,Ec:2048,Xi:4096,gd:57344,ma:{gd:13}},Ye:{ce:1,xi:2,lf:3,Kb:28,Dc:32,Cc:64,Qd:128,Wj:256,Ee:512,ec:1024,Ij:2048,Zd:4096,ak:8192,Gj:16384,Fe:32768,bd:32736},We:{dc:1,wa:14,Jb:48,Ib:64,$a:128,Uj:256,Zi:512,aj:1024,Me:2048,pd:8192,bd:16384,jb:32768,Kb:4608,
|
||||
fc:61438,Sa:3967,ma:{wa:1,Jb:4}},Xe:{od:15,ed:16,bc:8160,tb:57344,ma:{ed:4,bc:5,tb:13}},wa:{Ae:0,hc:2,ub:4,sd:6,Ic:8,Qe:10,Ge:12,bk:14}},Ib={nd:5,rd:112,Wc:4,Pe:"DY",cf:{Fa:1,wa:14,Za:48,Ib:64,$a:128,tb:768,Md:15360,Wi:16384,jb:32768,ui:16254,Qj:128,fc:65535,Sa:1022,ma:{wa:1,Za:4,tb:8}},af:{Sa:65534},df:{mf:1,nf:4,pf:16,Oj:65408,Xd:63,Hc:64,gc:65408,Ie:3,hj:8,ma:{Hc:6,gc:7}},Gc:{Le:{uj:0,Tj:1,si:2,vj:3,Ic:4,Ne:5,Yj:6,Sj:7},Nd:8,Ke:16,ej:32,gj:64,Je:128,fj:256,kj:512,mj:1024,jj:2048,ij:4096,nj:8192,
|
||||
dj:16384,lj:32768},bf:{bb:63},Md:{Fj:1024,Vi:2048,ce:2048,pj:3072,Ee:4096,ab:5120,ec:8192,xj:9216},wa:{zj:0,sd:2,qf:4,Ic:6,Ue:8,sf:10,Re:12,Kj:14}},Jb={nd:5,rd:180,Wc:2,Pe:"DX",ff:{dc:1,wa:14,qd:16,DONE:32,Ib:64,fb:128,INIT:16384,jb:32768,Kb:16128,fc:32992,Sa:16479},Lj:{},jf:{bb:127},hf:{bb:31},gf:{Id:1,Td:2,gd:4,cc:64,Fa:128},wa:{Zc:0,EMPTY:2,hc:4,ub:6,Kb:8,Te:10,Jc:12,Se:14},ERROR:{cd:8,dd:16,ni:24,Oe:32,bj:40,Pj:48,md:56,Dj:72,Cj:80,Bj:88,wi:96,pi:104,Aj:112,ld:120,vi:128,oi:136}},Kb={48:"DL11R",
|
||||
52:"DL11X",56:"PC11R",60:"PC11X",64:"KW11",112:"RL11",144:"RK11",180:"RX11"};Jb.ef=["DX",77,1,26,128,1,0,0,128,0];Hb.Ec=["RK",203,2,12,512,0,0,0,512,Hb.Fc.Ec|Hb.Fc.$d|Hb.Fc.Wd];Ib.Ze=["RL",512,2,40,256,0,0,0,256,Ib.Gc.Le.Ne|Ib.Gc.Nd|Ib.Gc.Ke];
|
||||
var w="pdp11",wb="PDPjs",Cb=!1,Db=ub,Fb=Eb=!0,Lb={cpu:1,trap:2,fault:4,"int":8,bus:16,memory:32,mmu:64,rom:128,device:256,panel:512,keyboard:1024,key:2048,pc11:4096,paper:4096,disk:8192,read:16384,write:32768,rk11:65536,rl11:131072,rx11:262144,dl11:1048576,serial:1048576,kw11:2097152,timer:2097152,speaker:16777216,computer:33554432,log:268435456,warn:536870912,buffer:1073741824,halt:-2147483648};
|
||||
function Mb(a,b){r.call(this,"Panel",a,512);this.j=this.u=0;this.M=b;this.fa=this.g=this.Xa=this.Wa=0;this.B=this.C=-1;this.G=this.I=this.w=!1;this.L=Nb;this.i={};this.b={START:[1,1,!0,!1,this.Mf],STEP:[1,1,!1,!1,this.Nf],ENABLE:[1,1,!1,!1,this.If],CONT:[1,1,!0,!1,this.Gf],DEP:[0,0,!0,!1,this.Hf],EXAM:[1,1,!0,!1,this.Jf],LOAD:[1,1,!0,!1,this.Lf],TEST:[0,0,!0,!1,this.Kf]};for(a=0;22>a;a++)this.b["S"+a]=[0,0,!1,!1,this.Of,a];this.F=this.f=this.D=this.K=null;y(this)}p(Mb,r);h=Mb.prototype;
|
||||
function Mb(a,b){r.call(this,"Panel",a,512);this.j=this.u=0;this.M=b;this.fa=this.g=this.Xa=this.Wa=0;this.B=this.C=-1;this.G=this.I=this.w=!1;this.L=Nb;this.i={};this.b={START:[1,1,!0,!1,this.Nf],STEP:[1,1,!1,!1,this.Of],ENABLE:[1,1,!1,!1,this.Jf],CONT:[1,1,!0,!1,this.Hf],DEP:[0,0,!0,!1,this.If],EXAM:[1,1,!0,!1,this.Kf],LOAD:[1,1,!0,!1,this.Mf],TEST:[0,0,!0,!1,this.Lf]};for(a=0;22>a;a++)this.b["S"+a]=[0,0,!1,!1,this.Pf,a];this.F=this.f=this.D=this.K=null;y(this)}p(Mb,r);h=Mb.prototype;
|
||||
h.reset=function(a){this.stop();a&&Ob(this,this.Wa=0)};
|
||||
h.va=function(a,b,c,d){if(this.K&&this.K.va(a,b,c,d)||this.f&&this.f.va(a,b,c,d)||this.F&&this.F.va(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.H[b]=c,this.u++,!0;default:return"led"==a||"rled"==a?(this.H[b]=c,this.i[b]=d?1:0,this.u++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0,d?1:0]),this.H[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,
|
||||
b){return function(){Pb(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){Qb(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){Pb(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){Qb(a,b)}}(this,b),!0):r.prototype.va.call(this,a,b,c,d)}};h.Aa=function(a,b,c,d){this.K=a;this.D=b;this.f=c;this.F=d;Rb(b,this,Sb);Tb(b,this.reset.bind(this));Ub(this);Vb(this)};
|
||||
h.Da=function(a,b){if(!b)if(this.M&&Wb(),!a)this.reset(!0);else if(!this.restore(a))return!1;return!0};h.Ca=function(a){return a?this.save():!0};h.save=function(){var a=new G(this);a.set(0,[this.fa,this.Wa,this.Xa]);return a.data()};h.restore=function(a){if(a=a[0])Xb(this,this.fa=a[0]),Ob(this,this.Wa=a[1]),Yb(this,a[2]);return!0};function ec(a,b,c){if(a=a.H[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Ub(a,b){for(var c in a.i)ec(a,c,null!=b?b:a.i[c])}
|
||||
function fc(a,b,c){if(a=a.H[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Vb(a){for(var b in a.b)fc(a,b,a.b[b][1])}function gc(a,b,c,d){if(a.H[b]){var e=a.F&&a.F.Ba||8;c=c||0;c=8==e?E(c,d):F(c,d);a.H[b].textContent!=c&&(a.H[b].textContent=c)}}function Pb(a,b){var c=a.b[b];fc(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);b!=hc&&(a.G=b==ic,a.I=b==jc)}
|
||||
function Qb(a,b){var c=a.b[b];c[2]&&c[3]&&(fc(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}h.Mf=function(a){a||this.f.A.V||(a=this.f,a.D.reset(),kc(a),this.b[lc]&&this.b[lc][1]&&mc(this.f))};h.Nf=function(){};h.If=function(a){a||this.f.ba()};
|
||||
h.Gf=function(a){if(!a&&!this.f.A.V)if(this.b[lc]&&this.b[lc][1])mc(this.f);else{if((a=this.F)&&!Ba(a,!0))Da(a,!0),nc(a,0,null),Da(a,!1);else try{var b=this.f.Ac(1);0<b&&(oc(this.f,b),pc(this.f,b,!0),qc(this.f,b))}catch(c){"number"!=typeof c&&ya(this.f,c.stack||c.message)}this.stop();this.K&&H(this.K)}};h.Hf=function(a){if(a&&!this.f.A.V)if(this.G&&rc(this),a=Ob(this,this.Xa),this.L==Nb)sc(this.D,this.fa,a);else{var b=this.f,c=this.fa;b.pa++;b.D.$b(tc(b,c,4),a);b.pa--}};
|
||||
h.Jf=function(a){a||this.f.A.V||(this.I&&rc(this),a=this.L==Nb?uc(this.D,this.fa):vc(this.f,this.fa),Ob(this,a))};h.Lf=function(a){a||this.f.A.V||Xb(this,this.Xa)};h.Kf=function(a){a?(this.w=!0,Ub(this,!0)):(this.w=!1,Ub(this),Yb(this,0))};h.Of=function(a,b){this.Xa=a?this.Xa|1<<b:this.Xa&~(1<<b)};function rc(a){var b=1140>=a.f.ka?8:16,c=65472<=a.fa&&a.fa<65472+b,b=c?1:2,c=c?15:a.D.I;a.b[hc]&&a.b[hc][1]||(b=-b);Xb(a,a.fa&~c|a.fa+b&c)}
|
||||
function Qb(a,b){var c=a.b[b];c[2]&&c[3]&&(fc(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}h.Nf=function(a){a||this.f.A.V||(a=this.f,a.D.reset(),kc(a),this.b[lc]&&this.b[lc][1]&&mc(this.f))};h.Of=function(){};h.Jf=function(a){a||this.f.ba()};
|
||||
h.Hf=function(a){if(!a&&!this.f.A.V)if(this.b[lc]&&this.b[lc][1])mc(this.f);else{if((a=this.F)&&!Ba(a,!0))Da(a,!0),nc(a,0,null),Da(a,!1);else try{var b=this.f.Ac(1);0<b&&(oc(this.f,b),pc(this.f,b,!0),qc(this.f,b))}catch(c){"number"!=typeof c&&ya(this.f,c.stack||c.message)}this.stop();this.K&&H(this.K)}};h.If=function(a){if(a&&!this.f.A.V)if(this.G&&rc(this),a=Ob(this,this.Xa),this.L==Nb)sc(this.D,this.fa,a);else{var b=this.f,c=this.fa;b.pa++;b.D.ac(tc(b,c,4),a);b.pa--}};
|
||||
h.Kf=function(a){a||this.f.A.V||(this.I&&rc(this),a=this.L==Nb?uc(this.D,this.fa):vc(this.f,this.fa),Ob(this,a))};h.Mf=function(a){a||this.f.A.V||Xb(this,this.Xa)};h.Lf=function(a){a?(this.w=!0,Ub(this,!0)):(this.w=!1,Ub(this),Yb(this,0))};h.Pf=function(a,b){this.Xa=a?this.Xa|1<<b:this.Xa&~(1<<b)};function rc(a){var b=1140>=a.f.ka?8:16,c=65472<=a.fa&&a.fa<65472+b,b=c?1:2,c=c?15:a.D.I;a.b[hc]&&a.b[hc][1]||(b=-b);Xb(a,a.fa&~c|a.fa+b&c)}
|
||||
function Xb(a,b){a.fa=b&a.D.I;if(a.B!==a.fa){a.B=a.fa;b=a.B;for(var c=0;22>c;c++)wc(a,"A"+c,b&1<<c)}}function Ob(a,b){a.g=b&65535;if(a.C!==a.g){a.C=a.g;b=a.C;for(var c=0;16>c;c++)wc(a,"D"+c,b&1<<c)}return a.g}function wc(a,b,c){a.i[b]=c;a.w||ec(a,b,c)}function xc(a){return void 0!==a.H[yc]}function Yb(a,b){if(xc(a)){a.Xa=b;for(var c=0;22>c;c++)a.b["S"+c][1]=b&1<<c?1:0;Vb(a)}}h.stop=function(){Xb(this,this.f.g[7])};h.Cd=function(a){this.fa=a};h.setData=function(a,b){b?this.Wa=a:this.g=a};
|
||||
h.Tf=function(a,b){return(b?this.Wa:this.Xa)&65535};h.hh=function(a){this.Wa=a};function Wb(){for(var a=x(document,w,"panel"),b=0;b<a.length;b++){var c=a[b],d=wa(c),e=ua(d.id);e||(e=new Mb(d,!0));xa(e,c)}}var Nb=7,yc="S0",ic="DEP",lc="ENABLE",jc="EXAM",hc="STEP",zc={},Sb=(zc[65400]=[null,null,Mb.prototype.Tf,Mb.prototype.hh,"CNSW"],zc);mb(Wb);
|
||||
function Ac(a,b,c){r.call(this,"Bus",a,16);this.f=b;this.F=c;this.U=+a.busWidth||16;this.M=1<<this.U;this.I=this.M-1;this.j=Bc;this.g=Math.log2(this.j);this.R=this.j>>2;this.i=this.j-1;this.G=this.M/this.j|0;this.S=this.G-1;this.Pa=[];this.na=0;this.C=!1;this.N=[];this.tf=[Cc,Dc,Ec,Fc];this.b=this.u=[];this.B=this.L=this.w=this.O=this.P=0;a=new I(this);Gc(a,this.F);this.b=Array(this.G);this.u=Array(this.G);for(b=0;b<this.G;b++)this.b[b]=this.u[b]=a;this.B=this.M-Bc;Hc(this,this.B,Bc,Ic,this);this.P=
|
||||
h.Uf=function(a,b){return(b?this.Wa:this.Xa)&65535};h.ih=function(a){this.Wa=a};function Wb(){for(var a=x(document,w,"panel"),b=0;b<a.length;b++){var c=a[b],d=wa(c),e=ua(d.id);e||(e=new Mb(d,!0));xa(e,c)}}var Nb=7,yc="S0",ic="DEP",lc="ENABLE",jc="EXAM",hc="STEP",zc={},Sb=(zc[65400]=[null,null,Mb.prototype.Uf,Mb.prototype.ih,"CNSW"],zc);mb(Wb);
|
||||
function Ac(a,b,c){r.call(this,"Bus",a,16);this.f=b;this.F=c;this.U=+a.busWidth||16;this.M=1<<this.U;this.I=this.M-1;this.j=Bc;this.g=Math.log2(this.j);this.R=this.j>>2;this.i=this.j-1;this.G=this.M/this.j|0;this.S=this.G-1;this.Pa=[];this.na=0;this.C=!1;this.N=[];this.uf=[Cc,Dc,Ec,Fc];this.b=this.u=[];this.B=this.L=this.w=this.O=this.P=0;a=new I(this);Gc(a,this.F);this.b=Array(this.G);this.u=Array(this.G);for(b=0;b<this.G;b++)this.b[b]=this.u[b]=a;this.B=this.M-Bc;Hc(this,this.B,Bc,Ic,this);this.P=
|
||||
this.O=(this.B&this.I)>>>this.g;this.L=0;this.w=this.I;y(this)}p(Ac,r);function Jc(a,b){if(b!=a.L){for(var c=0;c<a.G;c++)a.u[c]=a.b[c];a.L=0;a.w=a.I;b&&(a.L=b,b=1<<b,a.w=b-1,b-=Bc,a.P=(b&a.w)>>>a.g,a.u[a.P]=a.b[a.O])}}h=Ac.prototype;h.reset=function(){for(var a=0;a<this.N.length;a++)this.N[a]();Jc(this,16)};h.Da=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};h.Ca=function(a){return a?this.save():!0};h.save=function(){var a=new G(this);a.set(0,Vc(this));return a.data()};
|
||||
h.restore=function(a){a:{a=a[0];var b;for(b=0;b<a.length-1;b+=2){var c=a[b],d=a[b+1];if(d&&d.length<this.R){for(var e=0,f=Array(this.R),g=0;g<d.length-1;)for(var k=d[g++],l=d[g++];k--;)f[e++]=l;d=f}e=this.b[c];if(!e||!e.restore(d)){v("Unable to restore memory block "+c);a=!1;break a}}a=!0}return a};
|
||||
function Hc(a,b,c,d,e){for(var f=b,g=c,k=f>>>a.g;0<g&&k<a.b.length;){var l=a.b[k],m=k*a.j,n=a.j-(f-m);n>g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.J)return l.Wb+=l.J-f,l.J=f,!0;if(f>=l.J+l.Wb){n=l.size-(f-m);n>g&&(n=g);l.Wb=f-l.J+n;f=m+a.j;g-=n;k++;continue}}return Wc(Xc,f,g)}f=new I(a,f,n,a.j,d,e);Gc(f,a.F,l);a.b[k++]=f;f=m+a.j;g-=n}return 0>=g?(a.status("Added "+(c>>10)+"Kb "+Yc[d]+" at "+E(b)),!0):Wc(Zc,b,c)}h.Gd=function(a){return this.u[(a&this.w)>>>this.g].Db(a&this.i,a)};
|
||||
h.zc=function(a){var b=a&this.i,c=(a&this.w)>>>this.g;return Fb||b!=this.i?this.u[c].oa(b,a):this.u[c++].Db(b,a)|this.u[c&this.S].Db(0,a+1)<<8};h.Hd=function(a,b){this.u[(a&this.w)>>>this.g].Fb(a&this.i,b,a)};h.$b=function(a,b){var c=a&this.i,d=(a&this.w)>>>this.g;Fb||c!=this.i?this.u[d].Gb(c,b,a):(this.u[d++].Fb(c,b&255,a),this.u[d&this.S].Fb(0,b>>8&255,a+1))};function $c(a,b){return a.b[(b&a.I)>>>a.g]}
|
||||
function Hc(a,b,c,d,e){for(var f=b,g=c,k=f>>>a.g;0<g&&k<a.b.length;){var l=a.b[k],m=k*a.j,n=a.j-(f-m);n>g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.J)return l.Xb+=l.J-f,l.J=f,!0;if(f>=l.J+l.Xb){n=l.size-(f-m);n>g&&(n=g);l.Xb=f-l.J+n;f=m+a.j;g-=n;k++;continue}}return Wc(Xc,f,g)}f=new I(a,f,n,a.j,d,e);Gc(f,a.F,l);a.b[k++]=f;f=m+a.j;g-=n}return 0>=g?(a.status("Added "+(c>>10)+"Kb "+Yc[d]+" at "+E(b)),!0):Wc(Zc,b,c)}h.Gd=function(a){return this.u[(a&this.w)>>>this.g].Eb(a&this.i,a)};
|
||||
h.zc=function(a){var b=a&this.i,c=(a&this.w)>>>this.g;return Fb||b!=this.i?this.u[c].oa(b,a):this.u[c++].Eb(b,a)|this.u[c&this.S].Eb(0,a+1)<<8};h.Hd=function(a,b){this.u[(a&this.w)>>>this.g].Gb(a&this.i,b,a)};h.ac=function(a,b){var c=a&this.i,d=(a&this.w)>>>this.g;Fb||c!=this.i?this.u[d].Hb(c,b,a):(this.u[d++].Gb(c,b&255,a),this.u[d&this.S].Gb(0,b>>8&255,a+1))};function $c(a,b){return a.b[(b&a.I)>>>a.g]}
|
||||
function uc(a,b){var c;a.C=!1;a.na++;var d=b&a.i,e=$c(a,b);Fb||d!=a.i?c=e.B(d,b):c=e.K(d,b)|$c(a,b+1).K(0,b+1)<<8;a.na--;return c}function ad(a,b,c){a.C=!1;a.na++;$c(a,b).F(b&a.i,c&255,b);a.na--}function sc(a,b,c){a.C=!1;a.na++;var d=b&a.i,e=$c(a,b);Fb||d!=a.i?e.C(d,c&65535,b):(e.F(d,c&255,b),$c(a,b+1).F(0,c>>8&255,b+1));a.na--}
|
||||
function Vc(a){for(var b=0,c=[],d=0;d<a.G;d++){var e=a.b[d];if(e.hb||e.Af){c[b++]=d;var f=b++;if(e=e.save()){for(var g=0,k=0,l=[];g<e.length;){for(var m=e[g],n=g+1;n<e.length&&e[n]===m;)n++;l[k++]=n-g;l[k++]=m;g=n}l.length<e.length&&(e=l)}c[f]=e}}return c}function bd(a){for(var b=cd,c=0,d=0;d<a.b.length;d++){var e=a.b[d];e.type==b&&(c=e.J+e.Wb)}return c}
|
||||
function Vc(a){for(var b=0,c=[],d=0;d<a.G;d++){var e=a.b[d];if(e.hb||e.Bf){c[b++]=d;var f=b++;if(e=e.save()){for(var g=0,k=0,l=[];g<e.length;){for(var m=e[g],n=g+1;n<e.length&&e[n]===m;)n++;l[k++]=n-g;l[k++]=m;g=n}l.length<e.length&&(e=l)}c[f]=e}}return c}function bd(a){for(var b=cd,c=0,d=0;d<a.b.length;d++){var e=a.b[d];e.type==b&&(c=e.J+e.Xb)}return c}
|
||||
function dd(a,b,c,d,e,f,g,k,l){for(var m=b==c?-1:0;b<=c;b+=2){var n=b&ed;if(void 0!==a.Pa[n])return v("I/O address already registered: "+F(b,8,!0)),!1;var q=l||"unknown";q&&0<=m&&(q+=m++);a.Pa[n]=[d,e,f,g,q,k||16,!1]}return!0}
|
||||
function Rb(a,b,c,d){for(var e in c){var f=+e+(d||0),g=c[e];if(!(g[6]&&g[6]>a.f.ka)){var k=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,m=g[2]?g[2].bind(b):null,n=g[3]?g[3].bind(b):null;65472<=f&&65487>=f&&(!k&&m&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&n&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var q=g[4],t=g[5]||1,u=0;u<t;u++,f+=2)if(q&&1<t&&(q=g[4]+u),!dd(a,f,f,k,l,m,n,g[7]||b.ha,q||b.Lb))return!1}}return!0}
|
||||
function Rb(a,b,c,d){for(var e in c){var f=+e+(d||0),g=c[e];if(!(g[6]&&g[6]>a.f.ka)){var k=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,m=g[2]?g[2].bind(b):null,n=g[3]?g[3].bind(b):null;65472<=f&&65487>=f&&(!k&&m&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&n&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var q=g[4],t=g[5]||1,u=0;u<t;u++,f+=2)if(q&&1<t&&(q=g[4]+u),!dd(a,f,f,k,l,m,n,g[7]||b.ha,q||b.Mb))return!1}}return!0}
|
||||
function Tb(a,b){a.N.push(b)}h.Na=function(a,b,c){this.C=!0;this.na||(this.F&&z(this.F,4)&&D(this.F,"memory fault ("+c+") on "+J(this.F,a),!0,!0),b&&(this.f.P|=b),this.f.sa(4,0,a))};function fd(a){var b=a.C;a.C=!1;return b}function Wc(a,b,c){v("Memory block error ("+a+": "+F(b)+","+F(c)+")");return!1}var Bc=8192,ed=Bc-1,Xc=1,Zc=2;
|
||||
function Cc(a,b){var c=-1,d=this.controller,e=d.Pa[a],f=b&65535;e?e[0]?c=e[0](f):e[2]&&(c=f&1?e[2](f&-2)>>8:e[2](f)&255):f&1&&(e=d.Pa[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return this.f&&z(this.f,16|e[5])&&D(this.f,e[4]+".readByte("+J(this.f,b)+"): "+J(this.f,c),!0,!d.na),c;d.Na(b,16,3);c=255;this.f&&z(this.f,16)&&D(this.f,"warning: unconverted read access to byte @"+J(this.f,b)+": "+J(this.f,c),!0,!d.na);return c}
|
||||
function Dc(a,b,c){var d=!1,e=this.controller,f=e.Pa[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](g,!0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else g&1&&(f=e.Pa[a&-2])&&(f[3]?(g&=-2,a=f[2]?f[2](g,!0):0,f[3](a&255|b<<8,g),d=!0):f[1]&&(f[1](b,g),d=!0));d?this.f&&z(this.f,16|f[5])&&D(this.f,f[4]+".writeByte("+J(this.f,c)+","+J(this.f,b)+")",!0,!e.na):(e.Na(c,16,5),this.f&&z(this.f,16)&&D(this.f,"warning: unconverted write access to byte @"+J(this.f,c)+": "+J(this.f,
|
||||
|
|
@ -97,70 +97,70 @@ b),!0,!e.na))}function Ec(a,b){var c=-1,d=this.controller;a=d.Pa[a];var e=b&6553
|
|||
function Fc(a,b,c){var d=!1,e=this.controller;a=e.Pa[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d?this.f&&z(this.f,16|a[5])&&D(this.f,a[4]+".writeWord("+J(this.f,c)+","+J(this.f,b)+")",!0,!e.na):(e.Na(c,16,4),this.f&&z(this.f,16)&&D(this.f,"warning: unconverted write access to word @"+J(this.f,c)+": "+J(this.f,b),!0,!e.na))}function L(a){r.call(this,"Device",a,256);this.b={ib:128,Dd:-1}}p(L,r);h=L.prototype;
|
||||
h.Aa=function(a,b,c,d){this.D=b;this.K=a;this.f=c;this.F=d;var e=this;this.b.Dd=gd(c,function(){e.b.ib|=128;e.b.ib&64&&hd(e.f,e.b.Qa);e.K&&H(e.K,1);id(e.f,e.b.Dd,1E3/60)});this.b.Qa=jd(c,64,6,2097152);Rb(b,this,kd);Tb(b,this.reset.bind(this));d&&ld(d,64,function(a){var b=e.f;md(e,"KIPDR",b.B[0],0,a[0]);md(e,"KDPDR",b.B[0],8,a[0]);md(e,"KIPAR",b.M[0],0,a[0]);md(e,"KDPAR",b.M[0],8,a[0],!0);md(e,"SIPDR",b.B[1],0,a[0]);md(e,"SDPDR",b.B[1],8,a[0]);md(e,"SIPAR",b.M[1],0,a[0]);md(e,"SDPAR",b.M[1],8,a[0],
|
||||
!0);md(e,"UIPDR",b.B[3],0,a[0]);md(e,"UDPDR",b.B[3],8,a[0]);md(e,"UIPAR",b.M[3],0,a[0]);md(e,"UDPAR",b.M[3],8,a[0],!0);b.U&32&&md(e,"UNIMAP",b.Ha,-1,a[0])});y(this)};function md(a,b,c,d,e,f){a=a.F;if(!(e&&0>b.indexOf(e.toUpperCase()))){e=8;var g="",k=!1,l=0,m=8;0>d&&(e=c.length,d=0,k=!0,l=3,m=4);for(var n=0;n<e;n++)n%m||(g&&(g+="\n"),g+=b+(k?"["+Ga(n)+"]":"")+":"),g+=" "+J(a,c[d+n],l);a.v(g+(f?"\n":""))}}h.Da=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};
|
||||
h.Ca=function(a){return a?this.save():!0};h.reset=function(){this.b.ib=128;id(this.f,this.b.Dd,1E3/60,!0)};h.save=function(){var a=new G(this);a.set(0,[this.b.ib]);return a.data()};h.restore=function(a){a=ia(a[0]);this.b.ib=a.next().value;return!0};h.$f=function(){return this.b.ib};h.oh=function(a){this.b.ib=a&192;this.b.ib&64||nd(this.f,this.b.Qa)};h.bg=function(){return od(this.f)};h.qh=function(a){pd(this.f,a&-129|this.f.S&128)};h.cg=function(){return qd(this.f)};h.dg=function(){return rd(this.f)};
|
||||
h.eg=function(){return this.f.U};h.rh=function(a){sd(this.f,a)};h.Qg=function(a){a=a>>1&63;var b=this.f.Ha[a>>1];return a&1?b>>16:b&65535};h.ci=function(a,b){b=b>>1&63;var c=b>>1;this.f.Ha[c]=b&1?this.f.Ha[c]&65535|(a&63)<<16:this.f.Ha[c]&-65536|a&65534};h.Jg=function(a){return this.f.B[1][a>>1&7]};h.Wh=function(a,b){this.f.B[1][b>>1&7]=a&65295};h.Hg=function(a){return this.f.B[1][(a>>1&7)+8]};h.Uh=function(a,b){this.f.B[1][(b>>1&7)+8]=a&65295};h.Ig=function(a){return this.f.M[1][a>>1&7]};
|
||||
h.Vh=function(a,b){b=b>>1&7;this.f.M[1][b]=a;this.f.B[1][b]&=65295};h.Gg=function(a){return this.f.M[1][(a>>1&7)+8]};h.Th=function(a,b){b=(b>>1&7)+8;this.f.M[1][b]=a;this.f.B[1][b]&=65295};h.Zf=function(a){return this.f.B[0][a>>1&7]};h.nh=function(a,b){this.f.B[0][b>>1&7]=a&65295};h.Xf=function(a){return this.f.B[0][(a>>1&7)+8]};h.lh=function(a,b){this.f.B[0][(b>>1&7)+8]=a&65295};h.Yf=function(a){return this.f.M[0][a>>1&7]};h.mh=function(a,b){b=b>>1&7;this.f.M[0][b]=a;this.f.B[0][b]&=65295};
|
||||
h.Wf=function(a){return this.f.M[0][(a>>1&7)+8]};h.kh=function(a,b){b=(b>>1&7)+8;this.f.M[0][b]=a;this.f.B[0][b]&=65295};h.Pg=function(a){return this.f.B[3][a>>1&7]};h.bi=function(a,b){this.f.B[3][b>>1&7]=a&65295};h.Ng=function(a){return this.f.B[3][(a>>1&7)+8]};h.$h=function(a,b){this.f.B[3][(b>>1&7)+8]=a&65295};h.Og=function(a){return this.f.M[3][a>>1&7]};h.ai=function(a,b){b=b>>1&7;this.f.M[3][b]=a;this.f.B[3][b]&=65295};h.Mg=function(a){return this.f.M[3][(a>>1&7)+8]};
|
||||
h.Zh=function(a,b){b=(b>>1&7)+8;this.f.M[3][b]=a;this.f.B[3][b]&=65295};h.Ub=function(a){a&=7;return this.f.w&2048?this.f.qa[a]:this.f.g[a]};h.Yb=function(a,b){b&=7;this.f.w&2048?this.f.qa[b]=a:this.f.g[b]=a};h.lg=function(){return this.f.w&49152?this.f.W[0]:this.f.g[6]};h.yh=function(a){this.f.w&49152?this.f.W[0]=a:this.f.g[6]=a};h.og=function(){return this.f.g[7]};h.Bh=function(a){this.f.g[7]=a};h.Vb=function(a){a&=7;return this.f.w&2048?this.f.g[a]:this.f.qa[a]};
|
||||
h.Zb=function(a,b){b&=7;this.f.w&2048?this.f.g[b]=a:this.f.qa[b]=a};h.mg=function(){return 1==(this.f.w&49152)>>14?this.f.g[6]:this.f.W[1]};h.zh=function(a){1==(this.f.w&49152)>>14?this.f.g[6]=a:this.f.W[1]=a};h.ng=function(){return 3==(this.f.w&49152)>>14?this.f.g[6]:this.f.W[3]};h.Ah=function(a){3==(this.f.w&49152)>>14?this.f.g[6]=a:this.f.W[3]=a};h.Vf=function(a){return this.f.wc[a-65504>>1]};h.jh=function(a,b){this.f.wc[b-65504>>1]=a};h.se=function(a){return 65520==a?(bd(this.D)>>6)-1:0};
|
||||
h.xe=function(){};h.Lg=function(){return 1};h.Yh=function(){};h.Uf=function(){return this.f.P};h.ih=function(){this.f.P=0};h.ag=function(){return this.f.tc};h.ph=function(a,b){b&1||(a&=255);this.f.tc=a};h.fg=function(a,b){return b?0:this.f.eb};h.sh=function(a){td(this.f,a)};h.Kg=function(a,b){return b?0:this.f.xa&65280};h.Xh=function(a){this.f.xa=a|255};h.kg=function(){return ud(this.f)};h.xh=function(a){vd(this.f,a)};h.we=function(a,b){z(this)&&D(this,"writeIgnored("+E(b)+"): "+E(a),!0,!0)};
|
||||
var M={},kd=(M[61568]=[null,null,L.prototype.Qg,L.prototype.ci,"UNIMAP",64,1170],M[62592]=[null,null,L.prototype.Jg,L.prototype.Wh,"SIPDR",8,1145,64],M[62608]=[null,null,L.prototype.Hg,L.prototype.Uh,"SDPDR",8,1145,64],M[62624]=[null,null,L.prototype.Ig,L.prototype.Vh,"SIPAR",8,1145,64],M[62640]=[null,null,L.prototype.Gg,L.prototype.Th,"SDPAR",8,1145,64],M[62656]=[null,null,L.prototype.Zf,L.prototype.nh,"KIPDR",8,1140,64],M[62672]=[null,null,L.prototype.Xf,L.prototype.lh,"KDPDR",8,1145,64],M[62688]=
|
||||
[null,null,L.prototype.Yf,L.prototype.mh,"KIPAR",8,1140,64],M[62704]=[null,null,L.prototype.Wf,L.prototype.kh,"KDPAR",8,1145,64],M[62798]=[null,null,L.prototype.eg,L.prototype.rh,"MMR3",1,1145,64],M[65382]=[null,null,L.prototype.$f,L.prototype.oh,"LKS"],M[65402]=[null,null,L.prototype.bg,L.prototype.qh,"MMR0",1,1140,64],M[65404]=[null,null,L.prototype.cg,L.prototype.we,"MMR1",1,1145,64],M[65406]=[null,null,L.prototype.dg,L.prototype.we,"MMR2",1,1140,64],M[65408]=[null,null,L.prototype.Pg,L.prototype.bi,
|
||||
"UIPDR",8,1140,64],M[65424]=[null,null,L.prototype.Ng,L.prototype.$h,"UDPDR",8,1145,64],M[65440]=[null,null,L.prototype.Og,L.prototype.ai,"UIPAR",8,1140,64],M[65456]=[null,null,L.prototype.Mg,L.prototype.Zh,"UDPAR",8,1145,64],M[65472]=[null,null,L.prototype.Ub,L.prototype.Yb,"R0SET0"],M[65473]=[null,null,L.prototype.Ub,L.prototype.Yb,"R1SET0"],M[65474]=[null,null,L.prototype.Ub,L.prototype.Yb,"R2SET0"],M[65475]=[null,null,L.prototype.Ub,L.prototype.Yb,"R3SET0"],M[65476]=[null,null,L.prototype.Ub,
|
||||
L.prototype.Yb,"R4SET0"],M[65477]=[null,null,L.prototype.Ub,L.prototype.Yb,"R5SET0"],M[65478]=[null,null,L.prototype.lg,L.prototype.yh,"R6KERNEL"],M[65479]=[null,null,L.prototype.og,L.prototype.Bh,"R7KERNEL"],M[65480]=[null,null,L.prototype.Vb,L.prototype.Zb,"R0SET1",1,1145],M[65481]=[null,null,L.prototype.Vb,L.prototype.Zb,"R1SET1",1,1145],M[65482]=[null,null,L.prototype.Vb,L.prototype.Zb,"R2SET1",1,1145],M[65483]=[null,null,L.prototype.Vb,L.prototype.Zb,"R3SET1",1,1145],M[65484]=[null,null,L.prototype.Vb,
|
||||
L.prototype.Zb,"R4SET1",1,1145],M[65485]=[null,null,L.prototype.Vb,L.prototype.Zb,"R5SET1",1,1145],M[65486]=[null,null,L.prototype.mg,L.prototype.zh,"R6SUPER",1,1145],M[65487]=[null,null,L.prototype.ng,L.prototype.Ah,"R6USER",1,1145],M[65504]=[null,null,L.prototype.Vf,L.prototype.jh,"CTRL",8,1170],M[65520]=[null,null,L.prototype.se,L.prototype.xe,"LSIZE",1,1170],M[65522]=[null,null,L.prototype.se,L.prototype.xe,"HSIZE",1,1170],M[65524]=[null,null,L.prototype.Lg,L.prototype.Yh,"SYSID",1,1170],M[65526]=
|
||||
[null,null,L.prototype.Uf,L.prototype.ih,"ERR",1,1170],M[65528]=[null,null,L.prototype.ag,L.prototype.ph,"MBR",1,1170],M[65530]=[null,null,L.prototype.fg,L.prototype.sh,"PIR"],M[65532]=[null,null,L.prototype.Kg,L.prototype.Xh,"SLR"],M[65534]=[null,null,L.prototype.kg,L.prototype.xh,"PSW"],M);
|
||||
h.Ca=function(a){return a?this.save():!0};h.reset=function(){this.b.ib=128;id(this.f,this.b.Dd,1E3/60,!0)};h.save=function(){var a=new G(this);a.set(0,[this.b.ib]);return a.data()};h.restore=function(a){a=ia(a[0]);this.b.ib=a.next().value;return!0};h.ag=function(){return this.b.ib};h.ph=function(a){this.b.ib=a&192;this.b.ib&64||nd(this.f,this.b.Qa)};h.cg=function(){return od(this.f)};h.rh=function(a){pd(this.f,a&-129|this.f.S&128)};h.dg=function(){return qd(this.f)};h.eg=function(){return rd(this.f)};
|
||||
h.fg=function(){return this.f.U};h.sh=function(a){sd(this.f,a)};h.Rg=function(a){a=a>>1&63;var b=this.f.Ha[a>>1];return a&1?b>>16:b&65535};h.di=function(a,b){b=b>>1&63;var c=b>>1;this.f.Ha[c]=b&1?this.f.Ha[c]&65535|(a&63)<<16:this.f.Ha[c]&-65536|a&65534};h.Kg=function(a){return this.f.B[1][a>>1&7]};h.Xh=function(a,b){this.f.B[1][b>>1&7]=a&65295};h.Ig=function(a){return this.f.B[1][(a>>1&7)+8]};h.Vh=function(a,b){this.f.B[1][(b>>1&7)+8]=a&65295};h.Jg=function(a){return this.f.M[1][a>>1&7]};
|
||||
h.Wh=function(a,b){b=b>>1&7;this.f.M[1][b]=a;this.f.B[1][b]&=65295};h.Hg=function(a){return this.f.M[1][(a>>1&7)+8]};h.Uh=function(a,b){b=(b>>1&7)+8;this.f.M[1][b]=a;this.f.B[1][b]&=65295};h.$f=function(a){return this.f.B[0][a>>1&7]};h.oh=function(a,b){this.f.B[0][b>>1&7]=a&65295};h.Yf=function(a){return this.f.B[0][(a>>1&7)+8]};h.mh=function(a,b){this.f.B[0][(b>>1&7)+8]=a&65295};h.Zf=function(a){return this.f.M[0][a>>1&7]};h.nh=function(a,b){b=b>>1&7;this.f.M[0][b]=a;this.f.B[0][b]&=65295};
|
||||
h.Xf=function(a){return this.f.M[0][(a>>1&7)+8]};h.lh=function(a,b){b=(b>>1&7)+8;this.f.M[0][b]=a;this.f.B[0][b]&=65295};h.Qg=function(a){return this.f.B[3][a>>1&7]};h.ci=function(a,b){this.f.B[3][b>>1&7]=a&65295};h.Og=function(a){return this.f.B[3][(a>>1&7)+8]};h.ai=function(a,b){this.f.B[3][(b>>1&7)+8]=a&65295};h.Pg=function(a){return this.f.M[3][a>>1&7]};h.bi=function(a,b){b=b>>1&7;this.f.M[3][b]=a;this.f.B[3][b]&=65295};h.Ng=function(a){return this.f.M[3][(a>>1&7)+8]};
|
||||
h.$h=function(a,b){b=(b>>1&7)+8;this.f.M[3][b]=a;this.f.B[3][b]&=65295};h.Vb=function(a){a&=7;return this.f.w&2048?this.f.qa[a]:this.f.g[a]};h.Zb=function(a,b){b&=7;this.f.w&2048?this.f.qa[b]=a:this.f.g[b]=a};h.mg=function(){return this.f.w&49152?this.f.W[0]:this.f.g[6]};h.zh=function(a){this.f.w&49152?this.f.W[0]=a:this.f.g[6]=a};h.pg=function(){return this.f.g[7]};h.Ch=function(a){this.f.g[7]=a};h.Wb=function(a){a&=7;return this.f.w&2048?this.f.g[a]:this.f.qa[a]};
|
||||
h.$b=function(a,b){b&=7;this.f.w&2048?this.f.g[b]=a:this.f.qa[b]=a};h.ng=function(){return 1==(this.f.w&49152)>>14?this.f.g[6]:this.f.W[1]};h.Ah=function(a){1==(this.f.w&49152)>>14?this.f.g[6]=a:this.f.W[1]=a};h.og=function(){return 3==(this.f.w&49152)>>14?this.f.g[6]:this.f.W[3]};h.Bh=function(a){3==(this.f.w&49152)>>14?this.f.g[6]=a:this.f.W[3]=a};h.Wf=function(a){return this.f.wc[a-65504>>1]};h.kh=function(a,b){this.f.wc[b-65504>>1]=a};h.te=function(a){return 65520==a?(bd(this.D)>>6)-1:0};
|
||||
h.ye=function(){};h.Mg=function(){return 1};h.Zh=function(){};h.Vf=function(){return this.f.P};h.jh=function(){this.f.P=0};h.bg=function(){return this.f.tc};h.qh=function(a,b){b&1||(a&=255);this.f.tc=a};h.gg=function(a,b){return b?0:this.f.eb};h.th=function(a){td(this.f,a)};h.Lg=function(a,b){return b?0:this.f.xa&65280};h.Yh=function(a){this.f.xa=a|255};h.lg=function(){return ud(this.f)};h.yh=function(a){vd(this.f,a)};h.xe=function(a,b){z(this)&&D(this,"writeIgnored("+E(b)+"): "+E(a),!0,!0)};
|
||||
var M={},kd=(M[61568]=[null,null,L.prototype.Rg,L.prototype.di,"UNIMAP",64,1170],M[62592]=[null,null,L.prototype.Kg,L.prototype.Xh,"SIPDR",8,1145,64],M[62608]=[null,null,L.prototype.Ig,L.prototype.Vh,"SDPDR",8,1145,64],M[62624]=[null,null,L.prototype.Jg,L.prototype.Wh,"SIPAR",8,1145,64],M[62640]=[null,null,L.prototype.Hg,L.prototype.Uh,"SDPAR",8,1145,64],M[62656]=[null,null,L.prototype.$f,L.prototype.oh,"KIPDR",8,1140,64],M[62672]=[null,null,L.prototype.Yf,L.prototype.mh,"KDPDR",8,1145,64],M[62688]=
|
||||
[null,null,L.prototype.Zf,L.prototype.nh,"KIPAR",8,1140,64],M[62704]=[null,null,L.prototype.Xf,L.prototype.lh,"KDPAR",8,1145,64],M[62798]=[null,null,L.prototype.fg,L.prototype.sh,"MMR3",1,1145,64],M[65382]=[null,null,L.prototype.ag,L.prototype.ph,"LKS"],M[65402]=[null,null,L.prototype.cg,L.prototype.rh,"MMR0",1,1140,64],M[65404]=[null,null,L.prototype.dg,L.prototype.xe,"MMR1",1,1145,64],M[65406]=[null,null,L.prototype.eg,L.prototype.xe,"MMR2",1,1140,64],M[65408]=[null,null,L.prototype.Qg,L.prototype.ci,
|
||||
"UIPDR",8,1140,64],M[65424]=[null,null,L.prototype.Og,L.prototype.ai,"UDPDR",8,1145,64],M[65440]=[null,null,L.prototype.Pg,L.prototype.bi,"UIPAR",8,1140,64],M[65456]=[null,null,L.prototype.Ng,L.prototype.$h,"UDPAR",8,1145,64],M[65472]=[null,null,L.prototype.Vb,L.prototype.Zb,"R0SET0"],M[65473]=[null,null,L.prototype.Vb,L.prototype.Zb,"R1SET0"],M[65474]=[null,null,L.prototype.Vb,L.prototype.Zb,"R2SET0"],M[65475]=[null,null,L.prototype.Vb,L.prototype.Zb,"R3SET0"],M[65476]=[null,null,L.prototype.Vb,
|
||||
L.prototype.Zb,"R4SET0"],M[65477]=[null,null,L.prototype.Vb,L.prototype.Zb,"R5SET0"],M[65478]=[null,null,L.prototype.mg,L.prototype.zh,"R6KERNEL"],M[65479]=[null,null,L.prototype.pg,L.prototype.Ch,"R7KERNEL"],M[65480]=[null,null,L.prototype.Wb,L.prototype.$b,"R0SET1",1,1145],M[65481]=[null,null,L.prototype.Wb,L.prototype.$b,"R1SET1",1,1145],M[65482]=[null,null,L.prototype.Wb,L.prototype.$b,"R2SET1",1,1145],M[65483]=[null,null,L.prototype.Wb,L.prototype.$b,"R3SET1",1,1145],M[65484]=[null,null,L.prototype.Wb,
|
||||
L.prototype.$b,"R4SET1",1,1145],M[65485]=[null,null,L.prototype.Wb,L.prototype.$b,"R5SET1",1,1145],M[65486]=[null,null,L.prototype.ng,L.prototype.Ah,"R6SUPER",1,1145],M[65487]=[null,null,L.prototype.og,L.prototype.Bh,"R6USER",1,1145],M[65504]=[null,null,L.prototype.Wf,L.prototype.kh,"CTRL",8,1170],M[65520]=[null,null,L.prototype.te,L.prototype.ye,"LSIZE",1,1170],M[65522]=[null,null,L.prototype.te,L.prototype.ye,"HSIZE",1,1170],M[65524]=[null,null,L.prototype.Mg,L.prototype.Zh,"SYSID",1,1170],M[65526]=
|
||||
[null,null,L.prototype.Vf,L.prototype.jh,"ERR",1,1170],M[65528]=[null,null,L.prototype.bg,L.prototype.qh,"MBR",1,1170],M[65530]=[null,null,L.prototype.gg,L.prototype.th,"PIR"],M[65532]=[null,null,L.prototype.Lg,L.prototype.Yh,"SLR"],M[65534]=[null,null,L.prototype.lg,L.prototype.yh,"PSW"],M);
|
||||
mb(function(){for(var a=x(document,w,"device"),b=0;b<a.length;b++){var c,d=a[b];c=wa(d);switch(c.type){case "default":c=new L(c);xa(c,d);break;case "pc11":c=new wd(c);xa(c,d);break;case "rl11":c=new xd(c);xa(c,d);break;case "rk11":c=new N(c);xa(c,d);break;case "rx11":c=new yd(c),xa(c,d)}}});
|
||||
function I(a,b,c,d,e,f){this.D=a;this.id=zd+=2;this.b=null;this.J=b;this.Wb=c;this.size=d||0;this.type=e||Ad;this.j=e==Bd;this.f=this.controller=null;this.Db=this.K=this.yd;this.oa=this.B=this.zd;this.Fb=this.F=this.Xb;this.Gb=this.C=this.Sc;this.H=this.i=0;Gc(this);this.hb=this.Af=!1;if(this.size)if(f)this.controller=f,a=[null,0],this.b=a[0],Dd(this,f.tf);else if(ub)this.u=new ArrayBuffer(this.size),this.w=new DataView(this.u,0,this.size),this.g=new Uint8Array(this.u,0,this.size),this.G=new Uint16Array(this.u,
|
||||
function I(a,b,c,d,e,f){this.D=a;this.id=zd+=2;this.b=null;this.J=b;this.Xb=c;this.size=d||0;this.type=e||Ad;this.j=e==Bd;this.f=this.controller=null;this.Eb=this.K=this.yd;this.oa=this.B=this.zd;this.Gb=this.F=this.Yb;this.Hb=this.C=this.Sc;this.H=this.i=0;Gc(this);this.hb=this.Bf=!1;if(this.size)if(f)this.controller=f,a=[null,0],this.b=a[0],Dd(this,f.uf);else if(ub)this.u=new ArrayBuffer(this.size),this.w=new DataView(this.u,0,this.size),this.g=new Uint8Array(this.u,0,this.size),this.G=new Uint16Array(this.u,
|
||||
0,this.size>>1),this.b=new Int32Array(this.u,0,this.size>>2),Dd(this,Ed?Fd:Gd);else{a=this.b=Array(this.size>>2);for(f=0;f<a.length;f++)a[f]=0;Dd(this,Hd)}else Dd(this)}h=I.prototype;h.save=function(){var a,b;if(this.controller)a=null;else if(ub)for(a=Array(this.size>>2),b=0;b<a.length;b++)a[b]=this.w.getInt32(b<<2,!0);else a=this.b;return a};
|
||||
h.restore=function(a){if(this.controller)return!a;if(a&&this.size==a.length<<2){var b;if(ub)for(b=0;b<a.length;b++)this.w.setInt32(b<<2,a[b],!0);else this.b=a;return this.hb=!0}return!1};function Dd(a,b){b||(b=Id);Jd(a,b,void 0);Kd(a,b,void 0)}function Jd(a,b,c){c&&a.H||(a.Db=b[0]||a.yd,a.oa=b[2]||a.zd);if(c||void 0===c)a.K=b[0]||a.yd,a.B=b[2]||a.zd}function Kd(a,b,c){c&&a.i||(a.Fb=!a.j&&b[1]||a.Xb,a.Gb=!a.j&&b[3]||a.Sc);if(c||void 0===c)a.F=b[1]||a.Xb,a.C=b[3]||a.Sc}
|
||||
h.Cb=function(a,b){b?this.i++||Kd(this,Ld,!1):this.H++||Jd(this,Ld,!1)};function Md(a,b){b?--a.i||(a.Fb=a.j?a.Xb:a.F,a.Gb=a.j?a.Sc:a.C):--a.H||(a.Db=a.K,a.oa=a.B)}function Gc(a,b,c){a.f=b;a.H=a.i=0;c&&((a.H=c.H)&&Jd(a,Ld,!1),(a.i=c.i)&&Kd(a,Ld,!1))}h.yd=function(a,b){this.f&&z(this.f,32)&&D(this.f,"attempt to read invalid address "+J(this.f,b),!0);this.D.Na(b,32,2);return 255};
|
||||
h.Xb=function(a,b,c){this.f&&z(this.f,32)&&D(this.f,"attempt to write "+J(this.f,b)+" to invalid addresses "+J(this.f,c),!0);this.D.Na(c,32,4)};h.zd=function(a,b){return this.Db(a++,b++)|this.Db(a,b)<<8};h.Sc=function(a,b,c){this.Fb(a++,b&255,c++);this.Fb(a,b>>8,c)};h.Sf=function(a){return this.b[a>>2]>>>((a&3)<<3)&255};h.Wg=function(a,b){Eb&&a&1&&this.D.Na(b,64,2);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};
|
||||
h.gh=function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<<a)|b<<a;this.hb=!0};h.gi=function(a,b,c){Eb&&a&1&&this.D.Na(c,64,4);c=a>>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<<a)|b<<a:(this.b[c]=this.b[c]&16777215|b<<24,c++,this.b[c]=this.b[c]&-256|b>>8);this.hb=!0};h.Qf=function(a,b){this.f&&null!=this.J&&Nd(this.f,this.J+a);return this.K(a,b)};h.Sg=function(a,b){this.f&&null!=this.J&&Nd(this.f,this.J+a,2);return this.B(a,b)};
|
||||
h.eh=function(a,b,c){this.f&&null!=this.J&&Od(this.f,this.J+a);this.j?this.Xb(0,b,c):this.F(a,b,c)};h.ei=function(a,b,c){this.f&&null!=this.J&&Od(this.f,this.J+a,2);this.j?this.Xb(0,b,c):this.C(a,b,c)};h.Pf=function(a){return this.g[a]};h.Rf=function(a,b){a=this.g[a];this.f&&z(this.f,32)&&D(this.f,"Memory.readByte("+J(this.f,b)+"): "+J(this.f,a),!0);return a};h.Rg=function(a,b){Eb&&a&1&&this.D.Na(b,64,2);return this.w.getUint16(a,!0)};
|
||||
h.Vg=function(a,b){Eb&&a&1&&this.D.Na(b,64,2);a=!Fb&&a&1?this.g[a]|this.g[a+1]<<8:this.G[a>>1];this.f&&z(this.f,32)&&D(this.f,"Memory.readWord("+J(this.f,b)+"): "+J(this.f,a),!0);return a};h.dh=function(a,b){this.g[a]=b;this.hb=!0};h.fh=function(a,b,c){this.g[a]=b;this.hb=!0;this.f&&z(this.f,32)&&D(this.f,"Memory.writeByte("+J(this.f,c)+","+J(this.f,b)+")",!0)};h.di=function(a,b,c){Eb&&a&1&&this.D.Na(c,64,4);this.w.setUint16(a,b,!0);this.hb=!0};
|
||||
h.fi=function(a,b,c){Eb&&a&1&&this.D.Na(c,64,4);!Fb&&a&1?(this.g[a]=b,this.g[a+1]=b>>8):this.G[a>>1]=b;this.hb=!0;this.f&&z(this.f,32)&&D(this.f,"Memory.writeWord("+J(this.f,c)+","+J(this.f,b)+")",!0)};var Ad=0,cd=1,Bd=2,Ic=4,Yc=["NONE","RAM","ROM","VID","H/W"],zd=0,Id=[],Hd=[I.prototype.Sf,I.prototype.gh,I.prototype.Wg,I.prototype.gi],Ld=[I.prototype.Qf,I.prototype.eh,I.prototype.Sg,I.prototype.ei];
|
||||
if(ub)var Gd=[I.prototype.Pf,I.prototype.dh,I.prototype.Rg,I.prototype.di],Fd=[I.prototype.Rf,I.prototype.fh,I.prototype.Vg,I.prototype.fi];var Pd;if(ub){var Qd=new ArrayBuffer(2);(new DataView(Qd)).setUint16(0,256,!0);Pd=256===(new Uint16Array(Qd))[0]}else Pd=!1;var Ed=Pd;
|
||||
function Rd(a,b){r.call(this,"CPU",a,1);b=+a.cycles||b;var c=+a.multiplier||1;this.Xc=0;this.Uc=b;this.ob=c;this.hd=Math.round(this.Uc/1E4)/100;this.yb=this.hd*this.ob;this.jd=this.pc=this.Bb=this.Vc=0;this.A.V=this.A.Pc=!1;this.A.ra=a.autoStart;"string"==typeof this.A.ra&&(this.A.ra="true"==this.A.ra);this.A.Mb=!1;this.nc=this.Pb=0;this.oc=+a.csStart;this.Nb=+a.csInterval;this.Qb=+a.csStop;this.ia=[];this.Yd=this.$g.bind(this);this.pb=this.Ka=this.nb=this.b=this.la=this.Ja=this.mc=this.mb=this.Rb=
|
||||
h.restore=function(a){if(this.controller)return!a;if(a&&this.size==a.length<<2){var b;if(ub)for(b=0;b<a.length;b++)this.w.setInt32(b<<2,a[b],!0);else this.b=a;return this.hb=!0}return!1};function Dd(a,b){b||(b=Id);Jd(a,b,void 0);Kd(a,b,void 0)}function Jd(a,b,c){c&&a.H||(a.Eb=b[0]||a.yd,a.oa=b[2]||a.zd);if(c||void 0===c)a.K=b[0]||a.yd,a.B=b[2]||a.zd}function Kd(a,b,c){c&&a.i||(a.Gb=!a.j&&b[1]||a.Yb,a.Hb=!a.j&&b[3]||a.Sc);if(c||void 0===c)a.F=b[1]||a.Yb,a.C=b[3]||a.Sc}
|
||||
h.Cb=function(a,b){b?this.i++||Kd(this,Ld,!1):this.H++||Jd(this,Ld,!1)};function Md(a,b){b?--a.i||(a.Gb=a.j?a.Yb:a.F,a.Hb=a.j?a.Sc:a.C):--a.H||(a.Eb=a.K,a.oa=a.B)}function Gc(a,b,c){a.f=b;a.H=a.i=0;c&&((a.H=c.H)&&Jd(a,Ld,!1),(a.i=c.i)&&Kd(a,Ld,!1))}h.yd=function(a,b){this.f&&z(this.f,32)&&D(this.f,"attempt to read invalid address "+J(this.f,b),!0);this.D.Na(b,32,2);return 255};
|
||||
h.Yb=function(a,b,c){this.f&&z(this.f,32)&&D(this.f,"attempt to write "+J(this.f,b)+" to invalid addresses "+J(this.f,c),!0);this.D.Na(c,32,4)};h.zd=function(a,b){return this.Eb(a++,b++)|this.Eb(a,b)<<8};h.Sc=function(a,b,c){this.Gb(a++,b&255,c++);this.Gb(a,b>>8,c)};h.Tf=function(a){return this.b[a>>2]>>>((a&3)<<3)&255};h.Xg=function(a,b){Eb&&a&1&&this.D.Na(b,64,2);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};
|
||||
h.hh=function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<<a)|b<<a;this.hb=!0};h.hi=function(a,b,c){Eb&&a&1&&this.D.Na(c,64,4);c=a>>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<<a)|b<<a:(this.b[c]=this.b[c]&16777215|b<<24,c++,this.b[c]=this.b[c]&-256|b>>8);this.hb=!0};h.Rf=function(a,b){this.f&&null!=this.J&&Nd(this.f,this.J+a);return this.K(a,b)};h.Tg=function(a,b){this.f&&null!=this.J&&Nd(this.f,this.J+a,2);return this.B(a,b)};
|
||||
h.fh=function(a,b,c){this.f&&null!=this.J&&Od(this.f,this.J+a);this.j?this.Yb(0,b,c):this.F(a,b,c)};h.fi=function(a,b,c){this.f&&null!=this.J&&Od(this.f,this.J+a,2);this.j?this.Yb(0,b,c):this.C(a,b,c)};h.Qf=function(a){return this.g[a]};h.Sf=function(a,b){a=this.g[a];this.f&&z(this.f,32)&&D(this.f,"Memory.readByte("+J(this.f,b)+"): "+J(this.f,a),!0);return a};h.Sg=function(a,b){Eb&&a&1&&this.D.Na(b,64,2);return this.w.getUint16(a,!0)};
|
||||
h.Wg=function(a,b){Eb&&a&1&&this.D.Na(b,64,2);a=!Fb&&a&1?this.g[a]|this.g[a+1]<<8:this.G[a>>1];this.f&&z(this.f,32)&&D(this.f,"Memory.readWord("+J(this.f,b)+"): "+J(this.f,a),!0);return a};h.eh=function(a,b){this.g[a]=b;this.hb=!0};h.gh=function(a,b,c){this.g[a]=b;this.hb=!0;this.f&&z(this.f,32)&&D(this.f,"Memory.writeByte("+J(this.f,c)+","+J(this.f,b)+")",!0)};h.ei=function(a,b,c){Eb&&a&1&&this.D.Na(c,64,4);this.w.setUint16(a,b,!0);this.hb=!0};
|
||||
h.gi=function(a,b,c){Eb&&a&1&&this.D.Na(c,64,4);!Fb&&a&1?(this.g[a]=b,this.g[a+1]=b>>8):this.G[a>>1]=b;this.hb=!0;this.f&&z(this.f,32)&&D(this.f,"Memory.writeWord("+J(this.f,c)+","+J(this.f,b)+")",!0)};var Ad=0,cd=1,Bd=2,Ic=4,Yc=["NONE","RAM","ROM","VID","H/W"],zd=0,Id=[],Hd=[I.prototype.Tf,I.prototype.hh,I.prototype.Xg,I.prototype.hi],Ld=[I.prototype.Rf,I.prototype.fh,I.prototype.Tg,I.prototype.fi];
|
||||
if(ub)var Gd=[I.prototype.Qf,I.prototype.eh,I.prototype.Sg,I.prototype.ei],Fd=[I.prototype.Sf,I.prototype.gh,I.prototype.Wg,I.prototype.gi];var Pd;if(ub){var Qd=new ArrayBuffer(2);(new DataView(Qd)).setUint16(0,256,!0);Pd=256===(new Uint16Array(Qd))[0]}else Pd=!1;var Ed=Pd;
|
||||
function Rd(a,b){r.call(this,"CPU",a,1);b=+a.cycles||b;var c=+a.multiplier||1;this.Xc=0;this.Uc=b;this.ob=c;this.hd=Math.round(this.Uc/1E4)/100;this.yb=this.hd*this.ob;this.jd=this.pc=this.Bb=this.Vc=0;this.A.V=this.A.Pc=!1;this.A.ra=a.autoStart;"string"==typeof this.A.ra&&(this.A.ra="true"==this.A.ra);this.A.Nb=!1;this.nc=this.Qb=0;this.oc=+a.csStart;this.Ob=+a.csInterval;this.Rb=+a.csStop;this.ia=[];this.Yd=this.ah.bind(this);this.pb=this.Ka=this.nb=this.b=this.la=this.Ja=this.mc=this.mb=this.Sb=
|
||||
this.kd=this.xb=0;this.ta=null;y(this)}p(Rd,r);h=Rd.prototype;h.Aa=function(a,b,c,d){this.K=a;this.D=b;this.F=d;this.ta=a.i;for(a=0;a<Sd.length;a++)(b=this.H[Sd[a]])&&this.K.va(null,Sd[a],b);y(this)};h.reset=function(){};h.save=function(){return null};h.restore=function(){return!1};
|
||||
h.Da=function(a,b){var c=Td(this.K,"autoStart");null!=c?this.A.ra="true"==c?!0:"false"==c?!1:!!c:null==this.A.ra&&(this.A.ra=!this.F&&void 0===this.H.run);if(!b){if(a){Ud(this);if(!this.restore(a))return!1;ce(this)}else this.reset();this.F?(a=this.F,b=this.A.ra,a.Ga=!0,a.v("Type ? for help with PDPjs Debugger commands"),de(a),b||ee(a),a.ta&&(b=a.ta,a.ta=null,fe(a,b))):this.status("No debugger detected");this.A.ra||this.v("CPU will not be auto-started "+(this.ta?"(click Run to start)":"(type 'go' to start)"))}return!0};
|
||||
h.Ca=function(a){return a?this.save():!0};h.ra=function(){return this.A.V?!0:this.A.ra?(mc(this),!0):!1};h.le=function(){return 0};function ce(a){void 0===a.oc&&(a.oc=0);void 0===a.Nb&&(a.Nb=-1);void 0===a.Qb&&(a.Qb=-1);a.A.Mb=0<=a.oc&&0<a.Nb;a.A.Mb&&(a.nc=0,a.Pb=a.oc-a.pb)}function qc(a,b){if(a.A.Mb){var c=!1;a.nc=a.nc+a.le()|0;a.Pb-=b;0>=a.Pb&&(a.Pb+=a.Nb,c=!0);0<=a.Qb&&a.Qb<=ge(a)&&(a.Nb=a.Qb=-1,ce(a),a.ba(),c=!0);c&&a.v(ge(a)+" cycles: checksum="+F(a.nc))}}
|
||||
h.Ca=function(a){return a?this.save():!0};h.ra=function(){return this.A.V?!0:this.A.ra?(mc(this),!0):!1};h.le=function(){return 0};function ce(a){void 0===a.oc&&(a.oc=0);void 0===a.Ob&&(a.Ob=-1);void 0===a.Rb&&(a.Rb=-1);a.A.Nb=0<=a.oc&&0<a.Ob;a.A.Nb&&(a.nc=0,a.Qb=a.oc-a.pb)}function qc(a,b){if(a.A.Nb){var c=!1;a.nc=a.nc+a.le()|0;a.Qb-=b;0>=a.Qb&&(a.Qb+=a.Ob,c=!0);0<=a.Rb&&a.Rb<=ge(a)&&(a.Ob=a.Rb=-1,ce(a),a.ba(),c=!0);c&&a.v(ge(a)+" cycles: checksum="+F(a.nc))}}
|
||||
h.va=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.H[b]=c,!0;case "run":return this.H[b]=c,c.onclick=function(){var a;if(a=d.K)if(a=d.K,a.A.aa)a=!0;else{var b=null,c,k=ta(a.id);for(c=0;c<k.length&&(b=k[c],b===a||b.A.ready);c++);if(c==k.length)for(c=0;c<k.length&&(b=k[c],b===a||b.A.aa);c++);c==k.length&&(b=a);v("The "+b.type+" component ("+b.id+") is not "+(b.A.ready?"powered yet":"ready yet"+(b.Kc?" (waiting for notification)":""))+".");a=!1}a&&(d.A.V?d.ba():mc(d))},!0;
|
||||
case "speed":return this.H[b]=c,!0;case "setSpeed":return this.H[b]=c,c.onclick=function(){he(d,d.ob<<1,!0)},c.textContent=this.yb.toFixed(2)+"Mhz",!0}return!1};function pc(a,b,c){a.pb+=b;c&&(a.nb=a.b=a.la=0)}function ie(a,b){var c=1;b&&1<a.ob&&a.xb&&(c=a.xb/a.hd);a.jd=Math.round(1E3/je);a.pc=Math.floor(a.Uc/je*c);b||(a.Bb=a.pc);a.Vc=0}function ge(a){return a.pb+a.Ka+a.nb-a.b}function Ud(a){a.xb=0;a.kd=0;a.pb=a.Ka=a.nb=a.b=a.la=0;ce(a);he(a,1)}
|
||||
function he(a,b,c){var d=!1;if(void 0!==b){.8>a.xb/a.yb?b=1:d=!0;a.ob=b;b=a.hd*a.ob;if(a.yb!=b){a.yb=b;b=a.yb.toFixed(2)+"Mhz";var e=a.H.setSpeed;e&&(e.textContent=b);a.v("target speed: "+b)}c&&a.K&&ke(a.K)}pc(a,a.Ka);a.Ka=0;a.Ja=qa();a.mb=0;ie(a);return d}function gd(a,b){var c=a.ia.length;a.ia.push([-1,b]);return c}function id(a,b,c,d){0<=b&&b<a.ia.length&&(d||0>a.ia[b][0])&&(c=a.Uc*a.ob/1E3*c|0,a.A.V&&(c+=le(a)),a.ia[b][0]=c)}
|
||||
function me(a,b){for(var c=a.ia.length-1;0<=c;c--){var d=a.ia[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function ne(a){for(var b=[],c=0;c<a.ia.length;c++)b.push(a.ia[c][0]);return b}function oc(a,b){for(var c=a.ia.length-1;0<=c;c--){var d=a.ia[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function le(a,b){var c=a.nb-=a.b;a.b=a.la=0;b&&(a.nb=0);return c}
|
||||
h.$g=function(){if(this.A.V){this.Vc>=this.Uc&&ie(this,!0);this.Rb=0;this.mc=qa();if(this.mb){var a=this.mc-this.mb;a>this.jd&&(this.Ja+=a,this.Ja>this.mc&&(this.Ja=this.mc))}try{do{var b=me(this,this.A.Mb?1:this.pc);try{this.Ac(b)}catch(e){if("number"!=typeof e)throw e;}b=le(this,!0);this.Rb+=b;this.Ka+=b;qc(this,b);oc(this,b);this.Bb-=b;if(0>=this.Bb){this.Bb+=this.pc;++this.kd>=oe&&(this.K&&H(this.K,void 0),this.kd=0);break}}while(this.A.V)}catch(e){this.ba();this.K&&this.K.stop(qa(),ge(this));
|
||||
ya(this,e.stack||e.message);return}if(this.A.V){a=setTimeout;b=this.Yd;this.mb=qa();var c=this.jd;this.Rb&&(c=Math.round(c*this.Rb/this.pc));var c=c-(this.mb-this.mc),d=this.mb-this.Ja;d&&(this.xb=Math.round(this.Ka/(10*d))/100,864E5<=d&&(this.pb=0,he(this)));if(0>c||this.xb<this.yb)-1E3>c&&(this.Ja-=c),c=0;this.Vc+=this.Rb;this.mb+=c;a(b,c)}}};
|
||||
h.ah=function(){if(this.A.V){this.Vc>=this.Uc&&ie(this,!0);this.Sb=0;this.mc=qa();if(this.mb){var a=this.mc-this.mb;a>this.jd&&(this.Ja+=a,this.Ja>this.mc&&(this.Ja=this.mc))}try{do{var b=me(this,this.A.Nb?1:this.pc);try{this.Ac(b)}catch(e){if("number"!=typeof e)throw e;}b=le(this,!0);this.Sb+=b;this.Ka+=b;qc(this,b);oc(this,b);this.Bb-=b;if(0>=this.Bb){this.Bb+=this.pc;++this.kd>=oe&&(this.K&&H(this.K,void 0),this.kd=0);break}}while(this.A.V)}catch(e){this.ba();this.K&&this.K.stop(qa(),ge(this));
|
||||
ya(this,e.stack||e.message);return}if(this.A.V){a=setTimeout;b=this.Yd;this.mb=qa();var c=this.jd;this.Sb&&(c=Math.round(c*this.Sb/this.pc));var c=c-(this.mb-this.mc),d=this.mb-this.Ja;d&&(this.xb=Math.round(this.Ka/(10*d))/100,864E5<=d&&(this.pb=0,he(this)));if(0>c||this.xb<this.yb)-1E3>c&&(this.Ja-=c),c=0;this.Vc+=this.Sb;this.mb+=c;a(b,c)}}};
|
||||
function mc(a,b){if(!za(a))if(a.A.V)a.v(a.toString()+" busy");else{he(a);a.A.V=!0;a.A.Pc=!0;var c=a.H.run;c&&(c.textContent="Halt");a.K&&(b&&ke(a.K,!0),a.K.start(a.Ja,ge(a)));a.F||a.status("Started");setTimeout(a.Yd,0)}}h.Ac=function(){return 0};h.ba=function(a){var b=!1;if(this.A.V){le(this);pc(this,this.Ka);this.Ka=0;this.A.V=!1;if(b=this.H.run)b.textContent="Run";this.K&&this.K.stop(qa(),ge(this));b=!0;this.F||this.status("Stopped")}this.A.complete=a;return b};var je=30,oe=15,Sd=["power","reset"];
|
||||
function pe(a){var b=+a.model||1170;Rd.call(this,a,6666667);this.ka=b;this.Rd=+a.addrReset||0;this.cb=this.w=this.N=this.C=this.G=this.L=this.I=0;this.g=this.qa=this.W=[];this.M=this.B=this.Ha=this.wc=[];this.kb=this.O=this.Pd=this.zb=this.Ab=this.sb=this.lb=this.P=this.tc=this.eb=this.xa=this.S=this.uc=this.vc=this.U=this.i=0;this.Ud=[4,2,0,1];this.xc=0;this.Vd=255;1120>=this.ka?(this.Od=qe.bind(this),this.Kb=this.xf,this.xc=8,this.Vd=-1,this.be=255,this.ae=0):(this.Od=re.bind(this),this.Kb=this.yf,
|
||||
this.be=~(1792|(1140>=this.ka?2048:0))&65535,this.ae=1140<this.ka?2048:0);this.Bc=this.yc=this.pa=0;this.R=null;this.lc=[];this.ic=this.Yc=this.ke;this.jc=this.$c=this.pe;this.Qc=this.ad=this.ue;this.kc=this.fd=this.ve;this.Ia=this.vb=this.rc=this.sc=0;this.Ga=this.oe;this.oa=this.Ad;this.Gb=this.Ed;this.u=this.j=this.Tc=this.X=this.Y=0;this.A.complete=!1}p(pe,Rd);h=pe.prototype;
|
||||
h.Aa=function(a,b,c,d){Rd.prototype.Aa.call(this,a,b,c,d);this.Yc=b.Gd.bind(b);this.$c=b.zc.bind(b);this.ad=b.Hd.bind(b);this.fd=b.$b.bind(b)};h.Da=function(a,b){for(var c=192,d=0;d<this.lc.length;d++){var e=this.lc[d];0>e.Eb&&(e.Eb=c,c+=4)}return Rd.prototype.Da.call(this,a,b)};
|
||||
function pe(a){var b=+a.model||1170;Rd.call(this,a,6666667);this.ka=b;this.Rd=+a.addrReset||0;this.cb=this.w=this.N=this.C=this.G=this.L=this.I=0;this.g=this.qa=this.W=[];this.M=this.B=this.Ha=this.wc=[];this.kb=this.O=this.Pd=this.zb=this.Ab=this.sb=this.lb=this.P=this.tc=this.eb=this.xa=this.S=this.uc=this.vc=this.U=this.i=0;this.Ud=[4,2,0,1];this.xc=0;this.Vd=255;1120>=this.ka?(this.Od=qe.bind(this),this.Lb=this.yf,this.xc=8,this.Vd=-1,this.be=255,this.ae=0):(this.Od=re.bind(this),this.Lb=this.zf,
|
||||
this.be=~(1792|(1140>=this.ka?2048:0))&65535,this.ae=1140<this.ka?2048:0);this.Bc=this.yc=this.pa=0;this.R=null;this.lc=[];this.ic=this.Yc=this.ke;this.jc=this.$c=this.pe;this.Qc=this.ad=this.ve;this.kc=this.fd=this.we;this.Ia=this.vb=this.rc=this.sc=0;this.Ga=this.oe;this.oa=this.Ad;this.Hb=this.Ed;this.u=this.j=this.Tc=this.X=this.Y=0;this.A.complete=!1}p(pe,Rd);h=pe.prototype;
|
||||
h.Aa=function(a,b,c,d){Rd.prototype.Aa.call(this,a,b,c,d);this.Yc=b.Gd.bind(b);this.$c=b.zc.bind(b);this.ad=b.Hd.bind(b);this.fd=b.ac.bind(b)};h.Da=function(a,b){for(var c=192,d=0;d<this.lc.length;d++){var e=this.lc[d];0>e.Fb&&(e.Fb=c,c+=4)}return Rd.prototype.Da.call(this,a,b)};
|
||||
h.reset=function(){this.status("Model "+this.ka);this.A.V&&this.ba();this.C=65536;this.G=32768;this.L=65535;this.I=32768;this.w=15;this.g=[0,0,0,0,0,0,0,this.Rd,-1,-2,-3,-4,-5,-6,-7,-8];this.qa=[0,0,0,0,0,0];this.W=[0,0,0,0];this.M=[[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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.B=[[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],[65535,65535,65535,65535,65535,65535,65535,65535,65535,
|
||||
65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.Ha=[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];this.wc=[0,0,0,0,0,0,0,0];this.N=0;this.cb=-1;this.u=this.j=this.Tc=this.X=this.Y=this.i=this.tc=0;kc(this);Ud(this);this.A.error=!1;Rd.prototype.reset.call(this)};function kc(a){a.S=0;a.uc=0;a.vc=0;a.U=0;a.P=0;a.eb=0;a.xa=255;a.zb=0;a.Ab=0;a.sb=0;a.lb=262143;a.kb=a.g[7];a.O=0;a.R=null;a.D&&(se(a),a.Pd=bd(a.D))}
|
||||
function se(a){a.ic=a.Yc;a.jc=a.$c;a.Qc=a.ad;a.kc=a.fd;a.rc&&(a.ic=a.ke,a.jc=a.pe);a.sc&&(a.Qc=a.ue,a.kc=a.ve);a.zb?(a.Ia=65536,a.vb=a.U&16?4186112:253952,a.Ga=a.oe,a.oa=a.rc?a.Ug:a.Ad,a.Gb=a.sc?a.ii:a.Ed,Jc(a.D,a.U&16?22:18)):(a.Ia=0,a.vb=57344,a.Ga=a.Bf,a.oa=a.rc?a.Tg:a.te,a.Gb=a.sc?a.hi:a.ye,Jc(a.D,16))}function od(a){var b=a.S;b&57344||(b=b&-3199|a.Ab<<5|a.sb<<1);return b}
|
||||
function se(a){a.ic=a.Yc;a.jc=a.$c;a.Qc=a.ad;a.kc=a.fd;a.rc&&(a.ic=a.ke,a.jc=a.pe);a.sc&&(a.Qc=a.ve,a.kc=a.we);a.zb?(a.Ia=65536,a.vb=a.U&16?4186112:253952,a.Ga=a.oe,a.oa=a.rc?a.Vg:a.Ad,a.Hb=a.sc?a.ji:a.Ed,Jc(a.D,a.U&16?22:18)):(a.Ia=0,a.vb=57344,a.Ga=a.Cf,a.oa=a.rc?a.Ug:a.ue,a.Hb=a.sc?a.ii:a.ze,Jc(a.D,16))}function od(a){var b=a.S;b&57344||(b=b&-3199|a.Ab<<5|a.sb<<1);return b}
|
||||
function pd(a,b){b&=-3073;if(a.S!=b){b&57344&&!(a.S&57344)&&(a.uc=a.O>>16&65535,a.vc=a.O&65535);a.S=b;a.Ab=(b&96)>>5;a.sb=(b&30)>>1;var c=0;b&257&&(c=4,b&1&&(c|=2));a.zb!=c&&(a.zb=c,se(a))}}function qd(a){a.S&57344||(a.uc=a.O>>16&65535);a=a.uc;a&65280&&(a=(a<<8|a>>8)&65535);return a}function rd(a){a.S&57344||(a.vc=a.O&65535);return a.vc}function sd(a,b){1170>a.ka&&(b&=-49);a.U!=b&&(a.U=b,a.lb=b&16?4194303:262143,se(a))}
|
||||
function te(a,b,c,d){a.Rd=b;ue(a,b);vd(a,0);a.D.reset();kc(a);if(c){a.g[0]=d||0;for(b=1;5>=b;b++)a.g[b]=0;a.g[6]=1024;a.A.aa?a.A.V||mc(a):a.A.ra=!0}else a.F&&a.A.aa?a.ba()||(de(a.F),H(a.K,-1)):!1===c&&a.ba();!a.A.V&&a.ta&&a.ta.stop()}h.le=function(){return 0};
|
||||
function te(a,b,c,d){a.Rd=b;ue(a,b);vd(a,0);a.D.reset();kc(a);if(c){a.g[0]=d||0;for(b=1;5>=b;b++)a.g[b]=0;a.g[6]=1024;a.F||(a.A.aa?a.A.V||mc(a):a.A.ra=!0)}else a.F&&a.A.aa?a.ba()||(de(a.F),H(a.K,-1)):!1===c&&a.ba();!a.A.V&&a.ta&&a.ta.stop()}h.le=function(){return 0};
|
||||
h.save=function(){var a=new G(this);a.set(0,[this.g,this.qa,this.W,this.M,this.B,this.Ha,this.wc,this.P,this.tc,this.eb,this.xa,this.Ab,this.sb,this.kb,this.i,this.O,this.cb,this.yc,this.Bc]);a.set(1,[ud(this),od(this),qd(this),rd(this),this.U]);a.set(2,[this.pb,this.ob,this.A.ra]);a.set(3,ve(this));a.set(4,ne(this));return a.data()};
|
||||
h.restore=function(a){var b=ia(a[0]);this.g=b.next().value;this.qa=b.next().value;this.W=b.next().value;this.M=b.next().value;this.B=b.next().value;this.Ha=b.next().value;this.wc=b.next().value;this.P=b.next().value;this.tc=b.next().value;this.eb=b.next().value;this.xa=b.next().value;this.Ab=b.next().value;this.sb=b.next().value;this.kb=b.next().value;this.i=b.next().value;this.O=b.next().value;this.cb=b.next().value;this.yc=b.next().value;this.Bc=b.next().value;b=a[1];vd(this,b[0]);pd(this,b[1]);
|
||||
this.uc=b[2];this.vc=b[3];sd(this,b[4]);b=a[2];this.pb=b[0];he(this,b[1]);this.A.ra=b[2];for(var b=a[3],c=b.length-1;0<=c;c--){var d;a:{for(d=0;d<this.lc.length;d++){var e=this.lc[d];if(e.Eb===b[c]){d=e;break a}}d=null}d&&(d.next=this.R,this.R=d)}a=a[4];for(b=0;b<this.ia.length&&b<a.length;b++)this.ia[b][0]=a[b];return!0};function we(a){return a.C&65536?1:0}function xe(a){return a.G&32768?2:0}function ye(a){return a.L&65535?0:4}function ze(a){return a.I&32768?8:0}
|
||||
function Ae(a,b){var c=a.g[7];a.g[7]=c+b&65535;return c}function Be(a,b,c){c&&(ue(a,a.g[7]+(b<<24>>23)),a.b-=2);a.b-=3}function ue(a,b){a.g[7]=b&65535}function jd(a,b,c,d){b={Eb:b,qb:c,message:d||0,name:Kb[b],next:null};a.lc.push(b);return b}function Ce(a,b){var c=a.R;if(c==b)a.R=b.next;else for(;c;){var d=c.next;if(d==b){c.next=d.next;break}c=d}a.R&&(a.i|=1)}
|
||||
function hd(a,b){if(b){if(b!=a.R){var c=a.R;if(!c||c.qb<=b.qb)b.next=c,a.R=b;else{do{var d=c.next;if(!d||d.qb<=b.qb){b.next=d;c.next=b;break}c=d}while(c)}}a.i|=1;b.message&&z(a,b.message|8)&&D(a,"setIRQ(vector="+E(b.Eb)+",priority="+b.qb+")",!0,!0)}}function nd(a,b){b&&(Ce(a,b),b.message&&z(a,b.message|8)&&D(a,"clearIRQ(vector="+E(b.Eb)+",priority="+b.qb+")",!0,!0))}function ve(a){var b=[];for(a=a.R;a;)b.push(a.Eb),a=a.next;return b}
|
||||
this.uc=b[2];this.vc=b[3];sd(this,b[4]);b=a[2];this.pb=b[0];he(this,b[1]);this.A.ra=b[2];for(var b=a[3],c=b.length-1;0<=c;c--){var d;a:{for(d=0;d<this.lc.length;d++){var e=this.lc[d];if(e.Fb===b[c]){d=e;break a}}d=null}d&&(d.next=this.R,this.R=d)}a=a[4];for(b=0;b<this.ia.length&&b<a.length;b++)this.ia[b][0]=a[b];return!0};function we(a){return a.C&65536?1:0}function xe(a){return a.G&32768?2:0}function ye(a){return a.L&65535?0:4}function ze(a){return a.I&32768?8:0}
|
||||
function Ae(a,b){var c=a.g[7];a.g[7]=c+b&65535;return c}function Be(a,b,c){c&&(ue(a,a.g[7]+(b<<24>>23)),a.b-=2);a.b-=3}function ue(a,b){a.g[7]=b&65535}function jd(a,b,c,d){b={Fb:b,qb:c,message:d||0,name:Kb[b],next:null};a.lc.push(b);return b}function Ce(a,b){var c=a.R;if(c==b)a.R=b.next;else for(;c;){var d=c.next;if(d==b){c.next=d.next;break}c=d}a.R&&(a.i|=1)}
|
||||
function hd(a,b){if(b){if(b!=a.R){var c=a.R;if(!c||c.qb<=b.qb)b.next=c,a.R=b;else{do{var d=c.next;if(!d||d.qb<=b.qb){b.next=d;c.next=b;break}c=d}while(c)}}a.i|=1;b.message&&z(a,b.message|8)&&D(a,"setIRQ(vector="+E(b.Fb)+",priority="+b.qb+")",!0,!0)}}function nd(a,b){b&&(Ce(a,b),b.message&&z(a,b.message|8)&&D(a,"clearIRQ(vector="+E(b.Fb)+",priority="+b.qb+")",!0,!0))}function ve(a){var b=[];for(a=a.R;a;)b.push(a.Fb),a=a.next;return b}
|
||||
function De(a){return a.i&64?(a.sa(168,64,-6),!0):a.i&32?(a.sa(4,32,-5),!0):a.i&16?(a.sa(12,16,-7),!0):!1}function ud(a){return a.w=a.w&63728|ze(a)|ye(a)|xe(a)|we(a)}function vd(a,b){b&=a.be;a.I=b<<12;a.L=~b&4;a.G=b<<14;a.C=b<<16;if((b^a.w)&a.ae)for(var c=a.qa.length;0<=--c;){var d=a.g[c];a.g[c]=a.qa[c];a.qa[c]=d}a.N=b>>14&3;c=a.w>>14&3;a.N!=c&&(a.W[c]=a.g[6],a.g[6]=a.W[a.N]);a.w=b;a.i&=-3;a.i|=a.R?2:1}function td(a,b){if(b&=65024){var c=b>>9;do b+=34;while(c>>=1);a.i|=1}a.eb=b}
|
||||
h.Ea=function(a){this.I=this.L=a;this.G=0};h.rb=function(a,b){this.I=this.L=this.C=a;this.G=b||0};function Ee(a,b){a.I=a.L=a.C=b;a.G=a.I^a.C>>1}function Fe(a,b,c,d){a.I=a.L=a.C=b;a.G=(c^d)&(d^b)}
|
||||
h.sa=function(a,b,c){if(!this.pa){0>this.cb?this.cb=ud(this):this.N||(c=-4);-4==c&&(this.i&256&&(c=-1),this.i|=256,this.P|=4,this.g[6]=a=4);if(-1!=c){this.O=a|4143316992;this.N=0;var d=this.oa(a|this.Ia),e=this.oa(a+2&65535|this.Ia);vd(this,e&-12289|this.cb>>2&12288);Ge(this,this.cb);Ge(this,this.g[7]);ue(this,d)}this.b-=5;this.i&=~(b|19);this.i|=129;this.cb=-1;this.yc=c;this.Bc=a;-1==c&&this.ba();if(-4<=c)throw a;}};
|
||||
function He(a){var b=Ie(a),c=Ie(a);a.w&49152&&(c=c&-225|a.w&63712);ue(a,b);vd(a,c);a.i&=-17}function Je(a,b){var c=b>>13&31;31>c&&(b=a.U&32?a.Ha[c]+(b&8191)&4194303:b&-3932161);return b}
|
||||
function Ke(a,b,c){var d=[];if(c){c=Je(a,b);var e=b>>13&31;d.push(c);d.push(e);a.U&32&&(d.push(a.Ha[e]),d.push(b&8191))}else if(a.zb){var e=a.N<<1,f=b>>13;7<f&&(e|=1);a.U&a.Ud[a.N]||(f&=7);b&=8191;var g=a.M[a.N][f]<<6;c=g+b&a.lb;3932160<=c&&(c=Je(a,c));d.push(c);d.push(b);d.push(e);d.push(f&7);d.push(g);d.push(a.lb)}else c=b&65535,57344<=c&&(c|=a.vb),d.push(c);return d}
|
||||
function tc(a,b,c){var d,e,f;if(!(c&a.zb))return f=b&65535,57344<=f&&(f|=a.vb),f;d=b>>13;a.U&a.Ud[a.N]||(d&=7);e=a.B[a.N][d];f=(a.M[a.N][d]<<6)+(b&8191)&a.lb;3932160<=f&&(f=Je(a,f));if(a.pa)return f;f>=a.Pd&&f<a.vb?(a.P|=32,a.sa(4,0,f)):f&1&&!(c&1)&&(a.P|=64,a.sa(4,0,f));var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!=(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&
|
||||
(g|=16384));a.B[a.N][d]=e;if(f!=(4194170&a.lb)||a.N)a.Ab=a.N,a.sb=d;g&&(g&57344&&(0<=a.cb&&(g|=128),a.S&57344||(g|=a.S&4096|a.Ab<<5|a.sb<<1,pd(a,a.S&-61695|g&61694)),a.sa(168,64,-2)),a.S&61440||!(f<(4191360&a.lb)||f>(4194239&a.lb))||(a.S|=4096,a.S&512&&(a.i|=64)));return f}function Ie(a){var b=a.oa(a.g[6]|a.Ia);a.g[6]=a.g[6]+2&65535;return b}function Ge(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.O=a.O&65535|(a.O&-65536)<<8|16121856;a.i&256||a.Kb(4,-2,c);a.Gb(c,b)}
|
||||
function Le(a,b,c,d){var e,f,g=d&8?0:a.Ia;switch(b){case 0:return a.sa(4,0,-3),0;case 1:return 6==c&&a.Kb(d,0,a.g[6]),a.b-=3,7==c?a.g[c]:a.g[c]|g;case 2:f=2;e=a.g[c];6==c&&a.Kb(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.g[c];7!=c&&(e|=g);e=a.oa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;6==c&&a.Kb(d,f,e);7!=c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!=c&&(e|=g);e=a.oa(e)|g;a.b-=8;break;case 6:return e=a.oa(Ae(a,2)),e=e+a.g[c]&65535,6==c&&a.Kb(d,
|
||||
0,e),a.b-=6,e|g;case 7:return e=a.oa(Ae(a,2)),e=e+a.g[c]&65535,e=a.oa(e|a.Ia),a.b-=10,e|g}a.g[c]=a.g[c]+f&65535;a.O=a.O&65535|(a.O&-65536)<<8|(f<<3&248|c)<<16;return e}h.xf=function(a,b,c){!this.N&&0>=b&&c<=this.xa&&(this.i|=32)};h.yf=function(a,b,c){this.N||(65534<=c&&(c|=-65536),a&4&&c<=this.xa&&(c<=this.xa-32?this.sa(4,0,-4):(this.P|=8,this.i|=32)))};h.ke=function(a){this.F&&Nd(this.F,a,1);return this.Yc(a)};h.pe=function(a){this.F&&Nd(this.F,a,2);return this.$c(a)};
|
||||
h.ue=function(a,b){this.F&&Od(this.F,a,1);this.ad(a,b)};h.ve=function(a,b){this.F&&Od(this.F,a,2);this.fd(a,b)};function vc(a,b){a.pa++;b=a.D.zc(tc(a,b,2));a.pa--;return b}function Me(a,b){(b?--a.sc:--a.rc)||se(a)}h.Bf=function(a,b,c){return Le(this,a,b,c)};h.oe=function(a,b,c){return tc(this,Le(this,a,b,c),c)};h.te=function(a){return this.D.zc(this.kb=a)};h.Tg=function(a){this.F&&Nd(this.F,a,2);return this.te(a)};h.Ad=function(a){return this.D.zc(this.kb=tc(this,a,2))};
|
||||
h.Ug=function(a){this.F&&Nd(this.F,a,2);return this.Ad(a)};h.ye=function(a,b){this.D.$b(this.kb=a,b)};h.hi=function(a,b){this.F&&Od(this.F,a,2);this.ye(a,b)};h.Ed=function(a,b){this.D.$b(this.kb=tc(this,a,4),b)};h.ii=function(a,b){this.F&&Od(this.F,a,2);this.Ed(a,b)};function Ne(a,b,c){var d=a.j=b&7;(b=a.u=(b&56)>>3)?(d=Le(a,b,d,2),c&65536||61440!==(a.w&61440)&&(d&=65535),a.N=a.w>>12&3,c=a.oa(d|c&a.Ia),a.N=a.w>>14&3):c=6!=d||(a.w>>2&12288)===(a.w&12288)?a.g[d]:a.W[a.w>>12&3];return c}
|
||||
(g|=16384));a.B[a.N][d]=e;if(f!=(4194170&a.lb)||a.N)a.Ab=a.N,a.sb=d;g&&(g&57344&&(0<=a.cb&&(g|=128),a.S&57344||(g|=a.S&4096|a.Ab<<5|a.sb<<1,pd(a,a.S&-61695|g&61694)),a.sa(168,64,-2)),a.S&61440||!(f<(4191360&a.lb)||f>(4194239&a.lb))||(a.S|=4096,a.S&512&&(a.i|=64)));return f}function Ie(a){var b=a.oa(a.g[6]|a.Ia);a.g[6]=a.g[6]+2&65535;return b}function Ge(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.O=a.O&65535|(a.O&-65536)<<8|16121856;a.i&256||a.Lb(4,-2,c);a.Hb(c,b)}
|
||||
function Le(a,b,c,d){var e,f,g=d&8?0:a.Ia;switch(b){case 0:return a.sa(4,0,-3),0;case 1:return 6==c&&a.Lb(d,0,a.g[6]),a.b-=3,7==c?a.g[c]:a.g[c]|g;case 2:f=2;e=a.g[c];6==c&&a.Lb(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.g[c];7!=c&&(e|=g);e=a.oa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;6==c&&a.Lb(d,f,e);7!=c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!=c&&(e|=g);e=a.oa(e)|g;a.b-=8;break;case 6:return e=a.oa(Ae(a,2)),e=e+a.g[c]&65535,6==c&&a.Lb(d,
|
||||
0,e),a.b-=6,e|g;case 7:return e=a.oa(Ae(a,2)),e=e+a.g[c]&65535,e=a.oa(e|a.Ia),a.b-=10,e|g}a.g[c]=a.g[c]+f&65535;a.O=a.O&65535|(a.O&-65536)<<8|(f<<3&248|c)<<16;return e}h.yf=function(a,b,c){!this.N&&0>=b&&c<=this.xa&&(this.i|=32)};h.zf=function(a,b,c){this.N||(65534<=c&&(c|=-65536),a&4&&c<=this.xa&&(c<=this.xa-32?this.sa(4,0,-4):(this.P|=8,this.i|=32)))};h.ke=function(a){this.F&&Nd(this.F,a,1);return this.Yc(a)};h.pe=function(a){this.F&&Nd(this.F,a,2);return this.$c(a)};
|
||||
h.ve=function(a,b){this.F&&Od(this.F,a,1);this.ad(a,b)};h.we=function(a,b){this.F&&Od(this.F,a,2);this.fd(a,b)};function vc(a,b){a.pa++;b=a.D.zc(tc(a,b,2));a.pa--;return b}function Me(a,b){(b?--a.sc:--a.rc)||se(a)}h.Cf=function(a,b,c){return Le(this,a,b,c)};h.oe=function(a,b,c){return tc(this,Le(this,a,b,c),c)};h.ue=function(a){return this.D.zc(this.kb=a)};h.Ug=function(a){this.F&&Nd(this.F,a,2);return this.ue(a)};h.Ad=function(a){return this.D.zc(this.kb=tc(this,a,2))};
|
||||
h.Vg=function(a){this.F&&Nd(this.F,a,2);return this.Ad(a)};h.ze=function(a,b){this.D.ac(this.kb=a,b)};h.ii=function(a,b){this.F&&Od(this.F,a,2);this.ze(a,b)};h.Ed=function(a,b){this.D.ac(this.kb=tc(this,a,4),b)};h.ji=function(a,b){this.F&&Od(this.F,a,2);this.Ed(a,b)};function Ne(a,b,c){var d=a.j=b&7;(b=a.u=(b&56)>>3)?(d=Le(a,b,d,2),c&65536||61440!==(a.w&61440)&&(d&=65535),a.N=a.w>>12&3,c=a.oa(d|c&a.Ia),a.N=a.w>>14&3):c=6!=d||(a.w>>2&12288)===(a.w&12288)?a.g[d]:a.W[a.w>>12&3];return c}
|
||||
function Oe(a,b,c,d){a.O=a.O&65535|1441792;var e=a.j=b&7;(b=a.u=(b&56)>>3)?(e=Le(a,b,e,4),c&65536||(e&=65535),a.N=a.w>>12&3,e=tc(a,e|c&65536,4),a.N=a.w>>14&3,a.kc(e,d)):6!=e||(a.w>>2&12288)===(a.w&12288)?a.g[e]=d:a.W[a.w>>12&3]=d}function Pe(a,b){b>>=6;var c=a.Y=b&7;return(b=a.X=(b&56)>>3)?a.ic(a.Ga(b,c,3)):a.g[c+a.xc]&a.Vd}function Qe(a,b){var c;b>>=6;var d=a.Y=b&7;(b=a.X=(b&56)>>3)?c=a.jc(a.Ga(b,d,2)):c=a.g[d+a.xc];return c}function Re(a,b){var c=a.j=b&7;b=a.u=(b&56)>>3;return Le(a,b,c,8)}
|
||||
function Se(a,b){var c=a.j=b&7;return(b=a.u=(b&56)>>3)?a.ic(a.Ga(b,c,3)):a.g[c]&255}function Te(a,b){var c,d=a.j=b&7;(b=a.u=(b&56)>>3)?c=a.jc(a.Ga(b,d,2)):c=a.g[d];return c}function Ue(a,b,c,d){var e=a.j=b&7;(b=a.u=(b&56)>>3)?(e=a.Tc=a.Ga(b,e,7),c=0>c?a.g[-c-1]&255:c,a.Qc(e,d.call(a,c,a.ic(e))),e&1&&a.b--):(b=a.g[e],c=0>c?a.g[-c-1]&255:c,a.g[e]=b&65280|d.call(a,c,b&255))}
|
||||
function P(a,b,c,d){var e=a.j=b&7;(b=a.u=(b&56)>>3)?(e=a.Ga(b,e,6),a.kc(e,d.call(a,0>c?a.g[-c-1]:c,a.jc(e)))):a.g[e]=d.call(a,0>c?a.g[-c-1]:c,a.g[e])}function Ve(a,b,c,d,e){var f=a.j=b&7;(b=a.u=(b&56)>>3)?(d=a.Ga(b,f,5),e.call(a,(c=0>c?a.g[-c-1]&255:c)<<8),a.Qc(d,c),d&1&&a.b--):(c?(c=0>c?a.g[-c-1]&255:c,a.g[f]=a.g[f]&~d|c<<24>>24&d):a.g[f]&=~d,e.call(a,c<<8))}
|
||||
function We(a,b,c,d){var e=a.j=b&7;(b=a.u=(b&56)>>3)?(e=a.Ga(b,e,4),d.call(a,c=0>c?a.g[-c-1]:c),a.kc(e,c)):(a.g[e]=c=0>c?a.g[-c-1]:c,d.call(a,c))}
|
||||
h.Ac=function(a){this.A.complete=!0;var b=this.F?Xe(this.F)?1:this.A.Pc?-1:0:0,c=a?this.A.Pc?0:1:-1;this.A.Pc=!1;this.nb=this.b=a;this.i=this.i&-5|(b?4:0);do{if(this.i){if(this.i&4){if(Ye(this.F,this.g[7],c)){this.ba();break}++b||(this.i&=-5);c||c++}if(a=this.i&11)if(a=!1,this.i&2){var d=160,e=(this.eb&224)>>5,f=this.R&&this.R.qb>e?this.R:null;f&&(d=f.Eb,e=f.qb);e>(this.w&224)>>5?(this.i&8&&(Ae(this,2),this.i&=-9),this.sa(d,0,-10),e=!0):e=!1;e&&(f&&Ce(this,f),a=!0);this.R||this.eb||(this.i&=-3)}else this.i&
|
||||
h.Ac=function(a){this.A.complete=!0;var b=this.F?Xe(this.F)?1:this.A.Pc?-1:0:0,c=a?this.A.Pc?0:1:-1;this.A.Pc=!1;this.nb=this.b=a;this.i=this.i&-5|(b?4:0);do{if(this.i){if(this.i&4){if(Ye(this.F,this.g[7],c)){this.ba();break}++b||(this.i&=-5);c||c++}if(a=this.i&11)if(a=!1,this.i&2){var d=160,e=(this.eb&224)>>5,f=this.R&&this.R.qb>e?this.R:null;f&&(d=f.Fb,e=f.qb);e>(this.w&224)>>5?(this.i&8&&(Ae(this,2),this.i&=-9),this.sa(d,0,-10),e=!0):e=!1;e&&(f&&Ce(this,f),a=!0);this.R||this.eb||(this.i&=-3)}else this.i&
|
||||
1&&this.i++;if(a){if(this.i&4&&Ye(this.F,this.g[7],c)){this.ba();break}if(0>c)break}if(this.i&112&&De(this)){if(this.i&4&&Ye(this.F,this.g[7],c)){this.ba();break}if(0>c)break}}this.i=this.i&15|this.w&16;a=this.O=this.g[7];f=this.oa(a);this.g[7]=a+2&65535;this.Od(f)}while(0<this.b);return this.A.complete?this.nb-this.b:!1===this.A.complete?-1:0};mb(function(){for(var a=x(document,w,"cpu"),b=0;b<a.length;b++){var c=a[b],d=wa(c),d=new pe(d);xa(d,c)}});
|
||||
function Ze(a,b){var c=b+a;this.I=this.L=this.C=c;this.G=(a^c)&(b^c);return c&65535}function $e(a,b){var c=b+a,d=c<<8;this.I=this.L=this.C=d;this.G=(a<<8^d)&(b<<8^d);return c&255}function wf(a,b){a=b<<1;Ee(this,a);return a&65535}function xf(a,b){a=b<<1;Ee(this,a<<8);return a&255}function yf(a,b){a=b&32768|b>>1|b<<16;Ee(this,a);return a&65535}function zf(a,b){a=b&128|b>>1|b<<8;Ee(this,a<<8);return a&255}function Af(a,b){a=b&~a;this.Ea(a);return a}function Bf(a,b){a=b&~a;this.Ea(a<<8);return a}
|
||||
function Cf(a,b){a|=b;this.Ea(a);return a}function Df(a,b){a|=b;this.Ea(a<<8);return a}function Ef(a,b){a=~b|65536;this.rb(a);return a&65535}function Ff(a,b){a=~b|256;this.rb(a<<8);return a&255}function Gf(a,b){this.I=this.L=a=b-a;this.G=b&(b^a);return a&65535}function Hf(a,b){a=b-a;var c=a<<8;b<<=8;this.I=this.L=c;this.G=b&(b^c);return a&255}function If(a,b){this.I=this.L=a=b+a;this.G=a&(b^a);return a&65535}function Jf(a,b){a=b+a;var c=a<<8;this.I=this.L=c;this.G=c&(b<<8^c);return a&255}
|
||||
|
|
@ -189,8 +189,8 @@ this.la=this.b;this.Ea(b);Oe(this,a,0,b);this.b=this.la-Hg[this.u]},function(a){
|
|||
Tg,Tg,Q,Q,Q,Q,Og,Og],rh=[ng,lg,hg,jg,qg,rg,Xf,Yf,wg,Rg,eh,gh,ih,function(a){1145>this.ka?Q.call(this,a):vh[a>>6&3].call(this,a)},Q,Q],vh=[function(a){Q.call(this,a)},function(a){a=Ne(this,a,65536);this.Ea(a);Ge(this,a);this.b-=11},function(a){var b=Ie(this);this.la=this.b;this.Ea(b);Oe(this,a,65536,b);this.b=this.la-Hg[this.u]},function(a){Q.call(this,a)}];
|
||||
function wh(a){r.call(this,"ROM",a,128);this.ga=this.g=null;this.u=+a.addr;this.b=+a.size;this.w=!1;this.i=a.alias;"string"==typeof this.i&&(this.i=eval(this.i));this.j=a.file;this.B=Ja(this.j);if(this.j){a=this.j;var b=Ka(this.B);"json"!=b&&"hex"!=b&&(a=Za()+"/api/v1/dump?file="+this.j+"&format=bytes&decimal=true");var c=this;Xa(a,null,!0,function(a,b,f){f?(c.T("Unable to load ROM resource (error "+f+": "+a+")"),c.j=null):(oa(c.wb,a,b),(a=Ya(a,b))?(c.g=a.ca,c.ga=a.ga):c.j=null);xh(c)})}}p(wh,r);
|
||||
h=wh.prototype;h.Aa=function(a,b,c,d){this.D=b;this.f=c;this.F=d;xh(this)};h.Da=function(){this.ga&&(this.F&&yh(this.F,this.id,this.u,this.b,this.ga),delete this.ga);return!0};h.Ca=function(){return!0};
|
||||
function xh(a){if(!Aa(a)){if(a.j){if(!a.g||!a.D)return;a.b||(a.b=a.g.length);if(a.g.length!=a.b)ya(a,"ROM size ("+F(a.g.length,8,!0)+") does not match specified size ("+F(a.b,8,!0)+")");else{var b;a:{b=a.u;if(57344<=b&&b<57344+Bc){var c={},c=(c[b]=[wh.prototype.Dg,wh.prototype.Qh,null,null,null,a.b>>1],c);if(Rb(a.D,a,c)){a.status("Added "+a.b+"-byte ROM at "+E(b));b=a.w=!0;break a}}else if(Hc(a.D,b,a.b,Bd)){for(c=0;c<a.g.length;c++)ad(a.D,b+c,a.g[c]);b=!0;break a}b=!1}if(b){b=[];"number"==typeof a.i?
|
||||
b.push(a.i):null!=a.i&&a.i.length&&(b=a.i);for(c=0;c<b.length;c++){for(var d=a,e=b[c],f=d.D,g=d.b,k=[],l=d.u>>>f.g;0<g&&l<f.b.length;)k.push(f.b[l++]),g-=f.j;f=d.D;d=d.b;g=0;for(e>>>=f.g;0<d&&e<f.b.length;){l=k[g++];if(!l)break;f.b[e++]=l;d-=f.j}}a.w||delete a.g}}}y(a)}}h.Dg=function(a){return this.g[a-this.u]};h.Qh=function(){};mb(function(){for(var a=x(document,w,"rom"),b=0;b<a.length;b++){var c=a[b],d=wa(c),d=new wh(d);xa(d,c)}});
|
||||
function xh(a){if(!Aa(a)){if(a.j){if(!a.g||!a.D)return;a.b||(a.b=a.g.length);if(a.g.length!=a.b)ya(a,"ROM size ("+F(a.g.length,8,!0)+") does not match specified size ("+F(a.b,8,!0)+")");else{var b;a:{b=a.u;if(57344<=b&&b<57344+Bc){var c={},c=(c[b]=[wh.prototype.Eg,wh.prototype.Rh,null,null,null,a.b>>1],c);if(Rb(a.D,a,c)){a.status("Added "+a.b+"-byte ROM at "+E(b));b=a.w=!0;break a}}else if(Hc(a.D,b,a.b,Bd)){for(c=0;c<a.g.length;c++)ad(a.D,b+c,a.g[c]);b=!0;break a}b=!1}if(b){b=[];"number"==typeof a.i?
|
||||
b.push(a.i):null!=a.i&&a.i.length&&(b=a.i);for(c=0;c<b.length;c++){for(var d=a,e=b[c],f=d.D,g=d.b,k=[],l=d.u>>>f.g;0<g&&l<f.b.length;)k.push(f.b[l++]),g-=f.j;f=d.D;d=d.b;g=0;for(e>>>=f.g;0<d&&e<f.b.length;){l=k[g++];if(!l)break;f.b[e++]=l;d-=f.j}}a.w||delete a.g}}}y(a)}}h.Eg=function(a){return this.g[a-this.u]};h.Rh=function(){};mb(function(){for(var a=x(document,w,"rom"),b=0;b<a.length;b++){var c=a[b],d=wa(c),d=new wh(d);xa(d,c)}});
|
||||
function zh(a){r.call(this,"RAM",a);this.ga=this.g=null;this.i=+a.addr;this.j=+a.size;this.za=a.load;this.ya=a.exec;null!=this.za&&(this.za=+this.za);null!=this.ya&&(this.ya=+this.ya);this.u=!1;this.b=a.file;this.w=Ja(this.b);if(this.b){a=this.b;var b=Ka(this.w);"json"!=b&&"hex"!=b&&(a=Za()+"/api/v1/dump?file="+this.b+"&format=bytes&decimal=true");var c=this;Xa(a,null,!0,function(a,b,f){f?(c.T("Unable to load RAM resource (error "+f+": "+a+")"),c.b=null):(oa(c.wb,a,b),(a=Ya(a,b))?(c.g=a.ca,c.ga=a.ga,
|
||||
null==c.za&&(c.za=a.za),null==c.ya&&(c.ya=a.ya)):c.b=null);Ah(c)})}}p(zh,r);zh.prototype.Aa=function(a,b,c,d){this.D=b;this.f=c;this.F=d;Ah(this)};zh.prototype.Da=function(a,b){this.ga&&(this.F&&yh(this.F,this.id,this.i,this.j,this.ga),delete this.ga);b||this.reset();return!0};zh.prototype.Ca=function(){return!0};
|
||||
function Ah(a){if(a.D&&(!a.u&&a.j&&(Hc(a.D,a.i,a.j,cd)?a.u=!0:a.j=0),!Aa(a))){if(!a.u)v("No RAM allocated");else if(a.b){if(!a.g||!a.D)return;Bh(a,a.g,a.za,a.ya,a.i)?a.status('Loaded image "'+a.w+'"'):a.T('Error loading image "'+a.w+'"')}y(a)}}
|
||||
|
|
@ -199,16 +199,16 @@ function Bh(a,b,c,d,e,f){var g=!1,k=!1;if(null==c)for(var l=0;l<b.length-1;){var
|
|||
break}m+=b[l++]&255;if(m&255){D(a,"invalid checksum ("+F(m,2,!0)+") for block at offset "+Ha(n),4096);break}if(C)for(D(a,"loading "+Ha(C)+" bytes at "+Ha(t)+"-"+Ha(t+C),4096);C--;)ad(a.D,t++,b[u++]&255);else t&1?g=!0:null==d&&(d=t),null!=d&&D(a,"starting address: "+Ha(d),4096);k=!0}else l++;else l+=2}if(!k&&(null==c&&(c=e),null!=c)){for(e=0;e<b.length;e++)ad(a.D,c+e,b[e]);k=!0}if(k){if(null==d||g)a.f.ba(),f=!1;null!=d&&te(a.f,d,f)}return k}
|
||||
mb(function(){for(var a=x(document,w,"ram"),b=0;b<a.length;b++){var c=a[b],d=wa(c),d=new zh(d);xa(d,c)}});function Ch(a){r.call(this,"Keyboard",a,1024);y(this)}p(Ch,r);Ch.prototype.va=function(){return!1};Ch.prototype.Aa=function(a,b,c,d){this.K=a;this.f=c;this.F=d};mb(function(){for(var a=x(document,w,"keyboard"),b=0;b<a.length;b++){var c=a[b],d=wa(c),d=new Ch(d);xa(d,c)}});
|
||||
function Dh(a){r.call(this,"SerialPort",a,1048576);this.M=+a.adapter;this.S=+a.baudReceive||9600;this.Y=+a.baudTransmit||9600;this.L=a.upperCase;"string"==typeof this.L&&(this.L="true"==this.L);this.u=this.w=null;this.W=+a.tabSize;this.U=+a.charBOL;this.B=0;this.I=!0;this.P=this.N=null;this.R=this.X=-1;this.C=this.b=this.g=0;this.i=[];var b=a.binding;if("console"==b)this.w="";else{var c;a=Eh;b&&(void 0===c&&(c="Panel"),(c=va(c,this.id))&&(b=c.H[b])&&this.va(null,a,b))}this.j=this.G=this.O=null;this.exports=
|
||||
{connect:this.qe,receiveData:this.Lc,receiveStatus:this.Zg,setConnection:this.bh}}p(Dh,r);h=Dh.prototype;
|
||||
h.va=function(a,b,c){var d=this;switch(b){case Eh:return this.H[b]=this.u=c,c.onkeydown=function(a){a=a||window.event;var b=0,c=a.keyCode;8==c?b=a.altKey?la.Jd:la.bc:46==c?b=la.Jd:a.ctrlKey&&c>=la.Fd&&c<=la.sf&&(b=c-(la.Fd-la.Ae));b&&(a.preventDefault&&a.preventDefault(),d.Lc(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==la.Ce&&(b=la.Be);d.Lc(b);a.preventDefault&&a.preventDefault()}return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation();
|
||||
{connect:this.qe,receiveData:this.Lc,receiveStatus:this.$g,setConnection:this.dh}}p(Dh,r);h=Dh.prototype;
|
||||
h.va=function(a,b,c){var d=this;switch(b){case Eh:return this.H[b]=this.u=c,c.onkeydown=function(a){a=a||window.event;var b=0,c=a.keyCode;8==c?b=a.altKey?la.Jd:la.cc:46==c?b=la.Jd:a.ctrlKey&&c>=la.Fd&&c<=la.tf&&(b=c-(la.Fd-la.Be));b&&(a.preventDefault&&a.preventDefault(),d.Lc(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==la.De&&(b=la.Ce);d.Lc(b);a.preventDefault&&a.preventDefault()}return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation();
|
||||
a.preventDefault&&a.preventDefault();(a=a.clipboardData||window.clipboardData)&&d.Lc(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};
|
||||
h.Aa=function(a,b,c,d){this.K=a;this.D=b;this.f=c;this.F=d;var e=this;this.P=jd(this.f,this.M?-1:48,4,1048576);this.R=gd(this.f,function(){var a;a=-1;e.i.length&&(a=e.i.shift()&255,D(e,"receiveByte("+F(a,2,!0)+")"),e.L&&97<=a&&122>a&&(a-=32),id(e.f,e.R,1E3/Math.round(e.S/10)));0<=a&&(e.C=a,e.b&128?e.C|=49152:e.b|=128,e.b&64&&hd(c,e.P))});this.N=jd(this.f,this.M?-1:52,4,1048576);this.X=gd(this.f,function(){e.g|=128;e.g&64&&hd(c,e.N)});Rb(b,this,Fh,this.M?64832+8*(this.M-1)-65392:0);Tb(b,this.reset.bind(this));
|
||||
y(this)};h.qe=function(a){if(!this.j){var b=Td(this.K,"connection");if(b){var c=b.split("->");if(2==c.length){var d=Pa(c[0]);if(d!=this.Lb)return;c=Pa(c[1]);if(this.j=ua(c)){var e=this.j.exports;if(e){var f=e.connect;f&&f.call(this.j,this.I);if(this.G=e.receiveData){this.I=a;this.O=e.receiveStatus;this.status("Connected "+this.wb+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};
|
||||
y(this)};h.qe=function(a){if(!this.j){var b=Td(this.K,"connection");if(b){var c=b.split("->");if(2==c.length){var d=Pa(c[0]);if(d!=this.Mb)return;c=Pa(c[1]);if(this.j=ua(c)){var e=this.j.exports;if(e){var f=e.connect;f&&f.call(this.j,this.I);if(this.G=e.receiveData){this.I=a;this.O=e.receiveStatus;this.status("Connected "+this.wb+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};
|
||||
h.Da=function(a,b){if(!b)if(this.qe(this.I),!a)this.reset();else if(!this.restore(a))return!1;return!0};h.Ca=function(a){return a?this.save():!0};h.reset=function(){Gh(this)};h.save=function(){var a=new G(this);a.set(0,[this.C,this.b,this.g,this.i]);return a.data()};h.restore=function(a){return Gh(this,a[0])};function Gh(a,b){b||(b=[0,8192,128,a.i]);b=ia(b);a.C=b.next().value;a.b=b.next().value;a.g=b.next().value;a.i=b.next().value;return!0}
|
||||
h.Lc=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d<a.length;d++){c=b;b=a.charCodeAt(d);if(10==b){if(13==c)continue;b=13}this.i.push(b)}else this.i=this.i.concat(a);id(this.f,this.R,1E3/Math.round(this.S/10));return!0};h.Zg=function(a){var b=this.b;this.b&=-12289;a&32&&(this.b|=8192);a&256&&(this.b|=4096);b!=this.b&&(this.b|=32768,this.b&32&&hd(this.f,this.P))};h.bh=function(a,b){return this.j?!1:(this.j=a,this.G=b,!0)};
|
||||
h.qg=function(){var a=this.b&65534;this.b&=-32769;return a};h.Dh=function(a){var b=a^this.b;this.b=this.b&-112|a&111;this.O&&b&6&&(b=0,b=this.I?b|(a&4?32:0)|(a&2?320:0):b|(a&4?16:0)|(a&2?1048576:0),this.O.call(this.j,b))};h.pg=function(){this.b&=-129;return this.C};h.Ch=function(){};h.Yg=function(){return this.g};h.ki=function(a){this.g&128&&(a&64?hd(this.f,this.N):nd(this.f,this.N));this.g=this.g&-70|a&69};h.Xg=function(){return 0};
|
||||
h.ji=function(a){a&=255;D(this,"transmitByte("+F(a,2,!0)+")");this.G&&this.G.call(this.j,a);a&=127;if(this.u)if(13==a)this.B=0;else if(8==a)this.u.value=this.u.value.slice(0,-1),0<this.B&&this.B--;else{if(a){var b;13!=a&&10!=a&&(b=Qa[a]);b=b?"<"+b+">":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.W||8,c=a-this.B%a,this.W&&(b=Oa("",c)));this.U&&!this.B&&c&&(b=String.fromCharCode(this.U)+b);this.u.value+=b;this.u.scrollTop=this.u.scrollHeight;this.B+=c}}else if(null!=this.w){if(10==
|
||||
a||1024<=this.w.length)this.v(this.w),this.w="";10!=a&&(this.w+=String.fromCharCode(a))}id(this.f,this.X,1E3/Math.round(this.Y/10));this.g&=-129};var Eh="buffer",Hh={},Fh=(Hh[65392]=[null,null,Dh.prototype.qg,Dh.prototype.Dh,"RCSR"],Hh[65394]=[null,null,Dh.prototype.pg,Dh.prototype.Ch,"RBUF"],Hh[65396]=[null,null,Dh.prototype.Yg,Dh.prototype.ki,"XCSR"],Hh[65398]=[null,null,Dh.prototype.Xg,Dh.prototype.ji,"XBUF"],Hh);
|
||||
h.Lc=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d<a.length;d++){c=b;b=a.charCodeAt(d);if(10==b){if(13==c)continue;b=13}this.i.push(b)}else this.i=this.i.concat(a);id(this.f,this.R,1E3/Math.round(this.S/10));return!0};h.$g=function(a){var b=this.b;this.b&=-12289;a&32&&(this.b|=8192);a&256&&(this.b|=4096);b!=this.b&&(this.b|=32768,this.b&32&&hd(this.f,this.P))};h.dh=function(a,b){return this.j?!1:(this.j=a,this.G=b,!0)};
|
||||
h.rg=function(){var a=this.b&65534;this.b&=-32769;return a};h.Eh=function(a){var b=a^this.b;this.b=this.b&-112|a&111;this.O&&b&6&&(b=0,b=this.I?b|(a&4?32:0)|(a&2?320:0):b|(a&4?16:0)|(a&2?1048576:0),this.O.call(this.j,b))};h.qg=function(){this.b&=-129;return this.C};h.Dh=function(){};h.Zg=function(){return this.g};h.li=function(a){this.g&128&&(a&64?hd(this.f,this.N):nd(this.f,this.N));this.g=this.g&-70|a&69};h.Yg=function(){return 0};
|
||||
h.ki=function(a){a&=255;D(this,"transmitByte("+F(a,2,!0)+")");this.G&&this.G.call(this.j,a);a&=127;if(this.u)if(13==a)this.B=0;else if(8==a)this.u.value=this.u.value.slice(0,-1),0<this.B&&this.B--;else{if(a){var b;13!=a&&10!=a&&(b=Qa[a]);b=b?"<"+b+">":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.W||8,c=a-this.B%a,this.W&&(b=Oa("",c)));this.U&&!this.B&&c&&(b=String.fromCharCode(this.U)+b);this.u.value+=b;this.u.scrollTop=this.u.scrollHeight;this.B+=c}}else if(null!=this.w){if(10==
|
||||
a||1024<=this.w.length)this.v(this.w),this.w="";10!=a&&(this.w+=String.fromCharCode(a))}id(this.f,this.X,1E3/Math.round(this.Y/10));this.g&=-129};var Eh="buffer",Hh={},Fh=(Hh[65392]=[null,null,Dh.prototype.rg,Dh.prototype.Eh,"RCSR"],Hh[65394]=[null,null,Dh.prototype.qg,Dh.prototype.Dh,"RBUF"],Hh[65396]=[null,null,Dh.prototype.Zg,Dh.prototype.li,"XCSR"],Hh[65398]=[null,null,Dh.prototype.Yg,Dh.prototype.ki,"XBUF"],Hh);
|
||||
mb(function(){for(var a=x(document,w,"serial"),b=0;b<a.length;b++){var c=a[b],d=wa(c),d=new Dh(d);xa(d,c)}});function wd(a){r.call(this,"PC11",a,4096);this.N=Ih(this,a.autoMount);this.g=0;this.U=+a.baudReceive||3600;this.w=this.b=0;this.L=32768;this.i=this.R=0;this.C=[];this.B=Jh;this.j=Kh;this.M=this.u="";this.ca=this.za=this.ya=null;this.P=-1;this.O=!db("Mobi")&&window&&"FileReader"in window;this.G=null;this.S=-1;this.I=null}p(wd,r);
|
||||
function Ih(a,b){if(b&&"string"==typeof b)try{b=eval("("+b+")")}catch(c){v(a.type+" auto-mount error: "+c.message+" ("+b+")"),b=null}return b||{}}h=wd.prototype;
|
||||
h.va=function(a,b,c){var d=this,e=Kh;switch(b){case "listTapes":return this.H[b]=c,c.onchange=function(){var a=d.H.descTape,b=c.options[c.selectedIndex];if(a&&b){var e={};if(b=b.getAttribute("data-value"))try{e=eval("("+b+")")}catch(l){v("PC11 option error: "+l.message)}b=e.desc;void 0===b&&(b="");e=e.href;void 0!==e&&(b='<a href="'+e+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descTape":return this.H[b]=c,!0;case "readTape":e=Lh;case "loadTape":return e||(e=Mh),this.H[b]=c,c.onclick=
|
||||
|
|
@ -220,9 +220,9 @@ function Wh(a,b,c,d,e,f){var g=-1;if(a.u.toLowerCase()!=c.toLowerCase()||a.j!=d)
|
|||
function Zh(a,b,c,d,e){var f=c;if(e){var g=new FileReader;g.onload=function(){var e=g.result;e&&(e=new Uint8Array(e,0,e.byteLength),$h(a,b,c,d,e),a.B=Th);a.A.gb=!1;Xh(a)};g.readAsArrayBuffer(e);return!1}0>c.indexOf("/api/v1/dump")&&(e=Ka(c),f="json"==e||"gz"==e?encodeURI(c):Za()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Xa(f,null,!0,function(e,f,g){var k=0>g&&!!a.K&&!a.K.A.aa;g?a.T('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(oa(a.wb,e,f),(e=Ya(e,f))&&$h(a,b,c,d,
|
||||
e.ca,e.za,e.ya));a.A.gb=!1;a.g&&(a.g--,a.g||y(a));Xh(a)})}function Sh(a,b,c,d){if((a=a.H.listTapes)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}
|
||||
function Xh(a){var b=a.H.listTapes;if(b&&b.options){a=a.B||a.u;for(var c=0;c<b.options.length;c++)if(b.options[c].value==a){b.selectedIndex!=c&&(b.selectedIndex=c);break}c==b.options.length&&(b.selectedIndex=0)}}function Qh(a,b){b|=0;if(b!==a.P){var c=a.H[Oh];c&&(c=(c=x(c,ai))&&c[0])&&c.style&&(c.style.width=b+"%");a.P=b}}
|
||||
function $h(a,b,c,d,e,f,g){a.M=b;a.u=c;a.j=d;a.ca=e;a.za=f;a.ya=g;d==Lh?a.I&&Bh(a.I,e,f,g,null,!1)?a.status('Read tape "'+b+'"'):a.T('No valid memory address for tape "'+b+'"'):(a.i=0,a.C=e,a.b&=-32769,a.status('Loaded tape "'+b+'" ('+e.length+" bytes)"),Qh(a,0))}function Yh(a,b){if(a.u||!1===b)a.M="",a.u="",b||(a.j&&a.status(a.j==Mh?"tape detached":"tape unloaded"),a.B=Jh,a.j=Kh,Xh(a))}h.save=function(){return(new G(this)).data()};h.restore=function(){return!0};h.jg=function(){return this.b&65534};
|
||||
h.wh=function(a){a&1&&(this.b&32768?(a&=-2,this.b&64&&hd(this.f,this.G)):(this.b&=-129,this.b|=2048,this.w=0,id(this.f,this.S,1E3/Math.round(this.U/10))));this.b=this.b&-66|a&65};h.ig=function(){this.b&=-129;this.b|=2048;return this.w};h.vh=function(){};h.hg=function(){return this.L};h.uh=function(a){this.L=this.L&-65|a&64};h.gg=function(){return this.R};h.th=function(a){this.R=a&255};
|
||||
var Jh="",Th="?",Uh="??",Kh=0,Mh=1,Lh=2,Oh="readProgress",ai="pcjs-progress-bar",bi={},Rh=(bi[65384]=[null,null,wd.prototype.jg,wd.prototype.wh,"PRS"],bi[65386]=[null,null,wd.prototype.ig,wd.prototype.vh,"PRB"],bi[65388]=[null,null,wd.prototype.hg,wd.prototype.uh,"PPS"],bi[65390]=[null,null,wd.prototype.gg,wd.prototype.th,"PPB"],bi);
|
||||
function $h(a,b,c,d,e,f,g){a.M=b;a.u=c;a.j=d;a.ca=e;a.za=f;a.ya=g;d==Lh?a.I&&Bh(a.I,e,f,g,null,!1)?a.status('Read tape "'+b+'"'):a.T('No valid memory address for tape "'+b+'"'):(a.i=0,a.C=e,a.b&=-32769,a.status('Loaded tape "'+b+'" ('+e.length+" bytes)"),Qh(a,0))}function Yh(a,b){if(a.u||!1===b)a.M="",a.u="",b||(a.j&&a.status(a.j==Mh?"tape detached":"tape unloaded"),a.B=Jh,a.j=Kh,Xh(a))}h.save=function(){return(new G(this)).data()};h.restore=function(){return!0};h.kg=function(){return this.b&65534};
|
||||
h.xh=function(a){a&1&&(this.b&32768?(a&=-2,this.b&64&&hd(this.f,this.G)):(this.b&=-129,this.b|=2048,this.w=0,id(this.f,this.S,1E3/Math.round(this.U/10))));this.b=this.b&-66|a&65};h.jg=function(){this.b&=-129;this.b|=2048;return this.w};h.wh=function(){};h.ig=function(){return this.L};h.vh=function(a){this.L=this.L&-65|a&64};h.hg=function(){return this.R};h.uh=function(a){this.R=a&255};
|
||||
var Jh="",Th="?",Uh="??",Kh=0,Mh=1,Lh=2,Oh="readProgress",ai="pcjs-progress-bar",bi={},Rh=(bi[65384]=[null,null,wd.prototype.kg,wd.prototype.xh,"PRS"],bi[65386]=[null,null,wd.prototype.jg,wd.prototype.wh,"PRB"],bi[65388]=[null,null,wd.prototype.ig,wd.prototype.vh,"PPS"],bi[65390]=[null,null,wd.prototype.hg,wd.prototype.uh,"PPB"],bi);
|
||||
function ci(a,b,c){r.call(this,"Disk",{id:a.wb+".disk"+F(++di,4)},8192);this.controller=a;this.K=a.K;this.F=a.F;this.u=b;this.Ya=b.name;this.Oa=this.Bd="";this.xd=b.xd;this.Z=this.ja=this.ea=this.ua=this.mode=0;this.b=[];this.i=null;this.j=!1;ei(this,c,b.Z,b.ja,b.ea,b.ua);this.g=this.w=null;y(this)}p(ci,r);h=ci.prototype;h.Aa=function(a,b,c,d){this.F=d};
|
||||
function ei(a,b,c,d,e,f){a.mode=b;a.Z=c;a.ja=d;a.ea=e;a.ua=f;a.b=[];if("preload"!=a.mode){b=Array(a.Z);for(c=0;c<b.length;c++){d=Array(a.ja);for(e=0;e<d.length;e++){f=Array(a.ea);for(var g=1;g<=f.length;g++)f[g-1]=fi(null,c,e,g,a.ua,0);d[e]=f}b[c]=d}a.b=b}a.i=null}
|
||||
function gi(a,b,c,d,e){var f=c;if(a.g)return!0;a.Ya=b;a.Oa=c;a.Bd=Ja(c);a.g=e;a.w=a.controller;if(d){var g=new FileReader;g.onload=function(){var b=g.result,c,d=b?b.byteLength:0,e=ka[d];if(e){a.Z=e[0];a.ja=e[1];a.ea=e[2];a.ua=e[3]||512;c=a.ua>>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.Z);for(d=0;d<a.b.length;d++)for(var t=a.b[d]=Array(a.ja),u=0;u<t.length;u++)for(var C=t[u]=Array(a.ea),A=0;A<C.length;A++){for(var B=fi(null,d,u,A+1,a.ua,0),K=B.data,vb=0;vb<c;vb++,f+=4)var Cd=K[vb]=b.getInt32(f,
|
||||
|
|
@ -230,57 +230,57 @@ function gi(a,b,c,d,e){var f=c;if(a.g)return!0;a.Ya=b;a.Oa=c;a.Bd=Ja(c);a.g=e;a.
|
|||
null,!0,function(b,c,d){hi(a,b,c,d)})}
|
||||
function hi(a,b,c,d){var e=null,f=0>d&&!!a.K&&!a.K.A.aa;a.j=!1;if(d)a.controller.T('Unable to load disk "'+a.Ya+'" (error '+d+": "+b+")",f);else{oa(a.controller.wb,b,c);try{if(0<Ja(a.Bd,!0).toLowerCase().indexOf("-readonly"))a.j=!0;else{var g=c.indexOf("\n");0<g&&1024>g&&0<c.substring(0,g).indexOf("write-protected")&&(a.j=!0)}var k;"<"==c.substr(0,1)?k=["Missing disk image: "+a.Ya]:k=0>c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+
|
||||
c+")");if(k.length)if(1==k.length)v(k[0]);else{a.Z=k.length;a.ja=k[0].length;a.ea=k[0][0].length;var l=k[0][0][0];a.ua=l&&l.length||512;for(d=c=0;d<a.Z;d++)for(f=0;f<a.ja;f++)for(g=0;g<a.ea;g++)if(l=k[d][f][g]){var m=l.length;void 0===m&&(m=l.length=512);var m=m>>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var q=l.data;if(void 0===q){var t=l.bytes;if(void 0!==t&&t.length){for(var u=m<<2,C=t.length;C<u;C++)t[C]=n;ii(l,t)}else q=[],n=l.pattern=n|n<<8|n<<16|n<<24,l.data=q;delete l.bytes}fi(l,d,f);for(u=
|
||||
0;u<q.length;u++)c=c+q[u]&-1}a.b=k;a.i=c;e=a}else v("Empty disk image: "+a.Ya)}catch(A){v("Disk image error ("+b+"): "+A.message)}}a.g&&(a.g.call(a.w,a.u,e,a.Ya,a.Oa),a.g=null)}function fi(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.nk=b;a.pk=c;a.Va=a.La=0;a.hb=!1;return a}
|
||||
h.seek=function(a,b,c,d,e){d=null;var f=this.u,g=this.b[a];if(g){var k=g[b];if(!k&&f.uf&&b<f.ja)for(k=g[b]=Array(f.vf),g=0;g<k.length;g++)k[g]=fi(null,a,b,g+1,f.re,0);if(k){for(g=0;g<k.length;g++)if(k[g]&&k[g].sector==c){d=k[g];break}!d&&f.uf&&9==f.fe&&(d=k[g]=fi(null,a,b,f.fe,f.re,0))}}e&&e(d,!1);return d};function ii(a,b){for(var c=0,d=a.length>>2,e=Array(d),f=0;f<d;f++)e[f]=b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24,c+=4;a.data=e}
|
||||
0;u<q.length;u++)c=c+q[u]&-1}a.b=k;a.i=c;e=a}else v("Empty disk image: "+a.Ya)}catch(A){v("Disk image error ("+b+"): "+A.message)}}a.g&&(a.g.call(a.w,a.u,e,a.Ya,a.Oa),a.g=null)}function fi(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.pk=b;a.qk=c;a.Va=a.La=0;a.hb=!1;return a}
|
||||
h.seek=function(a,b,c,d,e){d=null;var f=this.u,g=this.b[a];if(g){var k=g[b];if(!k&&f.vf&&b<f.ja)for(k=g[b]=Array(f.wf),g=0;g<k.length;g++)k[g]=fi(null,a,b,g+1,f.re,0);if(k){for(g=0;g<k.length;g++)if(k[g]&&k[g].sector==c){d=k[g];break}!d&&f.vf&&9==f.fe&&(d=k[g]=fi(null,a,b,f.fe,f.re,0))}}e&&e(d,!1);return d};function ii(a,b){for(var c=0,d=a.length>>2,e=Array(d),f=0;f<d;f++)e[f]=b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24,c+=4;a.data=e}
|
||||
h.read=function(a,b){var c=-1;if(a&&b<a.length)var c=a.data,d=b>>2,c=(d<c.length?c[d]:a.pattern)>>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.j)return!1;if(b<a.length){if(c!=this.read(a,b,!0)){var d=a.data,e=a.pattern,f=b>>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.La?f<a.Va?(a.La+=a.Va-f,a.Va=f):f>=a.Va+a.La&&(a.La+=f-(a.Va+a.La)+1):(a.Va=f,a.La=1);d[f]=d[f]&~(255<<b)|c<<b}return!0}return null};
|
||||
function ji(a,b){var c=a.ja*a.ea,d=b/c|0;return d<a.Z?(b%=c,a.seek(d,b/a.ea|0,b%a.ea+1)):null}function ki(a,b,c){for(var d=1,e=0,f=0;d--;){var g=a.read(b,c++);if(0>g)break;e|=g<<f;f+=8}return e}h.save=function(){var a=0,b=[];b[a++]=[this.Oa,this.i,this.Z,this.ja,this.ea,this.ua];if(!this.j)for(var c=this.b,d=0;d<c.length;d++)for(var e=0;e<c[d].length;e++)for(var f=0;f<c[d][e].length;f++){var g=c[d][e][f];if(g&&g.La){for(var k=[],l=0,m=g.Va,n=g.Va+g.La;m<n;)k[l++]=g.data[m++];b[a++]=[d,e,f,g.Va,k]}}return b};
|
||||
h.restore=function(a){var b=0,c="unsupported restore format";if(a&&0<a.length){var d=0,e=a[d++];e&&2<=e.length&&(!this.b.length&&6<=e.length?ei(this,"local",e[2],e[3],e[4],e[5]):null!=e[1]&&null!=this.i&&e[1]!=this.i&&(c="original checksum ("+e[1]+") differs from current checksum ("+this.i+")",b=-2));for(this.b.length||(b=-1);d<a.length&&0<=b;){var f=0,g=a[d++],k=g[f++],l=g[f++],m=g[f++];if(k>=this.b.length||l>=this.b[k].length||m>=this.b[k][l].length){c="sector (CHS="+k+":"+l+":"+m+") out of range ("+
|
||||
b+" changes applied)";b=-1;break}if(this.j){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.b[k][l][m]){for(l=k.data.length;l<e;)k.data[l++]=k.pattern;l=0;k.Va=e;for(k.La=f.length;e<g;)k.data[e++]=f[l++];b++}}}0>b&&-2!=b&&this.controller.T("Unable to restore disk '"+this.Ya+": "+c);return b};
|
||||
h.toJSON=function(){var a;a=0;for(var b;b=ji(this,a++);)li(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")};
|
||||
function li(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}var di=0;function mi(a,b,c,d,e,f){r.call(this,a,b,c);this.N=ni(this,b.autoMount);this.M=0;this.R=d;this.S=e;this.U=f;this.P=d.Wc;this.g=Array(this.P);this.O=!db("Mobi")&&window&&"FileReader"in window;this.B=[];this.Qa=null;this.exports={selectDrive:this.ah}}p(mi,r);
|
||||
function li(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}var di=0;function mi(a,b,c,d,e,f){r.call(this,a,b,c);this.N=ni(this,b.autoMount);this.M=0;this.R=d;this.S=e;this.U=f;this.P=d.Wc;this.g=Array(this.P);this.O=!db("Mobi")&&window&&"FileReader"in window;this.B=[];this.Qa=null;this.exports={selectDrive:this.bh}}p(mi,r);
|
||||
function ni(a,b){if(b&&"string"==typeof b)try{b=eval("("+b+")")}catch(c){v(a.type+" auto-mount error: "+c.message+" ("+b+")"),b=null}return b||{}}h=mi.prototype;
|
||||
h.va=function(a,b,c){var d=this;switch(b){case "listDisks":return this.H[b]=c,c.onchange=function(){var a=d.H.descDisk,b=c.options&&c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){v(d.type+" option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b='<a href="'+g+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.H[b]=c,c.onchange=function(){var a=Ea(c.value,10);null!=a&&
|
||||
oi(d,a)},!0;case "loadDisk":return this.H[b]=c,c.onclick=function(){var a=d.H.listDisks;a&&a.options&&pi(d,a.options[a.selectedIndex].text,a.value)},!0;case "bootDisk":return this.H[b]=c,c.onclick=function(){var a,b=d.H.listDrives,b=b&&Ea(b.value,10);null==b||0>b||b>=d.g.length||!(a=d.g[b])?d.T("Unable to boot the selected drive"):a.da?(te(d.f,0,!0,b),(a=d.Tb(a,a.Cf,a.Df,a.Ef,a.wf,0,2))&&d.T("Unable to read the boot sector ("+a+")")):d.T("Load a disk into the drive first")},!0;case "saveDisk":if(!this.O){c.parentNode.removeChild(c);
|
||||
oi(d,a)},!0;case "loadDisk":return this.H[b]=c,c.onclick=function(){var a=d.H.listDisks;a&&a.options&&pi(d,a.options[a.selectedIndex].text,a.value)},!0;case "bootDisk":return this.H[b]=c,c.onclick=function(){var a,b=d.H.listDrives,b=b&&Ea(b.value,10);null==b||0>b||b>=d.g.length||!(a=d.g[b])?d.T("Unable to boot the selected drive"):a.da?(te(d.f,0,!0,b),(a=d.Ub(a,a.Df,a.Ef,a.Ff,a.xf,0,2))&&d.T("Unable to read the boot sector ("+a+")")):d.T("Load a disk into the drive first")},!0;case "saveDisk":if(!this.O){c.parentNode.removeChild(c);
|
||||
break}this.H[b]=c;c.onclick=function(){var a=d.H.listDrives;if(a&&a.options&&d.g)if(a=d.g[Ea(a.value,10)||0])if(a=a.da){var b;b="";for(var c=0,k;k=ji(a,c++);)for(var l=0,m=k.length;l<m;l++)b+=String.fromCharCode(ki(a,k,l));b=btoa(b);a=a.Bd.replace(".json",".img");c=null;b="data:application/octet-stream;base64,"+b;a&&(c=document.createElement("a"),"string"!=typeof c.download&&(c=null));c?(c.href=b,c.download=a,document.body.appendChild(c),c.click(),document.body.removeChild(c),a="Check your Downloads folder for "+
|
||||
a+"."):(window.open(b),a="Check your browser for a new window/tab containing the requested data"+(a?" ("+a+")":"")+".");v(a)}else d.T("No disk loaded in drive.");else d.T("No disk drive selected.")};return!0;case "mountDisk":if(this.O)return this.H[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;pi(d,Ja(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
|
||||
h.Aa=function(a,b,c,d){this.K=a;this.D=b;this.f=c;this.F=d;if(a=ni(this,Td(this.K,"autoMount")))for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.N[e]=a[e]);this.reset();this.Qa=jd(this.f,this.R.rd,this.R.nd,this.ha);Rb(b,this,this.U);Tb(b,this.reset.bind(this));qi(this,"None",ri,!0);this.O&&qi(this,"Local Disk",si);qi(this,"Remote Disk",ti);Ni(this)||y(this)};
|
||||
h.Da=function(a,b){if(!b){if(!a){if(this.reset(),this.K.M){this.B=[];for(a=0;a<this.g.length;a++)Pi(this,a,!0);Ni(this,!0)}}else if(!this.restore(a))return!1;if(a=this.H.listDrives){for(;a.firstChild;)a.removeChild(a.firstChild);a.value="";for(b=0;b<this.P;b++){var c=document.createElement("option");c.value=b;c.text=this.g[b].Nc||"---";a.appendChild(c)}0<this.P&&(a.value="0",oi(this,0))}}return!0};h.Ca=function(a){return a?this.save():!0};h.reset=function(){this.Sb();Qi(this)};
|
||||
h.save=function(){var a=new G(this);a.set(0,this.Oc());a.set(1,Ri(this));a.set(2,Si(this));return a.data()};h.restore=function(a){var b=!0;this.Sb(a[0])||(b=!1);var c=a[1];c&&(this.B=c);Qi(this,a[2])||(b=!1);return b};h.Sb=function(){return!0};h.Oc=function(){return[]};
|
||||
function Qi(a,b){for(var c=0;c<a.g.length;c++){var d=a.g[c];void 0===d&&(d=a.g[c]={});var e=a,f=d,d=c,g=a.S,k=b&&b[c],l=0;f.hc=d;f.name=e.Lb;f.wd=f.Ob=!1;f.xd=!0;f.Nc=g[l++]+d;f.Z=g[l++];f.ja=g[l++];f.ea=g[l++];f.ua=g[l++];f.Cf=g[l++];f.Df=g[l++];f.Ef=g[l++];f.wf=g[l++];f.status=g[l++];f.hk=0;f.gk=0;f.fe=1;f.vf=f.ea;f.re=f.ua;f.qk=0;f.xk=null;f.da||(f.Oa="");k&&(l=k[1],g=k[2],k[0]?(f=l,k=g,g=e.g[d],Pi(e,d,!0),g.Ob=!0,d=new ci(e,g,"preload"),e.je(g,d,f,k,!0)):Ti(e,d,l,g,!0)?f.da&&g&&Ui(e,l,g,f.da):
|
||||
y(e,!1))}return!0}function Si(a){for(var b=[],c=0;c<a.g.length;c++){var d=a.g[c];b.push([d.Ob,d.Ya,d.Oa])}return b}function Ri(a){for(var b=0;b<a.g.length;b++){var c=a.g[b];c.da&&Vi(a,c.Oa,c.da)}return a.B}
|
||||
h.Da=function(a,b){if(!b){if(!a){if(this.reset(),this.K.M){this.B=[];for(a=0;a<this.g.length;a++)Pi(this,a,!0);Ni(this,!0)}}else if(!this.restore(a))return!1;if(a=this.H.listDrives){for(;a.firstChild;)a.removeChild(a.firstChild);a.value="";for(b=0;b<this.P;b++){var c=document.createElement("option");c.value=b;c.text=this.g[b].Nc||"---";a.appendChild(c)}0<this.P&&(a.value="0",oi(this,0))}}return!0};h.Ca=function(a){return a?this.save():!0};h.reset=function(){this.Db();Qi(this)};
|
||||
h.save=function(){var a=new G(this);a.set(0,this.Oc());a.set(1,Ri(this));a.set(2,Si(this));return a.data()};h.restore=function(a){var b=!0;this.Db(a[0])||(b=!1);var c=a[1];c&&(this.B=c);Qi(this,a[2])||(b=!1);return b};h.Db=function(){return!0};h.Oc=function(){return[]};
|
||||
function Qi(a,b){for(var c=0;c<a.g.length;c++){var d=a.g[c];void 0===d&&(d=a.g[c]={});var e=a,f=d,d=c,g=a.S,k=b&&b[c],l=0;f.Tb=d;f.name=e.Mb;f.wd=f.Pb=!1;f.xd=!0;f.Nc=g[l++]+d;f.Z=g[l++];f.ja=g[l++];f.ea=g[l++];f.ua=g[l++];f.Df=g[l++];f.Ef=g[l++];f.Ff=g[l++];f.xf=g[l++];f.status=g[l++];f.ik=0;f.hk=0;f.fe=1;f.wf=f.ea;f.re=f.ua;f.rk=0;f.yk=null;f.da||(f.Oa="");k&&(l=k[1],g=k[2],k[0]?(f=l,k=g,g=e.g[d],Pi(e,d,!0),g.Pb=!0,d=new ci(e,g,"preload"),e.je(g,d,f,k,!0)):Ti(e,d,l,g,!0)?f.da&&g&&Ui(e,l,g,f.da):
|
||||
y(e,!1))}return!0}function Si(a){for(var b=[],c=0;c<a.g.length;c++){var d=a.g[c];b.push([d.Pb,d.Ya,d.Oa])}return b}function Ri(a){for(var b=0;b<a.g.length;b++){var c=a.g[b];c.da&&Vi(a,c.Oa,c.da)}return a.B}
|
||||
function Ni(a,b){b||(a.M=0);for(var c in a.N){var d=a.N[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.H.listDisks)&&f.options)for(var g=0;g<f.options.length;g++){var k=f.options[g];if(k.value==e){f=k.text;break a}}f=Ja(e,!0)}if(e&&f&&(g=-1,c&&(g=c.charCodeAt(c.length-1)-48,0>g||9<g)&&(g=-1),0<=g&&g<a.g.length)){!Ti(a,g,f,e,!0)&&b&&y(a,!1);continue}a.T("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")")}return!!a.M}
|
||||
function pi(a,b,c,d){var e=a.H.listDrives,e=e&&Ea(e.value,10);if(void 0===e||0>e||e>=a.g.length)a.T("Unable to load the selected drive");else if(c)if(c==si)a.T('Use "Choose File" and "Mount" to select and load a local disk.');else{if(c==ti){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=Ja(c);a.status("Attempting to load "+c+' as "'+b+'"')}Ti(a,e,b,c,!1,d)}else Pi(a,e)}
|
||||
function Ti(a,b,c,d,e,f){var g=-1,k=a.g[b];k.Oa.toLowerCase()!=d.toLowerCase()&&(g++,Pi(a,b,!0),k.wd?a.T(a.type+" busy"):(k.wd=!0,e&&(k.vd=!0,a.M++,z(a)&&D(a,"auto-loading disk: "+c)),k.Ob=!!f,gi(new ci(a,k,"preload"),c,d,f,a.je)&&g++));return g}
|
||||
h.je=function(a,b,c,d,e){a.wd=!1;b&&(b.Z>a.Z||b.ja>a.ja)&&(this.T('Disk "'+c+'" too large for drive '+(this.g[a.hc].Nc||"---")),b=null);b?(a.da=b,a.Ya=c,a.Oa=d,Ui(this,c,d,b),this.T('Loaded disk "'+c+'" in drive '+(this.g[a.hc].Nc||"---"),a.vd||e),this.K&&ke(this.K)):a.Ob=!1;a.vd&&(a.vd=!1,--this.M||y(this));oi(this,a.hc)};
|
||||
function Ti(a,b,c,d,e,f){var g=-1,k=a.g[b];k.Oa.toLowerCase()!=d.toLowerCase()&&(g++,Pi(a,b,!0),k.wd?a.T(a.type+" busy"):(k.wd=!0,e&&(k.vd=!0,a.M++,z(a)&&D(a,"auto-loading disk: "+c)),k.Pb=!!f,gi(new ci(a,k,"preload"),c,d,f,a.je)&&g++));return g}
|
||||
h.je=function(a,b,c,d,e){a.wd=!1;b&&(b.Z>a.Z||b.ja>a.ja)&&(this.T('Disk "'+c+'" too large for drive '+(this.g[a.Tb].Nc||"---")),b=null);b?(a.da=b,a.Ya=c,a.Oa=d,this.se(a.Tb),Ui(this,c,d,b),this.T('Loaded disk "'+c+'" in drive '+(this.g[a.Tb].Nc||"---"),a.vd||e),this.K&&ke(this.K)):a.Pb=!1;a.vd&&(a.vd=!1,--this.M||y(this));oi(this,a.Tb)};
|
||||
function qi(a,b,c,d){if((a=a.H.listDisks)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}
|
||||
function oi(a,b,c){var d=!1;if(0<=b&&b<a.g.length){var e=a.g[b],f=a.H.listDisks;a=a.H.listDrives;if(f&&a&&f.options&&a.options){if(c)for(c=0;c<a.options.length;c++)if(Ea(a.options[c].value,10)==e.hc){a.selectedIndex!=c&&(a.selectedIndex=c);d=!0;break}c=Ea(a.value,10);e=e.Ob?si:e.Oa;if(!isNaN(c)&&c==b){for(c=0;c<f.options.length;c++)if(f.options[c].value==e){f.selectedIndex!=c&&(f.selectedIndex=c);d=!0;break}c==f.options.length&&(f.selectedIndex=0)}}}return d}
|
||||
h.ah=function(a){var b=this.H.listDrives;if(b&&b.options)for(var c=b.options.length,d=0;d<c;d++)if(b.options[d].innerHTML==a){var e=Ea(b.options[d].value,10);if(0<=e)return oi(this,e,!0)}return!1};function Pi(a,b,c){var d=a.g[b];if(d.da||!1===c)Vi(a,d.Oa,d.da),d.Ya="",d.Oa="",d.da=null,d.Ob=!1,c||(a.T("Drive "+(a.g[b].Nc||"---")+" unloaded",c),oi(a,b))}function Ui(a,b,c,d){var e;for(e=0;e<a.B.length;e++)if(a.B[e][1]==c){d.restore(a.B[e][2]);return}a.B[e]=[b,c,[]]}
|
||||
function Vi(a,b,c){var d;for(d=0;d<a.B.length;d++)if(a.B[d][1]==b){a.B[d][2]=c.save();break}}h.Tb=function(){return-1};h.Rc=function(){return-1};var ri="",si="?",ti="??";function N(a){mi.call(this,"RK11",a,65536,Hb,Hb.Ec,Wi);this.G=this.i=this.b=this.w=this.u=this.j=this.C=0}p(N,mi);h=N.prototype;
|
||||
h.Sb=function(a){a||(a=[Xi.Ec|Xi.$d|Xi.Wd,0,R.$a,0,0,0,0]);a=ia(a);this.G=a.next().value;this.i=a.next().value;this.b=a.next().value;this.w=a.next().value;this.u=a.next().value;this.j=a.next().value;this.C=a.next().value;return!0};h.Oc=function(){return[this.G,this.i,this.b,this.w,this.u,this.j,this.C]};
|
||||
h.Tb=function(a,b,c,d,e,f,g,k,l){var m=0;a=a.da;var n=null,q;a||(m=S.Qd,e=0);for(;e;){if(!n){if(b>=a.Z){m=S.Cc;break}n=a.seek(b,c,d+1);if(!n){m=S.Zd;break}q=0;++d>=a.ea&&(d=0,++c>=a.ja&&(c=0,++b))}var t,u;if(0>(t=a.read(n,q++))||0>(u=a.read(n,q++))){m=S.Dc;break}if(!k&&(sc(this.D,Je(this.f,f),t|u<<8),fd(this.D))){m=S.dc;break}q>=a.ua&&(n=null);f+=g;e--}return l?l(m,b,c,d,e,f):m};
|
||||
h.Rc=function(a,b,c,d,e,f,g,k,l){var m=0;a=a.da;var n=null,q;a||(m=S.Qd,e=0);for(;e;){var t=uc(this.D,Je(this.f,f));if(fd(this.D)){m=S.dc;break}if(!n){if(b>=a.Z){m=S.Cc;break}n=a.seek(b,c,d+1,!0);if(!n){m=S.Zd;break}q=0;++d>=a.ea&&(d=0,++c>=a.ja&&(c=0,++b))}if(k){var u,C;if(0>(u=a.read(n,q++))||0>(C=a.read(n,q++))){m=S.Dc;break}if(t!=(u|C<<8)){m=S.ce;break}}else if(!a.write(n,q++,t&255)||!a.write(n,q++,t>>8)){m=S.Dc;break}q>=a.ua&&(n=null);f+=g;e--}return l?l(m,b,c,d,e,f):m};
|
||||
h.Ue=function(a,b,c,d,e,f){this.u=f&65535;this.b=this.b&~R.Ib|f>>16-R.ma.Ib&R.Ib;this.w=65536-e&65535;this.j=this.j&~Yi.od|d&Yi.od;this.i|=a;Zi(this);return!0};function Zi(a){a.b&=~R.jb;a.i&&(a.i|=S.Ee,a.b|=R.jb,a.i&S.bd&&(a.b|=R.bd),z(a)&&D(a,a.type+": ERROR: "+E(a.i)))}h.vg=function(){return this.G};h.Ih=function(){};h.wg=function(){return this.i};h.Jh=function(){};h.sg=function(){return this.b&R.ec};
|
||||
h.Fh=function(a){this.b=this.b&~R.Sa|a&R.Sa;if(this.b&R.cc){a=!0;var b,c,d="",e=(this.j&Yi.tb)>>Yi.ma.tb,f=this.g[e],g,k,l,m,n,q;this.b&=~(R.$a|R.pd);this.i&=~S.kf;switch(c=this.b&R.wa){case $i.ze:z(this)&&D(this,this.type+": CRESET("+e+")",!0);this.i=this.j=0;this.b=R.$a;break;case $i.Pe:d="RCHK";case $i.ub:d||(d="READ"),b=this.Tb;case $i.sd:d||(d="WCHK");case $i.gc:d||(d="WRITE");b||(b=this.Rc);g=(this.j&Yi.ac)>>Yi.ma.ac;k=(this.j&Yi.ed)>>Yi.ma.ed;l=this.j&Yi.od;m=65536-this.w&65535;n=(this.b&R.Ib)<<
|
||||
16-R.ma.Ib|this.u;q=this.b&R.Le?0:2;z(this)&&D(this,this.type+": "+d+"("+g+":"+k+":"+l+") "+E(n)+"--"+E(n+(m<<1)),!0,!0);if(g>=f.Z){this.i|=S.Cc;break}if(l>=f.ea){this.i|=S.Dc;break}a=b.call(this,f,g,k,l,m,n,q,c>=$i.sd,this.Ue.bind(this));break;case $i.Ic:g=(this.j&Yi.ac)>>Yi.ma.ac;z(this)&&D(this,this.type+": SEEK("+g+")",!0);g<f.Z?this.b|=R.pd:this.i|=S.Cc;break;case $i.Fe:z(this)&&D(this,this.type+": DRESET("+e+")");this.i=this.j=0;this.b=R.$a|R.pd;break;default:z(this)&&D(this,this.type+": UNSUPPORTED("+
|
||||
c+")")}this.G=f.status|(f.da?Xi.Fa:0)|e<<Xi.ma.gd|this.j&Xi.jf;Zi(this);a&&(this.b&=~R.cc,this.b|=R.$a,this.b&R.Hb&&hd(this.f,this.Qa))}};h.xg=function(){return this.w};h.Kh=function(a){this.w=a};h.rg=function(){return this.u};h.Eh=function(a){this.u=a};h.tg=function(){return this.j};h.Gh=function(a){this.j=a};h.ug=function(){return this.C};h.Hh=function(a){this.C=a};
|
||||
var Xi=Hb.Fc,S=Hb.Xe,R=Hb.Ve,Yi=Hb.We,$i=Hb.wa,aj={},Wi=(aj[65280]=[null,null,N.prototype.vg,N.prototype.Ih,"RKDS"],aj[65282]=[null,null,N.prototype.wg,N.prototype.Jh,"RKER"],aj[65284]=[null,null,N.prototype.sg,N.prototype.Fh,"RKCS"],aj[65286]=[null,null,N.prototype.xg,N.prototype.Kh,"RKWC"],aj[65288]=[null,null,N.prototype.rg,N.prototype.Eh,"RKBA"],aj[65290]=[null,null,N.prototype.tg,N.prototype.Gh,"RKDA"],aj[65294]=[null,null,N.prototype.ug,N.prototype.Hh,"RKDB"],aj);
|
||||
function xd(a){mi.call(this,"RL11",a,131072,Ib,Ib.Ye,bj);this.b=this.C=this.i=this.j=this.w=this.u=0}p(xd,mi);h=xd.prototype;h.Sb=function(a){a||(a=[U.Fa|U.$a,0,0,0,0,0]);a=ia(a);this.b=a.next().value;this.C=a.next().value;this.i=a.next().value;this.j=a.next().value;this.w=a.next().value;this.u=a.next().value;return!0};h.Oc=function(){return[this.b,this.C,this.i,this.j,this.w,this.u]};
|
||||
h.Tb=function(a,b,c,d,e,f,g,k,l){g=0;a=a.da;k=null;var m;a||(g=cj.ab,e=0);for(;e;){if(!k){k=a.seek(b,c,d+1);if(!k){g=cj.ab;break}m=0}var n,q;if(0>(n=a.read(k,m++))||0>(q=a.read(k,m++))){g=cj.ab;break}sc(this.D,Je(this.f,f),n|q<<8);if(fd(this.D)){g=cj.dc;break}f+=2;e--;if(m>=a.ua&&(k=null,++d>=a.ea&&(d=0,++c>=a.ja&&(c=0,++b>=a.Z)))){g=cj.ab;break}}return l?l(g,b,c,d,e,f):g};
|
||||
h.Rc=function(a,b,c,d,e,f,g,k,l){g=0;a=a.da;k=null;var m;a||(g=cj.ab,e=0);for(;e;){var n=uc(this.D,Je(this.f,f));if(fd(this.D)){g=cj.dc;break}f+=2;e--;if(!k){k=a.seek(b,c,d+1,!0);if(!k){g=cj.ab;break}m=0}if(!a.write(k,m++,n&255)||!a.write(k,m++,n>>8)){g=cj.ab;break}if(m>=a.ua&&(k=null,++d>=a.ea&&(d=0,++c>=a.ja&&(c=0,++b>=a.Z)))){g=cj.ab;break}}return l?l(g,b,c,d,e,f):g};
|
||||
h.Ze=function(a,b,c,d,e,f){this.C=f&65535;this.b=this.b&~U.Za|f>>16-U.ma.Za&U.Za;this.u=f>>16&dj.bb;this.j=this.i=b<<ej.ma.fc|(c?ej.Hc:0)|d&ej.Xd;this.w=65536-e&65535;a&&(this.b=this.b|a|U.jb);return!0};h.Ag=function(){return this.b&U.ec};
|
||||
h.Nh=function(a){this.b=this.b&~U.Sa|a&U.Sa;this.u=this.u&60|(a&U.Za)>>U.ma.Za;if(!(this.b&U.$a)){a=!0;var b,c="",d=this.g[(this.b&U.tb)>>U.ma.tb],e=d.da,f,g,k;this.b&=~U.Fa;switch(this.b&U.wa){case fj.pf:this.w&gj.Nd&&(this.b&=U.Fa|U.wa|U.Za);this.w=d.status|this.j&ej.Hc|(e&&512==e.Z?gj.Ie:0);break;case fj.Ic:(this.i&ej.He)==ej.lf&&(b=this.i&ej.fc,c=(this.i&ej.nf)<<2,this.j=this.i&ej.mf?this.j+b:this.j-b,this.i=this.j=this.j&ej.fc|c);break;case fj.Te:this.w=this.j;break;case fj.Qe:c="READ",b=this.Tb;
|
||||
case fj.rf:c||(c="WRITE"),b||(b=this.Rc),f=this.i>>ej.ma.fc,g=this.i&ej.Hc?1:0,k=this.i&ej.Xd,!e||f>=e.Z||k>=e.ea?this.b=this.b|cj.ab|U.jb:(a=65536-this.w&65535,e=(this.u&dj.bb)<<16|this.C,z(this)&&D(this,this.type+": "+c+"("+f+":"+g+":"+k+") "+E(e)+"--"+E(e+(a<<1)),!0,!0),a=b.call(this,d,f,g,k,a,e,2,!1,this.Ze.bind(this)))}a&&(this.b=this.b|U.Fa|U.$a,this.b&U.Hb&&hd(this.f,this.Qa))}};h.yg=function(){return this.C};h.Lh=function(a){this.C=a&hj.Sa};h.Bg=function(){return this.i};
|
||||
h.Oh=function(a){this.i=a};h.Cg=function(){return this.w};h.Ph=function(a){this.w=a};h.zg=function(){return this.u};h.Mh=function(a){this.u=a&dj.bb;this.b=this.b&~U.Za|(this.u&3)<<U.ma.Za};
|
||||
var U=Ib.bf,hj=Ib.$e,ej=Ib.cf,gj=Ib.Gc,dj=Ib.af,cj=Ib.Md,fj=Ib.wa,ij={},bj=(ij[63744]=[null,null,xd.prototype.Ag,xd.prototype.Nh,"RLCS"],ij[63746]=[null,null,xd.prototype.yg,xd.prototype.Lh,"RLBA"],ij[63748]=[null,null,xd.prototype.Bg,xd.prototype.Oh,"RLDA"],ij[63750]=[null,null,xd.prototype.Cg,xd.prototype.Ph,"RLMP"],ij[63752]=[null,null,xd.prototype.zg,xd.prototype.Mh,"RLBE"],ij);
|
||||
function yd(a){mi.call(this,"RX11",a,262144,Jb,Jb.df,jj);this.I=this.G=this.i=this.L=this.b=this.C=0;this.j=V.Jb;this.u=0;this.w=Array(128).fill(0)}p(yd,mi);h=yd.prototype;h.Sb=function(a){a?(a=ia(a),this.b=a.next().value,this.C=a.next().value,this.I=a.next().value,this.G=a.next().value,this.i=a.next().value,this.L=a.next().value,this.j=a.next().value,this.u=a.next().value,this.w=a.next().value):(this.C=this.b=0,this.G=this.I=1,this.L=this.i=0,this.j=V.ub,this.u=0,nd(this.f,this.Qa),kj(this));return!0};
|
||||
h.Oc=function(){return[this.b,this.C,this.I,this.G,this.i,this.L,this.j,this.u,this.w]};function lj(a,b){b&&(a.L=b,a.C=a.i,a.b|=W.jb);a.j=V.Jb;a.b|=W.DONE;a.b&W.Hb&&hd(a.f,a.Qa)}
|
||||
h.Tb=function(a,b,c,d,e,f,g,k,l){k=0;var m=a.da,n=null,q;z(this)&&D(this,this.type+".readData("+b+":"+c+":"+d+") "+E(f)+"--"+E(f+(e<<1)),!0,!0);m||(k=a.hc?mj.dd:mj.cd,e=0);for(;e;){if(!n){if(b>=m.Z){k=mj.Ne;break}n=m.seek(b,c,d+1);if(!n){k=mj.md;break}q=0;++d>=m.ea&&(d=0,++c>=m.ja&&(c=0,++b))}var t;if(0>(a=m.read(n,q++))||0>(t=m.read(n,q++))){k=mj.ld;break}sc(this.D,Je(this.f,f),a|t<<8);q>=m.ua&&(n=null);f+=g;e--}return l?l(k,b,c,d,e,f):k};
|
||||
function kj(a){var b=0,c=a.b&W.qd?1:0,d=a.g[c],d=d&&d.da,e=a.I&nj.bb,f=a.G&oj.bb;a.i&=~(pj.Id|pj.Td|pj.bc|pj.Fa);if(d)if(a.i|=pj.Fa,z(a)&&D(a,a.type+".readSector("+e+":0:"+f+")",!0,!0),c=d.seek(e,0,f,!0)){e=0;for(f=a.w.length;e<f;){var g=d.read(c,e);if(0>g){b=mj.ld;break}a.w[e++]=g}c.zf&&(a.i|=pj.bc)}else b=mj.md;else b=c?mj.dd:mj.cd;lj(a,b)}
|
||||
h.Eg=function(a,b){a=this.b;if(!b)switch(a&=W.ec,this.j){case V.Zc:case V.EMPTY:this.u<this.w.length&&(this.b|=W.fb);break;case V.ub:case V.gc:case V.Jc:2>this.u&&(this.b|=W.fb)}return a};
|
||||
h.Rh=function(a){this.b=this.b&~W.Sa|a&W.Sa;if(this.b&W.INIT)this.Sb();else if(this.b&W.cc&&this.j==V.Jb)switch(this.j=this.b&W.wa,this.b&=~(W.cc|W.fb|W.DONE|W.jb),nd(this.f,this.Qa),z(this)&&D(this,this.type+".processCommand("+qj[this.j>>1]+")",!0,!0),this.j){case V.Zc:case V.EMPTY:case V.ub:case V.gc:case V.Jc:this.u=0;break;case V.Se:a=this.g[this.b&W.qd?1:0];this.i&=~pj.Fa;a&&a.da&&(this.i|=pj.Fa);this.C=this.i;lj(this);break;case V.Re:this.C=this.L,lj(this)}else this.b&W.Hb?this.b&W.DONE&&hd(this.f,
|
||||
this.Qa):nd(this.f,this.Qa)};h.Fg=function(a,b){if(!b)switch(this.j){case V.EMPTY:this.b&W.fb&&(this.b&=~W.fb,this.C=this.w[this.u]&255,z(this)&&D(this,this.type+".readByte("+this.u+"): "+F(this.C,2,!0),!0,!0),++this.u>=this.w.length&&lj(this))}return this.C};
|
||||
h.Sh=function(a){switch(this.j){case V.Zc:this.b&W.fb&&(this.b&=~W.fb,this.w[this.u]=a&255,z(this)&&D(this,this.type+".writeByte("+this.u+","+F(a,2,!0)+")",!0,!0),++this.u>=this.w.length&&lj(this));break;case V.ub:case V.gc:case V.Jc:if(this.b&W.fb)switch(this.b&=~W.fb,this.u++){case 0:this.G=a;break;case 1:if(this.I=a,this.j==V.ub)kj(this);else{var b=this.j==V.Jc,c=0,d=this.b&W.qd?1:0,e=this.g[d],e=e&&e.da,f=this.I&nj.bb,g=this.G&oj.bb;this.i&=~(pj.Id|pj.Td|pj.bc|pj.Fa);if(e)if(this.i|=pj.Fa,z(this)&&
|
||||
D(this,this.type+".writeSector("+f+":0:"+g+")",!0,!0),d=e.seek(f,0,g,!0))for(b&&(d.zf=!0),b=0,f=this.w.length;b<f;){if(!e.write(d,b,this.w[b]&255)){c=mj.ld;break}b++}else c=mj.md;else c=d?mj.dd:mj.cd;lj(this,c)}}}this.C=a};var W=Jb.ef,nj=Jb.hf,oj=Jb.gf,pj=Jb.ff,V=Jb.wa,mj=Jb.ERROR,qj="FILL EMPTY WRITE READ UNUSED RDSTAT WRDEL RDERR".split(" "),rj={},jj=(rj[65144]=[null,null,yd.prototype.Eg,yd.prototype.Rh,"RXCS"],rj[65146]=[null,null,yd.prototype.Fg,yd.prototype.Sh,"RXDB"],rj);
|
||||
function oi(a,b,c){var d=!1;if(0<=b&&b<a.g.length){var e=a.g[b],f=a.H.listDisks;a=a.H.listDrives;if(f&&a&&f.options&&a.options){if(c)for(c=0;c<a.options.length;c++)if(Ea(a.options[c].value,10)==e.Tb){a.selectedIndex!=c&&(a.selectedIndex=c);d=!0;break}c=Ea(a.value,10);e=e.Pb?si:e.Oa;if(!isNaN(c)&&c==b){for(c=0;c<f.options.length;c++)if(f.options[c].value==e){f.selectedIndex!=c&&(f.selectedIndex=c);d=!0;break}c==f.options.length&&(f.selectedIndex=0)}}}return d}
|
||||
h.bh=function(a){var b=this.H.listDrives;if(b&&b.options)for(var c=b.options.length,d=0;d<c;d++)if(b.options[d].innerHTML==a){var e=Ea(b.options[d].value,10);if(0<=e)return oi(this,e,!0)}return!1};function Pi(a,b,c){var d=a.g[b];if(d.da||!1===c)Vi(a,d.Oa,d.da),d.Ya="",d.Oa="",d.da=null,d.Pb=!1,c||(a.T("Drive "+(a.g[b].Nc||"---")+" unloaded",c),oi(a,b))}function Ui(a,b,c,d){var e;for(e=0;e<a.B.length;e++)if(a.B[e][1]==c){d.restore(a.B[e][2]);return}a.B[e]=[b,c,[]]}
|
||||
function Vi(a,b,c){var d;for(d=0;d<a.B.length;d++)if(a.B[d][1]==b){a.B[d][2]=c.save();break}}h.se=function(){};h.Ub=function(){return-1};h.Rc=function(){return-1};var ri="",si="?",ti="??";function N(a){mi.call(this,"RK11",a,65536,Hb,Hb.Ec,Wi);this.G=this.i=this.b=this.w=this.u=this.j=this.C=0}p(N,mi);h=N.prototype;
|
||||
h.Db=function(a){a||(a=[Xi.Ec|Xi.$d|Xi.Wd,0,R.$a,0,0,0,0]);a=ia(a);this.G=a.next().value;this.i=a.next().value;this.b=a.next().value;this.w=a.next().value;this.u=a.next().value;this.j=a.next().value;this.C=a.next().value;return!0};h.Oc=function(){return[this.G,this.i,this.b,this.w,this.u,this.j,this.C]};
|
||||
h.Ub=function(a,b,c,d,e,f,g,k,l){var m=0;a=a.da;var n=null,q;a||(m=S.Qd,e=0);for(;e;){if(!n){if(b>=a.Z){m=S.Cc;break}n=a.seek(b,c,d+1);if(!n){m=S.Zd;break}q=0;++d>=a.ea&&(d=0,++c>=a.ja&&(c=0,++b))}var t,u;if(0>(t=a.read(n,q++))||0>(u=a.read(n,q++))){m=S.Dc;break}if(!k&&(sc(this.D,Je(this.f,f),t|u<<8),fd(this.D))){m=S.ec;break}q>=a.ua&&(n=null);f+=g;e--}return l?l(m,b,c,d,e,f):m};
|
||||
h.Rc=function(a,b,c,d,e,f,g,k,l){var m=0;a=a.da;var n=null,q;a||(m=S.Qd,e=0);for(;e;){var t=uc(this.D,Je(this.f,f));if(fd(this.D)){m=S.ec;break}if(!n){if(b>=a.Z){m=S.Cc;break}n=a.seek(b,c,d+1,!0);if(!n){m=S.Zd;break}q=0;++d>=a.ea&&(d=0,++c>=a.ja&&(c=0,++b))}if(k){var u,C;if(0>(u=a.read(n,q++))||0>(C=a.read(n,q++))){m=S.Dc;break}if(t!=(u|C<<8)){m=S.ce;break}}else if(!a.write(n,q++,t&255)||!a.write(n,q++,t>>8)){m=S.Dc;break}q>=a.ua&&(n=null);f+=g;e--}return l?l(m,b,c,d,e,f):m};
|
||||
h.Ve=function(a,b,c,d,e,f){this.u=f&65535;this.b=this.b&~R.Jb|f>>16-R.ma.Jb&R.Jb;this.w=65536-e&65535;this.j=this.j&~Yi.od|d&Yi.od;this.i|=a;Zi(this);return!0};function Zi(a){a.b&=~R.jb;a.i&&(a.i|=S.Fe,a.b|=R.jb,a.i&S.bd&&(a.b|=R.bd),z(a)&&D(a,a.type+": ERROR: "+E(a.i)))}h.wg=function(){return this.G};h.Jh=function(){};h.xg=function(){return this.i};h.Kh=function(){};h.tg=function(){return this.b&R.fc};
|
||||
h.Gh=function(a){this.b=this.b&~R.Sa|a&R.Sa;if(this.b&R.dc){a=!0;var b,c,d="",e=(this.j&Yi.tb)>>Yi.ma.tb,f=this.g[e],g,k,l,m,n,q;this.b&=~(R.$a|R.pd);this.i&=~S.lf;switch(c=this.b&R.wa){case $i.Ae:z(this)&&D(this,this.type+": CRESET("+e+")",!0);this.i=this.j=0;this.b=R.$a;break;case $i.Qe:d="RCHK";case $i.ub:d||(d="READ"),b=this.Ub;case $i.sd:d||(d="WCHK");case $i.hc:d||(d="WRITE");b||(b=this.Rc);g=(this.j&Yi.bc)>>Yi.ma.bc;k=(this.j&Yi.ed)>>Yi.ma.ed;l=this.j&Yi.od;m=65536-this.w&65535;n=(this.b&R.Jb)<<
|
||||
16-R.ma.Jb|this.u;q=this.b&R.Me?0:2;z(this)&&D(this,this.type+": "+d+"("+g+":"+k+":"+l+") "+E(n)+"--"+E(n+(m<<1)),!0,!0);if(g>=f.Z){this.i|=S.Cc;break}if(l>=f.ea){this.i|=S.Dc;break}a=b.call(this,f,g,k,l,m,n,q,c>=$i.sd,this.Ve.bind(this));break;case $i.Ic:g=(this.j&Yi.bc)>>Yi.ma.bc;z(this)&&D(this,this.type+": SEEK("+g+")",!0);g<f.Z?this.b|=R.pd:this.i|=S.Cc;break;case $i.Ge:z(this)&&D(this,this.type+": DRESET("+e+")");this.i=this.j=0;this.b=R.$a|R.pd;break;default:z(this)&&D(this,this.type+": UNSUPPORTED("+
|
||||
c+")")}this.G=f.status|(f.da?Xi.Fa:0)|e<<Xi.ma.gd|this.j&Xi.kf;Zi(this);a&&(this.b&=~R.dc,this.b|=R.$a,this.b&R.Ib&&hd(this.f,this.Qa))}};h.yg=function(){return this.w};h.Lh=function(a){this.w=a};h.sg=function(){return this.u};h.Fh=function(a){this.u=a};h.ug=function(){return this.j};h.Hh=function(a){this.j=a};h.vg=function(){return this.C};h.Ih=function(a){this.C=a};
|
||||
var Xi=Hb.Fc,S=Hb.Ye,R=Hb.We,Yi=Hb.Xe,$i=Hb.wa,aj={},Wi=(aj[65280]=[null,null,N.prototype.wg,N.prototype.Jh,"RKDS"],aj[65282]=[null,null,N.prototype.xg,N.prototype.Kh,"RKER"],aj[65284]=[null,null,N.prototype.tg,N.prototype.Gh,"RKCS"],aj[65286]=[null,null,N.prototype.yg,N.prototype.Lh,"RKWC"],aj[65288]=[null,null,N.prototype.sg,N.prototype.Fh,"RKBA"],aj[65290]=[null,null,N.prototype.ug,N.prototype.Hh,"RKDA"],aj[65294]=[null,null,N.prototype.vg,N.prototype.Ih,"RKDB"],aj);
|
||||
function xd(a){mi.call(this,"RL11",a,131072,Ib,Ib.Ze,bj);this.b=this.C=this.i=this.j=this.w=this.u=0}p(xd,mi);h=xd.prototype;h.Db=function(a){a||(a=[U.Fa|U.$a,0,0,0,0,0]);a=ia(a);this.b=a.next().value;this.C=a.next().value;this.i=a.next().value;this.j=a.next().value;this.w=a.next().value;this.u=a.next().value;return!0};h.Oc=function(){return[this.b,this.C,this.i,this.j,this.w,this.u]};
|
||||
h.Ub=function(a,b,c,d,e,f,g,k,l){g=0;a=a.da;k=null;var m;a||(g=cj.ab,e=0);for(;e;){if(!k){k=a.seek(b,c,d+1);if(!k){g=cj.ab;break}m=0}var n,q;if(0>(n=a.read(k,m++))||0>(q=a.read(k,m++))){g=cj.ab;break}sc(this.D,Je(this.f,f),n|q<<8);if(fd(this.D)){g=cj.ec;break}f+=2;e--;if(m>=a.ua&&(k=null,++d>=a.ea&&(d=0,++c>=a.ja&&(c=0,++b>=a.Z)))){g=cj.ab;break}}return l?l(g,b,c,d,e,f):g};
|
||||
h.Rc=function(a,b,c,d,e,f,g,k,l){g=0;a=a.da;k=null;var m;a||(g=cj.ab,e=0);for(;e;){var n=uc(this.D,Je(this.f,f));if(fd(this.D)){g=cj.ec;break}f+=2;e--;if(!k){k=a.seek(b,c,d+1,!0);if(!k){g=cj.ab;break}m=0}if(!a.write(k,m++,n&255)||!a.write(k,m++,n>>8)){g=cj.ab;break}if(m>=a.ua&&(k=null,++d>=a.ea&&(d=0,++c>=a.ja&&(c=0,++b>=a.Z)))){g=cj.ab;break}}return l?l(g,b,c,d,e,f):g};
|
||||
h.$e=function(a,b,c,d,e,f){this.C=f&65535;this.b=this.b&~U.Za|f>>16-U.ma.Za&U.Za;this.u=f>>16&dj.bb;this.j=this.i=b<<ej.ma.gc|(c?ej.Hc:0)|d&ej.Xd;this.w=65536-e&65535;a&&(this.b=this.b|a|U.jb);return!0};h.Bg=function(){return this.b&U.fc};
|
||||
h.Oh=function(a){this.b=this.b&~U.Sa|a&U.Sa;this.u=this.u&60|(a&U.Za)>>U.ma.Za;if(!(this.b&U.$a)){a=!0;var b,c="",d=this.g[(this.b&U.tb)>>U.ma.tb],e=d.da,f,g,k;this.b&=~U.Fa;switch(this.b&U.wa){case fj.qf:this.w&gj.Nd&&(this.b&=U.Fa|U.wa|U.Za);this.w=d.status|this.j&ej.Hc|(e&&512==e.Z?gj.Je:0);break;case fj.Ic:(this.i&ej.Ie)==ej.mf&&(b=this.i&ej.gc,c=(this.i&ej.pf)<<2,this.j=this.i&ej.nf?this.j+b:this.j-b,this.i=this.j=this.j&ej.gc|c);break;case fj.Ue:this.w=this.j;break;case fj.Re:c="READ",b=this.Ub;
|
||||
case fj.sf:c||(c="WRITE"),b||(b=this.Rc),f=this.i>>ej.ma.gc,g=this.i&ej.Hc?1:0,k=this.i&ej.Xd,!e||f>=e.Z||k>=e.ea?this.b=this.b|cj.ab|U.jb:(a=65536-this.w&65535,e=(this.u&dj.bb)<<16|this.C,z(this)&&D(this,this.type+": "+c+"("+f+":"+g+":"+k+") "+E(e)+"--"+E(e+(a<<1)),!0,!0),a=b.call(this,d,f,g,k,a,e,2,!1,this.$e.bind(this)))}a&&(this.b=this.b|U.Fa|U.$a,this.b&U.Ib&&hd(this.f,this.Qa))}};h.zg=function(){return this.C};h.Mh=function(a){this.C=a&hj.Sa};h.Cg=function(){return this.i};
|
||||
h.Ph=function(a){this.i=a};h.Dg=function(){return this.w};h.Qh=function(a){this.w=a};h.Ag=function(){return this.u};h.Nh=function(a){this.u=a&dj.bb;this.b=this.b&~U.Za|(this.u&3)<<U.ma.Za};
|
||||
var U=Ib.cf,hj=Ib.af,ej=Ib.df,gj=Ib.Gc,dj=Ib.bf,cj=Ib.Md,fj=Ib.wa,ij={},bj=(ij[63744]=[null,null,xd.prototype.Bg,xd.prototype.Oh,"RLCS"],ij[63746]=[null,null,xd.prototype.zg,xd.prototype.Mh,"RLBA"],ij[63748]=[null,null,xd.prototype.Cg,xd.prototype.Ph,"RLDA"],ij[63750]=[null,null,xd.prototype.Dg,xd.prototype.Qh,"RLMP"],ij[63752]=[null,null,xd.prototype.Ag,xd.prototype.Nh,"RLBE"],ij);
|
||||
function yd(a){mi.call(this,"RX11",a,262144,Jb,Jb.ef,jj);this.I=this.G=this.i=this.L=this.b=this.C=0;this.j=V.Kb;this.u=0;this.w=Array(128).fill(0)}p(yd,mi);h=yd.prototype;h.Db=function(a){a?(a=ia(a),this.b=a.next().value,this.C=a.next().value,this.I=a.next().value,this.G=a.next().value,this.i=a.next().value,this.L=a.next().value,this.j=a.next().value,this.u=a.next().value,this.w=a.next().value):(this.C=this.b=0,this.G=this.I=1,this.L=this.i=0,this.j=V.ub,this.u=0,nd(this.f,this.Qa),kj(this));return!0};
|
||||
h.Oc=function(){return[this.b,this.C,this.I,this.G,this.i,this.L,this.j,this.u,this.w]};h.se=function(a){a||this.Db()};function lj(a,b){b&&(a.L=b,a.C=a.i,a.b|=W.jb);a.j=V.Kb;a.b|=W.DONE;a.b&W.Ib&&hd(a.f,a.Qa)}
|
||||
h.Ub=function(a,b,c,d,e,f,g,k,l){k=0;var m=a.da,n=null,q;z(this)&&D(this,this.type+".readData("+b+":"+c+":"+d+") "+E(f)+"--"+E(f+(e<<1)),!0,!0);m||(k=a.Tb?mj.dd:mj.cd,e=0);for(;e;){if(!n){if(b>=m.Z){k=mj.Oe;break}n=m.seek(b,c,d+1);if(!n){k=mj.md;break}q=0;++d>=m.ea&&(d=0,++c>=m.ja&&(c=0,++b))}var t;if(0>(a=m.read(n,q++))||0>(t=m.read(n,q++))){k=mj.ld;break}sc(this.D,Je(this.f,f),a|t<<8);q>=m.ua&&(n=null);f+=g;e--}return l?l(k,b,c,d,e,f):k};
|
||||
function kj(a){var b=0,c=a.b&W.qd?1:0,d=a.g[c],d=d&&d.da,e=a.I&nj.bb,f=a.G&oj.bb;a.i&=~(pj.Id|pj.Td|pj.cc|pj.Fa);if(d)if(a.i|=pj.Fa,z(a)&&D(a,a.type+".readSector("+e+":0:"+f+")",!0,!0),c=d.seek(e,0,f,!0)){e=0;for(f=a.w.length;e<f;){var g=d.read(c,e);if(0>g){b=mj.ld;break}a.w[e++]=g}c.Af&&(a.i|=pj.cc)}else b=mj.md;else b=c?mj.dd:mj.cd;lj(a,b)}
|
||||
h.Fg=function(a,b){a=this.b;if(!b)switch(a&=W.fc,this.j){case V.Zc:case V.EMPTY:this.u<this.w.length&&(this.b|=W.fb);break;case V.ub:case V.hc:case V.Jc:2>this.u&&(this.b|=W.fb)}return a};
|
||||
h.Sh=function(a){this.b=this.b&~W.Sa|a&W.Sa;if(this.b&W.INIT)this.Db();else if(this.b&W.dc&&this.j==V.Kb)switch(this.j=this.b&W.wa,this.b&=~(W.dc|W.fb|W.DONE|W.jb),nd(this.f,this.Qa),z(this)&&D(this,this.type+".processCommand("+qj[this.j>>1]+")",!0,!0),this.j){case V.Zc:case V.EMPTY:case V.ub:case V.hc:case V.Jc:this.u=0;break;case V.Te:a=this.g[this.b&W.qd?1:0];this.i&=~pj.Fa;a&&a.da&&(this.i|=pj.Fa);this.C=this.i;lj(this);break;case V.Se:this.C=this.L,lj(this)}else this.b&W.Ib?this.b&W.DONE&&hd(this.f,
|
||||
this.Qa):nd(this.f,this.Qa)};h.Gg=function(a,b){if(!b)switch(this.j){case V.EMPTY:this.b&W.fb&&(this.b&=~W.fb,this.C=this.w[this.u]&255,z(this)&&D(this,this.type+".readByte("+this.u+"): "+F(this.C,2,!0),!0,!0),++this.u>=this.w.length&&lj(this))}return this.C};
|
||||
h.Th=function(a){switch(this.j){case V.Zc:this.b&W.fb&&(this.b&=~W.fb,this.w[this.u]=a&255,z(this)&&D(this,this.type+".writeByte("+this.u+","+F(a,2,!0)+")",!0,!0),++this.u>=this.w.length&&lj(this));break;case V.ub:case V.hc:case V.Jc:if(this.b&W.fb)switch(this.b&=~W.fb,this.u++){case 0:this.G=a;break;case 1:if(this.I=a,this.j==V.ub)kj(this);else{var b=this.j==V.Jc,c=0,d=this.b&W.qd?1:0,e=this.g[d],e=e&&e.da,f=this.I&nj.bb,g=this.G&oj.bb;this.i&=~(pj.Id|pj.Td|pj.cc|pj.Fa);if(e)if(this.i|=pj.Fa,z(this)&&
|
||||
D(this,this.type+".writeSector("+f+":0:"+g+")",!0,!0),d=e.seek(f,0,g,!0))for(b&&(d.Af=!0),b=0,f=this.w.length;b<f;){if(!e.write(d,b,this.w[b]&255)){c=mj.ld;break}b++}else c=mj.md;else c=d?mj.dd:mj.cd;lj(this,c)}}}this.C=a};var W=Jb.ff,nj=Jb.jf,oj=Jb.hf,pj=Jb.gf,V=Jb.wa,mj=Jb.ERROR,qj="FILL EMPTY WRITE READ UNUSED RDSTAT WRDEL RDERR".split(" "),rj={},jj=(rj[65144]=[null,null,yd.prototype.Fg,yd.prototype.Sh,"RXCS"],rj[65146]=[null,null,yd.prototype.Gg,yd.prototype.Th,"RXDB"],rj);
|
||||
function sj(a){r.call(this,"Debugger",a);this.Ba=+a.base||16;this.ia=!1;this.w=0;this.O=!1;this.u=-1;this.j=[];this.S={}}p(sj,r);sj.prototype.me=function(){return-1};sj.prototype.ne=function(){};
|
||||
function tj(a,b,c,d){if(c)if(b){0>a.u&&a.j.length&&(a.u=0);if(0>a.u||b!=a.j[a.u])a.j.splice(0,0,b),a.u=0;a.u--}else a.O?b="end":b=a.j[a.u+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(Pa(b.substring(c,f))),c=f+1}}return a}
|
||||
function uj(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<<e;break;case ">>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f<e?1:0;break;case "<=":d=f<=e?1:0;break;case ">":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break;
|
||||
|
|
@ -292,10 +292,10 @@ function Aj(a,b){if(b)return zj(a,b,a.S[b]);var c=0;for(b in a.S)zj(a,b,a.S[b]),
|
|||
function Bj(a){sj.call(this,a);this.Ga=!1;this.ia=!0;this.G=X();this.xa=X();this.N=X();this.B=[];this.g=this.L=this.C=[];Cj(this);this.P=this.Y=0;this.i=[];this.pa=void 0;Dj(this);this.F=this;this.ka={};this.ha=this.ge=0;this.R=null;this.M=[];Ej(this,a.messages);this.ta=a.commands;this.Ja=Fj;this.W=[];this.I=0;this.Ka=this.qa=null;this.w=this.Ia=this.Ha=this.X=this.la=0;this.b=this.U=null;var b=this;window?void 0===window[w]&&(window[w]=function(a){return fe(b,a)}):void 0===global[w]&&(global[w]=
|
||||
function(a){return fe(b,a)})}p(Bj,sj);function Gj(a){a=a&&a.J;null==a&&(a=-1);return a}function X(a,b,c){return{J:void 0===a?null:a,Ma:void 0===b?!1:b,Ua:!1,Ba:c}}h=Bj.prototype;h.Cd=function(a,b){a.J=b;a.Ua=!1;a.Ba=void 0;return a};function Hj(a){return[a.J,a.Ma,a.Ba,a.Ua,a.Mc]}function Ij(a,b){var c=X(b[0],b[1],b[2]);c.Ua=b[3];b[4]&&(c.de=tj(a,c.Mc=b[4]));return c}
|
||||
h.Aa=function(a,b,c,d){this.D=b;this.K=a;this.f=c;this.b=a.i;(a=Td(a,"messages"))&&Ej(this,a);1140>this.f.ka&&(this.W=this.W.concat(Jj));1145>this.f.ka&&(this.W=this.W.concat(Kj));ld(this,16,function(a){a:{var b=d.D.b,c=a[0],e=a=0,l=b.length;if(c){a=Gj(Lj(d,c));if(-1===a){d.v("invalid address: "+c);break a}e=a>>>d.D.g;l=1}d.v("blockid physical blockaddr used size type");d.v("-------- --------- --------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.v("..."):
|
||||
(c=n.type,m=Yc[c],n&&d.v(F(n.id,8)+" %"+F(e<<d.D.g,8)+" %"+F(n.J,8)+" "+Ha(n.Wb)+" "+Ha(n.size)+" "+m),c!=Ad&&(c=-1),m=0);a+=d.D.j;e++}}});y(this)};
|
||||
(c=n.type,m=Yc[c],n&&d.v(F(n.id,8)+" %"+F(e<<d.D.g,8)+" %"+F(n.J,8)+" "+Ha(n.Xb)+" "+Ha(n.size)+" "+m),c!=Ad&&(c=-1),m=0);a+=d.D.j;e++}}});y(this)};
|
||||
h.va=function(a,b,c){var d=this;switch(b){case "debugInput":return this.U=this.H[b]=c,c.onkeydown=function(a){var b;if(13==a.keyCode)b=c.value,c.value="",fe(d,b,!0);else if(27==a.keyCode)c.value=b="";else if(38==a.keyCode?(b=null,d.u<d.j.length-1&&(b=d.j[++d.u])):40==a.keyCode&&(0<d.u?b=d.j[--d.u]:(b="",d.u=-1)),null!=b){var e=b.length;c.value=b;c.setSelectionRange(e,e)}null!=b&&a.preventDefault&&a.preventDefault()},!0;case "debugEnter":return this.H[b]=c,hb(c,function(){if(d.U){var a=d.U.value;d.U.value=
|
||||
"";fe(d,a,!0);return!0}return!1}),!0;case "step":return this.H[b]=c,hb(c,function(a){var b=!1;Ba(d,!0)||(Da(d,!0),b=nc(d,a?1:0,null),Da(d,!1));return b}),!0}return!1};function ee(a){if(a.U){var b=0,c=0;window&&(b=window.scrollX,c=window.scrollY);a.U.focus();window&&window.scrollTo(b,c)}}h.Kd=function(a,b){var c=255,d=Gj(a);-1!==d&&(a.Ma||65535<d?(c=this.D,d=Je(this.f,d),c.C=!1,c.na++,d=$c(c,d).K(d&c.i,d),c.na--):(c=this.f,c.pa++,d=c.D.Gd(tc(c,d,3)),c.pa--),c=d,b&&Mj(a,b));return c};
|
||||
h.Ra=function(a,b){var c=65535,d=Gj(a);-1!==d&&(c=a.Ma||65535<d?uc(this.D,Je(this.f,d)):vc(this.f,d),b&&Mj(a,b));return c};h.Ld=function(a,b,c){var d=Gj(a);if(-1!==d){if(a.Ma||65535<d)ad(this.D,Je(this.f,d),b);else{var e=this.f;e.pa++;e.D.Hd(tc(e,d,5),b);e.pa--}c&&Mj(a,c);H(this.K,-1)}};h.Ge=function(a,b,c){var d=Gj(a);if(-1!==d){if(a.Ma||65535<d)sc(this.D,Je(this.f,d),b);else{var e=this.f;e.pa++;e.D.$b(tc(e,d,4),b);e.pa--}c&&Mj(a,c);H(this.K,-1)}};
|
||||
h.Ra=function(a,b){var c=65535,d=Gj(a);-1!==d&&(c=a.Ma||65535<d?uc(this.D,Je(this.f,d)):vc(this.f,d),b&&Mj(a,b));return c};h.Ld=function(a,b,c){var d=Gj(a);if(-1!==d){if(a.Ma||65535<d)ad(this.D,Je(this.f,d),b);else{var e=this.f;e.pa++;e.D.Hd(tc(e,d,5),b);e.pa--}c&&Mj(a,c);H(this.K,-1)}};h.He=function(a,b,c){var d=Gj(a);if(-1!==d){if(a.Ma||65535<d)sc(this.D,Je(this.f,d),b);else{var e=this.f;e.pa++;e.D.ac(tc(e,d,4),b);e.pa--}c&&Mj(a,c);H(this.K,-1)}};
|
||||
function Lj(a,b,c){var d;c=(c?a.G:a.xa).J;var e,f;if(void 0!==b){b=wj(a,b);"%"==b.charAt(0)&&(e=!0,b=b.substr(1));d=b;var g,k;a:{c=a.D;var l;l=d.toUpperCase();for(k in c.Pa){var m=+k;if(c.Pa[m][4]==l){k=c.B+m;break a}}k=null}if(null==k&&d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;c<a.B.length;c++)if(l=a.B[c].ga[d],null!=l){k=l.o;break}null!=k&&(g=X(k));if(d=g)return d;0<=b.indexOf("0x")?f=16:0<=b.indexOf("0o")?f=8:0<=b.indexOf(".")&&(f=10);c=vj(a,b,void 0)}null!=c&&(d=X(c,e,f));return d}
|
||||
function Nj(a,b,c){c&&(c=c.match(/(['"])(.*?)\1/))&&(b.de=tj(a,b.Mc=c[2]))}function Mj(a,b){null!=a.J&&(a.J+=b||1)}function Oj(a,b){return(b.Ma?"%":"")+J(a,b.J)}
|
||||
function Ej(a,b){a.F=a;a.ha=a.ge=536870912;a.R=null;a.M=[];b=tj(a,b.replace("keys","key").replace("kbd","keyboard"),!1,"|");if(b.length)for(var c in Lb){var d;a:if(d=void 0,Array.prototype.indexOf)d=b.indexOf(c,d);else{d=d||0;0>d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;d<e;d++)if(d in b&&b[d]===c)break a;d=-1}0<=d&&(a.ha|=Lb[c],a.v(c+" messages enabled"))}}function ld(a,b,c){for(var d in Lb)if(b==Lb[d]){a.ka[d]=c;break}}
|
||||
|
|
@ -316,11 +316,11 @@ function ik(a,b){if(void 0!==b)jk(a,b,1,a.g,!0),a.I=0;else for(b=1;b<a.g.length;
|
|||
function jk(a,b,c,d,e){var f=!1;if(!a.la++)for(var g=1;!f&&g<d.length;g++){var k=d[g];if(!e||k.Ua)for(var l=Gj(k)&(d==a.g?65535:-1),m=0;m<c;m++)if(b+m==l){var n,f=!0;k.Ua&&(kk(a,d,k,!0),e=!0);if(n=k.de){for(var f=!1,q=0;q<n.length;q++)if(!nk(a,n[q],!0)){if(n[q].indexOf("if")){f=!0;break}for(var t=q+1;t<n.length&&n[t].indexOf("else");t++)q++;if(t==n.length){f=!0;break}}a.f.A.V||(f=!0)}if(f){e||lk(a,d,g,"hit");break}}}a.la--;return f}
|
||||
function ok(a,b,c,d){var e=X(b.J),f=a.Ra(b,2),g,k;for(k in a.Ja)if(g=a.Ja[k][f&k])break;g||(g=pk);var l=g[0];0<=a.W.indexOf(l)&&(g=pk,l=g[0]);var m=k="",n=qk[l],q=g.length-1;l||q||(k=J(a,f));for(l=1;l<=q;l++){var t=g[l];if(void 0!==t){var u;u=a;var C=t,t=b,A="",B=C&rk;if(B==Y)t=t.J+((f&255)<<24>>23)&65535,A=J(u,t);else if(B==sk)t=t.J-((f&63)<<1)&65535,A=J(u,t);else if(B==tk)A=J(u,f&7,1);else if(B==uk)A=J(u,f&63,1);else if(B==vk)A=J(u,f&255,1);else if(B=f&C,C&wk&&(B>>=6,C>>=6),C&Z){var C=null,K=B&
|
||||
xk;switch(B&yk){case 0:A=Qj(K);break;case 8:A="@"+Qj(K);C=zk(u,u.f.g[K]);break;case 16:7>K?A="("+Qj(K)+")+":(B=u.Ra(t,2),A="#"+J(u,B,0,!0));break;case 24:7>K?A="@("+Qj(K)+")+":(B=u.Ra(t,2),A="@#"+J(u,B,0,!0),C=zk(u,B));break;case 32:A="-("+Qj(K)+")";break;case 40:A="@-("+Qj(K)+")";break;case 48:B=u.Ra(t,2);A=J(u,B,0,!0)+"("+Qj(K)+")";7==K&&(A=J(u,B=B+t.J&65535),C=zk(u,B));break;case 56:B=u.Ra(t,2),A="@"+J(u,B)+"("+Qj(K)+")",7==K&&(A="@"+J(u,B=B+t.J&65535),C=zk(u,vc(u.f,B)))}C&&(A=[A,C])}u=A;if(!u||
|
||||
!u.length){k="INVALID";break}"string"!=typeof u&&(m=u[1],u=u[0]);0<k.length&&(k+=",");k+=u||"???"}}f="";g=Oj(a,e)+":";if(-1!==e.J&&-1!==b.J){do if(f+=" "+J(a,a.Ra(e,2)),null==e.J)break;while(e.J!=b.J)}g+=Oa(f,24);g+=Oa(n,5);k&&(g+=" "+k);if(c||m)g=Oa(g,60)+";"+(c||""),g=a.f.A.Mb?g+("cycles="+ge(a.f).toString()+" cs="+F(a.f.nc)):g+(null!=d?"="+d.toString():""),m&&(";"!=g.slice(-1)&&(g+=" "),g+=m);return g}
|
||||
!u.length){k="INVALID";break}"string"!=typeof u&&(m=u[1],u=u[0]);0<k.length&&(k+=",");k+=u||"???"}}f="";g=Oj(a,e)+":";if(-1!==e.J&&-1!==b.J){do if(f+=" "+J(a,a.Ra(e,2)),null==e.J)break;while(e.J!=b.J)}g+=Oa(f,24);g+=Oa(n,5);k&&(g+=" "+k);if(c||m)g=Oa(g,60)+";"+(c||""),g=a.f.A.Nb?g+("cycles="+ge(a.f).toString()+" cs="+F(a.f.nc)):g+(null!=d?"="+d.toString():""),m&&(";"!=g.slice(-1)&&(g+=" "),g+=m);return g}
|
||||
function zk(a,b){b=Ke(a.f,b)[0];b>=a.f.vb&&b<a.D.B&&(b=b-a.f.vb+a.D.B);var c=a.D;a=null;b>=c.B&&(b=c.Pa[b&ed])&&(a=b[4]);return a}function Ak(a,b){switch(b){case "N":a=ze(a.f);break;case "Z":a=ye(a.f);break;case "V":a=xe(a.f);break;case "C":a=we(a.f);break;default:a=0}return b.charAt(0)+(a?"1":"0")+" "}
|
||||
function Bk(a,b){var c="",d=a.f;if(8>b)c=Qj(b),c+="="+J(a,d.g[b]);else if(13>b)c="A"+(b-8)+"="+J(a,d.qa[b-8]);else if(16<=b&&20>b)c="S"+(b-16)+"="+J(a,d.W[b-16]);else switch(b){case Rj:c="PS="+J(a,ud(d));break;case Sj:c="PI="+J(a,d.eb);break;case Tj:c="ER="+J(a,d.P);break;case Uj:c="SL="+J(a,d.xa&65280);break;case Vj:c="M0="+J(a,od(d));break;case Wj:c="M1="+J(a,qd(d));break;case Xj:c="M2="+J(a,rd(d));break;case Yj:c="M3="+J(a,d.U);break;case Zj:a.b&&(c="AR="+J(a,a.b.fa,3));break;case ak:a.b&&(c="DR="+
|
||||
J(a,a.b.Wa));break;case bk:a.b&&xc(a.b)&&(c="SR="+J(a,a.b.Xa,3))}c&&(c+=" ");return c}function Ck(a,b){var c,d="";for(c=0;6>c;c++)d+=Bk(a,c);d=d+"\n"+(Bk(a,6)+Bk(a,7));d+=Bk(a,Rj)+Bk(a,Sj)+Bk(a,Uj);d+=Ak(a,"T")+Ak(a,"N")+Ak(a,"Z")+Ak(a,"V")+Ak(a,"C");b&&(b=d,c=""+(Bk(a,Vj)+Bk(a,Wj)),c+=Bk(a,Xj)+Bk(a,Yj)+Bk(a,Tj),c=c+"\n"+(Bk(a,bk)+Bk(a,Zj)+Bk(a,ak)),d=b+("\n"+c));return d}h.he=function(a,b){return a[0]>b[0]?1:a[0]<b[0]?-1:0};
|
||||
function yh(a,b,c,d,e){var f=[],g;for(g in e){var k=e[g];"number"==typeof k&&(e[g]=k={o:k});var l=k.o,m=k.a;if(void 0!==l){var n=f,l=[l>>>0,g],q=Ra(n,l,a.he);0>q&&n.splice(-(q+1),0,l)}m&&(k.a=m.replace(/''/g,'"'))}a.B.push({wk:b,J:c,Ff:d,ga:e,ee:f})}function Dk(a,b,c){var d=[],e=Gj(b)>>>0;for(b=0;b<a.B.length;b++){var f=a.B[b],g=f.J>>>0,k=f.Ff;if(e>=g&&e<g+k){e=Ra(f.ee,[e-g],a.he);0<=e?Ek(a,b,e,d):c&&(e=~e,Ek(a,b,e-1,d),Ek(a,b,e,d));break}}return d}
|
||||
function yh(a,b,c,d,e){var f=[],g;for(g in e){var k=e[g];"number"==typeof k&&(e[g]=k={o:k});var l=k.o,m=k.a;if(void 0!==l){var n=f,l=[l>>>0,g],q=Ra(n,l,a.he);0>q&&n.splice(-(q+1),0,l)}m&&(k.a=m.replace(/''/g,'"'))}a.B.push({xk:b,J:c,Gf:d,ga:e,ee:f})}function Dk(a,b,c){var d=[],e=Gj(b)>>>0;for(b=0;b<a.B.length;b++){var f=a.B[b],g=f.J>>>0,k=f.Gf;if(e>=g&&e<g+k){e=Ra(f.ee,[e-g],a.he);0<=e?Ek(a,b,e,d):c&&(e=~e,Ek(a,b,e-1,d),Ek(a,b,e,d));break}}return d}
|
||||
function Ek(a,b,c,d){var e={},f=a.B[b].ee,g=0,k=null;0<=c&&c<f.length&&(g=f[c][0],k=f[c][1]);k&&(e=a.B[b].ga[k],k="."==k.charAt(0)?null:e.l||k);d.push(k);d.push(g);d.push(e.a);d.push(e.c)}function Fk(a,b){var c=b.match(/^\s*([A-Z_]?[A-Z0-9_]*)\s*(=?)\s*(.*)$/i);if(c){if(!c[1])return Aj(a)||a.v("no variables"),!0;if(!c[2])return Aj(a,c[1]);if(!c[3])return delete a.S[c[1]],!0;b=vj(a,c[3]);return void 0!==b?(a.S[c[1]]=b,!0):!1}a.v("invalid assignment:"+b);return!1}
|
||||
function Gk(a,b,c){var d=null;if(b=Lj(a,b,!0)){var e=Dk(a,b,!0);if(e.length){var f,g;e[0]&&(g="",(f=b.J-e[1])&&(g=" + "+Ha(f)),f=e[0]+" ("+J(a,e[1])+")"+g,c&&a.v(f),d=f);4<e.length&&e[4]&&(g="",(f=e[5]-b.J)&&(g=" - "+Ha(f)),f=e[4]+" ("+J(a,e[5])+")"+g,c&&a.v(f),d||(d=f))}else c&&a.v("no symbols")}return d}
|
||||
function gk(a,b){var c;if(b&&"?"==b[1])a.v("register commands:"),a.v("\tr\tdump registers"),a.v("\trm\tdump misc registers"),a.v("\trx [#]\tset flag or register x to [#]");else{var d=!1,e=a.f;null==c&&(c=!0);if(b&&1<b.length){var f=b[1];if("m"==f)d=!0;else{var g=f.indexOf("=");if(0<g)b=f.substr(g+1),f=f.substr(0,g);else if(2<b.length)b=b[2];else{a.v("missing value for "+b[1]);return}g=vj(a,b);if(void 0===g)return;b=f.toUpperCase();switch(b){case "SP":case "R6":e.g[6]=g&65535;break;case "PC":case "R7":ue(e,
|
||||
|
|
@ -337,13 +337,13 @@ wi(g)):a.v("no dump registered for "+Sa);break a}Sa||(ib=a.Ka||"dw")}else a.Ka=i
|
|||
il=Ca--,Ci=ok(a,Lc,"history",il);(!df.length||0<=Ci.indexOf(df[0]))&&a.v(Ci);Lc.ud&&(Ia+=Lc.ud,Kc-=Lc.ud,Ca-=Lc.ud);Ia>=Ta.length&&(Ia=0);a.pa=Ca;Ai++;Kc--}}Ai||(a.v("no "+zi+"history available"),a.pa=void 0)}else{var na=Lj(a,Sa);if(na)if("da"==ib){var ef=na.Ma||65535<na.J,O=Ke(a.f,na.J||0,ef);a.v(Oa("",ef?12:19)+Fa(na.J,ef?22:17,3)+" "+E(na.J,8));6>O.length?(2<O.length&&(a.v(" OFFSET: "+Fa(O[3],13,3)+" "+E(O[3],8)),a.v("UNIMAP["+Ga(O[1])+"]: "+Fa(O[2],22,3)+" "+E(O[2],8))),a.v(" PHYSICAL: "+
|
||||
Fa(O[0],22,3)+" "+E(O[0],8))):(a.v(" OFFSET: "+Fa(O[1],13,3)+" "+E(O[1],8)),a.v("+ "+Kk[O[2]]+"PAR"+O[3]+": "+Fa(O[4],22,3)+" "+E(O[4],8)),a.v("& MMUMASK: "+Fa(O[5],22,3)+" "+E(O[5],8)),a.v("= PHYSICAL: "+Fa(O[0],22,3)+" "+E(O[0],8)))}else{var xb=0,ff="ds"==ib;if(jb){if("l"==jb.charAt(0))jb=jb.substr(1)||hl,xb=xj(a,jb);else{var Di=Lj(a,jb);Di&&(xb=Di.J-na.J)}0>xb&&(xb=0);65536<xb&&(xb=65536)}var kl=a.Ba;na.Ba&&(a.Ba=na.Ba);for(var yb="dd"==ib?4:"db"==ib?1:2,Vd=yb*xb||128,gf=
|
||||
ff?16:a.Ba,ll=(Vd+gf-1)/gf|0||1,zb="";ll--&&0<Vd;){for(var Ab="",hf="",Sa=Oj(a,na),Wd=gf,Mc=0,Nc=0;0<Wd&&0<Vd;){var bc=1,Xd=1==yb?a.Kd(na,bc):a.Ra(na,bc=2),Mc=Mc|Xd<<(Nc<<3),Nc=Nc+bc;Nc==yb&&(ff?(Ab&&(Ab+=","),Ab+="0x"+F(Mc,2*yb)):(Ab+=J(a,Mc,yb),Ab+=1==yb?9==Wd?"-":" ":" "),Mc=Nc=0);Wd-=bc;for(Vd-=bc;1==yb&&bc--;)var jf=Xd&255,hf=hf+(32<=jf&&128>jf?String.fromCharCode(jf):"."),Xd=Xd>>8}zb&&(zb+="\n");zb=ff?zb+(Ab+","):zb+(Sa+": "+Ab+(Wd?"":" "+hf))}zb&&a.v(zb);a.xa=na;a.Ba=kl}}}}break;case "e":if("else"==
|
||||
g[0])break;var cc,kf,lf,mf,nf=g[0],of=g[1];"eb"==nf?(cc=1,kf=255,lf=a.Kd,mf=a.Ld):"e"==nf||"ew"==nf?(cc=2,kf=65535,lf=a.Ra,mf=a.Ge):of=null;if(null==of)a.v("edit memory commands:"),a.v("\teb [a] [...] edit bytes at address a"),a.v("\tew [a] [...] edit words at address a");else{var Yd=Lj(a,of);if(Yd)for(var Zd=2;Zd<g.length;Zd++){var Oc=vj(a,g[Zd]);if(void 0===Oc){a.v("unrecognized value: "+g[Zd]);break}Oc&~kf&&a.v("warning: "+F(Oc)+" exceeds "+cc+"-byte value");a.v("changing "+Oj(a,Yd)+(z(a,16)?
|
||||
g[0])break;var cc,kf,lf,mf,nf=g[0],of=g[1];"eb"==nf?(cc=1,kf=255,lf=a.Kd,mf=a.Ld):"e"==nf||"ew"==nf?(cc=2,kf=65535,lf=a.Ra,mf=a.He):of=null;if(null==of)a.v("edit memory commands:"),a.v("\teb [a] [...] edit bytes at address a"),a.v("\tew [a] [...] edit words at address a");else{var Yd=Lj(a,of);if(Yd)for(var Zd=2;Zd<g.length;Zd++){var Oc=vj(a,g[Zd]);if(void 0===Oc){a.v("unrecognized value: "+g[Zd]);break}Oc&~kf&&a.v("warning: "+F(Oc)+" exceeds "+cc+"-byte value");a.v("changing "+Oj(a,Yd)+(z(a,16)?
|
||||
"":" from "+J(a,lf.call(a,Yd),cc))+" to "+J(a,Oc,cc));mf.call(a,Yd,Oc,cc)}}break;case "g":a:{var Ei=g[1],ml=b;if(void 0!==Ei){var pf=Lj(a,Ei,!0);if(!pf)break a;Nj(a,pf,ml);a.Cb(a.g,pf,!0)}dk(a,!0,c)}break;case "h":a.A.V?(c||a.v("halting"),a.ba()):Ba(a,!0)||c||a.v("already halted");break;case "i":if("if"==g[0]){var qf;var Pc=b.substr(2),Pc=Pa(Pc);vj(a,Pc)?(c||a.v("true: "+Pc),qf=!0):(c||a.v("false: "+Pc),qf=!1);qf||(d=!1);break}f=!0;break;case "k":var nl=g[0];if("?"==g[1])a.v("stack trace commands:"),
|
||||
a.v("\tk\tshow frame addresses"),a.v("\tks\tshow symbol information");else{var rf=0,sf=X(),Qc=X(a.f.g[6]);for(a.v("stack trace for "+Oj(a,Qc));10>rf;){for(var Bb=null,ol=256;65536>Qc.J>>>0;){sf.J=a.Ra(Qc,2);if(null==Qc.J||!ol--)break;if(!(sf.J&1)){for(var pl=a,$d=sf,Fi=null,Rc=$d.J,Gi=Rc,tf=1;6>=tf&&Rc;tf++){if(2<tf){$d.J=Rc;var ae=ok(pl,$d);if(0<=ae.indexOf("JSR")){var Hi=ae.indexOf(" ");if(Rc+(ae.indexOf(" ",Hi+1)-Hi-1)/2==Gi){Fi=ae;break}}}Rc-=2}$d.J=Gi;if(Bb=Fi)break}}if(!Bb||null==Bb)break;var Ii=
|
||||
null;if("ks"==nl){var Ji=Bb.match(/[0-9A-F]+$/);Ji&&(Ii=Gk(a,Ji[0]))}Bb=Oa(Bb,50)+" ;"+(Ii||"stack="+Oj(a,Qc));a.v(Bb);rf++}rf||a.v("no return addresses found")}break;case "l":if("ln"==g[0]){Gk(a,g[1],!0);break}f=!0;break;case "m":a:{var Ua,Va=null,T=g[1];"?"==T&&(T=void 0);if(void 0!==T){var kb=0;if("all"==T)kb=1879046143,T=null;else if("on"==T)Va=!0,T=null;else if("off"==T)Va=!1,T=null;else{"keys"==T&&(T="key");"kbd"==T&&(T="keyboard");for(Ua in Lb)if(T==Ua){kb=Lb[Ua];Va=!!(a.ha&kb);break}if(!kb){a.v("unknown message category: "+
|
||||
T);break a}}if(kb)if("on"==g[2])a.ha|=kb,Va=!0;else if("off"==g[2]&&(a.ha&=~kb,Va=!1,1073741824==kb)){for(var Ki=1E3<=a.M.length?a.M.length-1E3:0;Ki<a.M.length;)a.v(a.M[Ki++]);a.M=[]}}var ql=0,Sc="";for(Ua in Lb)if(!T||T==Ua){var rl=!!(a.ha&Lb[Ua]);if(null===Va||Va==rl)Sc&&(Sc+=","),++ql%10||(Sc+="\n\t"),"key"==Ua&&(Ua="keys"),Sc+=Ua}void 0===T&&a.v("message commands:\n\tm [category] [on|off]\tturn categories on/off");a.v((null!==Va?Va?"messages on: ":"messages off: ":"message categories:\n\t")+
|
||||
(Sc||"none"));Dj(a)}break;case "p":if("print"==g[0]){Hk(a,b.substr(5));break}var sl=g[0];if("?"==g[1])a.v("step commands:"),a.v("\tp\tstep over instruction"),a.v("\tpr\tstep over instruction with register update");else{var Li="pr"==sl?1:0,Mi=1+Li;if(a.I)a.v("step in progress");else{var be=X(a.f.g[7]),dc=a.Ra(be);3==dc||4==dc||34816==(dc&65280)||32256==(dc&65024)||35072==(dc&65280)?(a.I=Mi,Mj(be,2)):2048==(dc&65024)&&(ok(a,be),a.I=Mi);a.I?(a.Cb(a.g,be,!0),dk(a)||(a.K&&ke(a.K),a.I=0)):Ik(a,Li?"tr":
|
||||
"t")}}break;case "r":if("reset"==b){a.K&&a.K.reset();break}gk(a,g);break;case "s":a:switch(g[1]){case "base":if(g[2]){var Tc=+g[2];if(8==Tc||10==Tc||16==Tc)a.Ba=Tc;else{a.v("invalid base: "+Tc);break}}a.v("default base: "+a.Ba);break;case "cs":var Uc;void 0!==g[3]&&(Uc=+g[3]);switch(g[2]){case "int":a.f.Nb=Uc;break;case "start":a.f.oc=Uc;break;case "stop":a.f.Qb=Uc;break;default:a.v("unknown cs option");break a}void 0!==Uc&&ce(a.f);a.v("checksums "+(a.f.A.Mb?"enabled":"disabled"));break;case "sp":void 0!==
|
||||
"t")}}break;case "r":if("reset"==b){a.K&&a.K.reset();break}gk(a,g);break;case "s":a:switch(g[1]){case "base":if(g[2]){var Tc=+g[2];if(8==Tc||10==Tc||16==Tc)a.Ba=Tc;else{a.v("invalid base: "+Tc);break}}a.v("default base: "+a.Ba);break;case "cs":var Uc;void 0!==g[3]&&(Uc=+g[3]);switch(g[2]){case "int":a.f.Ob=Uc;break;case "start":a.f.oc=Uc;break;case "stop":a.f.Rb=Uc;break;default:a.v("unknown cs option");break a}void 0!==Uc&&ce(a.f);a.v("checksums "+(a.f.A.Nb?"enabled":"disabled"));break;case "sp":void 0!==
|
||||
g[2]&&(he(a.f,+g[2])||a.v("warning: using 1x multiplier, previous target not reached"));a.v("target speed: "+(a.f.yb.toFixed(2)+"Mhz")+" ("+a.f.ob+"x)");break;default:if(g[1]){a.v("unknown option: "+g[1]);break}case "?":a.v("debugger options:"),a.v("\tbase #\t\tset default base to #"),a.v("\tcs int #\tset checksum cycle interval to #"),a.v("\tcs start #\tset checksum cycle start count to #"),a.v("\tcs stop #\tset checksum cycle stop count to #"),a.v("\tsp #\t\tset speed multiplier to #")}break;case "t":Ik(a,
|
||||
g[0],g[1]);break;case "u":hk(a,g[1],g[2],8);break;case "v":if("var"==g[0]){Fk(a,b.substr(3))||(d=!1);break}if("ver"==g[0]){a.v((wb||"PDP11")+" version 1.33.1 ("+a.f.ka+",RELEASE"+(Db?",TYPEDARRAYS":Cb?",BYTEARRAYS":",LONGARRAYS")+")");a.v(window?window.navigator.userAgent:"");break}f=!0;break;case "?":if(g[1]){Hk(a,b.substr(1));break}var uf="commands:",vf;for(vf in Lk)uf+="\n"+Oa(vf,9)+Lk[vf];Xe(a)||(uf+="\nnote: history disabled if no exec breakpoints");a.v(uf);break;default:f=!0}f&&(a.v("unknown command: "+
|
||||
b),d=!1)}}catch(Oi){a.v("debugger error: "+(Oi.stack||Oi.message)),d=!1}return d}function fe(a,b,c){b=tj(a,b,c);for(var d in b)if(!nk(a,b[+d]))return!1;return!0}
|
||||
|
|
@ -368,13 +368,14 @@ h.reset=function(){this.D&&this.D.reset&&(D(this,"Resetting "+this.D.type),this.
|
|||
h.stop=function(a,b){for(var c=ta(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}H(this,-1)};
|
||||
function H(a,b){if(a.f){var c=a.f,d=b||0,e=c.H.speed;e&&(0>=d||30<=(c.Xc+=d))&&(e.textContent=c.A.V?c.xb.toFixed(2)+"Mhz":"Stopped",c.Xc=0)}if(a.i&&(a=a.i,b=b||0,a.u)){c=a.f.A.V;d=!!(a.f.i&8);if(0>=b||60<=(a.j+=b)){for(e=0;e<a.f.g.length;e++)gc(a,"R"+e,a.f.g[e]);e=ud(a.f);gc(a,"PS",e);gc(a,"NF",e&8?1:0,1);gc(a,"ZF",e&4?1:0,1);gc(a,"VF",e&2?1:0,1);gc(a,"CF",e&1?1:0,1);a.j=0}-1>b?a.fa=a.f.g[7]:0<b&&c&&!d&&(a.fa=a.f.kb);Xb(a,a.fa);Ob(a,a.Wa);b=a.f;b=b.zb?b.U&16?1:2:4;wc(a,"B22",b&1);wc(a,"B18",b&2);
|
||||
wc(a,"B16",b&4)}}
|
||||
h.va=function(a,b,c){var d=this;switch(b){case "power":return this.H[b]=c,c.onclick=function(){d.j||(d.A.aa?Jk(d,!1,!0):Sk(d,d.qc))},!0;case "reset":return this.H[b]=c,c.onclick=function(){if(d.A.aa&&!d.j)if(d.b&&!d.w){var a=ra("Click OK to save changes to this "+wb+" machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");Jk(d,a,!0);!a&&d.I?window&&window.location.reload():(a||(d.M=!0),d.qc(Pk),d.M=!1)}else d.reset(),d.f&&d.f.ra()},!0;case "save":if(La(Za(),"pcjs.org"))c.parentNode.removeChild(c);else return this.H[b]=
|
||||
c,c.onclick=function(){var a=Ok(d,!0);if(a){var b=!!(d.b&&!d.w||d.I),c=Jk(d,b);b?tl(d,a,c):d.T("Resume disabled, machine state not saved")}},!0}return!1};function Ok(a,b){var c=a.g;c||((c=bb(dl),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=vl(a,c))||a.T("The user ID is invalid.")):b&&a.T("Browser local storage is not available"));return c}
|
||||
h.va=function(a,b,c){var d=this;switch(b){case "power":return this.H[b]=c,c.onclick=function(){d.j||(d.A.aa?Jk(d,!1,!0):Sk(d,d.qc))},!0;case "reset":return this.H[b]=c,c.onclick=function(){if(d.A.aa&&!d.j)if(d.b&&!d.w){var a=ra("Click OK to save changes to this "+wb+" machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");Jk(d,a,!0);!a&&d.I?window&&window.location.reload():(a||(d.M=!0),d.qc(Pk),d.M=!1)}else d.reset(),d.f&&!d.F&&d.f.ra()},!0;case "save":if(La(Za(),"pcjs.org"))c.parentNode.removeChild(c);
|
||||
else return this.H[b]=c,c.onclick=function(){var a=Ok(d,!0);if(a){var b=!!(d.b&&!d.w||d.I),c=Jk(d,b);b?tl(d,a,c):d.T("Resume disabled, machine state not saved")}},!0}return!1};
|
||||
function Ok(a,b){var c=a.g;c||((c=bb(dl),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=vl(a,c))||a.T("The user ID is invalid.")):b&&a.T("Browser local storage is not available"));return c}
|
||||
function vl(a,b){a.g=null;b=Xa(Za()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(cb(dl,b.data),a.g=b.data)}catch(d){v(d.message+" ("+c+")")}return a.g}function Rk(a){var b=null;a.g&&(b=Za()+"/api/v1/user?req=load&user="+a.g+"&state="+wl(a,"1.33.1"));return b}
|
||||
function tl(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=wl(a,"1.33.1");d.data=c;b=Xa(Za()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.T("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.T(c),cb(dl,""),a.g=null)}}
|
||||
function Ph(a){var b;a=ta(a.id);for(var c=0;c<a.length;c++){var d=a[c];if(b)b==d&&(b=null);else if("RAM"==d.type)return d}return null}function ke(a,b){if(a.Ta){var c=0,d=0;!b&&window&&(c=window.scrollX,d=window.scrollY);a.Ta.focus();!b&&window&&window.scrollTo(c,d)}}var Zk="failsafe",Uk="validate",Wk="timestamp",fl="version",gl="url",jl="browser",dl="user",Yk=-1,Pk=0,Xk=1,al=2,ul=3;
|
||||
mb(function(){for(var a=x(document,w+"-machine"),b=0;b<a.length;b++)for(var c=a[b],d=wa(c),c=x(c,w,"computer"),e=0;e<c.length;e++){var f=c[e],g=wa(f),g=new Mk(g,d,!0);xa(g,f);g.L&&Sk(g,g.qc)}});nb.show.push(function(){for(var a=x(document,w,"computer"),b=0;b<a.length;b++){var c=wa(a[b]);(c=va("Computer",c.id))&&c.P&&!c.A.aa&&c.qc(Yk)}});nb.exit.push(function(){for(var a=x(document,w,"computer"),b=0;b<a.length;b++){var c=wa(a[b]);(c=va("Computer",c.id))&&c.A.aa&&Jk(c,!(!c.b||c.w),!0)}});
|
||||
function G(a,b,c){this.id=a.id;this.b="";this.f={};this.g=this.D=!1;this.key=wl(a,b,c);bl(this,a.qf)}h=G.prototype;h.set=function(a,b){try{this.f[a]=b}catch(c){}};h.get=function(a){return this.f[a]||null};h.data=function(){return this.f};function Qk(a,b){return b?(a.b=b,a.g=!0,a.D=!1,!0):a.g?!0:$a()&&(b=bb(a.key))?(a.b=b,a.g=!0):!1}function Vk(a){var b=!0;if(!a.D)try{a.f=JSON.parse(a.b),a.D=!0}catch(c){v(c.message||c),b=!1}return b}
|
||||
function G(a,b,c){this.id=a.id;this.b="";this.f={};this.g=this.D=!1;this.key=wl(a,b,c);bl(this,a.rf)}h=G.prototype;h.set=function(a,b){try{this.f[a]=b}catch(c){}};h.get=function(a){return this.f[a]||null};h.data=function(){return this.f};function Qk(a,b){return b?(a.b=b,a.g=!0,a.D=!1,!0):a.g?!0:$a()&&(b=bb(a.key))?(a.b=b,a.g=!0):!1}function Vk(a){var b=!0;if(!a.D)try{a.f=JSON.parse(a.b),a.D=!0}catch(c){v(c.message||c),b=!1}return b}
|
||||
function cl(a){var b=!0;if($a()){var c=JSON.stringify(a.f);cb(a.key,c)||(v("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}h.toString=function(){return this.f?JSON.stringify(this.f):this.b};function bl(a,b){a.b="";a.f={};a.g=a.D=!1;b&&a.set("parms",b)}
|
||||
h.clear=function(a){bl(this);var b=[];try{for(var c=0,d=window.localStorage.length;c<d;c++)b.push(window.localStorage.key(c))}catch(e){}for(c=0;c<b.length;c++)if((d=b[c])&&(a||d.substr(0,this.key.length)==this.key)){try{window.localStorage.removeItem(d)}catch(e){}b.splice(c,1);c=0}};function wl(a,b,c){a=a.id;if(b){var d=b.indexOf(".");0<d&&(a+=".v"+b.substr(0,d))}c&&(a+="."+c);return a}var xl=0;
|
||||
function yl(a,b,c,d,e,f){e("Loading "+a+"...");Xa(a,null,!0,function(g,k,l){l?(k||(k="unable to load "+a+" ("+l+")"),f(k,null)):zl(k,a,b,c,d,e,f)})}
|
||||
|
|
|
|||
Loading…
Reference in a new issue