diff --git a/src/main/java/jace/hardware/CardDiskII.java b/src/main/java/jace/hardware/CardDiskII.java index a0496bb..dc919da 100644 --- a/src/main/java/jace/hardware/CardDiskII.java +++ b/src/main/java/jace/hardware/CardDiskII.java @@ -18,7 +18,6 @@ */ package jace.hardware; -import jace.Emulator; import jace.EmulatorUILogic; import jace.config.ConfigurableField; import jace.config.Name; @@ -128,7 +127,9 @@ public class CardDiskII extends Card implements Reconfigurable, MediaConsumerPar // read/write latch currentDrive.write(); e.setNewValue(currentDrive.readLatch()); - EmulatorUILogic.addIndicator(this, currentDrive.getIcon()); + if (currentDrive.isOn()) { + EmulatorUILogic.addIndicator(this, currentDrive.getIcon()); + } break; case 0xF: // write mode diff --git a/src/main/java/jace/hardware/DiskIIDrive.java b/src/main/java/jace/hardware/DiskIIDrive.java index 22c711d..4d9c236 100644 --- a/src/main/java/jace/hardware/DiskIIDrive.java +++ b/src/main/java/jace/hardware/DiskIIDrive.java @@ -131,14 +131,17 @@ public class DiskIIDrive implements MediaConsumer { spinCount = (spinCount + 1) & 0x0F; if (spinCount > 0) { if (disk != null) { - result = disk.nibbles[trackStartOffset + nibbleOffset++]; + result = disk.nibbles[trackStartOffset + nibbleOffset]; + if (isOn()) { + nibbleOffset++; + if (nibbleOffset >= FloppyDisk.TRACK_NIBBLE_LENGTH) { + nibbleOffset = 0; + } + } } else { result = (byte) 0x0ff; } } - if (nibbleOffset >= FloppyDisk.TRACK_NIBBLE_LENGTH) { - nibbleOffset = 0; - } } else { spinCount = (spinCount + 1) & 0x0F; if (spinCount > 0) {