mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2024-12-22 23:29:34 +00:00
Changed disk creation to use a create method, as this is better
suited to disks that support mutiple logical disks. Also over-rode format to give suitable values.
This commit is contained in:
parent
49938c5325
commit
0f83d543a1
@ -53,12 +53,17 @@ public class UniDosFormatDisk extends DosFormatDisk {
|
||||
this.logicalOffset = logicalOffset;
|
||||
}
|
||||
/**
|
||||
* Constructor for UniDosFormatDisk.
|
||||
* @param filename
|
||||
* Create a UniDosFormatDisk.
|
||||
*/
|
||||
public UniDosFormatDisk(String filename, int logicalOffset) {
|
||||
super(filename);
|
||||
this.logicalOffset = logicalOffset;
|
||||
public static DosFormatDisk[] create(String filename) {
|
||||
byte[] diskImage = new byte[APPLE_800KB_2IMG_DISK];
|
||||
UniDosFormatDisk disk1 = new UniDosFormatDisk(filename,
|
||||
diskImage, UNIDOS_DISK_1);
|
||||
disk1.format();
|
||||
UniDosFormatDisk disk2 = new UniDosFormatDisk(filename,
|
||||
diskImage, UNIDOS_DISK_2);
|
||||
disk2.format();
|
||||
return new UniDosFormatDisk[] { disk1, disk2 };
|
||||
}
|
||||
/**
|
||||
* Answer with the name of this disk.
|
||||
@ -96,4 +101,11 @@ public class UniDosFormatDisk extends DosFormatDisk {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Format the disk as UniDOS.
|
||||
* @see com.webcodepro.applecommander.storage.FormattedDisk#format()
|
||||
*/
|
||||
public void format() {
|
||||
format(31, 50, 32);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user