From 43ad0bd2f3ad053b0fc86c78787e71a4ab1a8369 Mon Sep 17 00:00:00 2001 From: Robert Greene Date: Sat, 1 Mar 2003 22:56:59 +0000 Subject: [PATCH] Was not computing offset correctly for DOS format images of 800K. Primarily, this affected UniDOS. --- src/com/webcodepro/applecommander/storage/Disk.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/webcodepro/applecommander/storage/Disk.java b/src/com/webcodepro/applecommander/storage/Disk.java index 6665def..d96e9a4 100644 --- a/src/com/webcodepro/applecommander/storage/Disk.java +++ b/src/com/webcodepro/applecommander/storage/Disk.java @@ -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