Resolved a OzDOS and UniDOS format issue. #12
This commit is contained in:
parent
28e966db9f
commit
c93d7095a1
|
@ -98,8 +98,19 @@ public class OzDosFormatDisk extends DosFormatDisk {
|
||||||
* @see com.webcodepro.applecommander.storage.FormattedDisk#format()
|
* @see com.webcodepro.applecommander.storage.FormattedDisk#format()
|
||||||
*/
|
*/
|
||||||
public void format() {
|
public void format() {
|
||||||
getImageOrder().format();
|
final int tracksPerDisk = 50;
|
||||||
format(31, 50, 32);
|
final int sectorsPerTrack = 32;
|
||||||
|
final int firstCatalogSector = 31;
|
||||||
|
// We can't use the ImageLayout to format this disk since that actually wipes the entire
|
||||||
|
// 800K volume (that is, both disk1 and disk2 get cleared).
|
||||||
|
byte[] data = new byte[SECTOR_SIZE];
|
||||||
|
for (int t = 0; t < tracksPerDisk; t++) {
|
||||||
|
for (int s = 0; s < sectorsPerTrack; s++) {
|
||||||
|
writeSector(t, s, data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Lay down the catalog track...
|
||||||
|
format(firstCatalogSector, tracksPerDisk, sectorsPerTrack);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Retrieve the specified sector.
|
* Retrieve the specified sector.
|
||||||
|
|
|
@ -97,8 +97,19 @@ public class UniDosFormatDisk extends DosFormatDisk {
|
||||||
* @see com.webcodepro.applecommander.storage.FormattedDisk#format()
|
* @see com.webcodepro.applecommander.storage.FormattedDisk#format()
|
||||||
*/
|
*/
|
||||||
public void format() {
|
public void format() {
|
||||||
getImageOrder().format();
|
final int tracksPerDisk = 50;
|
||||||
format(31, 50, 32);
|
final int sectorsPerTrack = 32;
|
||||||
|
final int firstCatalogSector = 31;
|
||||||
|
// We can't use the ImageLayout to format this disk since that actually wipes the entire
|
||||||
|
// 800K volume (that is, both disk1 and disk2 get cleared).
|
||||||
|
byte[] data = new byte[SECTOR_SIZE];
|
||||||
|
for (int t = 0; t < tracksPerDisk; t++) {
|
||||||
|
for (int s = 0; s < sectorsPerTrack; s++) {
|
||||||
|
writeSector(t, s, data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Lay down the catalog track...
|
||||||
|
format(firstCatalogSector, tracksPerDisk, sectorsPerTrack);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue