mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2024-12-10 20:50:39 +00:00
Fixing acx create disk with DOS format to mark tracks 0-2 as used. #129
This commit is contained in:
parent
d62eee955c
commit
72f51be107
@ -98,8 +98,7 @@ public enum SystemType {
|
||||
|
||||
static void copyDosSystemTracks(FormattedDisk targetDisk, FormattedDisk source) {
|
||||
DosFormatDisk target = (DosFormatDisk)targetDisk;
|
||||
// FIXME messing with the VTOC should be handled elsewhere
|
||||
byte[] vtoc = source.readSector(DosFormatDisk.CATALOG_TRACK, DosFormatDisk.VTOC_SECTOR);
|
||||
byte[] vtoc = target.readVtoc();
|
||||
int sectorsPerTrack = vtoc[0x35];
|
||||
// Note that this also patches T0 S0 for BOOT0
|
||||
for (int t=0; t<3; t++) {
|
||||
@ -108,6 +107,7 @@ public enum SystemType {
|
||||
target.setSectorUsed(t, s, vtoc);
|
||||
}
|
||||
}
|
||||
target.writeVtoc(vtoc);
|
||||
}
|
||||
static void copyProdosSystemFiles(FormattedDisk target, FormattedDisk source) {
|
||||
// We need to explicitly fix the boot block
|
||||
|
@ -275,14 +275,14 @@ public class DosFormatDisk extends FormattedDisk {
|
||||
/**
|
||||
* Return the VTOC (Volume Table Of Contents).
|
||||
*/
|
||||
protected byte[] readVtoc() {
|
||||
public byte[] readVtoc() {
|
||||
return readSector(CATALOG_TRACK, VTOC_SECTOR);
|
||||
}
|
||||
|
||||
/**
|
||||
* Save the VTOC (Volume Table Of Contents) to disk.
|
||||
*/
|
||||
protected void writeVtoc(byte[] vtoc) {
|
||||
public void writeVtoc(byte[] vtoc) {
|
||||
writeSector(CATALOG_TRACK, VTOC_SECTOR, vtoc);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user