Another 1.15.4 change: decline to mount diskette images too large for the floppy drive type

This commit is contained in:
Jeff Parsons 2014-10-10 18:43:27 -07:00 committed by jeffpar
commit e96f0eecd9
7 changed files with 1135 additions and 1105 deletions

View file

@ -1055,8 +1055,10 @@ ChipSet.prototype.reset = function()
* their CMOS information, we must not allow a reset() from powerUp() to toss that information, so
* we allocate abCMOSData only if it hasn't already been allocated.
*/
if (!this.abCMOSData) this.abCMOSData = new Array(ChipSet.CMOS.ADDR.TOTAL);
this.initRTCDate(this.sRTCDate);
if (!this.abCMOSData) {
this.abCMOSData = new Array(ChipSet.CMOS.ADDR.TOTAL);
this.initRTCDate(this.sRTCDate);
}
/*
* initCMOSData() will initialize a variety of "legacy" CMOS bytes, but it will NOT overwrite any memory
@ -1511,6 +1513,15 @@ ChipSet.prototype.restore = function(data)
this.bCMOSAddr = a[2];
this.abCMOSData = a[3];
this.nCyclesCMOSLastUpdate = a[4];
/*
* TODO: Decide whether restore() should faithfully preserve the RTC date/time that save() saved,
* or always reinitialize the date/time, or give the user (or the machine configuration) the option.
*
* For now, we're always reinitializing the RTC date. Alternatively, we could selectively update
* the CMOS bytes above, instead of overwriting them all, in which case this extra call to initRTCDate()
* could be avoided.
*/
this.initRTCDate();
}
return true;
};