Found some disks that "hide" the catalog by pointing at T17,S0 - so the recognition allows the assumption that this is T17,S15 in reality.

This commit is contained in:
Rob Greene
2025-08-16 14:21:59 -05:00
parent 7aead323ff
commit fe8cf613c2
@@ -149,6 +149,11 @@ public class DosFormatDisk extends FormattedDisk {
byte[] vtoc = readVtoc();
int track = AppleUtil.getUnsignedByte(vtoc[1]);
int sector = AppleUtil.getUnsignedByte(vtoc[2]);
int sectorsPerTrack = AppleUtil.getUnsignedByte(vtoc[0x35]);
if (sector == 0 && track != 0) {
// Some folks "hid" the catalog by setting the pointer to T17,S0 - try and adjust
sector = sectorsPerTrack-1;
}
final Set<DosSectorAddress> visits = new HashSet<>();
while (sector != 0) { // bug fix: iterate through all catalog _sectors_