Amiga.org

Amiga computer related discussion => Amiga Hardware Issues and discussion => Topic started by: RobSmithDev on July 20, 2017, 03:00:23 PM

Title: Arduino-Based Amiga Floppy Disk Reader
Post by: RobSmithDev on July 20, 2017, 03:00:23 PM
Hi All

I have just finished an Arduino project that can successfully read Amiga DD floppy disks (AmigaDOS only presently) and save them down to ADF files.  I was surprised how well it worked on my old disks that haven't been used in years.

The project is completely open source and you can read about it, grab source code etc at http://amiga.robsmithdev.co.uk (http://amiga.robsmithdev.co.uk)

The source code currently comes with two Windows applications (console and windowed) to control and read the data, but this could (and hopefully will be) easily ported to other operating systems.

I am looking at adding a write function and also adding FDI file format support for raw disk copying next.

I welcome any feedback regarding this project you have.

Cheers

Rob

P.S. This is my first posting on here. I used to have an account many years ago.
Title: Re: Arduino-Based Amiga Floppy Disk Reader
Post by: Pat the Cat on July 20, 2017, 03:03:25 PM
Nice thinking out of the box. Welcome back. :)
Title: Re: Arduino-Based Amiga Floppy Disk Reader
Post by: curtis on July 20, 2017, 09:59:11 PM
Kinda makes a person wonder.  Is there anything an Arduino or a Raspberry Pi WON'T do given an little imagination?
Title: Re: Arduino-Based Amiga Floppy Disk Reader
Post by: Iggy on July 20, 2017, 11:01:05 PM
That's just f'ing remarkable.
If you'd mentioned that idea to me before you started, I would have bet against that working.

Truly you are the electronic MacGyver of the Amiga community.
Title: Re: Arduino-Based Amiga Floppy Disk Reader
Post by: billt on July 20, 2017, 11:43:38 PM
Cool!

I look forward to learning a few things when sources are released!
Title: Re: Arduino-Based Amiga Floppy Disk Reader
Post by: RobSmithDev on July 21, 2017, 12:01:25 AM
Quote from: billt;828468
Cool!

I look forward to learning a few things when sources are released!


It's all there now, there is a link to GitHub from the download page!

I'm now working on the disk writer!
Title: Re: Arduino-Based Amiga Floppy Disk Reader
Post by: dalek on July 21, 2017, 02:42:24 AM
Wow!  Thanks for releasing this as open source.

I love how you included a writeup of all your attempts along the way :)
Title: Re: Arduino-Based Amiga Floppy Disk Reader
Post by: slimf on July 21, 2017, 01:55:18 PM
Cool. But have you seen supercard pro? Cbmstuff.com
Title: Re: Arduino-Based Amiga Floppy Disk Reader
Post by: Pat the Cat on July 21, 2017, 02:22:16 PM
Quote from: curtis;828464
Kinda makes a person wonder. Is there anything an Arduino or a Raspberry Pi WON'T do given an little imagination?

I must admit, PI's not good for reading analog inputs without extras.
 
 OK, USB sound cards are not expensive. Minor niggle. But if you want to sample non-audio frequencies then it can get pricey.
Title: Re: Arduino-Based Amiga Floppy Disk Reader
Post by: Speelgoedmannetje on July 21, 2017, 06:04:38 PM
Quote from: Pat the Cat;828488
I must admit, PI's not good for reading analog inputs without extras.

You mean an RTOS?
Title: Re: Arduino-Based Amiga Floppy Disk Reader
Post by: bloodline on July 21, 2017, 07:52:45 PM
Quote from: RobSmithDev;828429
Hi All

I have just finished an Arduino project that can successfully read Amiga DD floppy disks (AmigaDOS only presently) and save them down to ADF files.  I was surprised how well it worked on my old disks that haven't been used in years.

The project is completely open source and you can read about it, grab source code etc at http://amiga.robsmithdev.co.uk (http://amiga.robsmithdev.co.uk)

The source code currently comes with two Windows applications (console and windowed) to control and read the data, but this could (and hopefully will be) easily ported to other operating systems.

I am looking at adding a write function and also adding FDI file format support for raw disk copying next.

I welcome any feedback regarding this project you have.

Cheers

Rob

P.S. This is my first posting on here. I used to have an account many years ago.
Brilliant work Rob! I actually started a similar project about 2 years ago, but real life got in the way :(

My project used a Teensy 3.1, but the idea was much the same!
Title: Arduino-Based Amiga Floppy Disk Reader
Post by: lar3ry on July 27, 2017, 11:04:39 PM
Looks like a great project, Rob.
Do you think that most PCs will handle 1,000,000 baud on a USB serial port?
The reason I ask is that when I run ArduinoFloppyReaderWin, using the same port as I used to program the sketch, I get what appears to be conflicting indications.

The drive light comes ON and the disk spins as soon as I click Start Copy, but after a short time, I get Unable to open COM port.

This suggests to me that I am communicating with the Arduino Uno, but that something else is causing it to lose the connection.
Any ideas?

If it turns out that I can't use my COM port at a million baud (I never in my life would have thought I'd ever use those two words next to each other), I think I will try a little different tack. I have a Mega 2560, and think I can get by with using a lower COM port speed. I know for sure I can handle 115200, and it is likely I can handle 250000. I figure there are two ways of doing this.

Because the lower baud rate is insufficient to keep up with the raw data rate of fthe disk, I can buffer the data in one of two ways.

1. The Mega 2560 has 8K bytes of RAM. I should be able to buffer single blocks. The limitation would be in how many blocks I can read in to the available RAM. I could then transfer them, and grab the next block(s). Might be a tad slow, so my second plan might be better.

2. I have a 32K*8 Static RAM chip that I could use to buffer 1 track at a time. If I understand things correctly, one track will be something lile 1900 * 11 bytes, requiring just under 21K. I also have a few 512K * 8 RAM chips on the way, one of which should allow me to buffer 25 tracks at a time.

I would use your sketch, modified, but I have been unable to compile your ArduinoFloppyReaderWin program. the file stdafx.cpp is missing, and I get a message saying it can't find build tool V141, which is likely because I am using VS Express 2015.

If I can't figure that out, I'll drop back into VB (one of my comfort zones - assembler and VB).

Any coments, corrections or ideas welcome.
Title: Arduino-Based Amiga Floppy Disk Reader
Post by: lar3ry on August 03, 2017, 10:58:03 PM
UPDATE

Well, it looks like I had problems with the floppy drive itself. For some reason this manifested as a COM problem.

I found it by reducing the baud rate to 115200 and using the serial monitor to send commands. This showed several problems, all to do with a bad floppy drive. I managed to find a few more drives, and these worked better.

So now, I can use the programs and sketch that Rob posted.

I do seem to get a lot of errors yet, and i don't really know if it's the floppies themselves or the drives. I have tested on three drives, and some are better than others. They are cheap, so I don't mind picking up a few more. I am  also going to work on my wiring and shielding in case some of the errors are in the drive to Arduino interface.
Title: Re: Arduino-Based Amiga Floppy Disk Reader
Post by: RobSmithDev on August 14, 2017, 04:13:59 PM
Glad to hear you managed to get it working.  Im currently working in the writing module, I also discovered several bugs in the code that repairs bad MFM data, and will be publishing this in the next week or so