Drive will not read if the motor is off. This breaks compatibility with the cracked copy of Sherwood Forrst, making it more like the original and expected behavior of the real hardware.

This commit is contained in:
Brendan Robert 2015-04-05 15:37:07 -05:00
parent 40faf2caeb
commit 8e4a406f74
2 changed files with 10 additions and 6 deletions

View File

@ -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());
if (currentDrive.isOn()) {
EmulatorUILogic.addIndicator(this, currentDrive.getIcon());
}
break;
case 0xF:
// write mode

View File

@ -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) {