Merge the last set of changes from the gh-pages branch
This commit is contained in:
parent
af4bc7c8bb
commit
d8f0e64329
30 changed files with 338 additions and 315 deletions
|
|
@ -34,7 +34,8 @@ Mc:88,Nc:89,kb:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Pc:97,Ee:98,Fe:99,d:1
|
|||
function aa(a){var b=16,c;if(a){b||(b=10);var d=a.charAt(0),e=0<a.indexOf(",");e&&(a=a.replace(/,/g,""));"#"==d?(b=8,d=null):"$"==d&&(b=16,d=null);null==d?a=a.substr(1):("0"==d&&(d=a.charAt(1),"b"==d&&e&&(b=2,d=null),"o"==d?(b=8,d=null):"x"==d&&(b=16,d=null)),null==d?a=a.substr(2):(d=a.charAt(a.length-1).toLowerCase(),"y"==d?(b=2,d=null):"."==d?(b=10,d=null):"h"==d&&(b=16,d=null),null==d&&(a=a.substr(0,a.length-1))));var f,d=a;((e=b)&&10!=e?16==e?d.match(/^[0-9a-f]+$/i):8==e?d.match(/^[0-7]+$/):2==
|
||||
e&&d.match(/^[01]+$/):d.match(/^[0-9]+$/))&&!isNaN(f=parseInt(a,b))&&(c=f|0)}return c}function p(a,b,c){var d="";b?8<b&&(b=8):b=a&-65536?8:4;if(null==a||isNaN(a))for(;0<b--;)d="?"+d;else for(;0<b--;){var e=a&15,e=e+(0<=e&&9>=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function ca(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0<c&&(b=b.substr(0,c));return b}function da(a){var b="",c=a.lastIndexOf(".");0<=c&&(b=a.substr(c+1).toLowerCase());return b}
|
||||
function ea(){var a=fa();return-1!==a.indexOf("pcjs.org",a.length-8)}var ga={"&":"&","<":"<",">":">",'"':""","'":"'"};function ha(a){return a.replace(/[&<>"']/g,function(a){return ga[a]})}function ia(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}
|
||||
var ja={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"},ka=Date.now||function(){return+new Date};function la(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())}
|
||||
var ja={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",10:"LF",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"},ka=Date.now||function(){return+new Date};
|
||||
function la(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())}
|
||||
function ma(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"==
|
||||
typeof b){var k="",n;for(n in b)b.hasOwnProperty(n)&&(k&&(k+="&"),k+=n+"="+encodeURIComponent(b[n]));k=k.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(k)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g}
|
||||
function na(a,b){var c,d={aa:null,wa:null,Ea:null,xa:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.Ea=g.load;d.xa=g.exec;if(e=g.bytes)d.aa=e;else if(e=g.words)for(d.aa=Array(2*e.length),f=c=0;c<e.length;c++)d.aa[f++]=e[c]&255,d.aa[f++]=e[c]>>8&255;else if(e=g.data)for(d.aa=Array(4*e.length),f=c=0;c<e.length;c++)d.aa[f++]=
|
||||
|
|
@ -168,8 +169,8 @@ l.Ib=function(a){if(!this.b){var b=Ab(this.w,"connection");if(b){var c=b.split("
|
|||
l.fa=function(a,b){if(!b)if(this.Ib(this.o),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.ha=function(a){return a?this.save():!0};l.reset=function(){Wc(this)};l.save=function(){var a=new G(this),b=0,c=[];c[b++]=this.s;c[b++]=this.A;c[b++]=this.F;c[b++]=this.X;c[b++]=this.l;c[b++]=this.m;c[b]=this.u;a.set(0,c);return a.data()};l.restore=function(a){return Wc(this,a[0])};
|
||||
function Wc(a,b){var c=0;b||(b=Sc);a.s=b[c++];a.A=b[c++];a.F=b[c++];a.X=b[c++];a.l=b[c++];a.m=b[c++];a.u=b[c];return!0}function Xc(a,b){var c=a.u&b;b&15||(c>>=4);b=Rc[c];c=((a.l&12)>>2)+6;a.l&16&&c++;c+=((a.l&192)>>6)+1>>1;return 1E3/Math.round(b/c)}function Tc(a,b){return a.B||a.X&2?!1:(a.A=b,a.X|=2,hc(a.a,a.P),!0)}
|
||||
l.nb=function(a){null!=a&&(this.h="number"!=typeof a?a:this.h+String.fromCharCode(a));this.h&&(Tc(this,this.h.charCodeAt(0))&&(this.h=this.h.substr(1)),this.h&&this.a&&Kb(this.a,this.R,Xc(this,15)));return!0};l.rd=function(a){this.X&=-129;a&64&&(this.X|=128)};function Fc(a,b){a.X|=5;b&&a.Fa&&a.Fa.call(a.b,b)}l.Wc=function(){var a=this.A;this.X&=-3;return a};l.Vc=function(){return this.X};
|
||||
l.ed=function(a,b){this.F=b;this.X&=-6;if(19==b)this.B=!0;else if(17==b)this.B=!1;else if(this.Fa&&this.Fa.call(this.b,b),this.c)if(8==b)this.c.value=this.c.value.slice(0,-1),0<this.g&&this.g--;else{a=(a=ja[b])?"<"+a+">":String.fromCharCode(b);var c=a.length;9==b?(b=this.M||8,c=b-this.g%b,this.M&&(a=" ".slice(0,c))):13==b&&(this.g=c=0,a="\n");this.G&&!this.g&&c&&(a=String.fromCharCode(this.G)+a);this.c.value+=a;this.c.scrollTop=this.c.scrollHeight;this.g+=c}else if(null!=
|
||||
this.f){if(10==b||1024<=this.f.length)this.ea(this.f),this.f="";10!=b&&(this.f+=String.fromCharCode(b))}this.a&&Kb(this.a,this.T,Xc(this,240))};l.dd=function(a,b){this.s?(this.ia&&(b^this.m)&34&&(a=0,a=this.o?a|(b&32?32:0)|(b&2?320:0):a|(b&32?16:0)|(b&2?1048576:0),this.ia.call(this.b,a)),this.m=b,this.m&64&&(this.s=!1)):(this.l=b,this.s=!0)};l.cd=function(a,b){this.u=b};var Uc={0:Pc.prototype.Wc,1:Pc.prototype.Vc},Vc={0:Pc.prototype.ed,1:Pc.prototype.dd,2:Pc.prototype.cd};
|
||||
l.ed=function(a,b){this.F=b;this.X&=-6;if(19==b)this.B=!0;else if(17==b)this.B=!1;else if(this.Fa&&this.Fa.call(this.b,b),this.c)if(8==b)this.c.value=this.c.value.slice(0,-1),0<this.g&&this.g--;else{a=(a=13!=b&&10!=b?ja[b]:null)?"<"+a+">":String.fromCharCode(b);var c=a.length;9==b?(b=this.M||8,c=b-this.g%b,this.M&&(a=" ".slice(0,c))):13==b&&(this.g=c=0,a="\n");this.G&&!this.g&&c&&(a=String.fromCharCode(this.G)+a);this.c.value+=a;this.c.scrollTop=this.c.scrollHeight;
|
||||
this.g+=c}else if(null!=this.f){if(10==b||1024<=this.f.length)this.ea(this.f),this.f="";10!=b&&(this.f+=String.fromCharCode(b))}this.a&&Kb(this.a,this.T,Xc(this,240))};l.dd=function(a,b){this.s?(this.ia&&(b^this.m)&34&&(a=0,a=this.o?a|(b&32?32:0)|(b&2?320:0):a|(b&32?16:0)|(b&2?1048576:0),this.ia.call(this.b,a)),this.m=b,this.m&64&&(this.s=!1)):(this.l=b,this.s=!0)};l.cd=function(a,b){this.u=b};var Uc={0:Pc.prototype.Wc,1:Pc.prototype.Vc},Vc={0:Pc.prototype.ed,1:Pc.prototype.dd,2:Pc.prototype.cd};
|
||||
Aa(function(){for(var a=A(document,"pc8080","serial"),b=0;b<a.length;b++){var c=a[b],d=y(c),d=new Pc(d);Qa(d,c)}});
|
||||
function Yc(a,b,c){r.call(this,"Computer",a,Yc);this.j.Y=!1;Zc(this,b);this.u=Ab(this,"autoPower",a);this.f=0;this.L=a.busWidth||a.buswidth;this.b=$c;this.o=null;this.w=this.F=!1;this.H=Ab(this,"url")||"";(Math.random()+.1).toString(36);this.c=ad(this);if(this.a=Pa("CPU",this.id)){this.N=Pa("Debugger",this.id);this.l=[];for(b=null;b=C(this,"Video",b);)this.l.push(b);this.i=new Ya({id:this.za+".bus",busWidth:this.L},this.a,this.N);var d,e=Na(this.id);if((this.g=Pa("Panel",this.id))&&this.g.ya)for(b=
|
||||
0;b<e.length;b++)d=e[b],d.K=this.g.K,d.ea=this.g.ea,d.ya=this.g.ya;this.ea("PC8080 v1.30.6\nCopyright \u00a9 2012-2016 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");for(b=0;b<e.length;b++)d=e[b],d.ra&&d.ra(this,this.i,this.a,this.N);b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.m=d:this.b=parseInt(d,10));var f;if(a=Ab(this,"state")||(f=!0,a.state))b=this.A=a,f||(this.w=!0,this.b=$c),this.b&&(this.s=new G(this,"1.30.6"),bd(this.s)?b=null:delete this.s);
|
||||
|
|
|
|||
Loading…
Reference in a new issue