More PC8080 structural fixes

This commit is contained in:
Jeff Parsons 2016-04-20 14:02:11 -07:00
commit 28e4eabd8d
14 changed files with 75 additions and 54 deletions

View file

@ -540,7 +540,7 @@ function ko(a,b,c,d,e){if(b.Ac<b.nh){e&&!A(a)||x(a,c,d,e,"CRTC."+b.kg[b.Ac]);b.m
var gn={948:Z.prototype.Gl,949:Z.prototype.Fl,952:Z.prototype.Hl,954:Z.prototype.Il},hn={948:Z.prototype.an,949:Z.prototype.$m,952:Z.prototype.bn},jn={980:Z.prototype.kl,981:Z.prototype.jl,984:Z.prototype.ll,985:Z.prototype.il,986:Z.prototype.ml},kn={980:Z.prototype.Em,981:Z.prototype.Dm,984:Z.prototype.Fm,985:Z.prototype.Cm},ln={960:Z.prototype.el,961:Z.prototype.Ck,962:Z.prototype.Sl,964:Z.prototype.Ql,965:Z.prototype.Pl,974:Z.prototype.zl,975:Z.prototype.yl},mn={954:Z.prototype.ek,960:Z.prototype.dk,
961:Z.prototype.dk,962:Z.prototype.cn,964:Z.prototype.jn,965:Z.prototype.hn,970:Z.prototype.Wm,972:Z.prototype.Vm,974:Z.prototype.Um,975:Z.prototype.Tm,986:Z.prototype.ek},nn={963:Z.prototype.Tl,966:Z.prototype.rl,967:Z.prototype.sl,969:Z.prototype.ql,970:Z.prototype.Ul,972:Z.prototype.Vl},on={963:Z.prototype.mn,966:Z.prototype.Km,967:Z.prototype.Lm,968:Z.prototype.Mm,969:Z.prototype.Jm};
Qa(function(){for(var a=nb(document,"pcjs","video"),b=0;b<a.length;b++){var c=a[b],d=jb(c),e=document.createElement("canvas");if(void 0===e||!e.getContext){c.innerHTML="<br/>Missing &lt;canvas&gt; support. Please try a newer web browser.";break}e.setAttribute("class","pcjs-canvas");e.setAttribute("width",d.screenWidth);e.setAttribute("height",d.screenHeight);e.style.backgroundColor=d.screenColor;e.style.height="auto";0<=ya().indexOf("MSIE")&&(c.onresize=function(a,b,c,d){return function(){b.style.height=
(a.clientWidth*d/c|0)+"px"}}(c,e,d.screenWidth,d.screenHeight),c.onresize());var f=+Ya.aspect;f&&.3<=f&&3.33>=f&&(Pa("onresize",function(a,b,c){return function(){b.style.height=(a.clientWidth/c|0)+"px"}}(c,e,f)),window.onresize());c.appendChild(e);f=document.createElement("textarea");Ga("iOS")&&(f.setAttribute("autocapitalize","off"),f.setAttribute("autocorrect","off"));c.appendChild(f);var g=e.getContext("2d"),d=new Z(d,e,g,f,c);mb(d,c)}});
(a.clientWidth*d/c|0)+"px"}}(c,e,d.screenWidth,d.screenHeight),c.onresize());var f=+(d.aspect||Ya.aspect);f&&.3<=f&&3.33>=f&&(Pa("onresize",function(a,b,c){return function(){b.style.height=(a.clientWidth/c|0)+"px"}}(c,e,f)),window.onresize());c.appendChild(e);f=document.createElement("textarea");Ga("iOS")&&(f.setAttribute("autocapitalize","off"),f.setAttribute("autocorrect","off"));c.appendChild(f);var g=e.getContext("2d"),d=new Z(d,e,g,f,c);mb(d,c)}});
function no(a){this.W=a.adapter;switch(this.W){case 1:this.V=956;this.C=7;break;case 2:this.V=888;this.C=7;break;case 3:this.V=632;this.C=5;break;default:w("Unrecognized parallel adapter #"+this.W);return}this.A=this.B=null;Ua.call(this,"ParallelPort",a,no,4194304);a=a.binding;"console"==a?this.B="":kb(this,a,oo)}db(no);var oo="buffer";m=no.prototype;m.Qb=function(a,b,c){switch(b){case oo:return this.qa[b]=this.A=c,!0}return!1};
m.Ic=function(a,b,c,d){this.ea=b;this.F=c;this.ha=d;this.N=Eb(a,"ChipSet");hc(b,this,po,this.V);lc(b,this,qo,this.V);rb(this)};m.ic=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};m.hc=function(a){return a?this.save():!0};m.reset=function(){ro(this)};m.save=function(){var a=new hf(this),b=0,c=[];c[b++]=this.L;c[b++]=this.Yb;c[b]=this.Bf;N(a,0,c);return a.data()};m.restore=function(a){return ro(this,a[0])};
function ro(a,b){var c=0;void 0===b&&(b=[0,0,0]);a.L=b[c++];a.Yb=b[c++];a.Bf=b[c];return!0}m.tl=function(a,b){var c=this.L;x(this,a,null,b,"DATA",c);return c};m.Rl=function(a,b){var c=this.Yb;x(this,a,null,b,"STAT",c);return c};m.pl=function(a,b){var c=this.Bf;x(this,a,null,b,"CTRL",c);return c};
@ -804,8 +804,8 @@ function dd(a,b){for(var c=0;c<a.L.length;c++)qn(a.L[c],b);if(a.C&&(c=a.C,c.Ja))
h.N.save(),h.N.translate(f,k),h.N.rotate(-Math.PI/2),f=k=0),l<h.X&&(h.X=l,h.ga=h.X+"px Monaco, Lucida Console, Courier New"),g=k,h.C=f,h.U=g,h=c,e=sc[e.type]+" ("+(e.Ud*c.ea.Nb/1024|0)+"Kb)",h.N.font=h.ga,h.C-=h.N.measureText(e).width>>1,h.U+=(h.X>>1)-2,Jb(h,e),h.ra&&(h.N.restore(),h.ra=!1)}}else Jb(c,"This space intentionally left blank");c.context.drawImage(c.aa,0,0,c.aa.width,c.aa.height,c.sb,c.Jb,c.$a,c.fb);c.Ja=!1}}
Qa(function(){for(var a=nb(document,"pcjs-machine"),b=0;b<a.length;b++)for(var c=a[b],d=jb(c),c=nb(c,"pcjs","computer"),e=0;e<c.length;e++){var f=c[e],g=jb(f),g=new Tr(g,d,!0);mb(g,f);g.ga&&Zr(g,g.$f)}});La.show.push(function(){for(var a=nb(document,"pcjs","computer"),b=0;b<a.length;b++){var c=jb(a[b]);(c=ib("Computer",c.id))&&c.ka&&!c.la.cc&&c.$f(-1)}});
La.exit.push(function(){for(var a=nb(document,"pcjs","computer"),b=0;b<a.length;b++){var c=jb(a[b]);(c=ib("Computer",c.id))&&c.la.cc&&Nr(c,!(!c.A||c.X),!0)}});var es=0;function fs(a,b,c,d,e,f){e("Loading "+a+"...");va(a,null,!0,function(g,h,k){k?(h||(h="unable to load "+a+" ("+k+")"),f(h,null)):rs(h,a,b,c,d,e,f)})}
function rs(a,b,c,d,e,f,g){function h(a,f){if(f)g(f,null);else{if(c){fb(c,b,a);var h=b;h&&0>h.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(h=window.location.pathname+h);d?"}"==d.slice(-1)?(d=d.slice(0,-1),1<d.length&&(d+=",")):d='{state:"'+d+'",':d="{";d+='url:"'+h+'"}';"object"==typeof resources&&(h=null);a=a.replace(/(<machine[^>]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(h?' url="'+h+'"':""))}h=null;if("<"==a.charAt(0))try{e||(a=a.replace(/<!DOCTYPE(.|[\r\n])*]>\s*/g,
"")),window.ActiveXObject||"ActiveXObject"in window?(h=new window.ActiveXObject("Microsoft.XMLDOM"),h.async=!1,h.loadXML(a)):h=(new window.DOMParser).parseFromString(a,"text/xml")}catch(q){h=null,a=q.message}else a="unrecognized XML: "+(255<a.length?a.substr(0,255)+"...":a);g(a,h)}}a?e?ss(a,f,h):h(a,null):g("no data"+(b?" for file: "+b:""),null)}
function rs(a,b,c,d,e,f,g){function h(a,f){if(f)g(f,null);else{if(c){fb(c,b,a);var h=b;h&&0>h.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(h=window.location.pathname+h);d?"}"==d.slice(-1)?(d=d.slice(0,-1),1<d.length&&(d+=",")):d='{state:"'+d+'",':d="{";d+='url:"'+h+'"}';"object"==typeof resources&&(h=null);a=a.replace(/(<machine[^>]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(h?' url="'+h+'"':""))}e||(a=a.replace(/(<xsl:variable name="APPCLASS">).*?(<\/xsl:variable>)/,"$1pcjs$2"));
h=null;if("<"==a.charAt(0))try{e||(a=a.replace(/<!DOCTYPE(.|[\r\n])*]>\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(h=new window.ActiveXObject("Microsoft.XMLDOM"),h.async=!1,h.loadXML(a)):h=(new window.DOMParser).parseFromString(a,"text/xml")}catch(q){h=null,a=q.message}else a="unrecognized XML: "+(255<a.length?a.substr(0,255)+"...":a);g(a,h)}}a?e?ss(a,f,h):h(a,null):g("no data"+(b?" for file: "+b:""),null)}
function ss(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");va(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var k=h[0],l,n=/( [a-z]+=)(['"])(.*?)\2/g;l=n.exec(f);)k=0>k.indexOf(l[1])?k.replace(">",l[0]+">"):k.replace(new RegExp(l[1]+"(['\"])(.*?)\\1"),l[0]);h[0]!=k&&(g=g.replace(h[0],k))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/,
"");a=a.replace(d[0],g);ss(a,b,c)}})}else c(a,null)}
function ts(a,b,c,d){function e(a){if(void 0===h){var b=g&&nb(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=la(a))}function f(a){e("Error: "+a);k&&(--es||Sa(!0));k=!1}var g,h,k=!0;es++;eb[a]={};try{if(g=document.getElementById(a)){var l;if("object"==typeof resources&&(l=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],q=document.createElement("style");q.type="text/css";q.styleSheet?q.styleSheet.cssText=l:q.appendChild(document.createTextNode(l));n.appendChild(q)}c||