Was not computing offset correctly for DOS format images of 800K.

Primarily, this affected UniDOS.
This commit is contained in:
Robert Greene 2003-03-01 22:56:59 +00:00
parent 390cb9e438
commit 43ad0bd2f3
1 changed files with 3 additions and 1 deletions

View File

@ -371,7 +371,9 @@ public class Disk {
throw new IllegalArgumentException("Unrecognized DOS format!");
}
int sectorsPerTrack = 16;
if (length == APPLE_800KB_DISK) sectorsPerTrack = 32;
if (length == APPLE_800KB_DISK || length == APPLE_800KB_2IMG_DISK) {
sectorsPerTrack = 32;
}
if ((track * sectorsPerTrack + sector) * SECTOR_SIZE > getPhysicalSize()) {
throw new IllegalArgumentException(
"The track (" + track + ") and sector (" + sector