Standard-mode Windows 3.0 finally runs properly
This commit is contained in:
parent
0a015b979b
commit
812c0af6b6
163 changed files with 7862 additions and 980 deletions
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<xsl:variable name="MACHINECLASS">pc</xsl:variable>
|
||||
<xsl:variable name="APPCLASS">pcjs</xsl:variable>
|
||||
<xsl:variable name="APPVERSION">1.18.6</xsl:variable>
|
||||
<xsl:variable name="APPVERSION">1.18.7</xsl:variable>
|
||||
<xsl:variable name="SITEHOST">www.pcjs.org</xsl:variable>
|
||||
|
||||
<xsl:template name="componentStyles">
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -126,11 +126,11 @@ function xf(a,b,c){if(c){16<c&&(a=b,c-=16);var d=a<<c-1;a=(d<<1|b>>16-c)&65535;D
|
|||
function Df(a,b,c){if(c){16<c&&(a=b,c-=16);var d=a>>c-1;a=(d>>1|b<<16-c)&65535;D(this,a,32768,d&1)}return a}function Ef(a,b,c){if(c){var d=a>>c-1;a=d>>1|b<<32-c;D(this,a,-2147483648,d&1)}return a}function Ff(a,b){return Df.call(this,a,b,this.W())}function Gf(a,b){return Ef.call(this,a,b,this.W())}function Hf(a,b){return Df.call(this,a,b,this.F&31)}function If(a,b){return Ef.call(this,a,b,this.F&31)}
|
||||
function Jf(a,b){var c=a-b|0;Md(this,a,b,c,191,!0);this.A-=-1===this.oa?-1===this.P?this.B.Jb:this.B.qb:this.B.Ub;return c&255}function Kf(a,b){var c=a-b|0;Md(this,a,b,c,this.dataType|63,!0);this.A-=-1===this.oa?-1===this.P?this.B.Jb:this.B.qb:this.B.Ub;return c&this.C}function Lf(a,b){D(this,a&b,128);this.A-=-1===this.oa?-1===this.P?this.B.Xf:this.B.ce:this.B.ce;this.O|=2;return a}
|
||||
function Mf(a,b){D(this,a&b,this.dataType);this.A-=-1===this.oa?-1===this.P?this.B.Xf:this.B.ce:this.B.ce;this.O|=2;return a}
|
||||
function Nf(a,b){if(-1===this.P){switch(this.Te&7){case 0:this.G=this.G&-256|a;break;case 1:this.F=this.F&-256|a;break;case 2:this.H=this.H&-256|a;break;case 3:this.D=this.D&-256|a;break;case 4:this.G=this.G&255|a<<8;break;case 5:this.F=this.F&255|a<<8;break;case 6:this.H=this.H&255|a<<8;break;case 7:this.D=this.D&255|a<<8}this.A-=this.B.Zf}else this.oa=this.P,O(this,a),this.A-=this.B.Yf;return b}
|
||||
function Of(a,b){if(-1===this.P){switch(this.Te&7){case 0:this.G=a;break;case 1:this.F=a;break;case 2:this.H=a;break;case 3:this.D=a;break;case 4:l(this,a);break;case 5:this.L=a;break;case 6:this.K=a;break;case 7:this.I=a}this.A-=this.B.Zf}else this.oa=this.P,P(this,a),this.A-=this.B.Yf;return b}function Pf(a,b){var c=a^b;D(this,c,128);this.A-=-1===this.oa?-1===this.P?this.B.Jb:this.B.qb:this.B.Ub;return c}
|
||||
function Qf(a,b){this.A-=-1===this.oa?-1===this.P?this.B.Jb:this.B.qb:this.B.Ub;return D(this,a^b,this.dataType)}function Rf(a){h.call(this,13,0);return a}function dd(a){h.call(this,6);return a}function U(a){gd.call(this);return a}function Sf(){C(this,this.Na-this.ka.Ha);me.call(this,0,null,2)}function Tf(){this.A-=-1===this.P?2:this.B.Nh;return 1}function Uf(){var a=this.F&255;this.A-=(-1===this.P?this.B.Qf:this.B.Pf)+(a<<this.B.Rf);return a}
|
||||
function Vf(){var a=this.W();this.A-=(-1===this.P?this.B.Qf:this.B.Pf)+(a<<this.B.Rf);return a}function Wf(){return null}function h(a,b,c,d){this.O|=8;if(this.ia.re){var e=!1;if(80186<=this.ga)if(0>this.Ue)C(this,this.Na-this.ka.Ha),e=!0;else if(8!=this.Ue)b=0,a=8,e=!0;else{Xf.call(this,-1,0,c);nd(this);return}Xf.call(this,a,b,c)&&(e=!1);e&&(this.Ue=a,me.call(this,a,b,d||0));this.O|=3}else this.Ma("Fault "+fa(a)+" blocked by PCjs",1073741824),C(this,this.Na-this.ka.Ha)}
|
||||
function pd(a,b,c){this.pd=a;a=0;b&&(a|=1);c&&(a|=2);3==this.Ca&&(a|=4);h.call(this,14,a)}
|
||||
function Nf(a,b){if(-1===this.P){switch(this.Te&7){case 0:this.G=this.G&-256|a;break;case 1:this.F=this.F&-256|a;break;case 2:this.H=this.H&-256|a;break;case 3:this.D=this.D&-256|a;break;case 4:this.G=this.G&-65281|a<<8;break;case 5:this.F=this.F&-65281|a<<8;break;case 6:this.H=this.H&-65281|a<<8;break;case 7:this.D=this.D&-65281|a<<8}this.A-=this.B.Zf}else this.oa=this.P,O(this,a),this.A-=this.B.Yf;return b}
|
||||
function Of(a,b){if(-1===this.P){switch(this.Te&7){case 0:this.G=this.G&~this.C|a;break;case 1:this.F=this.F&~this.C|a;break;case 2:this.H=this.H&~this.C|a;break;case 3:this.D=this.D&~this.C|a;break;case 4:l(this,k(this)&~this.C|a);break;case 5:this.L=this.D&~this.C|a;break;case 6:this.K=this.K&~this.C|a;break;case 7:this.I=this.I&~this.C|a}this.A-=this.B.Zf}else this.oa=this.P,P(this,a),this.A-=this.B.Yf;return b}
|
||||
function Pf(a,b){var c=a^b;D(this,c,128);this.A-=-1===this.oa?-1===this.P?this.B.Jb:this.B.qb:this.B.Ub;return c}function Qf(a,b){this.A-=-1===this.oa?-1===this.P?this.B.Jb:this.B.qb:this.B.Ub;return D(this,a^b,this.dataType)}function Rf(a){h.call(this,13,0);return a}function dd(a){h.call(this,6);return a}function U(a){gd.call(this);return a}function Sf(){C(this,this.Na-this.ka.Ha);me.call(this,0,null,2)}function Tf(){this.A-=-1===this.P?2:this.B.Nh;return 1}
|
||||
function Uf(){var a=this.F&255;this.A-=(-1===this.P?this.B.Qf:this.B.Pf)+(a<<this.B.Rf);return a}function Vf(){var a=this.W();this.A-=(-1===this.P?this.B.Qf:this.B.Pf)+(a<<this.B.Rf);return a}function Wf(){return null}
|
||||
function h(a,b,c,d){this.O|=8;if(this.ia.re){var e=!1;if(80186<=this.ga)if(0>this.Ue)C(this,this.Na-this.ka.Ha),e=!0;else if(8!=this.Ue)b=0,a=8,e=!0;else{Xf.call(this,-1,0,c);nd(this);return}Xf.call(this,a,b,c)&&(e=!1);e&&(this.Ue=a,me.call(this,a,b,d||0));this.O|=3}else this.Ma("Fault "+fa(a)+" blocked by PCjs",1073741824),C(this,this.Na-this.ka.Ha)}function pd(a,b,c){this.pd=a;a=0;b&&(a|=1);c&&(a|=2);3==this.Ca&&(a|=4);h.call(this,14,a)}
|
||||
function Xf(a,b,c){var d=32,e;a:{e=this.fa;var n=this.ea[(e&this.kc)>>>this.ta];if(5==n.type&&(n=Rb(this,e,!1,!0),!n)){e=null;break a}e=n.eg(e&this.Bb,e)}204!=e||this.Jc||(c=!1);this.R&131072&&(6==a&&99==e||13==a&&205==e)&&(c=!1);!1===c&&(d|=1);983040<=this.fa&&1048575>=this.fa&&(c=!1);this.Ra(d|-2147483648)&&(c=!0);if(this.Ra(d)||c)a="Fault "+fa(a)+(null!=b?" (0x"+ea(b,4)+")":"")+" on opcode "+fa(e)+" at "+this.Ta.B(t(this),this.ka.qa)+" (%"+ea(this.fa,6)+")",b=this.ia.Ib,this.Ma(a,d)?c&&(c=b,dc(this.Ta)):
|
||||
(this.Ia(a),dc(this));return c}function ed(){this.Ke[this.W()].call(this)}function hd(){r(this,k(this)&this.C);this.A-=this.B.bc}function Oc(){var a=k(this)&this.C;r(this,this.G&this.C);r(this,this.F&this.C);r(this,this.H&this.C);r(this,this.D&this.C);r(this,a);r(this,this.L&this.C);r(this,this.K&this.C);r(this,this.I&this.C);this.A-=this.B.Hh}
|
||||
function Pc(){this.I=this.I&~this.C|this.Ea();this.K=this.K&~this.C|this.Ea();this.L=this.L&~this.C|this.Ea();l(this,k(this)+this.la);this.D=this.D&~this.C|this.Ea();this.H=this.H&~this.C|this.Ea();this.F=this.F&~this.C|this.Ea();this.G=this.G&~this.C|this.Ea();this.A-=this.B.Fh}function Qc(){this.va[this.W()].call(this,ve)}function id(){this.Ja[this.W()].call(this,ue)}function jd(){this.O|=20;this.U=this.X=this.Ya;this.A-=this.B.qc}
|
||||
|
|
@ -1013,14 +1013,14 @@ this.key)){try{window.localStorage.removeItem(d)}catch(n){}b.splice(c,1);c=0}},R
|
|||
function A(a,b,c){try{a[a.id][b]=c}catch(d){}}
|
||||
function Rk(a,b,c){Ha.call(this,"Computer",a,Rk,67108864);this.ia.Tb=!1;this.P=a.busWidth||a.buswidth;this.jc=Sk;this.F=null;this.I=!1;this.R=b?b.url:null;this.U=(Math.random()+.1).toString(36).substr(2,12);this.B=Tk(this);if(this.A=Ta("CPU",this.id)){this.Ta=Ta("Debugger",this.id);this.na=new kb({id:this.hi+".bus",buswidth:this.P},this.A,this.Ta);var d,e=Ra(this.id);if((this.Yc=Ta("Panel",this.id))&&this.Yc.xg)for(b=0;b<e.length;b++)d=e[b],d.Ia=this.Yc.Ia,d.cc=this.Yc.cc,d.xg=this.Yc.xg;for(b=0;b<
|
||||
e.length;b++)d=e[b],d.oc&&d.oc(this,this.na,this.A,this.Ta);b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.Ye=d:this.jc=parseInt(d,10));var n;if(a=La&&La.state||(n=!0,a.state))b=this.O=a,n||(this.I=!0,this.jc=Sk),this.jc&&(this.K=new Gd(this,Uk),this.K.load()?b=null:delete this.K);!b&&this.jc&&(n=null,this.B&&(n=qa()+"/api/v1/user?req=load&user="+this.B+"&state="+Jk(this,Uk)),b=n)&&(this.I=!0);b?pa(b,!0,null,this,this.Bk):Ya(this);c||Vk(this,this.dg)}else ra("Unable to find CPU component")}Qa(Rk);
|
||||
var Uk="1.18.6",Sk=0;f=Rk.prototype;f.Vd=function(){return this.U};f.hd=function(){return this.B?this.B:""};f.Bk=function(a,b,c){c?(this.Ye=null,this.I=!1,this.Ia("Unable to load machine state from server (error "+c+(b?": "+(String.prototype.trim?b.trim():b.replace(/^\s+|\s+$/g,"")):"")+")")):this.F=b;Ya(this)};function Vk(a,b,c){for(var d=Ra(a.id),e=0;e<=d.length;e++){var n=e<d.length?d[e]:a;if(!Za(n)){Za(n,function(){Vk(a,b,c)});return}}b.call(a,c)}
|
||||
var Uk="1.18.7",Sk=0;f=Rk.prototype;f.Vd=function(){return this.U};f.hd=function(){return this.B?this.B:""};f.Bk=function(a,b,c){c?(this.Ye=null,this.I=!1,this.Ia("Unable to load machine state from server (error "+c+(b?": "+(String.prototype.trim?b.trim():b.replace(/^\s+|\s+$/g,"")):"")+")")):this.F=b;Ya(this)};function Vk(a,b,c){for(var d=Ra(a.id),e=0;e<=d.length;e++){var n=e<d.length?d[e]:a;if(!Za(n)){Za(n,function(){Vk(a,b,c)});return}}b.call(a,c)}
|
||||
function Wk(a,b){var c=new Gd(a,Uk,"validate");if(c.load()&&Pk(c)){var d=Qk(c,"timestamp"),e=b?Qk(b,"timestamp"):"unknown";d!=e&&(a.Ia("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}
|
||||
f.dg=function(a){void 0===a&&(a=this.jc||(this.F?1:Sk));var b=!1,c=!1;this.L=!1;var d=this.K||new Gd(this,Uk);if(-1==a)b=!0;else if(a>Sk){if(d.load(this.F)){this.D=new Gd(this,Uk,"failsafe");this.D.load()&&(Xk(this,d),a=2,Nk(this.D));A(this.D,"timestamp",ma());Ok(this.D);var e=this.jc&&!this.I;if(1==a||sa("Click OK to restore the previous PCjs machine state, or CANCEL to reset the machine.")){if(c=Pk(d)){var n=Qk(d,"code"),m=Qk(d,"data");n&&("ok"==n?d.load(m):("error"==n&&"no machine state"!=m?(this.Ia("Error: "+
|
||||
m),"unable to verify user"==m&&(xa("user",""),this.B=null)):this.cc(n+": "+m),Nk(d),d.load()?(c=Pk(d),e=!0):c=!1))}e&&Wk(this,c?d:null)}else 2==a&&d.clear()}else Wk(this);delete this.F;delete this.K}e=Ra(this.id);for(n=0;n<e.length;n++)m=e[n],m!==this&&m!=this.A&&(c=Yk(this,m,d,b,c));b=[d,a,c];-1!=a?Vk(this,this.xi,b):this.xi(b)};
|
||||
function Yk(a,b,c,d,e){if(!b.ia.Tb){b.ia.Tb=!0;if(b.Wb){var n=null;e&&((n=Qk(c,b.id))||(n=Qk(c,b.id.replace(/[a-z0-9]\./i,"."))));"string"===typeof n&&(n=null);!b.Wb(n,d)&&n&&(ra("Unable to restore state for "+b.type),a.O&&!a.F?(c.clear(),a.jc=Sk,window&&window.location.reload()):a.L=!0,b.Wb(null),e=!1)}if(!d&&b.ei)for(a=b.ei.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
|
||||
f.xi=function(a){var b=a[0],c=0>a[1];a=a[2];this.ia.Tb=!0;this.fi||(this.cc("PCjs v"+Uk+"\nCopyright \u00a9 2012-2015 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>"),this.fi=!0);this.A&&(Yk(this,this.A,b,c,a),bc(this.A));this.L&&(Xk(this,b),b.clear());!c&&this.D&&(this.D.clear(),delete this.D)};
|
||||
function Xk(a,b){if(sa("There may be a problem with your PCjs machine.\n\nTo help us diagnose it, click OK to send this PCjs machine state to http://www.pcjs.org.")){var c=a.R,d=a.hd(),e=b.toString(),n={app:"PCjs"};n.ver=Uk;n.url=c;n.user=d;n.type="bug";n.data=e;pa("http://www.pcjs.org/api/v1/report",!0,n)}}
|
||||
function Zk(a,b,c){var d,e="none",n=new Gd(a,Uk),m=new Gd(a,Uk,"validate"),p=ma();A(m,"timestamp",p);A(n,"timestamp",p);A(n,"version","1.18.6");A(n,"url",window?window.location.href:null);A(n,"browser",window?window.navigator.userAgent:"");a.A&&a.A.Vb&&(c&&dc(a.A),d=a.A.Vb(b,c),"object"===typeof d&&A(n,a.A.id,d),c&&(a.A.ia.Tb=!1,!1===d&&(e=null)));for(var p=Ra(a.id),q=0;q<p.length;q++){var w=p[q];w.ia.Tb&&(w.Vb&&(d=w.Vb(b,c),"object"===typeof d&&A(n,w.id,d)),c&&(w.ia.Tb=!1,!1===d&&(e=null)))}e&&(c?
|
||||
function Zk(a,b,c){var d,e="none",n=new Gd(a,Uk),m=new Gd(a,Uk,"validate"),p=ma();A(m,"timestamp",p);A(n,"timestamp",p);A(n,"version","1.18.7");A(n,"url",window?window.location.href:null);A(n,"browser",window?window.navigator.userAgent:"");a.A&&a.A.Vb&&(c&&dc(a.A),d=a.A.Vb(b,c),"object"===typeof d&&A(n,a.A.id,d),c&&(a.A.ia.Tb=!1,!1===d&&(e=null)));for(var p=Ra(a.id),q=0;q<p.length;q++){var w=p[q];w.ia.Tb&&(w.Vb&&(d=w.Vb(b,c),"object"===typeof d&&A(n,w.id,d)),c&&(w.ia.Tb=!1,!1===d&&(e=null)))}e&&(c?
|
||||
(p=d=!1,b?(a.B&&$k(a,a.B,n.toString()),Ok(m)&&Ok(n)||(e=null,d=p=!0)):a.jc&&(d=!0,p=3==a.jc),d&&n.clear(p)):e=n.toString());c&&(a.ia.Tb=!1);return e}f.reset=function(){this.na&&this.na.reset&&(this.Ma("Resetting "+this.na.type),this.na.reset());for(var a=Ra(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.na&&c.reset&&(this.Ma("Resetting "+c.type),c.reset())}};f.start=function(a,b){for(var c=Ra(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}};
|
||||
f.stop=function(a,b){for(var c=Ra(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}};f.Gb=function(a,b,c){var d=this;switch(b){case "save":return this.ra[b]=c,c.onclick=function(){var a=Tk(d,!0);if(a){var b=!(!d.jc||d.Ye),c=Zk(d,b);b?$k(d,a,c):d.Ia("Resume disabled, machine state not saved")}},!0;case "reset":return this.ra[b]=c,c.onclick=function(){ec(d)},!0}return!1};
|
||||
function Tk(a,b){var c=a.B;c||(c=wa("user"),void 0!==c?!c&&b&&(c=null,window&&(c=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&&((c=al(a,c))||a.Ia("The user ID is invalid."))):b&&a.Ia("Browser local storage is not available"));return c}
|
||||
|
|
@ -1033,6 +1033,6 @@ function dl(a,b,c,d,e,n,m){function p(a,n){if(n)m(n,null);else{if(c){var p=b;p&&
|
|||
null,a=H.message}else a="unrecognized XML: "+(255<a.length?a.substr(0,255)+"...":a);m(a,p)}}a?e?el(a,n,p):p(a,null):m("no data"+(b?" for file: "+b:""),null)}
|
||||
function el(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");pa(e,!0,null,null,function(n,m,p){if(p||!m)c(a,"unable to resolve XML reference: "+d[0]+" ("+p+")");else{if(n=d[3])if(p=m.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var q=p[0],w,B=/( [a-z]+=)(['"])(.*?)\2/g;w=B.exec(n);)q=0>q.indexOf(w[1])?q.replace(">",w[0]+">"):q.replace(new RegExp(w[1]+"(['\"])(.*?)\\1"),w[0]);p[0]!=q&&(m=m.replace(p[0],q))}else{c(a,"missing <"+d[1]+"> in "+e);return}m=m.replace(/<\?xml[^>]*>[\r\n]*/,
|
||||
"");a=a.replace(d[0],m);el(a,b,c)}})}else c(a,null)}
|
||||
function fl(a,b,c,d){function e(a){if(void 0===p){var b=m&&Wa(m,"machine-warning");p=b&&b[0]||m}p&&(p.innerHTML=ka(a))}function n(a){e("Error: "+a);q&&(--bl||Fa(!0));q=!1}var m,p,q=!0;bl++;try{if(m=window.document.getElementById(a)){c||(c="/versions/pcjs/1.18.6/components.xsl");var w=function(d,p){if(p){var q=function(d,q){if(q)if(q)if(e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window){var w=p.transformNode(q);w?(m.outerHTML=w,--bl||Fa(!0)):n("transformNodeToObject failed")}else window.document.implementation&&
|
||||
function fl(a,b,c,d){function e(a){if(void 0===p){var b=m&&Wa(m,"machine-warning");p=b&&b[0]||m}p&&(p.innerHTML=ka(a))}function n(a){e("Error: "+a);q&&(--bl||Fa(!0));q=!1}var m,p,q=!0;bl++;try{if(m=window.document.getElementById(a)){c||(c="/versions/pcjs/1.18.7/components.xsl");var w=function(d,p){if(p){var q=function(d,q){if(q)if(q)if(e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window){var w=p.transformNode(q);w?(m.outerHTML=w,--bl||Fa(!0)):n("transformNodeToObject failed")}else window.document.implementation&&
|
||||
window.document.implementation.createDocument?(w=new XSLTProcessor,w.importStylesheet(q),(w=w.transformToFragment(p,window.document))?m.parentNode?(m.parentNode.replaceChild(w,m),--bl||Fa(!0)):n("invalid machine element: "+a):n("transformToFragment failed")):n("unable to transform XML: unsupported browser");else n("failed to load XSL file: "+c);else n(d)};p?cl(c,null,null,!1,e,q):n("failed to load XML file: "+b)}else n(d)};"<"!=b.charAt(0)?cl(b,a,d,!0,e,w):dl(b,null,a,d,!1,e,w)}else n("missing machine element: "+
|
||||
a)}catch(B){n(B.message)}return q}window.embedPC=function(a,b,c,d){Fa(!1);return fl(a,b,c,d)};window.enableEvents=Fa;window.sendEvent=Ga;})();
|
||||
|
|
|
|||
Loading…
Reference in a new issue