Skip to content

Commit 4d6e57d

Browse files
committed
Merged with Pull Request #6 (Modified the behavior of the current track location on Arduino boot - paulofduarte) which also addresses issues with some drives and updated firmware to 1.4
Made a small change to the diagnostics code to also erase the track before writing it
1 parent 1ff1d7e commit 4d6e57d

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

ArduinoFloppyReader/lib/ADFWriter.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,12 @@ bool ADFWriter::runDiagnostics(const unsigned int comPort, std::function<void(bo
804804
bool writtenOK = false;
805805
for (int a = 1; a <= 10; a++) {
806806

807+
r = m_device.eraseCurrentTrack();
808+
if (r != DiagnosticResponse::drOK) {
809+
messageOutput(true, m_device.getLastErrorStr());
810+
return false;
811+
}
812+
807813
r = m_device.writeCurrentTrack((const unsigned char*)(&disktrack), sizeof(disktrack), false);
808814
if (r != DiagnosticResponse::drOK) {
809815
messageOutput(true, m_device.getLastErrorStr());

FloppyDriveController.sketch/FloppyDriveController.sketch.ino

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* ArduinoFloppyReader (and writer)
22
*
3-
* Copyright (C) 2017-2018 Robert Smith (@RobSmithDev)
3+
* Copyright (C) 2017-2020 Robert Smith (@RobSmithDev)
44
* http://amiga.robsmithdev.co.uk
55
*
66
* This sketch is free software; you can redistribute it and/or
@@ -17,6 +17,9 @@
1717
* License along with this sketch; if not, see http://www.gnu.org/licenses
1818
*/
1919

20+
/* Latest History:
21+
Firmware V1.4: Merged with Pull Request #6 (Modified the behavior of the current track location on Arduino boot - paulofduarte) which also addresses issues with some drives
22+
*/
2023

2124
/////////////////////////////////////////////////////////////////////////////////////////////////////
2225
// This sketch manages the interface between the floppy drive and the computer as well as the //
@@ -584,7 +587,7 @@ void loop() {
584587
writeByteToUART('V'); // Followed
585588
writeByteToUART('1'); // By
586589
writeByteToUART('.'); // Version
587-
writeByteToUART('3'); // Number
590+
writeByteToUART('4'); // Number
588591
break;
589592

590593
// Command "." means go back to track 0

readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ If you want to use the AVR directly instead of within the Arduino environment, t
1818
For further details including how to wire this up please visit [http://amiga.robsmithdev.co.uk]
1919

2020
# Whats changed?
21+
v2.32 Merged with Pull Request #6 (Modified the behavior of the current track location on Arduino boot - paulofduarte) which also addresses issues with some drives and updated firmware to 1.4
22+
Made a small change to the diagnostics code to also erase the track before writing it
2123
v2.31 Upgraded the PC code side to work with Visual Studio 2019 resolving issue #11 (ourIThome) and merging pull request #13 (bassclefstudio)
2224
Fixed a few typos in ArduinoInterface.cpp from pull request #12 (Crkk)
2325
V2.2 Fixed 99% of checksum errors when writing by erasing the track first

0 commit comments

Comments
 (0)