You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: FloppyDriveController.sketch/FloppyDriveController.sketch.ino
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@
42
42
43
43
// ** Hardware Modification Changes to get the best support for disk change notifications **
44
44
// Pin 34 on the floppy drive connector (Disk Ready/Change) must be connected to Pin 10 on the Arduino
45
-
// Pin 12 on the floppy drive connector (Select Disk B) must be *disconnected* from pin 16 on the Arduino and connected to Pin 12. Note you *must* leave the connection between Arduino Pin 5 and Floppy Connector 16 in place
45
+
// Pin 12 on the floppy drive connector (Select Disk B) must be *disconnected* from pin 5 on the Arduino and connected to Pin 11 on the Arduino. Note you *must* leave the connection between Arduino Pin 5 and Floppy Connector 16 in place
46
46
// On the Arduino, connect Pin 12 to GND (0v) - this enables this advanced mode automatically.
47
47
// If you can't connect pin12 to GND because you want to use the ISP headers, then see https://amiga.robsmithdev.co.uk/isp
//12 is the minimum number here. Any less than this and the CHECKSERIAL_ONLY() code will impact the output. The pulse width doesn't matter as long as its at least 0.125uSec (its the falling edge that triggers a bit write)
618
+
//14 is the minimum number here. Any less than this and the CHECKSERIAL_ONLY() code will impact the output. The pulse width doesn't matter as long as its at least 0.125uSec (its the falling edge that triggers a bit write)
619
619
// Because only the falling edge is important we achieve precomp by shifting the pulse starting position back or forward two clock ticks
620
620
// Because it may go back 2 ticks, we increase this number here by 2. 12 ticks is 750 ns, 14 ticks is 875 ns and 16 is 1000ns (1us)
621
621
// By doing this, the bit cell timing remains constant, but the actual write position is shifted +/- 125ns as required
@@ -651,10 +651,6 @@ void writePrecompTrack() {
651
651
652
652
PIN_CTS_PORT|=PIN_CTS_MASK; // stop any more data coming in!
653
653
654
-
// While the INDEX pin is high wait. Might as well write from the start of the track
655
-
if (waitForIndex)
656
-
while (PIN_INDEX_PORT & PIN_INDEX_MASK) {};
657
-
658
654
// Signal we're ready for data
659
655
PIN_CTS_PORT &= (~PIN_CTS_MASK);
660
656
@@ -676,6 +672,10 @@ void writePrecompTrack() {
676
672
TCCR2A = bit(COM2B1) | bit(WGM20) | bit(WGM21)| bit(WGM22); // (COM2B0|COM2B1) Clear OC2B. on compare match, set OC2B at BOTTOM. WGM20|WGM21|WGM22 is Fast PWM.
677
673
TCCR2B = bit(WGM22)| bit(CS20); // WGM22 enables waveform generation. CS20 starts the counter runing at maximum speed
678
674
675
+
// While the INDEX pin is high wait. Might as well write from the start of the track
676
+
if (waitForIndex)
677
+
while (PIN_INDEX_PORT & PIN_INDEX_MASK) {};
678
+
679
679
// Get it ready
680
680
OCR2A = 0; // Because we're using the PWM limits backwards this causes it to get stuck when it reaches 0
681
681
OCR2B = PULSE_WIDTH_VALUE; // pulse width is set to default
0 commit comments