Factored PDP-11 drive controller logic into a device-independent superclass (drive.js) and a device-dependent subclass (rk11.js); the RL11 controller is ready to be factored next
This commit is contained in:
parent
367d466fe1
commit
5edbdcdce2
33 changed files with 1754 additions and 1615 deletions
|
|
@ -32,7 +32,7 @@
|
|||
var k;function ba(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a;for(var d in b)if(Object.defineProperties){var e=Object.getOwnPropertyDescriptor(b,d);e&&Object.defineProperty(a,d,e)}else a[d]=b[d]}
|
||||
var m={le:0,oe:1,pe:2,qe:3,re:4,se:5,te:6,ue:7,ve:8,we:9,xe:10,ye:11,ze:12,Ae:13,Be:14,Ce:15,De:16,Ee:17,Fe:18,Ge:19,He:20,Ie:21,Je:22,Ke:23,Le:24,Me:25,Ne:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,pb:65,rc:66,tc:67,Rb:68,E:69,xc:70,yc:71,zc:72,Ac:73,Hc:74,Ic:75,Ub:76,Pc:77,Qc:78,Sc:79,Tc:80,Q:81,Zc:82,bd:83,hd:84,jd:85,kd:86,ld:87,
|
||||
nd:88,od:89,Db:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,pd:97,wf:98,xf:99,d:100,e:101,yf:102,zf:103,Af:104,Bf:105,Cf:106,k:107,Df:108,Ef:109,n:110,Ff:111,p:112,q:113,r:114,Gf:115,t:116,If:117,Jf:118,Kf:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126,Oe:127};
|
||||
function n(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.bc=b.comment;this.wd=b;this.exports={};this.P=this.bindings={};a=this.id.indexOf(".");0>a?this.$a=this.id:(this.ab=this.id.substr(0,a),this.$a=this.id.substr(a+1));this.G={ready:!1,jb:!1,Eb:!1,ja:!1,error:!1};this.vb=null;this.G.error=!1;this.ha=d||0;this.K=this.u=this.H=this.S=this.ta=null;ca.push(this)}function da(a,b,c){ea[a]&&b&&(ea[a][b]=c)}function fa(){return Date.now()||+new Date}
|
||||
function n(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.bc=b.comment;this.wd=b;this.exports={};this.P=this.bindings={};a=this.id.indexOf(".");0>a?this.$a=this.id:(this.ab=this.id.substr(0,a),this.$a=this.id.substr(a+1));this.G={ready:!1,jb:!1,Eb:!1,ja:!1,error:!1};this.vb=null;this.G.error=!1;this.ha=c||0;this.K=this.u=this.H=this.S=this.ta=null;ca.push(this)}function da(a,b,c){ea[a]&&b&&(ea[a][b]=c)}function fa(){return Date.now()||+new Date}
|
||||
function ga(a,b,c){b||q((c?c+": ":"")+a)}function q(a){window&&window.alert(a)}function ha(a){var b=!1;window&&(b=window.confirm(a));return b}function ja(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b<ca.length;b++){var d=ca[b];a&&d.id.indexOf(a)||c.push(d)}return c}function ka(a){if(void 0!==a){var b;for(b=0;b<ca.length;b++)if(ca[b].id===a)return ca[b]}return null}
|
||||
function la(a,b){var c;if(void 0!==a){var d;b&&(b=0<(d=b.indexOf("."))?b.substr(0,d+1):"");for(d=0;d<ca.length;d++)if(c)c==ca[d]&&(c=null);else if(!(a!=ca[d].type||b&&ca[d].id.indexOf(b)))return ca[d]}return null}function na(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")}catch(c){q(c.message+" ("+a+")")}return b}
|
||||
function oa(a,b){b=pa(b.parentNode,"pc8080-control");for(var c=0;c<b.length;c++)for(var d=b[c].childNodes,e=0;e<d.length;e++){var f=d[e];if(1===f.nodeType){var g=f.getAttribute("class");if(g)for(var h=g.split(" "),l=0;l<h.length;l++)switch(g=h[l],g){case "pc8080-binding":(g=na(f))&&g.binding&&a.ca(g.type,g.binding,f,g.value),l=h.length}}}}
|
||||
|
|
@ -75,7 +75,7 @@ k.ob=function(a,b){this.K&&wa(this.K,129)&&this.K.message("attempt to write "+y(
|
|||
k.je=function(a,b){var c=a>>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<<a)|b<<a:(this.b[c]=this.b[c]&16777215|b<<24,c++,this.b[c]=this.b[c]&-256|b>>8);this.Ca=!0};k.Vd=function(a,b){if(this.K&&null!=this.J){var c=this.K;sc(c,this.J+a,1,c.I)&&c.da(!0)}return this.lb(a,b)};k.Zd=function(a,b){if(this.K&&null!=this.J){var c=this.K;sc(c,this.J+a,2,c.I)&&c.da(!0)}return this.Jb(a,b)};
|
||||
k.de=function(a,b,c){if(this.K&&null!=this.J){var d=this.K;sc(d,this.J+a,1,d.w)&&d.da(!0)}this.u?this.ob(0,b):this.nb(a,b,c)};k.he=function(a,b,c){if(this.K&&null!=this.J){var d=this.K;sc(d,this.J+a,2,d.w)&&d.da(!0)}this.u?this.ob(0,b):this.Ob(a,b,c)};k.Ud=function(a){return this.g[a]};k.Wd=function(a){return this.g[a]};k.Yd=function(a){return this.w.getUint16(a,!0)};k.$d=function(a){return a&1?this.g[a]|this.g[a+1]<<8:this.A[a>>1]};k.ce=function(a,b){this.g[a]=b;this.Ca=!0};
|
||||
k.ee=function(a,b){this.g[a]=b;this.Ca=!0};k.ge=function(a,b){this.w.setUint16(a,b,!0);this.Ca=!0};k.ie=function(a,b){a&1?(this.g[a]=b,this.g[a+1]=b>>8):this.A[a>>1]=b;this.Ca=!0};var Yb=0,Zb=2,Cb=["NONE","RAM","ROM","VID","H/W"],Xb=0,ec=[],cc=[z.prototype.Xd,z.prototype.fe,z.prototype.ae,z.prototype.je],hc=[z.prototype.Vd,z.prototype.de,z.prototype.Zd,z.prototype.he];if(qb)var bc=[z.prototype.Ud,z.prototype.ce,z.prototype.Yd,z.prototype.ge],ac=[z.prototype.Wd,z.prototype.ee,z.prototype.$d,z.prototype.ie];
|
||||
function tc(a,b){n.call(this,"CPU",a,0,1);var c=a.multiplier||1;this.Fa=a.cycles||b;this.U=c;this.Sa=Math.round(this.Fa/1E4)/100;this.Z=this.Sa*this.U;this.G.ka=!1;this.G.Mb=!1;this.G.ib=a.autoStart;this.G.ec=!1;this.G.Va=!1;this.ya=this.oa=0;this.za=a.csStart;this.na=a.csInterval;this.sa=a.csStop;this.T=[];this.zb=this.qb.bind(this);sa(this)}ba(tc,n);k=tc.prototype;
|
||||
function tc(a,b){n.call(this,"CPU",a,1);var c=a.multiplier||1;this.Fa=a.cycles||b;this.U=c;this.Sa=Math.round(this.Fa/1E4)/100;this.Z=this.Sa*this.U;this.G.ka=!1;this.G.Mb=!1;this.G.ib=a.autoStart;this.G.ec=!1;this.G.Va=!1;this.ya=this.oa=0;this.za=a.csStart;this.na=a.csInterval;this.sa=a.csStop;this.T=[];this.zb=this.qb.bind(this);sa(this)}ba(tc,n);k=tc.prototype;
|
||||
k.Ea=function(a,b,c,d){this.S=a;this.H=b;this.K=d;for(b=0;b<uc.length;b++)(c=this.P[uc[b]])&&this.S.ca(null,uc[b],c);this.W=vb(a,"ChipSet");a=vc(a,"autoStart");null!=a&&(this.G.ib="true"==a?!0:"false"==a?!1:!!a);sa(this)};k.reset=function(){};k.save=function(){return null};k.restore=function(){return!1};
|
||||
k.ua=function(a,b){if(!b){if(a&&this.restore){wc(this);if(!this.restore(a))return!1;xc(this)}else this.reset();this.K?(a=this.K,a.i("Type ? for help with PC8080 Debugger commands"),yc(a),a.ea&&(b=a.ea,a.ea=null,zc(a,b))):this.i("No debugger detected")}Ac(this);return!0};k.wa=function(a){return a?this.save():!0};k.ib=function(){return this.G.ib||!this.K&&void 0===this.P.run?(this.qb(),!0):!1};k.hc=function(){return 0};
|
||||
function xc(a){void 0===a.za&&(a.za=0);void 0===a.na&&(a.na=-1);void 0===a.sa&&(a.sa=-1);a.G.Va=0<=a.za&&0<a.na;a.G.Va&&(a.ya=0,a.oa=a.za-a.la)}function Bc(a,b){if(a.G.Va){var c=!1;a.ya=a.ya+a.hc()|0;a.oa-=b;0>=a.oa&&(a.oa+=a.na,c=!0);0<=a.sa&&a.sa<=Cc(a)&&(a.na=a.sa=-1,xc(a),a.da(),c=!0);c&&a.i(Cc(a)+" cycles: checksum="+x(a.ya))}}
|
||||
|
|
@ -118,7 +118,7 @@ md(this)||C(this,a);this.b-=10},function(){var a=G(this);Sb(this.H,a,this.g,this
|
|||
11},function(){I(this,D(this));this.b-=11},function(){this.g=ud(this,G(this));this.b-=7},function(){I(this,this.j);C(this,32);this.b-=11},function(){od(this)&&(C(this,Bd(this)),this.b-=6);this.b-=5},function(){C(this,D(this));this.b-=5},function(){var a=H(this);od(this)&&C(this,a);this.b-=10},function(){var a=D(this);ld(this,jd(this));kd(this,a);this.b-=5},function(){var a=H(this);od(this)&&(I(this,this.j),C(this,a),this.b-=6);this.b-=11},Jd,function(){this.g=zd(this,G(this));this.b-=7},function(){I(this,
|
||||
this.j);C(this,40);this.b-=11},function(){rd(this)||(C(this,Bd(this)),this.b-=6);this.b-=5},function(){var a=Bd(this);Sc(this,a&255|this.N&-256);this.g=a>>8;this.b-=10},function(){var a=H(this);rd(this)||C(this,a);this.b-=10},function(){this.N&=-513;this.b-=4},function(){var a=H(this);rd(this)||(I(this,this.j),C(this,a),this.b-=6);this.b-=11},function(){I(this,Uc(this)&255|this.g<<8);this.b-=11},function(){this.g=xd(this,G(this));this.b-=7},function(){I(this,this.j);C(this,48);this.b-=11},function(){rd(this)&&
|
||||
(C(this,Bd(this)),this.b-=6);this.b-=5},function(){this.M=D(this)&65535;this.b-=5},function(){var a=H(this);rd(this)&&C(this,a);this.b-=10},function(){this.N|=512;this.b-=4;Cd(this)},function(){var a=H(this);rd(this)&&(I(this,this.j),C(this,a),this.b-=6);this.b-=11},Jd,function(){E(this,G(this));this.b-=7},function(){I(this,this.j);C(this,56);this.b-=11}];
|
||||
function Kd(a){n.call(this,"ChipSet",a,0,32768);var b=a.model;b&&!Ld[b]&&ga("Unrecognized ChipSet model: "+b);this.g=Ld[b]||{};a.sound&&(this.U=null,window&&(this.U=window.AudioContext||window.webkitAudioContext),this.U&&new this.U);sa(this)}ba(Kd,n);k=Kd.prototype;k.ca=function(){return!1};
|
||||
function Kd(a){n.call(this,"ChipSet",a,32768);var b=a.model;b&&!Ld[b]&&ga("Unrecognized ChipSet model: "+b);this.g=Ld[b]||{};a.sound&&(this.U=null,window&&(this.U=window.AudioContext||window.webkitAudioContext),this.U&&new this.U);sa(this)}ba(Kd,n);k=Kd.prototype;k.ca=function(){return!1};
|
||||
k.Ea=function(a,b,c,d){this.H=b;this.u=c;this.K=d;this.S=a;this.B=vb(a,"Keyboard");this.C=vb(a,"SerialPort");this.video=vb(a,"Video");Nb(b,this,this.g.xb);Rb(b,this,this.g.yb);if(d){var e=this;Md(d,16384,function(){for(var a="",b=0;b<e.j.length;b++)a&&(a+=b&&b%10?", ":",\n"),a+=y(e.j[b]);e.K.i(a)})}};k.ua=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};k.wa=function(a){return a?this.save():!0};k.reset=function(){this.g.INIT&&!this.restore(this.g.INIT)&&this.aa("reset error")};
|
||||
k.save=function(){var a=new Vc(this);switch(this.g.pa){case Nd.pa:a.set(0,[this.ea,this.A,this.ga,this.N,this.T,this.Y,this.Z]);break;case L.pa:a.set(0,[this.W,this.D]),a.set(1,[this.F,this.I]),a.set(2,[this.w,this.O,this.X,this.V]),a.set(3,[this.M,this.b,this.L,this.R,this.j])}return a.data()};
|
||||
k.restore=function(a){var b;if(a&&(b=a[0])&&b.length)switch(this.g.pa){case Nd.pa:return this.ea=b[0],this.A=b[1],this.ga=b[2],this.N=b[3],this.T=b[4],this.Y=b[5],this.Z=b[6],!0;case L.pa:return this.W=b[0],this.D=b[1],b=a[1],this.F=b[0],this.I=b[1],b=a[2],this.w=b[0],this.O=b[1],this.X=b[2],this.V=b[3],b=a[3],this.M=b[0],this.b=b[1],this.L=b[2],this.R=b[3],this.j=b[4],!0}return!1};k.start=function(){};k.stop=function(){};k.Bd=function(a,b){var c=this.ea;v(this,a,null,b,"STATUS0",c,!0);return c};
|
||||
|
|
@ -143,7 +143,7 @@ function Vd(a){n.call(this,"RAM",a);this.ra=this.g=null;this.w=a.addr;this.A=a.s
|
|||
Vd.prototype.Ea=function(a,b,c,d){this.H=b;this.u=c;this.K=d;Wd(this)};Vd.prototype.ua=function(){return!0};Vd.prototype.wa=function(){return!0};
|
||||
function Wd(a){!a.j&&a.A&&zb(a.H,a.w,a.A,1)&&(a.j=!0);if(!ra(a)){if(!a.j)q("No RAM allocated");else if(a.b){if(!a.g||!a.H)return;var b=a.w;null!==a.Qa&&(b=a.Qa);for(var c=0;c<a.g.length;c++)Hb(a.H,b+c,a.g[c]);if(null!==a.Ia){if(a.Ia==Xd){for(c=0;c<Yd.length;c++)Hb(a.H,Yd[c],118);Rc(a.u,function(a){return function(b){if(0<=Yd.indexOf(b)){var c=!1,d=a.u,e=a.K;if(b==Zd)switch(c=!0,d.A){case $d:ae(a,String.fromCharCode(d.C));break;case be:for(var l=jd(d),p="",r=255;r--;){var t=F(a.u,l++);if(36==t)break;
|
||||
p+=String.fromCharCode(t)}ae(a,p);break;default:c=!1}c?Id.call(d):e&&(a.i("\nCP/M vector "+y(b)),C(d,b),e.da());b=!0}else b=!1;return b}}(a))}Tc(a.u,a.Ia)}delete a.g}sa(a)}}Vd.prototype.reset=function(){};function ae(a,b){b=b.replace(/\r/g,"");a.ta&&(a.ta.value+=b,a.ta.scrollTop=a.ta.scrollHeight)}var Zd=5,$d=2,be=9,Xd=256,Yd=[0,Zd];hb(function(){for(var a=pa(document,"pc8080","ram"),b=0;b<a.length;b++){var c=a[b],d=na(c),d=new Vd(d);oa(d,c)}});
|
||||
function ce(a){n.call(this,"Keyboard",a,0,65536);(a=a.model)&&!de[a]&&ga("Unrecognized Keyboard8080 model: "+a);this.b=de[a]||{};this.reset();sa(this)}ba(ce,n);k=ce.prototype;
|
||||
function ce(a){n.call(this,"Keyboard",a,65536);(a=a.model)&&!de[a]&&ga("Unrecognized Keyboard8080 model: "+a);this.b=de[a]||{};this.reset();sa(this)}ba(ce,n);k=ce.prototype;
|
||||
k.ca=function(a,b,c){var d=this,e=a+"-"+b;if(void 0===this.P[e]){if("led"==a&&this.b.bb[b])return this.P[e]=c,!0;switch(b){case "kbd":case "screen":return c.onkeydown=function(a){return ee(d,a,!0)},c.onkeyup=function(a){return ee(d,a,!1)},c.onkeypress=function(a){a=a.keyCode;a>=m.pb&&a<=m.Db?d.j&(fe|ge)||(d.j|=ge,he(d,20,!0),De(d)):a>=m.pd&&a<=m.z&&d.j&ge&&(d.j&=~ge,he(d,20,!1),De(d));return!0},c.onpaste=function(a){a:{if(d.C&&d.C.Ra&&(a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),
|
||||
a=a.clipboardData||window.clipboardData)){Ee(d.C,a.getData("Text"));a=!1;break a}a=!0}return a},!0;default:if(this.b.Ta&&void 0!==this.b.Ta[b])return this.P[e]=c,c.onclick=function(a,b){return function(c){c.preventDefault&&c.preventDefault();he(a,b,!0,!0)}}(this,this.b.Ta[b]),!0}}return!1};k.Ea=function(a,b,c,d){this.S=a;this.u=c;this.K=d;var e=this;this.L=Ic(this.u,function(){Fe(e)});this.W=vb(a,"ChipSet");this.C=vb(a,"SerialPort");Nb(b,this,this.b.xb);Rb(b,this,this.b.yb)};
|
||||
k.ua=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};k.wa=function(a){return a?this.save():!0};k.reset=function(){this.g=[];this.j=0;this.b.INIT&&!this.restore(this.b.INIT)&&this.aa("reset error")};k.save=function(){var a=new Vc(this);switch(this.b.pa){case M.pa:a.set(0,[this.D,this.B,this.A,this.F,-1])}return a.data()};
|
||||
|
|
@ -155,7 +155,7 @@ k.Td=function(a,b,c){v(this,a,b,c,"KBDUART.STATUS");this.D=b;this.A=!0;this.F=Cc
|
|||
var Ge={pa:1978.1,Cb:{},Pb:Te,bb:{},Ta:{"1p":49,"2p":50,coin:51,left:37,right:39,fire:32}},N={},M={pa:100,Cb:(N[8]=3,N[m.Tc]=5,N[m.Sc]=6,N[m.od]=7,N[m.hd]=8,N[m.ld]=9,N[m.Q]=10,N[39]=16,N[221]=20,N[219]=21,N[m.Ac]=22,N[m.jd]=23,N[m.Zc]=24,N[m.E]=25,N[49]=26,N[37]=32,N[40]=34,N[117]=35,N[19]=35,N[192]=36,N[189]=37,N[57]=38,N[55]=39,N[52]=40,N[51]=41,N[27]=42,N[38]=48,N[114]=49,N[112]=50,N[46]=51,N[187]=52,N[48]=53,N[56]=54,N[54]=55,N[53]=56,N[50]=57,N[9]=58,N[103]=64,N[115]=65,N[113]=66,N[96]=67,N[118]=
|
||||
68,N[220]=69,N[m.Ub]=70,N[m.Ic]=71,N[m.yc]=72,N[m.xc]=73,N[m.pb]=74,N[104]=80,N[2013]=81,N[98]=82,N[97]=83,N[222]=85,N[186]=86,N[m.Hc]=87,N[m.zc]=88,N[m.Rb]=89,N[m.bd]=90,N[110]=96,N[116]=97,N[101]=98,N[100]=99,N[13]=100,N[190]=101,N[188]=102,N[m.Qc]=103,N[m.rc]=104,N[m.nd]=105,N[119]=106,N[105]=112,N[99]=113,N[102]=114,N[109]=115,N[191]=117,N[m.Pc]=118,N[m[" "]]=119,N[m.kd]=120,N[m.tc]=121,N[m.Db]=122,N[120]=123,N[17]=124,N[16]=125,N[20]=126,N),Pb:{},bb:{},Ta:{"num-comma":116,"break":117,"line-feed":118,
|
||||
"no-scroll":119,setup:120},qc:{qa:130,INIT:127},Ba:{qa:130,Nc:1,Mc:2,Lc:4,Kc:8,Oc:16,Wb:32,Vb:63,ed:64,me:128,INIT:0},Jc:127};M.bb={l4:M.Ba.Nc,l3:M.Ba.Mc,l2:M.Ba.Lc,l1:M.Ba.Kc,locked:M.Ba.Oc,local:M.Ba.Wb,online:~M.Ba.Wb,"caps-lock":ge};var de={SI1978:Ge,VT100:M};M.INIT=[[M.Ba.INIT,M.qc.INIT,!1,0,-1]];M.xb={130:ce.prototype.Fd};M.yb={130:ce.prototype.Td};hb(function(){for(var a=pa(document,"pc8080","keyboard"),b=0;b<a.length;b++){var c=a[b],d=na(c),d=new ce(d);oa(d,c)}});
|
||||
function Ue(a,b,c,d,e){n.call(this,"Video",a,0,262144);var f=this;this.Sa=bb("Gecko/");var g=["","moz","ms","webkit"];this.M=a.screenWidth;this.I=a.screenHeight;this.la=a.bufferAddr;this.sd=a.bufferRAM;var h=a.bufferFormat;this.Y=h&&Ve[h.toUpperCase()]||We;this.O=a.bufferCols;this.Z=a.bufferRows;this.Ha=this.fa=a.cellWidth||1;this.ba=a.cellHeight||1;this.ea=null;this.Na=!1;this.na=a.bufferBits||1;this.ud=a.bufferLeft||0;if(this.g=a.bufferRotate)this.g=this.g%360,0<this.g&&(this.g-=360),-90!=this.g&&
|
||||
function Ue(a,b,c,d,e){n.call(this,"Video",a,262144);var f=this;this.Sa=bb("Gecko/");var g=["","moz","ms","webkit"];this.M=a.screenWidth;this.I=a.screenHeight;this.la=a.bufferAddr;this.sd=a.bufferRAM;var h=a.bufferFormat;this.Y=h&&Ve[h.toUpperCase()]||We;this.O=a.bufferCols;this.Z=a.bufferRows;this.Ha=this.fa=a.cellWidth||1;this.ba=a.cellHeight||1;this.ea=null;this.Na=!1;this.na=a.bufferBits||1;this.ud=a.bufferLeft||0;if(this.g=a.bufferRotate)this.g=this.g%360,0<this.g&&(this.g-=360),-90!=this.g&&
|
||||
(this.aa("unsupported buffer rotation: "+this.g),this.g=0);this.oa=a.interruptRate;this.hb=a.refreshRate||60;this.F=b;this.j=c;this.V=(this.xd=d)||b||null;this.zb=this.M;this.rd=this.I;this.La=this.M/this.O|0;this.Ma=this.I/this.Z|0;1<this.ba&&(this.Z++,this.sa=0,this.ya=!1);b=a.smoothing;(c=cb("smoothing"))&&(b="true"==c);if(null!=b)for(c=0;c<g.length;c++)if(d=(d=g[c])?d+"ImageSmoothingEnabled":"imageSmoothingEnabled",void 0!==this.j[d]){this.j[d]=b;break}if(this.w=a.screenRotate)this.w=this.w%360,
|
||||
0<this.w&&(this.w-=360),-90!=this.w?(this.aa("unsupported screen rotation: "+this.w),this.w=0):(this.j.translate(0,this.I),this.j.rotate(this.w*Math.PI/180),this.j.scale(this.I/this.M,this.M/this.I));if(this.b=e)if(this.b.Wa=e.requestFullscreen||e.msRequestFullscreen||e.mozRequestFullScreen||e.webkitRequestFullscreen,this.b.Wa){for(c=0;c<g.length;c++)if(d=g[c]+"fullscreenchange","on"+d in document){document.addEventListener(d,function(){Xe(f,!!(document.fullscreenElement||document.msFullscreenElement||
|
||||
document.mozFullScreenElement||document.webkitFullscreenElement))},!1);break}for(c=0;c<g.length;c++)if(d=g[c]+"fullscreenerror","on"+d in document){document.addEventListener(d,function(){Xe(f,null)},!1);break}}if(this.R=a.fontROM)"json"!=Fa(this.R)&&(this.R=Ha()+"/api/v1/dump?file="+this.R+"&format=bytes"),Sa(this.R,null,!0,function(a,b,c){Ye(f,a,b,c)});this.Fa={}}ba(Ue,n);
|
||||
|
|
@ -173,7 +173,7 @@ ya,S,La,dc,K,ia,ta,ma))}h++}g++}e++}}a.W=!0;!b&&a.ya&&1==h&&(a.A[l]=-1,h=0);a.ya
|
|||
(f=b,g=e,b=c,e=d,c=a.C-(f+g),d=g),a.va.putImageData(a.Ua,0,0,b,c,e,d),a.j.drawImage(a.D,0,0,a.D.width,a.D.height,0,0,a.M,a.I))}}var bf=0,cf=1,$e=2,We=0,af=1,df=2,Ve={SI1978:af,VT100:df},ef=96,gf=64,hf=32,jf=0,lf=127,nf=15,of=16,mf=96,pf=8192,qf=16384;
|
||||
hb(function(){for(var a=pa(document,"pc8080","video"),b=0;b<a.length;b++){var c=a[b],d=na(c),e=document.createElement("canvas");if(!e||!e.getContext){c.innerHTML="<br/>Missing <canvas> 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<=Ua().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=+(d.aspect||cb("aspect"));f&&.3<=f&&3.33>=f&&(gb("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");bb("iOS")&&(f.setAttribute("autocapitalize","off"),f.setAttribute("autocorrect","off"));c.appendChild(f);var g=e.getContext("2d"),d=new Ue(d,e,g,f,c);oa(d,c)}});
|
||||
function rf(a){n.call(this,"SerialPort",a,0,8388608);this.T=+a.adapter;switch(this.T){case 0:this.U=0;this.X=2;break;default:q("Unrecognized serial adapter #"+this.T);return}this.g=this.j=null;this.V=a.tabSize;this.R=a.charBOL;this.w=0;this.N=!1;this.D=!0;var b=a.binding;if("console"==b)this.j="";else{var c;a=sf;b&&(void 0===c&&(c="Panel"),(c=la(c,this.id))&&(b=c.P[b])&&this.ca(null,a,b))}this.A="";this.b=this.Ra=this.I=null;this.exports={connect:this.ic,receiveData:this.Kb,receiveStatus:this.be}}
|
||||
function rf(a){n.call(this,"SerialPort",a,8388608);this.T=+a.adapter;switch(this.T){case 0:this.U=0;this.X=2;break;default:q("Unrecognized serial adapter #"+this.T);return}this.g=this.j=null;this.V=a.tabSize;this.R=a.charBOL;this.w=0;this.N=!1;this.D=!0;var b=a.binding;if("console"==b)this.j="";else{var c;a=sf;b&&(void 0===c&&(c="Panel"),(c=la(c,this.id))&&(b=c.P[b])&&this.ca(null,a,b))}this.A="";this.b=this.Ra=this.I=null;this.exports={connect:this.ic,receiveData:this.Kb,receiveStatus:this.be}}
|
||||
ba(rf,n);k=rf.prototype;
|
||||
k.ca=function(a,b,c,d){var e=this;switch(b){case sf:return this.P[b]=this.g=c,c.onkeydown=function(a){a=a||window.event;var b=a.keyCode;if(8===b||a.ctrlKey&&65<=b&&90>=b)a.preventDefault&&a.preventDefault(),64<b&&(b-=64),tf(e,b);return!0},c.onkeypress=function(a){a=a||window.event;tf(e,a.which||a.keyCode);a.preventDefault&&a.preventDefault();return!0},c.removeAttribute("readonly"),!0;default:if(d)return this.P[b]=c,d=d.replace(/\\e/g,String.fromCharCode(27)),c.onclick=function(){e.Kb(d);return!0},
|
||||
!0}return!1};k.Ea=function(a,b,c,d){this.S=a;this.H=b;this.u=c;this.K=d;var e=this;this.Y=Ic(this.u,function(){e.Kb()});this.Z=Ic(this.u,function(){Ee(e)});this.W=vb(a,"ChipSet");Nb(b,this,uf,this.U);Rb(b,this,vf,this.U);sa(this)};
|
||||
|
|
@ -254,7 +254,7 @@ T,U],[43,T,V],[43,T,W],[43,T,X],[43,T,Y],[43,T,Z],[43,T,R],[43,U,T],[43,U,U],[43
|
|||
U],[43,R,V],[43,R,W],[43,R,X],[43,R,Y],[43,R,Z],[43,R,R],[3,R|O,T],[3,R|O,U],[3,R|O,V],[3,R|O,W],[3,R|O,X],[3,R|O,Y],[3,R|O,Z],[3,R|O,R],[2,R|O,T],[2,R|O,U],[2,R|O,V],[2,R|O,W],[2,R|O,X],[2,R|O,Y],[2,R|O,Z],[2,R|O,R],[73,R|O,T],[73,R|O,U],[73,R|O,V],[73,R|O,W],[73,R|O,X],[73,R|O,Y],[73,R|O,Z],[73,R|O,R],[66,R|O,T],[66,R|O,U],[66,R|O,V],[66,R|O,W],[66,R|O,X],[66,R|O,Y],[66,R|O,Z],[66,R|O,R],[5,R|O,T],[5,R|O,U],[5,R|O,V],[5,R|O,W],[5,R|O,X],[5,R|O,Y],[5,R|O,Z],[5,R|O,R],[76,R|O,T],[76,R|O,U],[76,R|
|
||||
O,V],[76,R|O,W],[76,R|O,X],[76,R|O,Y],[76,R|O,Z],[76,R|O,R],[46,R|O,T],[46,R|O,U],[46,R|O,V],[46,R|O,W],[46,R|O,X],[46,R|O,Y],[46,R|O,Z],[46,R|O,R],[18,R|O,T],[18,R|O,U],[18,R|O,V],[18,R|O,W],[18,R|O,X],[18,R|O,Y],[18,R|O,Z],[18,R|O,R],[58],[50,Mh],[34,51],[30,51],[11,51],[51,Mh],[4,R|O,P|Q],[65,xh],[62],[54],[38,51],[30,51|yh],[15,51],[7,51],[1,R|O,P|Q],[65,xh],[57],[50,Nh],[33,51],[48,P|Q,R|O],[10,51],[51,Nh],[74,R|O,P|Q],[65,xh],[55],[54,yh],[31,51],[27,R|O,P|Q],[8,51],[7,51|yh],[67,R|O,P|Q],[65,
|
||||
xh],[61],[50,Oh],[37,51],[78,Ph|uh|O,Oh|O],[14,51],[51,Oh],[6,R|O,P|Q],[65,xh],[60],[49,Oh],[36,51],[75,Oh|O,Nh|O],[13,51],[7,51|yh],[77,R|O,P|Q],[65,xh],[59],[50,Qh],[35,51],[24],[12,51],[51,Qh],[47,R|O,P|Q],[65,xh],[56],[69,Ph|O,Oh|O],[32,51],[25],[9,51],[7,51|yh],[19,R|O,P|Q],[65,xh]],Zg=1E3;hb(function(){for(var a=pa(document,"pc8080","debugger"),b=0;b<a.length;b++){var c=a[b],d=na(c),d=new Uf(d);oa(d,c)}});
|
||||
function Rh(a,b,c){n.call(this,"Computer",a,0,67108864);this.G.ja=!1;Sh(this,b);this.L=vc(this,"autoPower",a);this.j=0;this.T=a.busWidth||a.buswidth;this.b=Th;this.F=null;this.C=this.O=!1;this.U=vc(this,"url")||"";(Math.random()+.1).toString(36);this.g=Uh(this);if(this.u=la("CPU",this.id)){this.K=la("Debugger",this.id);this.A=[];for(b=null;b=vb(this,"Video",b);)this.A.push(b);this.H=new xb({id:this.ab+".bus",busWidth:this.T},this.u,this.K);var d,e=ja(this.id);if((this.B=la("Panel",this.id))&&this.B.ta)for(b=
|
||||
function Rh(a,b,c){n.call(this,"Computer",a,67108864);this.G.ja=!1;Sh(this,b);this.L=vc(this,"autoPower",a);this.j=0;this.T=a.busWidth||a.buswidth;this.b=Th;this.F=null;this.C=this.O=!1;this.U=vc(this,"url")||"";(Math.random()+.1).toString(36);this.g=Uh(this);if(this.u=la("CPU",this.id)){this.K=la("Debugger",this.id);this.A=[];for(b=null;b=vb(this,"Video",b);)this.A.push(b);this.H=new xb({id:this.ab+".bus",busWidth:this.T},this.u,this.K);var d,e=ja(this.id);if((this.B=la("Panel",this.id))&&this.B.ta)for(b=
|
||||
0;b<e.length;b++)d=e[b],d.aa=this.B.aa,d.i=this.B.i,d.ta=this.B.ta;this.i("PC8080 v1.32.2\nCopyright \u00a9 2012-2017 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.Ea&&d.Ea(this,this.H,this.u,this.K);b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.D=d:this.b=parseInt(d,10));var f;if(a=vc(this,"state")||(f=!0,a.state))b=this.M=a,f||(this.C=!0,this.b=Th),this.b&&(this.I=new Vc(this,"1.32.2"),Vh(this.I)?b=null:delete this.I);
|
||||
!b&&this.b&&(b=Wh(this))&&(this.C=!0);if(b){var g=this;Sa(b,null,!0,function(a,b,c){c?(g.D=null,g.C=!1,g.aa("Unable to load machine state from server (error "+c+(b?": "+Na(b):"")+")")):(g.F=b,g.O=!0);sa(g)})}else sa(this);this.P.power||(this.L=!0);!c&&this.L&&Xh(this,this.kb)}else q("Unable to find CPU component")}ba(Rh,n);function Sh(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){q(d.message+" ("+c+")")}}a.R=b}
|
||||
function vc(a,b,c){var d=b.toLowerCase(),d=cb(b)||cb(d);void 0===d&&a.R&&(d=a.R[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}function Xh(a,b,c){for(var d=ja(a.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:a;if(!ra(f)){ra(f,function(){Xh(a,b,c)});return}}b.call(a,c)}
|
||||
|
|
|
|||
Loading…
Reference in a new issue