FDC hacks to deal with recent disk path changes and disk file name case changes
This commit is contained in:
parent
e8ba4aedc5
commit
64d71f0fd6
4 changed files with 4 additions and 4 deletions
|
|
@ -608,7 +608,7 @@ n[q++];g.he=n[q++];g.Ib=n[q++];g.eb=n[q++];g.pb=null;g.za||(g.Le="");p=n[q++];10
|
|||
m.lk=function(a,b,c){if(a.za){var d=a.za.info(),e=d[2],f=d[1]*e;if(b+c<=d[0]*f)return a.Qb=Math.floor(b/f),b%=f,a.kb=Math.floor(b/e),a.xb=b%e+1,a.Ib=c*d[3],a.Cb=0,!0}return!1};
|
||||
function zp(a,b){b||(a.fa=0);if(a.U)for(var c in a.U){var d=a.U[c],e=d.path,f;if(!(f=d.name))a:{if((f=a.qa.listDisks)&&f.options)for(var g=0;g<f.options.length;g++){var h=f.options[g];if(h.value==e){f=h.text;break a}}f=fa(e,!0)}if(e&&f&&(g=c.charCodeAt(0)-65,0<=g&&g<a.A.length)){!Cp(a,g,f,e,!0)&&b&&rb(a,!1);continue}a.Na("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")")}return!!a.fa}
|
||||
function up(a,b,c,d){var e,f=a.qa.listDrives;if(f&&!isNaN(e=ca(f.value,10))&&0<=e&&e<a.A.length)if(c)if("?"==c)a.Na('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=fa(c)}for(;0>Cp(a,e,b,c,!1,d)&&window.confirm("Click OK to reload the original disk.\n(WARNING: All disk changes will be discarded)");){for(var f=a,g=c,h=void 0,h=0;h<f.B.length;h++)if(f.B[h][1]==g){f.B.splice(h,1);break}Ap(a,
|
||||
e,!1,!0)}}else Ap(a,e);else a.Na("Unable to load the selected drive")}function Cp(a,b,c,d,e,f){var g=a.A[b];if(d&&(d=d.replace("/disks/pc/","/disks/pcx86/"),g.Le!=d)){Ap(a,b,e,!0);if(g.bd)return a.Na("Drive "+b+" busy"),0;g.bd=!0;e&&(g.Ae=!0,a.fa++,A(a)&&y(a,"loading diskette '"+c+"'"));g.$e=!!f;return(new Ho(a,g,"preload")).load(c,d,f,a.Hi)?1:0}return-1}
|
||||
e,!1,!0)}}else Ap(a,e);else a.Na("Unable to load the selected drive")}function Cp(a,b,c,d,e,f){var g=a.A[b];if(d&&(d=d.replace("/disks/pc/","/disks/pcx86/"),g.Le.toLowerCase()!=d.toLowerCase())){Ap(a,b,e,!0);if(g.bd)return a.Na("Drive "+b+" busy"),0;g.bd=!0;e&&(g.Ae=!0,a.fa++,A(a)&&y(a,"loading diskette '"+c+"'"));g.$e=!!f;return(new Ho(a,g,"preload")).load(c,d,f,a.Hi)?1:0}return-1}
|
||||
m.Hi=function(a,b,c,d,e){var f;a.bd=!1;b&&(f=b.info(),b&&f[0]>a.Bb||f[1]>a.ub)&&(this.Na('Diskette "'+c+'" too large for drive '+String.fromCharCode(65+a.hb)),b=null);b?(a.za=b,a.kk=c,a.Le=d,Dp(this,c,d,b),f=b.info(),this.X|=128,this.Na('Mounted diskette "'+c+'" in drive '+String.fromCharCode(65+a.hb),a.Ae||e),a.zg=f[0],a.Nf=f[1],a.Of=f[2],this.V&&this.V.yd()):a.$e=!1;a.Ae&&(a.Ae=!1,--this.fa||rb(this));tp(this,a.hb)};
|
||||
function yp(a,b,c,d){if((a=a.qa.listDisks)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}
|
||||
function tp(a,b){if(0<=b&&b<a.A.length){var c=a.A[b],d=a.qa.listDisks,e=a.qa.listDrives;if(d&&e&&d.options&&e.options&&(e=ca(e.value,10),c=c.$e?"?":c.Le,!isNaN(e)&&e==b)){for(e=0;e<d.options.length;e++)if(d.options[e].value==c){d.selectedIndex!=e&&(d.selectedIndex=e);break}e==d.options.length&&(d.selectedIndex=0)}}}function Ap(a,b,c,d){var e=a.A[b];e.za&&(Bp(a,e.Le,e.za),e.kk="",e.Le="",e.za=null,e.$e=!1,a.X|=128,d||a.Na("Drive "+String.fromCharCode(65+b)+" unloaded",c),c||d||tp(a,b))}
|
||||
|
|
|
|||
Loading…
Reference in a new issue