Numerous changes to make paper tape configurations more consistent with disk configurations. This allows all devices to share the machine-wide "autoMount" configuration object, now that the PC11 has a proper device name ("PTR"), making its properties distinguishable from those for RK11 and RL11 drives (eg, "RK0", "RL0", etc). And all the tape/disk components now use "Load" functions to connect a tape or disk to a device ("Attach" is deprecated). And finally, all tape/disk components now support operations to deposit their media directly into memory -- although in this case, the names of the operations are necessarily different: "Read" for tape images, "Boot" for disk images. The difference is partly historical convention but also reflects the fact that a "Boot" operation is more limited: paper tapes were designed to be completely loaded into memory, whereas bootable disks are designed for only the first sector to be loaded and executed. Also, paper tape images are now flagged as non-auto-starting, because they often require some user action (eg, loading another tape, setting some switches, etc), whereas disk boot sectors are flagged as auto-starting (see the fStart parameter of the loadImage() interface in the RAM component).
This commit is contained in:
parent
aa2aebd89a
commit
b54253acf9
41 changed files with 383 additions and 211 deletions
|
|
@ -650,8 +650,8 @@ l.toJSON=function(){var a;a=0;for(var b;b=ep(this,a++);)xp(b);a=JSON.stringify(t
|
|||
function xp(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function yp(a){bb.call(this,"FDC",a,yp,524288);this.dmaRead=this.el;this.dmaWrite=this.fl;this.dmaFormat=this.xl;this.U=a.autoMount||null;this.fa=a.sortBy||"name";"none"==this.fa&&(this.fa=null);this.B=[];this.ia=!La("Mobi")&&window&&"FileReader"in window}jb(yp);aa={};
|
||||
var zp={3:{Ud:3,ge:0,name:aa.gp},4:{Ud:2,ge:1,name:aa.ep},5:{Ud:9,ge:7,name:aa.kp},6:{Ud:9,ge:7,name:aa.$o},7:{Ud:2,ge:0,name:aa.bp},8:{Ud:1,ge:2,name:aa.fp},10:{Ud:2,ge:7,name:aa.ap},13:{Ud:6,ge:7,name:aa.Xo},15:{Ud:3,ge:0,name:aa.cp}};l=yp.prototype;
|
||||
l.Pb=function(a,b,c){var d=this;switch(b){case "listDisks":this.qa[b]=c;if(this.fa){b=[];for(a=0;a<c.options.length;a++)b.push(c.options[a]);b.sort(function(a,b){return"path"!=d.fa?a.text.localeCompare(b.text):a.value.localeCompare(b.value)});for(a=0;a<b.length;a++)try{c.options[a]=b[a]}catch(e){break}}c.onchange=function(){var a=d.qa.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){w("FDC option error: "+h.message)}b=g.desc;
|
||||
void 0===b&&(b="");g=g.href;void 0!==g&&(b='<a href="'+g+'" target="_blank">'+b+"</a>");a.innerHTML=b}};return!0;case "descDisk":case "listDrives":return this.qa[b]=c,c.onchange=function(){var a=ea(c.value,10);null!=a&&Ap(d,a)},!0;case "loadDrive":return this.qa[b]=c,c.onclick=function(){var a=d.qa.listDisks;a&&Bp(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.ia){c.parentNode.removeChild(c);break}this.qa[b]=c;c.onclick=function(){var a=d.qa.listDrives;a&&a.options&&d.A&&
|
||||
((a=d.A[ea(a.value,10)||0])?(a=a.za)?(a=Na(wp(a),"octet-stream",!0,a.Ug.replace(".json",".img")),w(a)):d.Na("No diskette loaded in drive."):d.Na("No diskette drive selected."))};return!0;case "mountDrive":if(this.ia)return this.qa[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Bp(d,ja(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
|
||||
void 0===b&&(b="");g=g.href;void 0!==g&&(b='<a href="'+g+'" target="_blank">'+b+"</a>");a.innerHTML=b}};return!0;case "descDisk":case "listDrives":return this.qa[b]=c,c.onchange=function(){var a=ea(c.value,10);null!=a&&Ap(d,a)},!0;case "loadDisk":return this.qa[b]=c,c.onclick=function(){var a=d.qa.listDisks;a&&Bp(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDisk":if(!this.ia){c.parentNode.removeChild(c);break}this.qa[b]=c;c.onclick=function(){var a=d.qa.listDrives;a&&a.options&&d.A&&((a=
|
||||
d.A[ea(a.value,10)||0])?(a=a.za)?(a=Na(wp(a),"octet-stream",!0,a.Ug.replace(".json",".img")),w(a)):d.Na("No diskette loaded in drive."):d.Na("No diskette drive selected."))};return!0;case "mountDisk":if(this.ia)return this.qa[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Bp(d,ja(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
|
||||
l.Jc=function(a,b,c,d){this.ga=b;this.F=c;this.ha=d;this.X=a;this.N=Jb(a,"ChipSet");if((this.U=Yc(this.X,"autoMount")||this.U)&&"string"==typeof this.U)try{this.U=eval("("+this.U+")")}catch(e){w("FDC auto-mount error: "+e.message+" ("+this.U+")"),this.U=null}Cp(this);qc(b,this,Dp);yc(b,this,Ep);Fp(this,"None","",!0);this.ia&&Fp(this,"Local Disk","?");Fp(this,"Remote Disk","??");Gp(this)||xb(this)};
|
||||
l.hc=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.X.lh){this.B=[];for(a=0;a<this.A.length;a++)Hp(this,a,!0);Gp(this,!0)}}else if(!this.restore(a))return!1;if(a=this.qa.listDrives){for(;a.firstChild;)a.removeChild(a.firstChild);a.value="";for(b=0;b<this.ka;b++){var c=document.createElement("option");c.value=b;c.text=String.fromCharCode(65+b)+":";a.appendChild(c)}0<this.ka&&(a.value="0",Ap(this,0))}}return!0};l.gc=function(a){return a?this.save():!0};l.reset=function(){Cp(this)};
|
||||
l.save=function(){var a=new qf(this);a.set(0,Ip(this));return a.data()};l.restore=function(a){return Cp(this,a[0])};
|
||||
|
|
|
|||
Loading…
Reference in a new issue