Added some more disk configurations
This commit is contained in:
parent
16f91fec4a
commit
b730b915bf
31 changed files with 1002 additions and 963 deletions
|
|
@ -219,8 +219,8 @@ h.Yg=function(a){a&1&&(this.a&32768?(a&=-2,this.a&64&&yc(this.c,this.s)):(this.a
|
|||
var bg="",lg="?",mg="??",cg=0,eg=1,dg=2,gg="readProgress",tg="pcjs-progress-bar",ug={},jg=(ug[65384]=[null,null,Lc.prototype.Hf,Lc.prototype.Yg,"PRS"],ug[65386]=[null,null,Lc.prototype.Gf,Lc.prototype.Xg,"PRB"],ug[65388]=[null,null,Lc.prototype.Ff,Lc.prototype.Wg,"PPS"],ug[65390]=[null,null,Lc.prototype.Ef,Lc.prototype.Vg,"PPB"],ug);
|
||||
function vg(a,b,c){t.call(this,"Disk",{id:a.Ua+".disk"+wa(++wg,4)},8192);this.controller=a;this.A=a.A;this.D=a.D;this.h=b;this.xa=b.name;this.oa=this.cd="";this.Zc=b.Zc;this.M=this.T=this.R=this.Z=this.mode=0;this.a=[];this.f=null;this.g=!1;this.create(c,b.M,b.T,b.R,b.Z);this.b=this.i=null;B(this)}p(vg,t);h=vg.prototype;h.ja=function(a,b,c,d){this.D=d};
|
||||
h.create=function(a,b,c,d,e){this.mode=a;this.M=b;this.T=c;this.R=d;this.Z=e;this.a=[];if("preload"!=this.mode){a=Array(this.M);for(b=0;b<a.length;b++){c=Array(this.T);for(d=0;d<c.length;d++){e=Array(this.R);for(var f=1;f<=e.length;f++)e[f-1]=xg(null,b,d,f,this.Z,0);c[d]=e}a[b]=c}this.a=a}this.f=null};
|
||||
function yg(a,b,c,d,e){var f=c;if(a.b)return!0;a.xa=b;a.oa=c;a.cd=xa(c);a.b=e;a.i=a.controller;if(d){var g=new FileReader;g.onload=function(){var b=g.result,c=b?b.byteLength:0,d=ra[c];if(d){a.M=d[0];a.T=d[1];a.R=d[2];a.Z=d[3]||512;var e=a.Z>>2;var f=d=0;b=new DataView(b,0,c);a.a=Array(a.M);for(c=0;c<a.a.length;c++)for(var v=a.a[c]=Array(a.T),u=0;u<v.length;u++)for(var oa=v[u]=Array(a.R),Ua=0;Ua<oa.length;Ua++){for(var Cc=xg(null,c,u,Ua+1,a.Z,0),yh=Cc.data,Tc=0;Tc<e;Tc++,f+=4){var zh=yh[Tc]=b.getInt32(f,
|
||||
!0);d=d+zh&-1}Cc.na=e;oa[Ua]=Cc}a.f=d;e=a}else a.G("Unrecognized disk format ("+c+" bytes)");a.b&&(a.b.call(a.controller,a.h,e,a.xa,a.oa),a.b=null)};g.readAsArrayBuffer(d);return!0}0>c.indexOf("/api/v1/dump")&&(b=ya(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):za(c,"/")&&(d="dir"),f=Ja()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.Zc?"":e)+"&format=json"));return!!Ha(f,
|
||||
function yg(a,b,c,d,e){var f=c;if(a.b)return!0;a.xa=b;a.oa=c;a.cd=xa(c);a.b=e;a.i=a.controller;if(d){var g=new FileReader;g.onload=function(){var b=g.result,c=b?b.byteLength:0,d=ra[c];if(d){a.M=d[0];a.T=d[1];a.R=d[2];a.Z=d[3]||512;var e=a.Z>>2;var f=d=0;b=new DataView(b,0,c);a.a=Array(a.M);for(c=0;c<a.a.length;c++)for(var v=a.a[c]=Array(a.T),u=0;u<v.length;u++)for(var oa=v[u]=Array(a.R),Ua=0;Ua<oa.length;Ua++){for(var Cc=xg(null,c,u,Ua+1,a.Z,0),xh=Cc.data,Tc=0;Tc<e;Tc++,f+=4){var yh=xh[Tc]=b.getInt32(f,
|
||||
!0);d=d+yh&-1}Cc.na=e;oa[Ua]=Cc}a.f=d;e=a}else a.G("Unrecognized disk format ("+c+" bytes)");a.b&&(a.b.call(a.controller,a.h,e,a.xa,a.oa),a.b=null)};g.readAsArrayBuffer(d);return!0}0>c.indexOf("/api/v1/dump")&&(b=ya(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):za(c,"/")&&(d="dir"),f=Ja()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.Zc?"":e)+"&format=json"));return!!Ha(f,
|
||||
null,!0,function(b,c,d){zg(a,b,c,d)})}
|
||||
function zg(a,b,c,d){var e=null,f=0>d&&!!a.A&&!a.A.j.S;a.g=!1;if(d)a.controller.G('Unable to load disk "'+a.xa+'" (error '+d+": "+b+")",f);else{ab(a.controller.Ua,b,c);try{if(0<xa(a.cd,!0).toLowerCase().indexOf("-readonly"))a.g=!0;else{var g=c.indexOf("\n");0<g&&1024>g&&0<c.substring(0,g).indexOf("write-protected")&&(a.g=!0)}var k;"<"==c.substr(0,1)?k=["Missing disk image: "+a.xa]: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)r(k[0]);else{a.M=k.length;a.T=k[0].length;a.R=k[0][0].length;var l=k[0][0][0];a.Z=l&&l.length||512;for(d=c=0;d<a.M;d++)for(f=0;f<a.T;f++)for(g=0;g<a.R;g++)if(l=k[d][f][g]){var m=l.length;void 0===m&&(m=l.length=512);m>>=2;var n=l.pattern;void 0===n&&(n=l.pattern=0);var q=l.data;if(void 0===q){var v=l.bytes;if(void 0!==v&&v.length){for(var u=m<<2,oa=v.length;oa<u;oa++)v[oa]=n;Ag(l,v)}else q=[],n=l.pattern=n|n<<8|n<<16|n<<24,l.data=q;delete l.bytes}xg(l,d,f);for(u=
|
||||
|
|
@ -229,82 +229,80 @@ h.seek=function(a,b,c,d,e){d=null;var f=this.h,g=this.a[a];if(g){var k=g[b];if(!
|
|||
h.read=function(a,b){var c=-1;if(a&&b<a.length){c=a.data;var 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.g)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.na?f<a.wa?(a.na+=a.wa-f,a.wa=f):f>=a.wa+a.na&&(a.na+=f-(a.wa+a.na)+1):(a.wa=f,a.na=1);d[f]=d[f]&~(255<<b)|c<<b}return!0}return null};
|
||||
function Bg(a,b){var c=a.T*a.R,d=b/c|0;return d<a.M?(b%=c,a.seek(d,b/a.R|0,b%a.R+1)):null}function Cg(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.f,this.M,this.T,this.R,this.Z];if(!this.g)for(var c=this.a,d=0;d<c.length;d++)for(var e=0;e<c[d].length;e++)for(var f=0;f<c[d][e].length;f++){var g=c[d][e][f];if(g&&g.na){for(var k=[],l=0,m=g.wa,n=g.wa+g.na;m<n;)k[l++]=g.data[m++];b[a++]=[d,e,f,g.wa,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.a.length&&6<=e.length?this.create("local",e[2],e[3],e[4],e[5]):null!=e[1]&&null!=this.f&&e[1]!=this.f&&(c="original checksum ("+e[1]+") differs from current checksum ("+this.f+")",b=-2));for(this.a.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.a.length||l>=this.a[k].length||m>=this.a[k][l].length){c="sector (CHS="+k+":"+l+":"+m+") out of range ("+
|
||||
b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.a[k][l][m]){for(l=k.data.length;l<e;)k.data[l++]=k.pattern;l=0;k.wa=e;for(k.na=f.length;e<g;)k.data[e++]=f[l++];b++}}}0>b&&-2!=b&&this.controller.G("Unable to restore disk '"+this.xa+": "+c);return b};
|
||||
h.toJSON=function(){var a=0;for(var b;b=Bg(this,a++);)Dg(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")};
|
||||
function Dg(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 wg=0;function Eg(a,b,c,d,e,f){t.call(this,a,b,c);this.C=Fg(this,b.autoMount);this.B=0;this.I=d;this.J=e;this.K=f;this.H=d.Bc;this.b=Array(this.H);this.F=!Oa("Mobi")&&window&&"FileReader"in window;this.l=[];this.qa=null;this.exports={bootDisk:this.Fd,loadDisk:this.$c,selectDrive:this.yg,wait:this.Eg}}p(Eg,t);
|
||||
function Fg(a,b){if(b&&"string"==typeof b)try{b=eval("("+b+")")}catch(c){r(a.type+" auto-mount error: "+c.message+" ("+b+")"),b=null}return b||{}}h=Eg.prototype;
|
||||
h.ma=function(a,b,c){var d=this;switch(b){case "listDisks":return this.o[b]=c,c.onchange=function(){Gg(d)},!0;case "descDisk":case "listDrives":return this.o[b]=c,c.onchange=function(){var a=ta(c.value,10);null!=a&&Hg(d,a)},!0;case "loadDisk":return this.o[b]=c,c.onclick=function(){d.$c()},!0;case "bootDisk":return this.o[b]=c,c.onclick=function(){d.Fd()},!0;case "saveDisk":if(!this.F){c.parentNode.removeChild(c);break}this.o[b]=c;c.onclick=function(){var a=d.o.listDrives;if(a&&a.options&&d.b)if(a=
|
||||
b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.a[k][l][m]){for(l=k.data.length;l<e;)k.data[l++]=k.pattern;l=0;k.wa=e;for(k.na=f.length;e<g;)k.data[e++]=f[l++];b++}}}0>b&&-2!=b&&this.controller.G("Unable to restore disk '"+this.xa+": "+c);return b};var wg=0;
|
||||
function Dg(a,b,c,d,e,f){t.call(this,a,b,c);this.C=Eg(this,b.autoMount);this.B=0;this.I=d;this.J=e;this.K=f;this.H=d.Bc;this.b=Array(this.H);this.F=!Oa("Mobi")&&window&&"FileReader"in window;this.l=[];this.qa=null;this.exports={bootDisk:this.Fd,loadDisk:this.$c,selectDrive:this.yg,wait:this.Eg}}p(Dg,t);function Eg(a,b){if(b&&"string"==typeof b)try{b=eval("("+b+")")}catch(c){r(a.type+" auto-mount error: "+c.message+" ("+b+")"),b=null}return b||{}}h=Dg.prototype;
|
||||
h.ma=function(a,b,c){var d=this;switch(b){case "listDisks":return this.o[b]=c,c.onchange=function(){Fg(d)},!0;case "descDisk":case "listDrives":return this.o[b]=c,c.onchange=function(){var a=ta(c.value,10);null!=a&&Gg(d,a)},!0;case "loadDisk":return this.o[b]=c,c.onclick=function(){d.$c()},!0;case "bootDisk":return this.o[b]=c,c.onclick=function(){d.Fd()},!0;case "saveDisk":if(!this.F){c.parentNode.removeChild(c);break}this.o[b]=c;c.onclick=function(){var a=d.o.listDrives;if(a&&a.options&&d.b)if(a=
|
||||
d.b[ta(a.value,10)||0])if(a=a.P){for(var b="",c=0,k;k=Bg(a,c++);)for(var l=0,m=k.length;l<m;l++)b+=String.fromCharCode(Cg(a,k,l));b=btoa(b);a=a.cd.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+")":"")+".");r(a)}else d.G("No disk loaded in drive.");else d.G("No disk drive selected.")};return!0;case "mountDisk":if(this.F)return this.o[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;d.$c(xa(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
|
||||
h.ja=function(a,b,c,d){this.A=a;this.v=b;this.c=c;this.D=d;if(a=Fg(this,dd(this.A,"autoMount")))for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.C[e]=a[e]);this.reset();this.qa=Ac(this.c,this.I.Vc,this.I.Rc,this.pd);Bb(b,this,this.K);Db(b,this.reset.bind(this));Ig(this,"None",Jg,!0);this.F&&Ig(this,"Local Disk",Kg);Ig(this,"Remote Disk",Lg);Mg(this)||B(this)};
|
||||
h.la=function(a,b){if(!b){if(!a){if(this.reset(),this.A.C){this.l=[];for(a=0;a<this.b.length;a++)Ng(this,a,!0);Mg(this,!0)}}else if(!this.restore(a))return!1;if(a=this.o.listDrives){for(;a.firstChild;)a.removeChild(a.firstChild);a.value="";for(b=0;b<this.H;b++){var c=document.createElement("option");c.value=b;c.text=this.b[b].nc||"---";a.appendChild(c)}0<this.H&&(a.value="0",Hg(this,0))}}return!0};h.ka=function(a){return a?this.save():!0};h.reset=function(){this.bb();Og(this)};
|
||||
h.save=function(){var a=new E(this);a.set(0,this.oc());a.set(1,Pg(this));a.set(2,Qg(this));return a.data()};h.restore=function(a){var b=!0;this.bb(a[0])||(b=!1);var c=a[1];c&&(this.l=c);Og(this,a[2])||(b=!1);return b};h.bb=function(){return!0};h.oc=function(){return[]};
|
||||
function Og(a,b){for(var c=0;c<a.b.length;c++){var d=a.b[c];void 0===d&&(d=a.b[c]={});var e=a,f=d;d=c;var g=a.J,k=b&&b[c],l=0;f.pb=d;f.name=e.qc;f.fc=f.ob=!1;f.Ib=null;f.Zc=!0;f.nc=g[l++]+d;f.M=g[l++];f.T=g[l++];f.R=g[l++];f.Z=g[l++];f.Ze=g[l++];f.$e=g[l++];f.af=g[l++];f.Qe=g[l++];f.status=g[l];f.Jj=0;f.Ij=0;f.Ed=1;f.Pe=f.R;f.Ld=f.Z;f.Rj=0;f.Yj=null;f.P||(f.oa="");k&&(l=k[1],g=k[2],k[0]?(f=l,k=g,g=e.b[d],Ng(e,d,!0),g.ob=!0,d=new vg(e,g,"preload"),e.Gd(g,d,f,k,!0)):Rg(e,d,l,g,!0)?f.P&&g&&Sg(e,l,g,
|
||||
f.P):B(e,!1))}return!0}function Qg(a){for(var b=[],c=0;c<a.b.length;c++){var d=a.b[c];b.push([d.ob,d.xa,d.oa])}return b}function Pg(a){for(var b=0;b<a.b.length;b++){var c=a.b[b];c.P&&Tg(a,c.oa,c.P)}return a.l}
|
||||
function Mg(a,b){b||(a.B=0);for(var c in a.C){var d=a.C[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.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=xa(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.b.length)){!Rg(a,g,f,e,!0)&&b&&B(a,!1);continue}a.G("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")")}return!!a.B}
|
||||
h.$c=function(a,b,c){if(!a&&!b){var d=this.o.listDisks;d&&d.options&&(a=d.options[d.selectedIndex].text,b=d.value)}d=(d=this.o.listDrives)&&ta(d.value,10);if(void 0===d||0>d||d>=this.b.length)return this.G("Unable to load the selected drive"),!1;if(!b)return Ng(this,d),!0;if(b==Kg)return this.G('Use "Choose File" and "Mount" to select and load a local disk.'),!1;if(b==Lg){b=window.prompt("Enter the URL of a remote disk image.","")||"";if(!b)return!1;a=xa(b);this.status("Attempting to load "+b+' as "'+
|
||||
a+'"')}Rg(this,d,a,b,!1,c);return!0};h.Fd=function(){var a,b=this.o.listDrives;b=b&&ta(b.value,10);if(null==b||0>b||b>=this.b.length||!(a=this.b[b]))return this.G("Unable to boot the selected drive"),!1;if(!a.P)return this.G("Load a disk into the drive first"),!1;sd(this.c,0,!0,b);return(a=this.sb(a,a.Ze,a.$e,a.af,a.Qe,0,2))?(this.G("Unable to read the boot sector ("+a+")"),!1):!0};
|
||||
function Rg(a,b,c,d,e,f){var g=-1,k=a.b[b];k.oa.toLowerCase()!=d.toLowerCase()&&(g++,Ng(a,b,!0),k.fc?a.G(a.type+" busy"):(k.fc=!0,e&&(k.Yc=!0,a.B++),k.ob=!!f,yg(new vg(a,k,"preload"),c,d,f,a.Gd)&&g++));return g}
|
||||
h.Gd=function(a,b,c,d,e){a.fc=!1;b&&(b.M>a.M||b.T>a.T)&&(this.G('Disk "'+c+'" too large for drive '+(this.b[a.pb].nc||"---")),b=null);b?(a.P=b,a.xa=c,a.oa=d,this.Md(a.pb),Sg(this,c,d,b),this.G('Loaded disk "'+c+'" in drive '+(this.b[a.pb].nc||"---"),a.Yc||e),this.A&&kd(this.A)):a.ob=!1;a.Yc&&(a.Yc=!1,--this.B||B(this));Hg(this,a.pb);a.Ib&&(a.Ib(),a.Ib=null)};
|
||||
function Ig(a,b,c,d){if((a=a.o.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 Hg(a,b,c){var d=!1;if(0<=b&&b<a.b.length){var e=a.b[b],f=a.o.listDisks;a=a.o.listDrives;if(f&&a&&f.options&&a.options){if(c)for(c=0;c<a.options.length;c++)if(ta(a.options[c].value,10)==e.pb){a.selectedIndex!=c&&(a.selectedIndex=c);d=!0;break}c=ta(a.value,10);e=e.ob?Kg: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.yg=function(a){var b=this.o.listDrives;if(b&&b.options)for(var c=b.options.length,d=0;d<c;d++)if(b.options[d].textContent==a){var e=ta(b.options[d].value,10);if(0<=e)return Hg(this,e,!0)}return!1};
|
||||
function Gg(a){var b=a.o.listDisks,c=a.o.descDisk,d=b.options&&b.options[b.selectedIndex];if(c&&d){b={};if(d=d.getAttribute("data-value"))try{b=eval("("+d+")")}catch(e){r(a.type+" option error: "+e.message)}a=b.desc;void 0===a&&(a="");b=b.href;void 0!==b&&(a='<a href="'+b+'" target="_blank">'+a+"</a>");c.innerHTML=a}}h.Eg=function(a){for(var b=0;b<this.b.length;b++){var c=this.b[b];if(c&&c.fc)return c.Ib||(c.Ib=a),!1}return!0};
|
||||
function Ng(a,b,c){var d=a.b[b];if(d.P||!1===c)Tg(a,d.oa,d.P),d.xa="",d.oa="",d.P=null,d.ob=!1,c||(a.G("Drive "+(a.b[b].nc||"---")+" unloaded",c),Hg(a,b))}function Sg(a,b,c,d){var e;for(e=0;e<a.l.length;e++)if(a.l[e][1]==c){d.restore(a.l[e][2]);return}a.l[e]=[b,c,[]]}function Tg(a,b,c){var d;for(d=0;d<a.l.length;d++)if(a.l[d][1]==b){a.l[d][2]=c.save();break}}h.Md=function(){};h.sb=function(){return-1};h.uc=function(){return-1};var Jg="",Kg="?",Lg="??";
|
||||
function N(a){Eg.call(this,"RK11",a,65536,C,C.Zb,Ug);this.s=this.f=this.a=this.i=this.h=this.g=this.m=0}p(N,Eg);h=N.prototype;h.bb=function(a){a||(a=[Vg.Zb|Vg.Bd|Vg.xd,0,S.za,0,0,0,0]);a=ia(a);this.s=a.next().value;this.f=a.next().value;this.a=a.next().value;this.i=a.next().value;this.h=a.next().value;this.g=a.next().value;this.m=a.next().value;return!0};h.oc=function(){return[this.s,this.f,this.a,this.i,this.h,this.g,this.m]};
|
||||
h.ja=function(a,b,c,d){this.A=a;this.v=b;this.c=c;this.D=d;if(a=Eg(this,dd(this.A,"autoMount")))for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.C[e]=a[e]);this.reset();this.qa=Ac(this.c,this.I.Vc,this.I.Rc,this.pd);Bb(b,this,this.K);Db(b,this.reset.bind(this));Hg(this,"None",Ig,!0);this.F&&Hg(this,"Local Disk",Jg);Hg(this,"Remote Disk",Kg);Lg(this)||B(this)};
|
||||
h.la=function(a,b){if(!b){if(!a){if(this.reset(),this.A.C){this.l=[];for(a=0;a<this.b.length;a++)Mg(this,a,!0);Lg(this,!0)}}else if(!this.restore(a))return!1;if(a=this.o.listDrives){for(;a.firstChild;)a.removeChild(a.firstChild);a.value="";for(b=0;b<this.H;b++){var c=document.createElement("option");c.value=b;c.text=this.b[b].nc||"---";a.appendChild(c)}0<this.H&&(a.value="0",Gg(this,0))}}return!0};h.ka=function(a){return a?this.save():!0};h.reset=function(){this.bb();Ng(this)};
|
||||
h.save=function(){var a=new E(this);a.set(0,this.oc());a.set(1,Og(this));a.set(2,Pg(this));return a.data()};h.restore=function(a){var b=!0;this.bb(a[0])||(b=!1);var c=a[1];c&&(this.l=c);Ng(this,a[2])||(b=!1);return b};h.bb=function(){return!0};h.oc=function(){return[]};
|
||||
function Ng(a,b){for(var c=0;c<a.b.length;c++){var d=a.b[c];void 0===d&&(d=a.b[c]={});var e=a,f=d;d=c;var g=a.J,k=b&&b[c],l=0;f.pb=d;f.name=e.qc;f.fc=f.ob=!1;f.Ib=null;f.Zc=!0;f.nc=g[l++]+d;f.M=g[l++];f.T=g[l++];f.R=g[l++];f.Z=g[l++];f.Ze=g[l++];f.$e=g[l++];f.af=g[l++];f.Qe=g[l++];f.status=g[l];f.Jj=0;f.Ij=0;f.Ed=1;f.Pe=f.R;f.Ld=f.Z;f.Rj=0;f.Yj=null;f.P||(f.oa="");k&&(l=k[1],g=k[2],k[0]?(f=l,k=g,g=e.b[d],Mg(e,d,!0),g.ob=!0,d=new vg(e,g,"preload"),e.Gd(g,d,f,k,!0)):Qg(e,d,l,g,!0)?f.P&&g&&Rg(e,l,g,
|
||||
f.P):B(e,!1))}return!0}function Pg(a){for(var b=[],c=0;c<a.b.length;c++){var d=a.b[c];b.push([d.ob,d.xa,d.oa])}return b}function Og(a){for(var b=0;b<a.b.length;b++){var c=a.b[b];c.P&&Sg(a,c.oa,c.P)}return a.l}
|
||||
function Lg(a,b){b||(a.B=0);for(var c in a.C){var d=a.C[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.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=xa(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.b.length)){!Qg(a,g,f,e,!0)&&b&&B(a,!1);continue}a.G("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")")}return!!a.B}
|
||||
h.$c=function(a,b,c){if(!a&&!b){var d=this.o.listDisks;d&&d.options&&(a=d.options[d.selectedIndex].text,b=d.value)}d=(d=this.o.listDrives)&&ta(d.value,10);if(void 0===d||0>d||d>=this.b.length)return this.G("Unable to load the selected drive"),!1;if(!b)return Mg(this,d),!0;if(b==Jg)return this.G('Use "Choose File" and "Mount" to select and load a local disk.'),!1;if(b==Kg){b=window.prompt("Enter the URL of a remote disk image.","")||"";if(!b)return!1;a=xa(b);this.status("Attempting to load "+b+' as "'+
|
||||
a+'"')}Qg(this,d,a,b,!1,c);return!0};h.Fd=function(){var a,b=this.o.listDrives;b=b&&ta(b.value,10);if(null==b||0>b||b>=this.b.length||!(a=this.b[b]))return this.G("Unable to boot the selected drive"),!1;if(!a.P)return this.G("Load a disk into the drive first"),!1;sd(this.c,0,!0,b);return(a=this.sb(a,a.Ze,a.$e,a.af,a.Qe,0,2))?(this.G("Unable to read the boot sector ("+a+")"),!1):!0};
|
||||
function Qg(a,b,c,d,e,f){var g=-1,k=a.b[b];k.oa.toLowerCase()!=d.toLowerCase()&&(g++,Mg(a,b,!0),k.fc?a.G(a.type+" busy"):(k.fc=!0,e&&(k.Yc=!0,a.B++),k.ob=!!f,yg(new vg(a,k,"preload"),c,d,f,a.Gd)&&g++));return g}
|
||||
h.Gd=function(a,b,c,d,e){a.fc=!1;b&&(b.M>a.M||b.T>a.T)&&(this.G('Disk "'+c+'" too large for drive '+(this.b[a.pb].nc||"---")),b=null);b?(a.P=b,a.xa=c,a.oa=d,this.Md(a.pb),Rg(this,c,d,b),this.G('Loaded disk "'+c+'" in drive '+(this.b[a.pb].nc||"---"),a.Yc||e),this.A&&kd(this.A)):a.ob=!1;a.Yc&&(a.Yc=!1,--this.B||B(this));Gg(this,a.pb);a.Ib&&(a.Ib(),a.Ib=null)};
|
||||
function Hg(a,b,c,d){if((a=a.o.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 Gg(a,b,c){var d=!1;if(0<=b&&b<a.b.length){var e=a.b[b],f=a.o.listDisks;a=a.o.listDrives;if(f&&a&&f.options&&a.options){if(c)for(c=0;c<a.options.length;c++)if(ta(a.options[c].value,10)==e.pb){a.selectedIndex!=c&&(a.selectedIndex=c);d=!0;break}c=ta(a.value,10);e=e.ob?Jg: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.yg=function(a){var b=this.o.listDrives;if(b&&b.options)for(var c=b.options.length,d=0;d<c;d++)if(b.options[d].textContent==a){var e=ta(b.options[d].value,10);if(0<=e)return Gg(this,e,!0)}return!1};
|
||||
function Fg(a){var b=a.o.listDisks,c=a.o.descDisk,d=b.options&&b.options[b.selectedIndex];if(c&&d){b={};if(d=d.getAttribute("data-value"))try{b=eval("("+d+")")}catch(e){r(a.type+" option error: "+e.message)}a=b.desc;void 0===a&&(a="");b=b.href;void 0!==b&&(a='<a href="'+b+'" target="_blank">'+a+"</a>");c.innerHTML=a}}h.Eg=function(a){for(var b=0;b<this.b.length;b++){var c=this.b[b];if(c&&c.fc)return c.Ib||(c.Ib=a),!1}return!0};
|
||||
function Mg(a,b,c){var d=a.b[b];if(d.P||!1===c)Sg(a,d.oa,d.P),d.xa="",d.oa="",d.P=null,d.ob=!1,c||(a.G("Drive "+(a.b[b].nc||"---")+" unloaded",c),Gg(a,b))}function Rg(a,b,c,d){var e;for(e=0;e<a.l.length;e++)if(a.l[e][1]==c){d.restore(a.l[e][2]);return}a.l[e]=[b,c,[]]}function Sg(a,b,c){var d;for(d=0;d<a.l.length;d++)if(a.l[d][1]==b){a.l[d][2]=c.save();break}}h.Md=function(){};h.sb=function(){return-1};h.uc=function(){return-1};var Ig="",Jg="?",Kg="??";
|
||||
function N(a){Dg.call(this,"RK11",a,65536,C,C.Zb,Tg);this.s=this.f=this.a=this.i=this.h=this.g=this.m=0}p(N,Dg);h=N.prototype;h.bb=function(a){a||(a=[Ug.Zb|Ug.Bd|Ug.xd,0,S.za,0,0,0,0]);a=ia(a);this.s=a.next().value;this.f=a.next().value;this.a=a.next().value;this.i=a.next().value;this.h=a.next().value;this.g=a.next().value;this.m=a.next().value;return!0};h.oc=function(){return[this.s,this.f,this.a,this.i,this.h,this.g,this.m]};
|
||||
h.sb=function(a,b,c,d,e,f,g,k,l){var m=0;a=a.P;var n=null;a||(m=T.rd,e=0);for(;e;){if(!n){if(b>=a.M){m=T.Xb;break}n=a.seek(b,c,d+1);if(!n){m=T.Ad;break}var q=0;++d>=a.R&&(d=0,++c>=a.T&&(c=0,++b))}var v,u;if(0>(v=a.read(n,q++))||0>(u=a.read(n,q++))){m=T.Yb;break}if(!k&&(Xb(this.v,Dd(this.c,f),v|u<<8),wc(this.v))){m=T.Cb;break}q>=a.Z&&(n=null);f+=g;e--}return l?l(m,b,c,d,e,f):m};
|
||||
h.uc=function(a,b,c,d,e,f,g,k,l){var m=0;a=a.P;var n=null;a||(m=T.rd,e=0);for(;e;){var q=Zb(this.v,Dd(this.c,f));if(wc(this.v)){m=T.Cb;break}if(!n){if(b>=a.M){m=T.Xb;break}n=a.seek(b,c,d+1,!0);if(!n){m=T.Ad;break}var v=0;++d>=a.R&&(d=0,++c>=a.T&&(c=0,++b))}if(k){var u,oa;if(0>(u=a.read(n,v++))||0>(oa=a.read(n,v++))){m=T.Yb;break}if(q!=(u|oa<<8)){m=T.Cd;break}}else if(!a.write(n,v++,q&255)||!a.write(n,v++,q>>8)){m=T.Yb;break}v>=a.Z&&(n=null);f+=g;e--}return l?l(m,b,c,d,e,f):m};
|
||||
h.oe=function(a,b,c,d,e,f){this.h=f&65535;this.a=this.a&~S.fb|f>>16-S.V.fb&S.fb;this.i=65536-e&65535;this.g=this.g&~Wg.Sc|d&Wg.Sc;this.f|=a;Xg(this);return!0};function Xg(a){a.a&=~S.Ja;a.f&&(a.f|=T.Zd,a.a|=S.Ja,a.f&T.Hc&&(a.a|=S.Hc))}h.Tf=function(){return this.s};h.kh=function(){};h.Uf=function(){return this.f};h.lh=function(){};h.Qf=function(){return this.a&S.Db};
|
||||
h.hh=function(a){this.a=this.a&~S.va|a&S.va;if(this.a&S.Bb){a=!0;var b,c=(this.g&Wg.Ta)>>Wg.V.Ta,d=this.b[c];this.a&=~(S.za|S.Tc);this.f&=~T.Ee;switch(b=this.a&S.ca){case Yg.Ud:this.f=this.g=0;this.a=S.za;break;case Yg.je:case Yg.Va:var e=this.sb;case Yg.Wc:case Yg.Fb:e||(e=this.uc);var f=(this.g&Wg.zb)>>Wg.V.zb;var g=(this.g&Wg.Kc)>>Wg.V.Kc;var k=this.g&Wg.Sc;var l=65536-this.i&65535;var m=(this.a&S.fb)<<16-S.V.fb|this.h;var n=this.a&S.fe?0:2;if(f>=d.M){this.f|=T.Xb;break}if(k>=d.R){this.f|=T.Yb;
|
||||
break}a=e.call(this,d,f,g,k,l,m,n,b>=Yg.Wc,this.oe.bind(this));break;case Yg.cc:f=(this.g&Wg.zb)>>Wg.V.zb;f<d.M?this.a|=S.Tc:this.f|=T.Xb;break;case Yg.$d:this.f=this.g=0,this.a=S.za|S.Tc}this.s=d.status|(d.P?Vg.ha:0)|c<<Vg.V.Mc|this.g&Vg.De;Xg(this);a&&(this.a&=~S.Bb,this.a|=S.za,this.a&S.eb&&yc(this.c,this.qa))}};h.Vf=function(){return this.i};h.mh=function(a){this.i=a};h.Pf=function(){return this.h};h.gh=function(a){this.h=a};h.Rf=function(){return this.g};h.ih=function(a){this.g=a};h.Sf=function(){return this.m};
|
||||
h.jh=function(a){this.m=a};var Vg=C.$b,T=C.re,S=C.pe,Wg=C.qe,Yg=C.ca,Zg={},Ug=(Zg[65280]=[null,null,N.prototype.Tf,N.prototype.kh,"RKDS"],Zg[65282]=[null,null,N.prototype.Uf,N.prototype.lh,"RKER"],Zg[65284]=[null,null,N.prototype.Qf,N.prototype.hh,"RKCS"],Zg[65286]=[null,null,N.prototype.Vf,N.prototype.mh,"RKWC"],Zg[65288]=[null,null,N.prototype.Pf,N.prototype.gh,"RKBA"],Zg[65290]=[null,null,N.prototype.Rf,N.prototype.ih,"RKDA"],Zg[65294]=[null,null,N.prototype.Sf,N.prototype.jh,"RKDB"],Zg);
|
||||
function M(a){Eg.call(this,"RL11",a,131072,D,D.se,$g);this.a=this.m=this.f=this.g=this.i=this.h=0}p(M,Eg);h=M.prototype;h.bb=function(a){a||(a=[U.ha|U.za,0,0,0,0,0]);a=ia(a);this.a=a.next().value;this.m=a.next().value;this.f=a.next().value;this.g=a.next().value;this.i=a.next().value;this.h=a.next().value;return!0};h.oc=function(){return[this.a,this.m,this.f,this.g,this.i,this.h]};
|
||||
h.sb=function(a,b,c,d,e,f,g,k,l){g=0;a=a.P;k=null;a||(g=ah.Ba,e=0);for(;e;){if(!k){k=a.seek(b,c,d+1);if(!k){g=ah.Ba;break}var m=0}var n,q;if(0>(n=a.read(k,m++))||0>(q=a.read(k,m++))){g=ah.Ba;break}Xb(this.v,Dd(this.c,f),n|q<<8);if(wc(this.v)){g=ah.Cb;break}f+=2;e--;if(m>=a.Z&&(k=null,++d>=a.R&&(d=0,++c>=a.T&&(c=0,++b>=a.M)))){g=ah.Ba;break}}return l?l(g,b,c,d,e,f):g};
|
||||
h.uc=function(a,b,c,d,e,f,g,k,l){g=0;a=a.P;k=null;a||(g=ah.Ba,e=0);for(;e;){var m=Zb(this.v,Dd(this.c,f));if(wc(this.v)){g=ah.Cb;break}f+=2;e--;if(!k){k=a.seek(b,c,d+1,!0);if(!k){g=ah.Ba;break}var n=0}if(!a.write(k,n++,m&255)||!a.write(k,n++,m>>8)){g=ah.Ba;break}if(n>=a.Z&&(k=null,++d>=a.R&&(d=0,++c>=a.T&&(c=0,++b>=a.M)))){g=ah.Ba;break}}return l?l(g,b,c,d,e,f):g};
|
||||
h.te=function(a,b,c,d,e,f){this.m=f&65535;this.a=this.a&~U.ya|f>>16-U.V.ya&U.ya;this.h=f>>16&bh.Fa;this.g=this.f=b<<V.V.Eb|(c?V.bc:0)|d&V.yd;this.i=65536-e&65535;a&&(this.a=this.a|a|U.Ja);return!0};h.Yf=function(){return this.a&U.Db};
|
||||
h.ph=function(a){this.a=this.a&~U.va|a&U.va;this.h=this.h&60|(a&U.ya)>>U.V.ya;if(!(this.a&U.za)){a=!0;var b=this.b[(this.a&U.Ta)>>U.V.Ta],c=b.P;this.a&=~U.ha;switch(this.a&U.ca){case ch.Ie:this.i&dh.nd&&(this.a&=U.ha|U.ca|U.ya);this.i=b.status|this.g&V.bc|(c&&512==c.M?dh.ce:0);break;case ch.cc:if((this.f&V.be)==V.Fe){var d=this.f&V.Eb;b=(this.f&V.He)<<2;this.g=this.f&V.Ge?this.g+d:this.g-d;this.f=this.g=this.g&V.Eb|b}break;case ch.ne:this.i=this.g;break;case ch.ke:d=this.sb;case ch.Le:d||(d=this.uc);
|
||||
var e=this.f>>V.V.Eb;var f=this.f&V.bc?1:0;var g=this.f&V.yd;!c||e>=c.M||g>=c.R?this.a=this.a|ah.Ba|U.Ja:(a=65536-this.i&65535,c=(this.h&bh.Fa)<<16|this.m,a=d.call(this,b,e,f,g,a,c,2,!1,this.te.bind(this)))}a&&(this.a=this.a|U.ha|U.za,this.a&U.eb&&yc(this.c,this.qa))}};h.Wf=function(){return this.m};h.nh=function(a){this.m=a&eh.va};h.Zf=function(){return this.f};h.qh=function(a){this.f=a};h.$f=function(){return this.i};h.rh=function(a){this.i=a};h.Xf=function(){return this.h};
|
||||
h.oh=function(a){this.h=a&bh.Fa;this.a=this.a&~U.ya|(this.h&3)<<U.V.ya};var U=D.we,eh=D.ue,V=D.xe,dh=D.ac,bh=D.ve,ah=D.md,ch=D.ca,fh={},$g=(fh[63744]=[null,null,M.prototype.Yf,M.prototype.ph,"RLCS"],fh[63746]=[null,null,M.prototype.Wf,M.prototype.nh,"RLBA"],fh[63748]=[null,null,M.prototype.Zf,M.prototype.qh,"RLDA"],fh[63750]=[null,null,M.prototype.$f,M.prototype.rh,"RLMP"],fh[63752]=[null,null,M.prototype.Xf,M.prototype.oh,"RLBE"],fh);
|
||||
function Mc(a){Eg.call(this,"RX11",a,262144,ub,ub.ye,gh);this.u=this.s=this.f=this.w=this.a=this.m=0;this.g=W.gb;this.i=0;this.h=Array(128).fill(0)}p(Mc,Eg);h=Mc.prototype;
|
||||
h.bb=function(a){a?(a=ia(a),this.a=a.next().value,this.m=a.next().value,this.u=a.next().value,this.s=a.next().value,this.f=a.next().value,this.w=a.next().value,this.g=a.next().value,this.i=a.next().value,this.h=a.next().value):(this.m=this.a=0,this.s=this.u=1,this.w=this.f=0,this.g=W.Va,this.i=0,(a=this.qa)&&Dc(this.c,a),hh(this));return!0};h.oc=function(){return[this.a,this.m,this.u,this.s,this.f,this.w,this.g,this.i,this.h]};h.Md=function(a){0==a&&this.bb()};
|
||||
function ih(a,b){b&&(a.w=b,a.m=a.f,a.a|=X.Ja);a.g=W.gb;a.a|=X.DONE;a.a&X.eb&&yc(a.c,a.qa)}h.sb=function(a,b,c,d,e,f,g,k,l){k=0;var m=a.P,n=null;m||(k=a.pb?Y.Jc:Y.Ic,e=0);for(;e;){if(!n){if(b>=m.M){k=Y.he;break}n=m.seek(b,c,d+1);if(!n){k=Y.Qc;break}var q=0;++d>=m.R&&(d=0,++c>=m.T&&(c=0,++b))}var v;if(0>(a=m.read(n,q++))||0>(v=m.read(n,q++))){k=Y.Pc;break}Xb(this.v,Dd(this.c,f),a|v<<8);q>=m.Z&&(n=null);f+=g;e--}return l?l(k,b,c,d,e,f):k};
|
||||
function hh(a){var b=0,c=a.a&X.Uc?1:0,d=a.b[c];d=d&&d.P;var e=a.u&jh.Fa,f=a.s&kh.Fa;a.f&=~(Z.kd|Z.ud|Z.Ab|Z.ha);if(d)if(a.f|=Z.ha,c=d.seek(e,0,f,!0)){e=0;for(f=a.h.length;e<f;){var g=d.read(c,e);if(0>g){b=Y.Pc;break}a.h[e++]=g}c.Te&&(a.f|=Z.Ab)}else b=Y.Qc;else b=c?Y.Jc:Y.Ic;ih(a,b)}h.bg=function(a,b){a=this.a;if(!b)switch(a&=X.Db,this.g){case W.Ec:case W.EMPTY:this.i<this.h.length&&(this.a|=X.Ga);break;case W.Va:case W.Fb:case W.dc:2>this.i&&(this.a|=X.Ga)}return a};
|
||||
h.th=function(a){this.a=this.a&~X.va|a&X.va;if(this.a&X.INIT)this.bb();else if(this.a&X.Bb&&this.g==W.gb)switch(this.g=this.a&X.ca,this.a&=~(X.Bb|X.Ga|X.DONE|X.Ja),(a=this.qa)&&Dc(this.c,a),this.g){case W.Ec:case W.EMPTY:case W.Va:case W.Fb:case W.dc:this.i=0;break;case W.me:a=this.b[this.a&X.Uc?1:0];this.f&=~Z.ha;a&&a.P&&(this.f|=Z.ha);this.m=this.f;ih(this);break;case W.le:this.m=this.w,ih(this)}else this.a&X.eb?this.a&X.DONE&&yc(this.c,this.qa):(a=this.qa)&&Dc(this.c,a)};
|
||||
h.cg=function(a,b){if(!b)switch(this.g){case W.EMPTY:this.a&X.Ga&&(this.a&=~X.Ga,this.m=this.h[this.i]&255,++this.i>=this.h.length&&ih(this))}return this.m};
|
||||
h.uh=function(a){switch(this.g){case W.Ec:this.a&X.Ga&&(this.a&=~X.Ga,this.h[this.i]=a&255,++this.i>=this.h.length&&ih(this));break;case W.Va:case W.Fb:case W.dc:if(this.a&X.Ga)switch(this.a&=~X.Ga,this.i++){case 0:this.s=a;break;case 1:if(this.u=a,this.g==W.Va)hh(this);else{var b=this.g==W.dc,c=0,d=this.a&X.Uc?1:0,e=this.b[d];e=e&&e.P;var f=this.u&jh.Fa,g=this.s&kh.Fa;this.f&=~(Z.kd|Z.ud|Z.Ab|Z.ha);if(e)if(this.f|=Z.ha,d=e.seek(f,0,g,!0))for(b&&(d.Te=!0),b=0,f=this.h.length;b<f;){if(!e.write(d,b,
|
||||
this.h[b]&255)){c=Y.Pc;break}b++}else c=Y.Qc;else c=d?Y.Jc:Y.Ic;ih(this,c)}}}this.m=a};var X=ub.ze,jh=ub.Ce,kh=ub.Be,Z=ub.Ae,W=ub.ca,Y=ub.ae,lh={},gh=(lh[65144]=[null,null,Mc.prototype.bg,Mc.prototype.th,"RXCS"],lh[65146]=[null,null,Mc.prototype.cg,Mc.prototype.uh,"RXDB"],lh);
|
||||
function mh(a,b,c){t.call(this,"Computer",a,33554432);this.j.S=!1;this.H=null;nh(this,b);this.B=dd(this,"autoPower",a,6);this.g=0;this.K=+a.busWidth||+a.buswidth;this.s=this.i=this.u=null;this.m=this.J=!1;this.l=this.h=null;this.I=this.C=this.F=!1;this.O=dd(this,"url")||"";(Math.random()+.1).toString(36);this.b=oh(this);if(this.c=hb("CPU",this.id)){this.D=hb("Debugger",this.id);this.v=new bc({id:this.Ua+".bus",busWidth:this.K},this.c,this.D);var d=fb(this.id);if(this.w=(this.f=hb("Panel",this.id))&&
|
||||
h.oe=function(a,b,c,d,e,f){this.h=f&65535;this.a=this.a&~S.fb|f>>16-S.V.fb&S.fb;this.i=65536-e&65535;this.g=this.g&~Vg.Sc|d&Vg.Sc;this.f|=a;Wg(this);return!0};function Wg(a){a.a&=~S.Ja;a.f&&(a.f|=T.Zd,a.a|=S.Ja,a.f&T.Hc&&(a.a|=S.Hc))}h.Tf=function(){return this.s};h.kh=function(){};h.Uf=function(){return this.f};h.lh=function(){};h.Qf=function(){return this.a&S.Db};
|
||||
h.hh=function(a){this.a=this.a&~S.va|a&S.va;if(this.a&S.Bb){a=!0;var b,c=(this.g&Vg.Ta)>>Vg.V.Ta,d=this.b[c];this.a&=~(S.za|S.Tc);this.f&=~T.Ee;switch(b=this.a&S.ca){case Xg.Ud:this.f=this.g=0;this.a=S.za;break;case Xg.je:case Xg.Va:var e=this.sb;case Xg.Wc:case Xg.Fb:e||(e=this.uc);var f=(this.g&Vg.zb)>>Vg.V.zb;var g=(this.g&Vg.Kc)>>Vg.V.Kc;var k=this.g&Vg.Sc;var l=65536-this.i&65535;var m=(this.a&S.fb)<<16-S.V.fb|this.h;var n=this.a&S.fe?0:2;if(f>=d.M){this.f|=T.Xb;break}if(k>=d.R){this.f|=T.Yb;
|
||||
break}a=e.call(this,d,f,g,k,l,m,n,b>=Xg.Wc,this.oe.bind(this));break;case Xg.cc:f=(this.g&Vg.zb)>>Vg.V.zb;f<d.M?this.a|=S.Tc:this.f|=T.Xb;break;case Xg.$d:this.f=this.g=0,this.a=S.za|S.Tc}this.s=d.status|(d.P?Ug.ha:0)|c<<Ug.V.Mc|this.g&Ug.De;Wg(this);a&&(this.a&=~S.Bb,this.a|=S.za,this.a&S.eb&&yc(this.c,this.qa))}};h.Vf=function(){return this.i};h.mh=function(a){this.i=a};h.Pf=function(){return this.h};h.gh=function(a){this.h=a};h.Rf=function(){return this.g};h.ih=function(a){this.g=a};h.Sf=function(){return this.m};
|
||||
h.jh=function(a){this.m=a};var Ug=C.$b,T=C.re,S=C.pe,Vg=C.qe,Xg=C.ca,Yg={},Tg=(Yg[65280]=[null,null,N.prototype.Tf,N.prototype.kh,"RKDS"],Yg[65282]=[null,null,N.prototype.Uf,N.prototype.lh,"RKER"],Yg[65284]=[null,null,N.prototype.Qf,N.prototype.hh,"RKCS"],Yg[65286]=[null,null,N.prototype.Vf,N.prototype.mh,"RKWC"],Yg[65288]=[null,null,N.prototype.Pf,N.prototype.gh,"RKBA"],Yg[65290]=[null,null,N.prototype.Rf,N.prototype.ih,"RKDA"],Yg[65294]=[null,null,N.prototype.Sf,N.prototype.jh,"RKDB"],Yg);
|
||||
function M(a){Dg.call(this,"RL11",a,131072,D,D.se,Zg);this.a=this.m=this.f=this.g=this.i=this.h=0}p(M,Dg);h=M.prototype;h.bb=function(a){a||(a=[U.ha|U.za,0,0,0,0,0]);a=ia(a);this.a=a.next().value;this.m=a.next().value;this.f=a.next().value;this.g=a.next().value;this.i=a.next().value;this.h=a.next().value;return!0};h.oc=function(){return[this.a,this.m,this.f,this.g,this.i,this.h]};
|
||||
h.sb=function(a,b,c,d,e,f,g,k,l){g=0;a=a.P;k=null;a||(g=$g.Ba,e=0);for(;e;){if(!k){k=a.seek(b,c,d+1);if(!k){g=$g.Ba;break}var m=0}var n,q;if(0>(n=a.read(k,m++))||0>(q=a.read(k,m++))){g=$g.Ba;break}Xb(this.v,Dd(this.c,f),n|q<<8);if(wc(this.v)){g=$g.Cb;break}f+=2;e--;if(m>=a.Z&&(k=null,++d>=a.R&&(d=0,++c>=a.T&&(c=0,++b>=a.M)))){g=$g.Ba;break}}return l?l(g,b,c,d,e,f):g};
|
||||
h.uc=function(a,b,c,d,e,f,g,k,l){g=0;a=a.P;k=null;a||(g=$g.Ba,e=0);for(;e;){var m=Zb(this.v,Dd(this.c,f));if(wc(this.v)){g=$g.Cb;break}f+=2;e--;if(!k){k=a.seek(b,c,d+1,!0);if(!k){g=$g.Ba;break}var n=0}if(!a.write(k,n++,m&255)||!a.write(k,n++,m>>8)){g=$g.Ba;break}if(n>=a.Z&&(k=null,++d>=a.R&&(d=0,++c>=a.T&&(c=0,++b>=a.M)))){g=$g.Ba;break}}return l?l(g,b,c,d,e,f):g};
|
||||
h.te=function(a,b,c,d,e,f){this.m=f&65535;this.a=this.a&~U.ya|f>>16-U.V.ya&U.ya;this.h=f>>16&ah.Fa;this.g=this.f=b<<V.V.Eb|(c?V.bc:0)|d&V.yd;this.i=65536-e&65535;a&&(this.a=this.a|a|U.Ja);return!0};h.Yf=function(){return this.a&U.Db};
|
||||
h.ph=function(a){this.a=this.a&~U.va|a&U.va;this.h=this.h&60|(a&U.ya)>>U.V.ya;if(!(this.a&U.za)){a=!0;var b=this.b[(this.a&U.Ta)>>U.V.Ta],c=b.P;this.a&=~U.ha;switch(this.a&U.ca){case bh.Ie:this.i&ch.nd&&(this.a&=U.ha|U.ca|U.ya);this.i=b.status|this.g&V.bc|(c&&512==c.M?ch.ce:0);break;case bh.cc:if((this.f&V.be)==V.Fe){var d=this.f&V.Eb;b=(this.f&V.He)<<2;this.g=this.f&V.Ge?this.g+d:this.g-d;this.f=this.g=this.g&V.Eb|b}break;case bh.ne:this.i=this.g;break;case bh.ke:d=this.sb;case bh.Le:d||(d=this.uc);
|
||||
var e=this.f>>V.V.Eb;var f=this.f&V.bc?1:0;var g=this.f&V.yd;!c||e>=c.M||g>=c.R?this.a=this.a|$g.Ba|U.Ja:(a=65536-this.i&65535,c=(this.h&ah.Fa)<<16|this.m,a=d.call(this,b,e,f,g,a,c,2,!1,this.te.bind(this)))}a&&(this.a=this.a|U.ha|U.za,this.a&U.eb&&yc(this.c,this.qa))}};h.Wf=function(){return this.m};h.nh=function(a){this.m=a&dh.va};h.Zf=function(){return this.f};h.qh=function(a){this.f=a};h.$f=function(){return this.i};h.rh=function(a){this.i=a};h.Xf=function(){return this.h};
|
||||
h.oh=function(a){this.h=a&ah.Fa;this.a=this.a&~U.ya|(this.h&3)<<U.V.ya};var U=D.we,dh=D.ue,V=D.xe,ch=D.ac,ah=D.ve,$g=D.md,bh=D.ca,eh={},Zg=(eh[63744]=[null,null,M.prototype.Yf,M.prototype.ph,"RLCS"],eh[63746]=[null,null,M.prototype.Wf,M.prototype.nh,"RLBA"],eh[63748]=[null,null,M.prototype.Zf,M.prototype.qh,"RLDA"],eh[63750]=[null,null,M.prototype.$f,M.prototype.rh,"RLMP"],eh[63752]=[null,null,M.prototype.Xf,M.prototype.oh,"RLBE"],eh);
|
||||
function Mc(a){Dg.call(this,"RX11",a,262144,ub,ub.ye,fh);this.u=this.s=this.f=this.w=this.a=this.m=0;this.g=W.gb;this.i=0;this.h=Array(128).fill(0)}p(Mc,Dg);h=Mc.prototype;
|
||||
h.bb=function(a){a?(a=ia(a),this.a=a.next().value,this.m=a.next().value,this.u=a.next().value,this.s=a.next().value,this.f=a.next().value,this.w=a.next().value,this.g=a.next().value,this.i=a.next().value,this.h=a.next().value):(this.m=this.a=0,this.s=this.u=1,this.w=this.f=0,this.g=W.Va,this.i=0,(a=this.qa)&&Dc(this.c,a),gh(this));return!0};h.oc=function(){return[this.a,this.m,this.u,this.s,this.f,this.w,this.g,this.i,this.h]};h.Md=function(a){0==a&&this.bb()};
|
||||
function hh(a,b){b&&(a.w=b,a.m=a.f,a.a|=X.Ja);a.g=W.gb;a.a|=X.DONE;a.a&X.eb&&yc(a.c,a.qa)}h.sb=function(a,b,c,d,e,f,g,k,l){k=0;var m=a.P,n=null;m||(k=a.pb?Y.Jc:Y.Ic,e=0);for(;e;){if(!n){if(b>=m.M){k=Y.he;break}n=m.seek(b,c,d+1);if(!n){k=Y.Qc;break}var q=0;++d>=m.R&&(d=0,++c>=m.T&&(c=0,++b))}var v;if(0>(a=m.read(n,q++))||0>(v=m.read(n,q++))){k=Y.Pc;break}Xb(this.v,Dd(this.c,f),a|v<<8);q>=m.Z&&(n=null);f+=g;e--}return l?l(k,b,c,d,e,f):k};
|
||||
function gh(a){var b=0,c=a.a&X.Uc?1:0,d=a.b[c];d=d&&d.P;var e=a.u&ih.Fa,f=a.s&jh.Fa;a.f&=~(Z.kd|Z.ud|Z.Ab|Z.ha);if(d)if(a.f|=Z.ha,c=d.seek(e,0,f,!0)){e=0;for(f=a.h.length;e<f;){var g=d.read(c,e);if(0>g){b=Y.Pc;break}a.h[e++]=g}c.Te&&(a.f|=Z.Ab)}else b=Y.Qc;else b=c?Y.Jc:Y.Ic;hh(a,b)}h.bg=function(a,b){a=this.a;if(!b)switch(a&=X.Db,this.g){case W.Ec:case W.EMPTY:this.i<this.h.length&&(this.a|=X.Ga);break;case W.Va:case W.Fb:case W.dc:2>this.i&&(this.a|=X.Ga)}return a};
|
||||
h.th=function(a){this.a=this.a&~X.va|a&X.va;if(this.a&X.INIT)this.bb();else if(this.a&X.Bb&&this.g==W.gb)switch(this.g=this.a&X.ca,this.a&=~(X.Bb|X.Ga|X.DONE|X.Ja),(a=this.qa)&&Dc(this.c,a),this.g){case W.Ec:case W.EMPTY:case W.Va:case W.Fb:case W.dc:this.i=0;break;case W.me:a=this.b[this.a&X.Uc?1:0];this.f&=~Z.ha;a&&a.P&&(this.f|=Z.ha);this.m=this.f;hh(this);break;case W.le:this.m=this.w,hh(this)}else this.a&X.eb?this.a&X.DONE&&yc(this.c,this.qa):(a=this.qa)&&Dc(this.c,a)};
|
||||
h.cg=function(a,b){if(!b)switch(this.g){case W.EMPTY:this.a&X.Ga&&(this.a&=~X.Ga,this.m=this.h[this.i]&255,++this.i>=this.h.length&&hh(this))}return this.m};
|
||||
h.uh=function(a){switch(this.g){case W.Ec:this.a&X.Ga&&(this.a&=~X.Ga,this.h[this.i]=a&255,++this.i>=this.h.length&&hh(this));break;case W.Va:case W.Fb:case W.dc:if(this.a&X.Ga)switch(this.a&=~X.Ga,this.i++){case 0:this.s=a;break;case 1:if(this.u=a,this.g==W.Va)gh(this);else{var b=this.g==W.dc,c=0,d=this.a&X.Uc?1:0,e=this.b[d];e=e&&e.P;var f=this.u&ih.Fa,g=this.s&jh.Fa;this.f&=~(Z.kd|Z.ud|Z.Ab|Z.ha);if(e)if(this.f|=Z.ha,d=e.seek(f,0,g,!0))for(b&&(d.Te=!0),b=0,f=this.h.length;b<f;){if(!e.write(d,b,
|
||||
this.h[b]&255)){c=Y.Pc;break}b++}else c=Y.Qc;else c=d?Y.Jc:Y.Ic;hh(this,c)}}}this.m=a};var X=ub.ze,ih=ub.Ce,jh=ub.Be,Z=ub.Ae,W=ub.ca,Y=ub.ae,kh={},fh=(kh[65144]=[null,null,Mc.prototype.bg,Mc.prototype.th,"RXCS"],kh[65146]=[null,null,Mc.prototype.cg,Mc.prototype.uh,"RXDB"],kh);
|
||||
function lh(a,b,c){t.call(this,"Computer",a,33554432);this.j.S=!1;this.H=null;mh(this,b);this.B=dd(this,"autoPower",a,6);this.g=0;this.K=+a.busWidth||+a.buswidth;this.s=this.i=this.u=null;this.m=this.J=!1;this.l=this.h=null;this.I=this.C=this.F=!1;this.O=dd(this,"url")||"";(Math.random()+.1).toString(36);this.b=nh(this);if(this.c=hb("CPU",this.id)){this.D=hb("Debugger",this.id);this.v=new bc({id:this.Ua+".bus",busWidth:this.K},this.c,this.D);var d=fb(this.id);if(this.w=(this.f=hb("Panel",this.id))&&
|
||||
this.f.o.print)for(b=0;b<d.length;b++){var e=d[b];e.G=this.f.G;e.print=this.f.print;e.aa=this.f.aa}this.aa(rb+" v1.37.0\nCopyright \u00a9 2012-2017 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");this.aa("Portions adapted from the PDP-11/70 Emulator by Paul Nankervis <http://skn.noip.me/pdp11/pdp11.html>");for(b=0;b<d.length;b++)e=d[b],e.ja&&e.ja(this,this.v,this.c,this.D);b=null;e=dd(this,"resume",a);void 0!==e&&(1<e.length?b=this.i=e:this.a=parseInt(e,
|
||||
10));var f;if(a=dd(this,"state")||(f=!0,a.state))this.u=b=a,f||(this.m=!0,this.a=ph),this.a&&(this.l=new E(this,"1.37.0"),qh(this.l)?b=null:delete this.l);!b&&this.a&&(b=rh(this))&&(this.m=!0);if(b){var g=this;Ha(b,null,!0,function(a,b,c){c?(g.i=null,g.m=!1,g.G("Unable to load machine state from server (error "+c+(b?": "+Ca(b):"")+")")):(g.s=b,g.J=!0);B(g)})}else B(this);this.o.power||(this.B=!0);!c&&this.B&&this.Tb(this.Qb)}else r("Unable to find CPU component")}p(mh,t);
|
||||
function nh(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){r(d.message+" ("+c+")")}}a.H=b}function dd(a,b,c,d){var e=b.toLowerCase();e=Pa(b)||Pa(e);void 0===e&&a.H&&(e=a.H[b]);void 0===e&&c&&(e=c[b]);void 0===e&&"object"==typeof resources&&resources[b]&&(e=b);void 0===e&&(e=void 0);if("string"==typeof e&&d)switch(d){case 4:e=+e;isNaN(e)&&(e=0);break;case 6:e="true"==e}return e}h=mh.prototype;
|
||||
h.Tb=function(a,b){for(var c=this,d=fb(this.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:this;if(!ob(f)){ob(f,function(){c.Tb(a,b)});return}}a.call(this,b)};function sh(a,b){var c=new E(a,"1.37.0",th);if(qh(c)&&uh(c)){var d=c.get(vh),e=b?b.get(vh):"unknown";d!=e&&(a.G("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}
|
||||
h.Qb=function(a){void 0===a&&(a=this.a||(this.s?wh:ph));if(!this.g){this.g++;var b=!1,c=!1;this.F=!1;var d=this.l||new E(this,"1.37.0");if(a==xh)b=!0;else if(a>ph){if(qh(d,this.s)){this.h=new E(this,"1.37.0",Ah);qh(this.h)&&(Bh(this,d),a=Ch,Dh(this.h));this.h.set(vh,Ea());Eh(this.h);var e=this.a&&!this.m;if(a==wh||db("Click OK to restore the previous "+rb+" machine state, or CANCEL to reset the machine.")){if(c=uh(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?qh(d,g):("error"==f&&"no machine state"!=
|
||||
g?(this.G("Error: "+g),"unable to verify user"==g&&(Na(Fh,""),this.b=null)):this.aa(f+": "+g),Dh(d),qh(d)?(c=uh(d),e=!0):c=!1))}e&&sh(this,c?d:null)}else a==Ch&&d.clear()}else sh(this);delete this.s;delete this.l}e=fb(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.c&&(c=Gh(this,g,d,b,c));b=[d,a,c];a!=xh?this.Tb(this.Hd,b):this.Hd(b)}};
|
||||
function Gh(a,b,c,d,e){if(!b.j.S){b.j.S=!0;var f=null;try{if(e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/-[0-9]+\./i,".")))),"string"===typeof f&&(f=null),!b.la(f,d)&&f&&(r("Unable to restore state for "+b.type),a.u&&!a.J?(c.clear(),a.a=ph,window&&window.location.reload()):a.F=!0,b.la(null),e=!1),!d&&b.qd){var g=b.qd.split("|");for(a=0;a<g.length;a++)b.status(g[a])}}catch(k){r("Error restoring state for "+b.type+" ("+k.message+")")}}return e}
|
||||
h.Hd=function(a){var b=a[0],c=0>a[1];a=a[2];this.I=!0;this.j.S=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.c&&(Gh(this,this.c,b,c,a),Vb(this,-2),this.c.Y());this.F&&(Bh(this,b),b.clear());!c&&this.h&&(this.h.clear(),delete this.h);this.g=0};
|
||||
function Bh(a,b){if(db("There may be a problem with your "+rb+" machine.\n\nTo help us diagnose it, click OK to send this "+rb+" machine state to http://www.pcjs.org.")){var c=a.O;a=a.b||"";b=b.toString();var d={};d.app=rb;d.ver="1.37.0";d.url=c;d.user=a;d.type="bug";d.data=b;Ha("http://www.pcjs.org/api/v1/report",d,!0)}}
|
||||
function Hh(a,b,c){var d="none";if(a.g)return null;a.g--;var e=new E(a,"1.37.0"),f=new E(a,"1.37.0",th),g=Ea();f.set(vh,g);e.set(vh,g);e.set(Ih,"1.37.0");e.set(Jh,window?window.location.href:null);e.set(Kh,window?window.navigator.userAgent:"");if(a.c&&a.c.ka){c&&(b&&(a.c.j.Y=a.c.j.N),G(a.c));var k=a.c.ka(b,c);"object"===typeof k&&e.set(a.c.id,k);c&&(a.c.j.S=!1,!1===k&&(d=null))}g=fb(a.id);for(var l=0;l<g.length;l++){var m=g[l];m.j.S&&(m.ka&&(k=m.ka(b,c),"object"===typeof k&&e.set(m.id,k)),c&&(m.j.S=
|
||||
!1,!1===k&&(d=null)))}d&&(c?(g=k=!1,b?(a.b&&Lh(a,a.b,e.toString()),Eh(f)&&Eh(e)||(d=null,k=g=!0)):a.a&&(k=!0,g=a.a==Mh),k&&e.clear(g)):d=e.toString());c&&(a.j.S=!1,b=a.o.power)&&(b.textContent="Power");a.g=0;return d}h.reset=function(){this.j.reset=!0;this.v&&this.v.reset&&this.v.reset();this.c&&this.c.reset&&this.c.reset();for(var a=fb(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.v&&c!==this.c&&c.reset&&c.reset()}this.j.reset=!1;Vb(this,-1)};
|
||||
10));var f;if(a=dd(this,"state")||(f=!0,a.state))this.u=b=a,f||(this.m=!0,this.a=oh),this.a&&(this.l=new E(this,"1.37.0"),ph(this.l)?b=null:delete this.l);!b&&this.a&&(b=qh(this))&&(this.m=!0);if(b){var g=this;Ha(b,null,!0,function(a,b,c){c?(g.i=null,g.m=!1,g.G("Unable to load machine state from server (error "+c+(b?": "+Ca(b):"")+")")):(g.s=b,g.J=!0);B(g)})}else B(this);this.o.power||(this.B=!0);!c&&this.B&&this.Tb(this.Qb)}else r("Unable to find CPU component")}p(lh,t);
|
||||
function mh(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){r(d.message+" ("+c+")")}}a.H=b}function dd(a,b,c,d){var e=b.toLowerCase();e=Pa(b)||Pa(e);void 0===e&&a.H&&(e=a.H[b]);void 0===e&&c&&(e=c[b]);void 0===e&&"object"==typeof resources&&resources[b]&&(e=b);void 0===e&&(e=void 0);if("string"==typeof e&&d)switch(d){case 4:e=+e;isNaN(e)&&(e=0);break;case 6:e="true"==e}return e}h=lh.prototype;
|
||||
h.Tb=function(a,b){for(var c=this,d=fb(this.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:this;if(!ob(f)){ob(f,function(){c.Tb(a,b)});return}}a.call(this,b)};function rh(a,b){var c=new E(a,"1.37.0",sh);if(ph(c)&&th(c)){var d=c.get(uh),e=b?b.get(uh):"unknown";d!=e&&(a.G("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}
|
||||
h.Qb=function(a){void 0===a&&(a=this.a||(this.s?vh:oh));if(!this.g){this.g++;var b=!1,c=!1;this.F=!1;var d=this.l||new E(this,"1.37.0");if(a==wh)b=!0;else if(a>oh){if(ph(d,this.s)){this.h=new E(this,"1.37.0",zh);ph(this.h)&&(Ah(this,d),a=Bh,Ch(this.h));this.h.set(uh,Ea());Dh(this.h);var e=this.a&&!this.m;if(a==vh||db("Click OK to restore the previous "+rb+" machine state, or CANCEL to reset the machine.")){if(c=th(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?ph(d,g):("error"==f&&"no machine state"!=
|
||||
g?(this.G("Error: "+g),"unable to verify user"==g&&(Na(Eh,""),this.b=null)):this.aa(f+": "+g),Ch(d),ph(d)?(c=th(d),e=!0):c=!1))}e&&rh(this,c?d:null)}else a==Bh&&d.clear()}else rh(this);delete this.s;delete this.l}e=fb(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.c&&(c=Fh(this,g,d,b,c));b=[d,a,c];a!=wh?this.Tb(this.Hd,b):this.Hd(b)}};
|
||||
function Fh(a,b,c,d,e){if(!b.j.S){b.j.S=!0;var f=null;try{if(e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/-[0-9]+\./i,".")))),"string"===typeof f&&(f=null),!b.la(f,d)&&f&&(r("Unable to restore state for "+b.type),a.u&&!a.J?(c.clear(),a.a=oh,window&&window.location.reload()):a.F=!0,b.la(null),e=!1),!d&&b.qd){var g=b.qd.split("|");for(a=0;a<g.length;a++)b.status(g[a])}}catch(k){r("Error restoring state for "+b.type+" ("+k.message+")")}}return e}
|
||||
h.Hd=function(a){var b=a[0],c=0>a[1];a=a[2];this.I=!0;this.j.S=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.c&&(Fh(this,this.c,b,c,a),Vb(this,-2),this.c.Y());this.F&&(Ah(this,b),b.clear());!c&&this.h&&(this.h.clear(),delete this.h);this.g=0};
|
||||
function Ah(a,b){if(db("There may be a problem with your "+rb+" machine.\n\nTo help us diagnose it, click OK to send this "+rb+" machine state to http://www.pcjs.org.")){var c=a.O;a=a.b||"";b=b.toString();var d={};d.app=rb;d.ver="1.37.0";d.url=c;d.user=a;d.type="bug";d.data=b;Ha("http://www.pcjs.org/api/v1/report",d,!0)}}
|
||||
function Gh(a,b,c){var d="none";if(a.g)return null;a.g--;var e=new E(a,"1.37.0"),f=new E(a,"1.37.0",sh),g=Ea();f.set(uh,g);e.set(uh,g);e.set(Hh,"1.37.0");e.set(Ih,window?window.location.href:null);e.set(Jh,window?window.navigator.userAgent:"");if(a.c&&a.c.ka){c&&(b&&(a.c.j.Y=a.c.j.N),G(a.c));var k=a.c.ka(b,c);"object"===typeof k&&e.set(a.c.id,k);c&&(a.c.j.S=!1,!1===k&&(d=null))}g=fb(a.id);for(var l=0;l<g.length;l++){var m=g[l];m.j.S&&(m.ka&&(k=m.ka(b,c),"object"===typeof k&&e.set(m.id,k)),c&&(m.j.S=
|
||||
!1,!1===k&&(d=null)))}d&&(c?(g=k=!1,b?(a.b&&Kh(a,a.b,e.toString()),Dh(f)&&Dh(e)||(d=null,k=g=!0)):a.a&&(k=!0,g=a.a==Lh),k&&e.clear(g)):d=e.toString());c&&(a.j.S=!1,b=a.o.power)&&(b.textContent="Power");a.g=0;return d}h.reset=function(){this.j.reset=!0;this.v&&this.v.reset&&this.v.reset();this.c&&this.c.reset&&this.c.reset();for(var a=fb(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.v&&c!==this.c&&c.reset&&c.reset()}this.j.reset=!1;Vb(this,-1)};
|
||||
h.start=function(a,b){for(var c=fb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}Vb(this,-1)};h.stop=function(a,b){for(var c=fb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}Vb(this,-1)};
|
||||
function Vb(a,b){if(a.c){var c=a.c,d=b||0,e=c.o.speed;e&&(0>=d||30<=(c.hd+=d))&&(e.textContent=c.j.N?c.Wa.toFixed(2)+"Mhz":"Stopped",c.hd=0)}if(a.f&&(a=a.f,b=b||0,a.l)){c=a.c.j.N;d=!!(a.c.g&8);if(0>=b||60<=(a.i+=b)){for(e=0;e<a.c.b.length;e++)Lb(a,"R"+e,a.c.b[e]);e=Jc(a.c);Lb(a,"PS",e);Lb(a,"NF",e&8?1:0,1);Lb(a,"ZF",e&4?1:0,1);Lb(a,"VF",e&2?1:0,1);Lb(a,"CF",e&1?1:0,1);a.i=0}-1>b?a.U=a.c.b[7]:0<b&&c&&!d&&(a.U=a.c.Ka);Hb(a,a.U);yb(a,a.b);b=a.c;b=b.jb?b.ta&16?1:2:4;$b(a,"B22",b&1);$b(a,"B18",b&2);$b(a,
|
||||
"B16",b&4)}}
|
||||
h.ma=function(a,b,c){var d=this;switch(b){case "power":return this.o[b]=c,c.onclick=function(){d.g||(d.j.S?Hh(d,!1,!0):d.Tb(d.Qb))},!0;case "reset":return this.o[b]=c,c.onclick=function(){if(d.j.S&&!d.g)if(d.a&&!d.i){var a=db("Click OK to save changes to this "+rb+" machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");Hh(d,a,!0);!a&&d.u?window&&window.location.reload():(a||(d.C=!0),d.Qb(ph),d.C=!1)}else d.reset(),d.c&&!d.D&&d.c.Y()},!0;case "save":if(za(Ja(),"pcjs.org"))c.parentNode.removeChild(c);else return this.o[b]=
|
||||
c,c.onclick=function(){var a=oh(d,!0);if(a){var b=!!(d.a&&!d.i||d.u),c=Hh(d,b);b?Lh(d,a,c):d.G("Resume disabled, machine state not saved")}},!0}return!1};function oh(a,b){var c=a.b;c||((c=Ma(Fh),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=Nh(a,c))||a.G("The user ID is invalid.")):b&&a.G("Browser local storage is not available"));return c}
|
||||
function Nh(a,b){a.b=null;b=Ha(Ja()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Na(Fh,b.data),a.b=b.data)}catch(d){r(d.message+" ("+c+")")}return a.b}function rh(a){var b=null;a.b&&(b=Ja()+"/api/v1/user?req=load&user="+a.b+"&state="+Oh(a,"1.37.0"));return b}
|
||||
function Lh(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=Oh(a,"1.37.0");d.data=c;b=Ha(Ja()+"/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.G("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.G(c),Na(Fh,""),a.b=null)}}
|
||||
function hg(a){var b;a=fb(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 kd(a){if(a.w){var b=0,c=0;window&&(b=window.scrollX,c=window.scrollY);a.w.focus();window&&window.scrollTo(b,c)}}var Ah="failsafe",th="validate",vh="timestamp",Ih="version",Jh="url",Kh="browser",Fh="user",xh=-1,ph=0,wh=1,Ch=2,Mh=3;
|
||||
Sa(function(){for(var a=z(document,y+"-machine"),b=0;b<a.length;b++){var c=a[b],d=A(c);c=z(c,y,"computer");for(var e=0;e<c.length;e++){var f=c[e],g=A(f);g=new mh(g,d,!0);x(g,f);g.B&&g.Tb(g.Qb)}}});Ta.show.push(function(){for(var a=z(document,y,"computer"),b=0;b<a.length;b++){var c=A(a[b]);if(c=hb("Computer",c.id))c.j.fd=!1,c.I&&!c.j.S&&c.Qb(xh)}});
|
||||
Ta.exit.push(function(){for(var a=z(document,y,"computer"),b=0;b<a.length;b++){var c=A(a[b]);if(c=hb("Computer",c.id))c.j.fd=!0,c.j.S&&Hh(c,!(!c.a||c.i),!0)}});function E(a,b,c){this.id=a.id;this.a="";this.c={};this.b=this.o=!1;this.key=Oh(a,b,c);Dh(this,a.Ke)}h=E.prototype;h.set=function(a,b){try{this.c[a]=b}catch(c){}};h.get=function(a){return this.c[a]||null};h.data=function(){return this.c};function qh(a,b){return b?(a.a=b,a.b=!0,a.o=!1,!0):a.b?!0:Ka()&&(b=Ma(a.key))?(a.a=b,a.b=!0):!1}
|
||||
function uh(a){var b=!0;if(!a.o)try{a.c=JSON.parse(a.a),a.o=!0}catch(c){r(c.message||c),b=!1}return b}function Eh(a){var b=!0;if(Ka()){var c=JSON.stringify(a.c);Na(a.key,c)||(r("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}h.toString=function(){return this.c?JSON.stringify(this.c):this.a};function Dh(a,b){a.a="";a.c={};a.b=a.o=!1;b&&a.set("parms",b)}
|
||||
h.clear=function(a){Dh(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 Oh(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 Ph=0;
|
||||
function Qh(a,b,c,d,e,f,g){f("Loading "+a+"...");Ha(a,null,!0,function(k,l,m){m?(l||(l="unable to load "+a+" ("+m+")"),g(l,null)):Rh(l,a,b,c,d,e,f,g)})}
|
||||
function Rh(a,b,c,d,e,f,g,k){function l(a,g){if(g)k(g,null);else{c&&(ab(c,b,a),(g=b)&&0>g.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(g=window.location.pathname+g),e?"}"==e.slice(-1)?(e=e.slice(0,-1),1<e.length&&(e+=",")):e='{state:"'+e+'",':e="{",e+='url:"'+g+'"}',"object"==typeof resources&&(g=null),e=e.replace(/\$/g,"$$$$"),a=a.replace(/(<machine[^>]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(e?" parms='"+e+"'":"")+(g?' url="'+g+'"':"")));f||(a=a.replace(/(<xsl:variable name="APPNAME">).*?(<\/xsl:variable>)/,
|
||||
"$1PDPjs$2"),a=a.replace(/(<xsl:variable name="APPCLASS">).*?(<\/xsl:variable>)/,"$1"+d+"$2"));g=null;if("<"==a.charAt(0))try{f||(a=a.replace(/<!DOCTYPE(.|[\r\n])*]>\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(g=new window.ActiveXObject("Microsoft.XMLDOM"),g.async=!1,g.loadXML(a)):g=(new window.DOMParser).parseFromString(a,"text/xml")}catch(q){g=null,a=q.message}else a="unrecognized XML: "+(255<a.length?a.substr(0,255)+"...":a);k(a,g)}}a?f?Sh(a,g,l):l(a,null):k("no data"+(b?" for file: "+
|
||||
h.ma=function(a,b,c){var d=this;switch(b){case "power":return this.o[b]=c,c.onclick=function(){d.g||(d.j.S?Gh(d,!1,!0):d.Tb(d.Qb))},!0;case "reset":return this.o[b]=c,c.onclick=function(){if(d.j.S&&!d.g)if(d.a&&!d.i){var a=db("Click OK to save changes to this "+rb+" machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");Gh(d,a,!0);!a&&d.u?window&&window.location.reload():(a||(d.C=!0),d.Qb(oh),d.C=!1)}else d.reset(),d.c&&!d.D&&d.c.Y()},!0;case "save":if(za(Ja(),"pcjs.org"))c.parentNode.removeChild(c);else return this.o[b]=
|
||||
c,c.onclick=function(){var a=nh(d,!0);if(a){var b=!!(d.a&&!d.i||d.u),c=Gh(d,b);b?Kh(d,a,c):d.G("Resume disabled, machine state not saved")}},!0}return!1};function nh(a,b){var c=a.b;c||((c=Ma(Eh),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=Mh(a,c))||a.G("The user ID is invalid.")):b&&a.G("Browser local storage is not available"));return c}
|
||||
function Mh(a,b){a.b=null;b=Ha(Ja()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Na(Eh,b.data),a.b=b.data)}catch(d){r(d.message+" ("+c+")")}return a.b}function qh(a){var b=null;a.b&&(b=Ja()+"/api/v1/user?req=load&user="+a.b+"&state="+Nh(a,"1.37.0"));return b}
|
||||
function Kh(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=Nh(a,"1.37.0");d.data=c;b=Ha(Ja()+"/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.G("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.G(c),Na(Eh,""),a.b=null)}}
|
||||
function hg(a){var b;a=fb(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 kd(a){if(a.w){var b=0,c=0;window&&(b=window.scrollX,c=window.scrollY);a.w.focus();window&&window.scrollTo(b,c)}}var zh="failsafe",sh="validate",uh="timestamp",Hh="version",Ih="url",Jh="browser",Eh="user",wh=-1,oh=0,vh=1,Bh=2,Lh=3;
|
||||
Sa(function(){for(var a=z(document,y+"-machine"),b=0;b<a.length;b++){var c=a[b],d=A(c);c=z(c,y,"computer");for(var e=0;e<c.length;e++){var f=c[e],g=A(f);g=new lh(g,d,!0);x(g,f);g.B&&g.Tb(g.Qb)}}});Ta.show.push(function(){for(var a=z(document,y,"computer"),b=0;b<a.length;b++){var c=A(a[b]);if(c=hb("Computer",c.id))c.j.fd=!1,c.I&&!c.j.S&&c.Qb(wh)}});
|
||||
Ta.exit.push(function(){for(var a=z(document,y,"computer"),b=0;b<a.length;b++){var c=A(a[b]);if(c=hb("Computer",c.id))c.j.fd=!0,c.j.S&&Gh(c,!(!c.a||c.i),!0)}});function E(a,b,c){this.id=a.id;this.a="";this.c={};this.b=this.o=!1;this.key=Nh(a,b,c);Ch(this,a.Ke)}h=E.prototype;h.set=function(a,b){try{this.c[a]=b}catch(c){}};h.get=function(a){return this.c[a]||null};h.data=function(){return this.c};function ph(a,b){return b?(a.a=b,a.b=!0,a.o=!1,!0):a.b?!0:Ka()&&(b=Ma(a.key))?(a.a=b,a.b=!0):!1}
|
||||
function th(a){var b=!0;if(!a.o)try{a.c=JSON.parse(a.a),a.o=!0}catch(c){r(c.message||c),b=!1}return b}function Dh(a){var b=!0;if(Ka()){var c=JSON.stringify(a.c);Na(a.key,c)||(r("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}h.toString=function(){return this.c?JSON.stringify(this.c):this.a};function Ch(a,b){a.a="";a.c={};a.b=a.o=!1;b&&a.set("parms",b)}
|
||||
h.clear=function(a){Ch(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 Nh(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 Oh=0;
|
||||
function Ph(a,b,c,d,e,f,g){f("Loading "+a+"...");Ha(a,null,!0,function(k,l,m){m?(l||(l="unable to load "+a+" ("+m+")"),g(l,null)):Qh(l,a,b,c,d,e,f,g)})}
|
||||
function Qh(a,b,c,d,e,f,g,k){function l(a,g){if(g)k(g,null);else{c&&(ab(c,b,a),(g=b)&&0>g.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(g=window.location.pathname+g),e?"}"==e.slice(-1)?(e=e.slice(0,-1),1<e.length&&(e+=",")):e='{state:"'+e+'",':e="{",e+='url:"'+g+'"}',"object"==typeof resources&&(g=null),e=e.replace(/\$/g,"$$$$"),a=a.replace(/(<machine[^>]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(e?" parms='"+e+"'":"")+(g?' url="'+g+'"':"")));f||(a=a.replace(/(<xsl:variable name="APPNAME">).*?(<\/xsl:variable>)/,
|
||||
"$1PDPjs$2"),a=a.replace(/(<xsl:variable name="APPCLASS">).*?(<\/xsl:variable>)/,"$1"+d+"$2"));g=null;if("<"==a.charAt(0))try{f||(a=a.replace(/<!DOCTYPE(.|[\r\n])*]>\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(g=new window.ActiveXObject("Microsoft.XMLDOM"),g.async=!1,g.loadXML(a)):g=(new window.DOMParser).parseFromString(a,"text/xml")}catch(q){g=null,a=q.message}else a="unrecognized XML: "+(255<a.length?a.substr(0,255)+"...":a);k(a,g)}}a?f?Rh(a,g,l):l(a,null):k("no data"+(b?" for file: "+
|
||||
b:""),null)}
|
||||
function Sh(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ha(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],m,n=/( [a-z]+=)(['"])(.*?)\2/gi;m=n.exec(f);)l=0>l.toLowerCase().indexOf(m[1].toLowerCase())?l.replace(">",m[0]+">"):l.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);k[0]!=l&&(g=g.replace(k[0],l))}else{c(a,"missing <"+d[1]+
|
||||
"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/,"");a=a.replace(d[0],g);Sh(a,b,c)}})}else c(a,null)}
|
||||
function Th(a,b,c,d,e){function f(a){if(void 0===l){var b=k&&z(k,"machine-warning");l=b&&b[0]||k}l&&(l.innerHTML=Aa(a))}function g(a){f("Error: "+a);m&&(--Ph||Xa(!0));m=!1}var k,l,m=!0;Ph++;bb[b]={};try{if(k=document.getElementById(b)){var n;if("object"==typeof resources&&(n=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText=n:v.appendChild(document.createTextNode(n));q.appendChild(v)}d||
|
||||
(n=a,"pdp"==a.substr(0,3)&&(n="pdpjs"),d="/versions/"+n+"/1.37.0/components.xsl");n=function(e,l){l?Qh(d,null,a,null,!1,f,function(a,e){e?(ab(b,d,a),f("Processing "+c+"..."),window.ActiveXObject||"ActiveXObject"in window?(e=l.transformNode(e))?(k.outerHTML=e,--Ph||Xa(!0)):g("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(a=new XSLTProcessor,a.importStylesheet(e),(e=a.transformToFragment(l,document))?k.parentNode?(k.parentNode.replaceChild(e,k),--Ph||
|
||||
Xa(!0)):g("invalid machine element: "+b):g("transformToFragment failed")):g("unable to transform XML: unsupported browser")):g(a)}):g(e)};"<"!=c.charAt(0)?Qh(c,b,a,e,!0,f,n):Rh(c,null,b,a,e,!1,f,n)}else g("missing machine element: "+b)}catch(u){g(u.message)}return m}window.embedPDP10=function(a,b,c,d){Xa(!1);return Th("pdp10",a,b,c,d)};window.embedPDP11=function(a,b,c,d){Xa(!1);return Th("pdp11",a,b,c,d)};
|
||||
function Rh(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ha(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],m,n=/( [a-z]+=)(['"])(.*?)\2/gi;m=n.exec(f);)l=0>l.toLowerCase().indexOf(m[1].toLowerCase())?l.replace(">",m[0]+">"):l.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);k[0]!=l&&(g=g.replace(k[0],l))}else{c(a,"missing <"+d[1]+
|
||||
"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/,"");a=a.replace(d[0],g);Rh(a,b,c)}})}else c(a,null)}
|
||||
function Sh(a,b,c,d,e){function f(a){if(void 0===l){var b=k&&z(k,"machine-warning");l=b&&b[0]||k}l&&(l.innerHTML=Aa(a))}function g(a){f("Error: "+a);m&&(--Oh||Xa(!0));m=!1}var k,l,m=!0;Oh++;bb[b]={};try{if(k=document.getElementById(b)){var n;if("object"==typeof resources&&(n=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText=n:v.appendChild(document.createTextNode(n));q.appendChild(v)}d||
|
||||
(n=a,"pdp"==a.substr(0,3)&&(n="pdpjs"),d="/versions/"+n+"/1.37.0/components.xsl");n=function(e,l){l?Ph(d,null,a,null,!1,f,function(a,e){e?(ab(b,d,a),f("Processing "+c+"..."),window.ActiveXObject||"ActiveXObject"in window?(e=l.transformNode(e))?(k.outerHTML=e,--Oh||Xa(!0)):g("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(a=new XSLTProcessor,a.importStylesheet(e),(e=a.transformToFragment(l,document))?k.parentNode?(k.parentNode.replaceChild(e,k),--Oh||
|
||||
Xa(!0)):g("invalid machine element: "+b):g("transformToFragment failed")):g("unable to transform XML: unsupported browser")):g(a)}):g(e)};"<"!=c.charAt(0)?Ph(c,b,a,e,!0,f,n):Qh(c,null,b,a,e,!1,f,n)}else g("missing machine element: "+b)}catch(u){g(u.message)}return m}window.embedPDP10=function(a,b,c,d){Xa(!1);return Sh("pdp10",a,b,c,d)};window.embedPDP11=function(a,b,c,d){Xa(!1);return Sh("pdp11",a,b,c,d)};
|
||||
window.commandMachine=function(a,b,c,d,e,f){if("script"==e){d=!1;c+=".machine";if(!f)delete jb[c],d=!0;else if("string"==typeof f&&!jb[c]){d=!0;e=jb;for(var g=c,k=f.length,l=[],m=[],n="",q=null,v=0;v<k;v++){var u=f[v];if('"'==u||"'"==u)q&&u!=q?n+=u:(q?q=null:q=u,n&&(m.push(n),n=""));else{if(!q){if("\r"==u||"\n"==u)u=";";if(" "==u||"\t"==u||";"==u){n&&(m.push(n),n="");";"==u&&m.length&&(l.push(m),m=[]);continue}}n+=u}}n&&m.push(n);m.length&&l.push(m);e[g]=l;ib(c)||(d=!1)}return d?(b&&(a.disabled=!0),
|
||||
!0):!1}if(d&&(g=hb(d,c+".machine"))&&(k=g.exports)&&(k=k[e]))return k.call(g,f)?(b&&(a.disabled=!0),!0):!1;console.log("unimplemented: commandMachine('"+c+"','"+d+"','"+e+"','"+f+"')");return!1};window.enableEvents=Xa;window.sendEvent=Za;})();//# sourceMappingURL=/versions/pdpjs/1.37.0/pdp11.map
|
||||
|
|
|
|||
Loading…
Reference in a new issue