forked from Apple-2-Tools/jace
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:
parent
40faf2caeb
commit
8e4a406f74
@ -18,7 +18,6 @@
|
|||||||
*/
|
*/
|
||||||
package jace.hardware;
|
package jace.hardware;
|
||||||
|
|
||||||
import jace.Emulator;
|
|
||||||
import jace.EmulatorUILogic;
|
import jace.EmulatorUILogic;
|
||||||
import jace.config.ConfigurableField;
|
import jace.config.ConfigurableField;
|
||||||
import jace.config.Name;
|
import jace.config.Name;
|
||||||
@ -128,7 +127,9 @@ public class CardDiskII extends Card implements Reconfigurable, MediaConsumerPar
|
|||||||
// read/write latch
|
// read/write latch
|
||||||
currentDrive.write();
|
currentDrive.write();
|
||||||
e.setNewValue(currentDrive.readLatch());
|
e.setNewValue(currentDrive.readLatch());
|
||||||
|
if (currentDrive.isOn()) {
|
||||||
EmulatorUILogic.addIndicator(this, currentDrive.getIcon());
|
EmulatorUILogic.addIndicator(this, currentDrive.getIcon());
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 0xF:
|
case 0xF:
|
||||||
// write mode
|
// write mode
|
||||||
|
@ -131,14 +131,17 @@ public class DiskIIDrive implements MediaConsumer {
|
|||||||
spinCount = (spinCount + 1) & 0x0F;
|
spinCount = (spinCount + 1) & 0x0F;
|
||||||
if (spinCount > 0) {
|
if (spinCount > 0) {
|
||||||
if (disk != null) {
|
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 {
|
} else {
|
||||||
result = (byte) 0x0ff;
|
result = (byte) 0x0ff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (nibbleOffset >= FloppyDisk.TRACK_NIBBLE_LENGTH) {
|
|
||||||
nibbleOffset = 0;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
spinCount = (spinCount + 1) & 0x0F;
|
spinCount = (spinCount + 1) & 0x0F;
|
||||||
if (spinCount > 0) {
|
if (spinCount > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user