Releasing 1.16.0

This commit is contained in:
Jeff Parsons 2014-11-28 13:59:55 -08:00 committed by jeffpar
commit 6c6fccdbdd
6 changed files with 2073 additions and 2018 deletions

View file

@ -1,4 +1,5 @@
(function(){var f;function aa(a,b){var c="";void 0===b?b=8:8<b&&(b=8);if(isNaN(a))for(;0<b--;)c="?"+c;else for(;0<b--;){var d=a&15,d=d+(0<=d&&9>=d?48:55),c=String.fromCharCode(d)+c;a>>=4}return c}function n(a){return aa(a,2)}function p(a){return aa(a,4)}function ba(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));return b}var ca={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};function da(a){return a.replace(/[&<>"']/g,function(a){return ca[a]})}function r(){return Date.now()||+new Date}
(function(){var f;function aa(a,b){var c="";void 0===b?b=8:8<b&&(b=8);if(null==a||isNaN(a))for(;0<b--;)c="?"+c;else for(;0<b--;){var d=a&15,d=d+(0<=d&&9>=d?48:55),c=String.fromCharCode(d)+c;a>>=4}return c}function n(a){return aa(a,2)}function p(a){return aa(a,4)}function ba(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));return b}var ca={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};function da(a){return a.replace(/[&<>"']/g,function(a){return ca[a]})}
function r(){return Date.now()||+new Date}
function s(a,b,c){var d;d=!0;var e=0,g=null,h=ba(a),k=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");d&&(k.onreadystatechange=function(){4===k.readyState&&(g=k.responseText,200==k.status||!k.status&&g.length&&"file:"==(window?window.location.protocol:"file:")||(e=k.status||-1),c&&(b?c.call(b,h,g,e,void 0):c(h,g,e,void 0)))});k.open("GET",a,d);k.send();d||(g=k.responseText,200!=k.status&&(e=k.status||-1),c&&(b?c.call(b,h,g,e,void 0):c(h,g,e,void 0)))}
function t(a){window&&window.alert(a)}function u(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function ea(a,b,c){function d(){a-=1;0<=a&&(b()||(a=0));0<a?setTimeout(d,0):c()}d()}
function fa(a,b){function c(){b(100===d)&&(e=setTimeout(c,d),d=100)}var d=0,e=null,g=!1;a.onmousedown=function(){g||e||(d=500,c())};a.ontouchstart=function(){e||(d=500,c())};a.onmouseup=a.onmouseout=function(){e&&(clearTimeout(e),e=null)};a.ontouchend=a.ontouchcancel=function(){e&&(clearTimeout(e),e=null);g=!0}}var v={init:[],show:[],exit:[]},ga=!1,w=!0;function ha(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function x(a){v.init.push(a)}
@ -75,9 +76,9 @@ f.he=function(){this.b=this.a[this.d++]+this.n&255;this.c=this.e-this.a[this.b]-
f.ce=function(){this.b=(this.a[this.d++]|this.a[this.d++]<<8)+this.q;this.c=this.e-this.a[this.b]-(this.c&256?0:1);this.w=this.e^this.a[this.b];this.v=this.c;this.f=this.g=this.e=this.c&255;this.c^=256};f.ti=function(){this.b=(this.a[this.d++]|this.a[this.d++]<<8)+this.q;this.e=Q(this,this.e,this.a[this.b])};
f.be=function(){this.b=(this.a[this.d++]|this.a[this.d++]<<8)+this.n;this.c=this.e-this.a[this.b]-(this.c&256?0:1);this.w=this.e^this.a[this.b];this.v=this.c;this.f=this.g=this.e=this.c&255;this.c^=256};f.si=function(){this.b=(this.a[this.d++]|this.a[this.d++]<<8)+this.n;this.e=Q(this,this.e,this.a[this.b])};f.oh=function(){this.h=(this.a[this.d++]|this.a[this.d++]<<8)+this.n;this.f=this.g=this.a[this.h]=this.a[this.h]+1&255};
f.Pi=function(){var a;a=this.a[this.d++];switch(a){case this.yf:this.i("HALT");this.U();break;case this.qd:a=this.d;for(var b="";a<this.a.length;){var c=this.a[a++];if(!c)break;b+=String.fromCharCode(c)}this.d=a;b=b.replace(/%A/g,n(this.e)).replace(/%X/g,n(this.n)).replace(/%Y/g,n(this.q));this.i(b);Da(this);break;default:this.d-=2,this.i("undefined opSim: "+n(a)+" at "+p(this.d)),this.U()}};f.j=function(){var a=this.a[--this.d];this.i("undefined opcode: "+n(a)+" at "+p(this.d));this.U()};
x(function(){for(var a=F(window.document,"c1pjs","cpu"),b=0;b<a.length;b++){var c=a[b],d=D(c),d=new ra(d);E(d,c)}});function R(a){z.call(this,"C1PROM",a);this.ua=this.a=null;this.Ra=a.size;if(this.ub=a.image){a=this.ub;var b;b=this.ub;var c="",d=b.lastIndexOf(".");0<=d&&(c=b.substr(d+1).toLowerCase());b=c;"json"!=b&&"hex"!=b&&(a="http://"+window.location.host+"/api/v1/dump?file="+this.ub);s(a,this,this.Kf)}}B(R);
x(function(){for(var a=F(window.document,"c1pjs","cpu"),b=0;b<a.length;b++){var c=a[b],d=D(c),d=new ra(d);E(d,c)}});function R(a){z.call(this,"C1PROM",a);this.ua=this.a=null;this.Ra=a.size;if(this.ub=a.image){a=this.ub;var b;b=this.ub;var c="",d=b.lastIndexOf(".");0<=d&&(c=b.substr(d+1).toLowerCase());b=c;"json"!=b&&"hex"!=b&&(a="http://"+(window?window.location.host:"www.pcjs.org")+"/api/v1/dump?file="+this.ub+"&format=bytes");s(a,this,this.Kf)}}B(R);
R.prototype.W=function(a,b,c,d){this.a=a;this.Hc=b;a=c-b+1;this.Ra||(this.Ra=a);a!=this.Ra?K(this,"computer-specified ROM size ("+p(a)+") does not match component-specified size ("+p(this.Ra)+")"):(d&&(this.l=d,N(d,b,c,this,this.P)),Ha(this))};R.prototype.ca=function(a,b){a&&!this.o.C&&(this.o.C=!0,this.m=L(b,"debugger"))};R.prototype.P=function(a,b){if(void 0!==b){this.m&&S(this.m,this,a,b,this.m.ec,!0);var c=a-this.Hc;this.a[this.Hc+c]=this.ua?this.ua[c]:0}};
R.prototype.Kf=function(a,b,c){if(c)this.i('Error loading ROM "'+a+'" ('+c+")");else{if("["==b[0])try{this.ua=eval("("+b+")")}catch(d){this.i('Error processing ROM "'+a+'": '+d.message);return}else for(a=b.replace(/\n/gm," ").replace(/ +$/,"").split(" "),this.ua=Array(a.length),b=0;b<a.length;b++)this.ua[b]=parseInt(a[b],16);Ha(this)}};
R.prototype.Kf=function(a,b,c){if(c)this.i('Error loading ROM "'+a+'" ('+c+")");else{if("["==b.charAt(0)||"{"==b.charAt(0))try{var d=eval("("+b+")"),e=d.bytes;this.ua=e?e:d}catch(g){this.i('Error processing ROM "'+a+'": '+g.message);return}else for(a=b.replace(/\n/gm," ").replace(/ +$/,"").split(" "),this.ua=Array(a.length),b=0;b<a.length;b++)this.ua[b]=parseInt(a[b],16);Ha(this)}};
function Ha(a){if(!J(a))if(!a.ub)a.Q();else if(a.ua&&a.a){var b=a.ua.length;if(b!=a.Ra)K(a,"ROM image size ("+p(b)+") does not match component-specified size ("+p(a.Ra)+")");else{for(var c=0;c<b;c++)a.a[a.Hc+c]=a.ua[c];a.Q()}}}x(function(){for(var a=F(window.document,"c1pjs","rom"),b=0;b<a.length;b++){var c=a[b],d=D(c),d=new R(d);E(d,c)}});function Ia(a){z.call(this,"C1PRAM",a)}B(Ia);Ia.prototype.W=function(a){this.a=a;this.Q()};
x(function(){for(var a=F(window.document,"c1pjs","ram"),b=0;b<a.length;b++){var c=a[b],d=D(c),d=new Ia(d);E(d,c)}});
function Ja(a){z.call(this,"C1PKeyboard",a);this.o.C=!1;this.zc=a.model;this.Rc=8;this.Ie=9;this.Ge=10;this.Fe=13;this.He=16;this.Ee=17;this.Be=18;this.Ce=20;this.Sc=27;this.De=91;this.ye=this.Rc;this.ze=this.Ge;this.ve=this.Fe;this.Mc=this.Sc;this.T=224;this.p=this.He+this.T;this.Ab=this.Ee+this.T;this.dc=this.Be+this.T;this.Nc=this.Ce+this.T;this.Lc=0+this.T;this.we=3;this.xe=15;this.zb=1;this.yb=2;this.xb=4;this.bb=8;this.wb=64;this.cc=this.yb|this.xb|this.wb;this.pd=0;this.wf=1;this.vf=2;this.xf=
@ -104,8 +105,8 @@ function ta(a){var b=0;if(a.o.C)for(;b<a.Sa;){var c=a.a[a.Zb+b];if(a.mc[b]!=c){v
x(function(){for(var a=F(window.document,"c1pjs","video"),b=0;b<a.length;b++){var c=a[b],d=D(c),e=window.document.createElement("canvas");if(void 0===e){c.innerHTML="<br/>Missing &lt;canvas&gt; support; try a new web browser.";break}e.setAttribute("class","c1pjs-canvas");e.setAttribute("width",d.screenWidth);e.setAttribute("height",d.screenHeight);e.setAttribute("contenteditable","true");e.setAttribute("autocapitalize","off");e.setAttribute("autocorrect","off");e.style.backgroundColor=d.screenColor;
e.style.height="auto";0<=(window?window.navigator.userAgent:"").indexOf("MSIE")&&(e.style.height=(c.clientWidth*d.screenHeight/d.screenWidth|0)+"px",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.appendChild(e);var g=new Image,h=e.getContext("2d"),e=new Pa(d,e,h,g);g.onload=function(a){return function(){a.Q()}}(e,d.charSet);g.src=d.charSet;E(e,c)}});
function Sa(a){z.call(this,"C1PSerialPort",a);this.o.C=!1;this.Ed=a.demo;this.Af=0;this.zf=1;this.reset()}B(Sa);f=Sa.prototype;f.reset=function(){if(2!=this.Ga){this.Ob=this.qc=0;var a=1;if(this.Hd){var b=this.Hd.match(/\d+/);null!==b&&(a=parseInt(b[0],10))}this.ab='10 PRINT "HELLO OSI #'+a+'"\n';this.Ga=this.Vb=0}};f.start=function(){this.H&&this.Ed&&(V(this.H," C\n\n",3E3),setTimeout(function(a){return function(){a.Ga=1;V(a.H,"LOAD\n")}}(this),12E3));this.Ed=!1};
f.J=function(a,b,c){var d=this;switch(b){case "listSerial":return this.s[b]=c,!0;case "loadSerial":return this.s[b]=c,c.onclick=function(){d.s.listSerial&&s(d.s.listSerial.value,d,d.Id)},!0;case "mountSerial":return window&&"FileReader"in window?(this.s[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=0==a.children[0].files.length}),c.onsubmit=function(a){var b=a.currentTarget[1].files[0],c=new FileReader;c.onload=function(){d.Id(b.name,c.result.toString(),0)};
c.readAsText(b);return!1}):c.parentNode.removeChild(c),!0}return!1};f.W=function(a,b,c,d){this.a=a;this.Gc=b;this.Hf=c-b+1;this.Sd=this.Gc+this.Hf;if(this.l=d)ua(d,b,c,this,this.I),N(d,b,c,this,this.P);this.Q()};f.ca=function(a,b){a&&!this.o.C&&(this.o.C=!0,this.O=b,this.H=L(b,"keyboard"),this.m=L(b,"debugger"))};
f.J=function(a,b,c){var d=this;switch(b){case "listSerial":return this.s[b]=c,!0;case "loadSerial":return this.s[b]=c,c.onclick=function(){d.s.listSerial&&s(d.s.listSerial.value,d,d.Id)},!0;case "mountSerial":return!u("Mobi")&&window&&"FileReader"in window?(this.s[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=0==a.children[0].files.length}),c.onsubmit=function(a){var b=a.currentTarget[1].files[0],c=new FileReader;c.onload=function(){d.Id(b.name,c.result.toString(),
0)};c.readAsText(b);return!1}):c.parentNode.removeChild(c),!0}return!1};f.W=function(a,b,c,d){this.a=a;this.Gc=b;this.Hf=c-b+1;this.Sd=this.Gc+this.Hf;if(this.l=d)ua(d,b,c,this,this.I),N(d,b,c,this,this.P);this.Q()};f.ca=function(a,b){a&&!this.o.C&&(this.o.C=!0,this.O=b,this.H=L(b,"keyboard"),this.m=L(b,"debugger"))};
f.Id=function(a,b,c){b?(this.ab=b,this.Ga=this.Vb=0,this.O&&this.H&&this.l.o.ha?(this.i("auto-loading "+a),this.l.X(),"."!=this.ab.charAt(0)?(this.Ga=1,V(this.H,"NEW\nLOAD\n")):(this.Ga=2,this.O.reset(!0),V(this.H,"ML"))):this.i(a+" ready to load")):this.i(a+" load error ("+c+")")};f.I=function(a,b){void 0!==b&&(a&1?Ta(this):this.ab&&!this.Vb&&Ta(this))};f.P=function(a,b){void 0!==b&&this.m&&S(this.m,this,a,b,this.m.Tc,!0)};
function Ta(a){if(void 0!==a.ab){a.qc=0;a.Ob=0;if(a.Vb<a.ab.length){var b=a.ab.charCodeAt(a.Vb++);10==b&&(b=13);a.qc=b;a.Ob=1}else 1==a.Ga&&a.H&&V(a.H," \nRUN\n"),a.Ga=0;a.bc()}}f.bc=function(){var a;for(a=this.Gc+0;a<this.Sd;a+=2)this.a[a]=this.Ob?this.zf:this.Af;for(a=this.Gc+1;a<this.Sd;a+=2)this.a[a]=this.Ob?this.qc:0};x(function(){for(var a=F(window.document,"c1pjs","serial"),b=0;b<a.length;b++){var c=a[b],d=D(c),d=new Sa(d);E(d,c)}});
function Ua(a){z.call(this,"C1PDiskController",a);this.o.C=!1;this.rf=this.nd=0;this.kd=1;this.sf=this.od=2;this.ld=3;this.Oc=128;this.Pc=64;this.La=4;this.mf=1;this.fd=2;this.lf=4;this.of=8;this.nf=16;this.gd=32;this.ed=64;this.kc=128;this.jd=4;this.hd=8;this.pf=32;this.tf=this.qf=16;this.md=17;this.Qc=3;this.ud=1;this.vd=2;this.td=4;this.sd=8;this.Ae=0;this.Je=40;this.reset(!0)}B(Ua);f=Ua.prototype;

View file

@ -1,4 +1,4 @@
(function(){var e;function p(a,b){var c="";void 0===b?b=8:8<b&&(b=8);if(isNaN(a))for(;0<b--;)c="?"+c;else for(;0<b--;){var d=a&15,d=d+(0<=d&&9>=d?48:55),c=String.fromCharCode(d)+c;a>>=4}return c}function aa(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));return b}var ba={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};function ca(a){return a.replace(/[&<>"']/g,function(a){return ba[a]})}
(function(){var e;function p(a,b){var c="";void 0===b?b=8:8<b&&(b=8);if(null==a||isNaN(a))for(;0<b--;)c="?"+c;else for(;0<b--;){var d=a&15,d=d+(0<=d&&9>=d?48:55),c=String.fromCharCode(d)+c;a>>=4}return c}function aa(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));return b}var ba={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};function ca(a){return a.replace(/[&<>"']/g,function(a){return ba[a]})}
function q(a,b,c){var d;d=!0;var f=0,g=null,k=aa(a),h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");d&&(h.onreadystatechange=function(){4===h.readyState&&(g=h.responseText,200==h.status||!h.status&&g.length&&"file:"==(window?window.location.protocol:"file:")||(f=h.status||-1),c&&(b?c.call(b,k,g,f,void 0):c(k,g,f,void 0)))});h.open("GET",a,d);h.send();d||(g=h.responseText,200!=h.status&&(f=h.status||-1),c&&(b?c.call(b,k,g,f,void 0):c(k,g,f,void 0)))}
function r(a){window&&window.alert(a)}function s(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var t={init:[],show:[],exit:[]},da=!1,u=!0;function v(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function w(a){t.init.push(a)}
function x(a){if(u)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){r("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks.")}}function y(a){!u&&a?(u=!0,da&&ea("init")):u=a}function ea(a){t[a]&&x(t[a])}v("onload",function(){da=!0;x(t.init)});v("onpageshow",function(){x(t.show)});v(s("Opera")||s("iOS")?"onunload":"onbeforeunload",function(){x(t.exit)});
@ -73,9 +73,9 @@ e.Cc=function(){this.b=(this.a[this.d++]|this.a[this.d++]<<8)+this.n;this.c=this
e.Bc=function(){this.b=(this.a[this.d++]|this.a[this.d++]<<8)+this.k;this.c=this.e-this.a[this.b]-(this.c&256?0:1);this.A=this.e^this.a[this.b];this.s=this.c;this.f=this.g=this.e=this.c&255;this.c^=256};e.og=function(){this.b=(this.a[this.d++]|this.a[this.d++]<<8)+this.k;this.e=T(this,this.e,this.a[this.b])};e.kf=function(){this.h=(this.a[this.d++]|this.a[this.d++]<<8)+this.k;this.f=this.g=this.a[this.h]=this.a[this.h]+1&255};
e.Lg=function(){var a;a=this.a[this.d++];switch(a){case this.xd:this.u("HALT");O(this);break;case this.yd:a=this.d;for(var b="";a<this.a.length;){var c=this.a[a++];if(!c)break;b+=String.fromCharCode(c)}this.d=a;b=b.replace(/%A/g,p(this.e,2)).replace(/%X/g,p(this.k,2)).replace(/%Y/g,p(this.n,2));this.u(b);this.ka=0;this.Y-=this.C;this.C=0;break;default:this.d-=2,this.u("undefined opSim: "+p(a,2)+" at "+p(this.d,4)),O(this)}};
e.i=function(){var a=this.a[--this.d];this.u("undefined opcode: "+p(a,2)+" at "+p(this.d,4));O(this)};w(function(){for(var a=I(window.document,"c1pjs","cpu"),b=0;b<a.length;b++){var c=a[b],d=G(c),d=new N(d);H(d,c)}});
function U(a){z.call(this,"C1PROM",a);this.V=this.a=null;this.ha=a.size;if(this.Aa=a.image){a=this.Aa;var b;b=this.Aa;var c="",d=b.lastIndexOf(".");0<=d&&(c=b.substr(d+1).toLowerCase());b=c;"json"!=b&&"hex"!=b&&(a="http://"+window.location.host+"/api/v1/dump?file="+this.Aa);q(a,this,this.Jd)}}E(U);
function U(a){z.call(this,"C1PROM",a);this.V=this.a=null;this.ha=a.size;if(this.Aa=a.image){a=this.Aa;var b;b=this.Aa;var c="",d=b.lastIndexOf(".");0<=d&&(c=b.substr(d+1).toLowerCase());b=c;"json"!=b&&"hex"!=b&&(a="http://"+(window?window.location.host:"www.pcjs.org")+"/api/v1/dump?file="+this.Aa+"&format=bytes");q(a,this,this.Jd)}}E(U);
U.prototype.Q=function(a,b,c,d){this.a=a;this.wb=b;a=c-b+1;this.ha||(this.ha=a);a!=this.ha?K(this,"computer-specified ROM size ("+p(a,4)+") does not match component-specified size ("+p(this.ha,4)+")"):(d&&(this.t=d,Q(d,b,c,this,this.M)),va(this))};U.prototype.T=function(a){a&&!this.m.B&&(this.m.B=!0)};U.prototype.M=function(a,b){if(void 0!==b){var c=a-this.wb;this.a[this.wb+c]=this.V?this.V[c]:0}};
U.prototype.Jd=function(a,b,c){if(c)this.u('Error loading ROM "'+a+'" ('+c+")");else{if("["==b[0])try{this.V=eval("("+b+")")}catch(d){this.u('Error processing ROM "'+a+'": '+d.message);return}else for(a=b.replace(/\n/gm," ").replace(/ +$/,"").split(" "),this.V=Array(a.length),b=0;b<a.length;b++)this.V[b]=parseInt(a[b],16);va(this)}};
U.prototype.Jd=function(a,b,c){if(c)this.u('Error loading ROM "'+a+'" ('+c+")");else{if("["==b.charAt(0)||"{"==b.charAt(0))try{var d=eval("("+b+")"),f=d.bytes;this.V=f?f:d}catch(g){this.u('Error processing ROM "'+a+'": '+g.message);return}else for(a=b.replace(/\n/gm," ").replace(/ +$/,"").split(" "),this.V=Array(a.length),b=0;b<a.length;b++)this.V[b]=parseInt(a[b],16);va(this)}};
function va(a){if(!J(a))if(!a.Aa)a.K();else if(a.V&&a.a){var b=a.V.length;if(b!=a.ha)K(a,"ROM image size ("+p(b,4)+") does not match component-specified size ("+p(a.ha,4)+")");else{for(var c=0;c<b;c++)a.a[a.wb+c]=a.V[c];a.K()}}}w(function(){for(var a=I(window.document,"c1pjs","rom"),b=0;b<a.length;b++){var c=a[b],d=G(c),d=new U(d);H(d,c)}});function wa(a){z.call(this,"C1PRAM",a)}E(wa);wa.prototype.Q=function(a){this.a=a;this.K()};
w(function(){for(var a=I(window.document,"c1pjs","ram"),b=0;b<a.length;b++){var c=a[b],d=G(c),d=new wa(d);H(d,c)}});
function xa(a){z.call(this,"C1PKeyboard",a);this.m.B=!1;this.pb=a.model;this.Fb=8;this.gd=9;this.ed=10;this.dd=13;this.fd=16;this.cd=17;this.$c=18;this.ad=20;this.Gb=27;this.bd=91;this.Xc=this.Fb;this.Yc=this.ed;this.Uc=this.dd;this.Ab=this.Gb;this.L=224;this.l=this.fd+this.L;this.Ga=this.cd+this.L;this.$a=this.$c+this.L;this.Bb=this.ad+this.L;this.zb=0+this.L;this.Vc=3;this.Wc=15;this.Fa=1;this.Ea=2;this.Da=4;this.oa=8;this.Ca=64;this.Za=this.Ea|this.Da|this.Ca;this.Qb=0;this.vd=1;this.ud=2;this.wd=
@ -100,8 +100,8 @@ function ma(a){var b=0;if(a.m.B)for(;b<a.ia;){var c=a.a[a.Va+b];if(a.eb[b]!=c){v
w(function(){for(var a=I(window.document,"c1pjs","video"),b=0;b<a.length;b++){var c=a[b],d=G(c),f=window.document.createElement("canvas");if(void 0===f){c.innerHTML="<br/>Missing &lt;canvas&gt; support; try a new web browser.";break}f.setAttribute("class","c1pjs-canvas");f.setAttribute("width",d.screenWidth);f.setAttribute("height",d.screenHeight);f.setAttribute("contenteditable","true");f.setAttribute("autocapitalize","off");f.setAttribute("autocorrect","off");f.style.backgroundColor=d.screenColor;
f.style.height="auto";0<=(window?window.navigator.userAgent:"").indexOf("MSIE")&&(f.style.height=(c.clientWidth*d.screenHeight/d.screenWidth|0)+"px",c.onresize=function(a,b,c,d){return function(){b.style.height=(a.clientWidth*d/c|0)+"px"}}(c,f,d.screenWidth,d.screenHeight));c.appendChild(f);var g=new Image,k=f.getContext("2d"),f=new Ca(d,f,k,g);g.onload=function(a){return function(){a.K()}}(f,d.charSet);g.src=d.charSet;H(f,c)}});
function Fa(a){z.call(this,"C1PSerialPort",a);this.m.B=!1;this.bc=a.demo;this.Bd=0;this.Ad=1;this.reset()}E(Fa);e=Fa.prototype;e.reset=function(){if(2!=this.$){this.La=this.ib=0;var a=1;if(this.fc){var b=this.fc.match(/\d+/);null!==b&&(a=parseInt(b[0],10))}this.na='10 PRINT "HELLO OSI #'+a+'"\n';this.$=this.Qa=0}};e.start=function(){this.D&&this.bc&&(X(this.D," C\n\n",3E3),setTimeout(function(a){return function(){a.$=1;X(a.D,"LOAD\n")}}(this),12E3));this.bc=!1};
e.I=function(a,b,c){var d=this;switch(b){case "listSerial":return this.p[b]=c,!0;case "loadSerial":return this.p[b]=c,c.onclick=function(){d.p.listSerial&&q(d.p.listSerial.value,d,d.gc)},!0;case "mountSerial":return window&&"FileReader"in window?(this.p[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=0==a.children[0].files.length}),c.onsubmit=function(a){var b=a.currentTarget[1].files[0],c=new FileReader;c.onload=function(){d.gc(b.name,c.result.toString(),0)};
c.readAsText(b);return!1}):c.parentNode.removeChild(c),!0}return!1};e.Q=function(a,b,c,d){this.a=a;this.vb=b;this.Gd=c-b+1;this.rc=this.vb+this.Gd;if(this.t=d)na(d,b,c,this,this.O),Q(d,b,c,this,this.M);this.K()};e.T=function(a,b){a&&!this.m.B&&(this.m.B=!0,this.H=b,this.D=M(b,"keyboard"))};
e.I=function(a,b,c){var d=this;switch(b){case "listSerial":return this.p[b]=c,!0;case "loadSerial":return this.p[b]=c,c.onclick=function(){d.p.listSerial&&q(d.p.listSerial.value,d,d.gc)},!0;case "mountSerial":return!s("Mobi")&&window&&"FileReader"in window?(this.p[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=0==a.children[0].files.length}),c.onsubmit=function(a){var b=a.currentTarget[1].files[0],c=new FileReader;c.onload=function(){d.gc(b.name,c.result.toString(),
0)};c.readAsText(b);return!1}):c.parentNode.removeChild(c),!0}return!1};e.Q=function(a,b,c,d){this.a=a;this.vb=b;this.Gd=c-b+1;this.rc=this.vb+this.Gd;if(this.t=d)na(d,b,c,this,this.O),Q(d,b,c,this,this.M);this.K()};e.T=function(a,b){a&&!this.m.B&&(this.m.B=!0,this.H=b,this.D=M(b,"keyboard"))};
e.gc=function(a,b,c){b?(this.na=b,this.$=this.Qa=0,this.H&&this.D&&this.t.m.S?(this.u("auto-loading "+a),this.t.ea(),"."!=this.na.charAt(0)?(this.$=1,X(this.D,"NEW\nLOAD\n")):(this.$=2,this.H.reset(!0),X(this.D,"ML"))):this.u(a+" ready to load")):this.u(a+" load error ("+c+")")};e.O=function(a,b){void 0!==b&&(a&1?Ga(this):this.na&&!this.Qa&&Ga(this))};e.M=function(){};
function Ga(a){if(void 0!==a.na){a.ib=0;a.La=0;if(a.Qa<a.na.length){var b=a.na.charCodeAt(a.Qa++);10==b&&(b=13);a.ib=b;a.La=1}else 1==a.$&&a.D&&X(a.D," \nRUN\n"),a.$=0;a.Ya()}}e.Ya=function(){var a;for(a=this.vb+0;a<this.rc;a+=2)this.a[a]=this.La?this.Ad:this.Bd;for(a=this.vb+1;a<this.rc;a+=2)this.a[a]=this.La?this.ib:0};w(function(){for(var a=I(window.document,"c1pjs","serial"),b=0;b<a.length;b++){var c=a[b],d=G(c),d=new Fa(d);H(d,c)}});
function Ha(a){z.call(this,"C1PDiskController",a);this.m.B=!1;this.qd=this.Ob=0;this.Lb=1;this.rd=this.Pb=2;this.Mb=3;this.Cb=128;this.Db=64;this.fa=4;this.kd=1;this.Ib=2;this.jd=4;this.md=8;this.ld=16;this.Jb=32;this.Hb=64;this.ab=128;this.od=4;this.Kb=8;this.nd=32;this.sd=this.pd=16;this.Nb=17;this.Eb=3;this.Tb=1;this.Ub=2;this.Sb=4;this.Rb=8;this.Zc=0;this.hd=40;this.reset(!0)}E(Ha);e=Ha.prototype;