GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together. If nothing happens, download GitHub Desktop and try again. If nothing happens, download Xcode and try again. If nothing happens, download the GitHub extension for Visual Studio and try again.
This small Arduino build emulates an Atari floppy drive to connect to an original Atari 8-bit computer. The program is compatible with most Arduino boards. And for boards based on the Atmega32u4 it also provides various log messages on the serial monitor to help debugging mainly for my own use.
For a breadboard setup like my development device, you will need two push buttons, two 7-digit LEDs and one SDCard socket with built-in or separate level shifters and some wires and resistors. The connectivity is pretty standard and you will find the details as comments in the source code. The floppy drive emulator needs an SDcard containing. Such a folder will be emulated as an read-only enhanced density floppy containing these files. Currently only a very basic support for single density sectors and enhanced density sectors floppies is provided without special functions for any third-party devices.
You can switch though the numbered disks 00 to 99 with the two buttons. This is the maximum number of disks supported on a single SDcard. When you switch beyond 99, you will see -- on the display, which means the device now emulates a switched off floppy drive. Selecting a number for which no diskfile exists will simulate a device with no floppy inserted in this case you can create a diskfile with the DOS format functions.
You can also emulate a second floppy drive, which is very usable for example for holding the save disks for games that support this. To do so, you need to press both buttons to make the small indicator dot appear on the left LCD block. This means that the number you see in the display is the floppy that is inserted in drive 2. This floppy can now also be changed with the two buttons.
It is even possible to select the same floppy in both drives at once but this is probably of no great use. Skip to content. Dismiss Join GitHub today GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together. Sign up. An Arduino-based floppy drive emulator for the atari 8 bit computers. Branch: master. Find file. Sign in Sign up. Go back. Launching Xcode If nothing happens, download Xcode and try again.
Latest commit.Interfacing 3. Not a member? You should Sign Up.
Already have an account? Log In. To make the experience fit your profile, pick a username and tell us what interests you.
How to Create Floppy Drive Music
We found and based on your interests. Choose more interests. Floppy disk is a magnetic medium. The data are stored on magetic disc, which is beeing rotated during the reading process. Speed of the rotation of disk is 5 times per second. There is a magnetic head that reads the transitions of a magnetic flux and they are somehow interpreted as logic states. There are two common 3. Tracks are numbered where Track 00 is the outermost the "first track".
ED: there exist also 2. I consider ED floppies as very rare. Their drawback is were price. The drop occures every ms 5 times per second. See wiki or floppy PDF manuals attached. For sake of simplicity here just shortly about easier FM: FM encoding for DD k floppies means that log 0 wil be encoded as Rnnn and log 1 will be encoded as RnRn, where Rn means flux transition and nn means no flux transition. There is nice example on wiki, see "MFM encoding".
Arduino raw data 3.5" Floppy reader
Half of all the pins are grounded. Whole one line of pins in FDD connector can be wired together. Essential knowledge point: digitalRead. Same holds for digiralWrite probably, but it is not needed for us. Note: PDFs of floppy disk drives specifications I found on internet are for different floppy drives but since we expect most of standard floppy drives can work on all computers there could be hardly large differences between them. I am providing you few datasheets attached RAR Archive - 2.
Adobe Portable Document Format - 2. View all 7 files. Create an account to leave a comment. I want to more or less copy this project. Where can I find your connection information from floppy cable to arduino?Add the following snippet to your HTML:. Project tutorial by RobSmithDev. So after successfully being able to read disks, I figured if you want to keep the original physical medium, you might want to write disks back again. I figured I'd work this out in reverse, starting with the software i.
So I started by adding classes to read an ADF disk, and encode all the sectors as one track. Knowing I could potentially test the data I created by feeding it back into the decoding part, I started work on this. While working on this I decided to try to find out what was wrong with my Amiga.
After all, I can't test any disks I create if I don't have anything real to test them on. So I desoldered this from the board and set about cleaning the board up. Whilst at it, I pulled the entire machine out and set about cleaning up 20 years of dust and grime. I even took the floppy drive apart to clean it. Whilst cleaning it, I decided it was time to get rid of the yellowing, so I followed the information about Retr0brite and tried it.
I then checked all of the joints on the main motherboard and found a loose connection by the power connector, a few touchups with the soldering iron and as good as new. I waited until I was happy with the Retr0brite process before reassembling the computer. Meanwhile I continued working on the code for writing disks.
I wanted to read the status of the write protect line, but no matter what I set it to it didn't seem to change voltage. So I pulled the drive apart and followed the traces from the little switches that detect the write protect status to a little IC. At this point I guessed that the output is probably only available when you actually want to write data.
At this point you could obtain the write protect status. The Amiga would write an entire track in one go. I needed an alternative method. I decided I would try to send the data 1 byte at a time in a high priority thread and wait for a response byte from the Arduino before sending the next.
I changed the baud rate to 2M to reduce the lag between characters. This meant that it took roughly 5. The Arduino would need to write out 8 bits, at khz, so it would need a new byte every 16 uSec.
It only takes a minute to sign up. I have the floppy disk drive powered with a computer power supply that is switched on, and the Arduino powered by my computer's USB.Pirates of the Carribean on 40 floppy drives
I have cut apart the ribbon of a pin IDC connector to be able to route the pins to my Arduino. I have pins 7, 15, 17, 19, and 25 from the floppy all grounded to my Arduino, and I have pins 8, 16, 18, 20, and 26 from the floppy connected to my arduino as output pins so I can control the drive. I am expecting the Index to pulse when the disk motor makes a rotation, and for Track 0 to change when I am at the outside of the disk, but they are both always LOW. Am I missing something?
Here a schematic of what I have hooked up The breadboard in this circuit diagram represents the IDC connector that is plugged into the 3. While researching this problem I found a few code examples of Arduino to Floppy Drive.
I noticed that they were setting their input pins to HIGH, but I never realized why they were doing this. After fixing my problem, I found this in some Arduino documentation which made me realize the code examples I had were using an older version of the Arduino IDE :.
This is an archived copy of the FD 3. The outputs are open-collector, so a pull-up resistor is required. You can instead enable the Arduino internal pull-ups on those pins by. You should replace int with unsigned long in all locations where you deal with time in milliseconds. The point is that millis returns an unsigned longthus using int to store millis value, you have a loss of information due to automatic cast performed by the compiler.
Note that I have also performed some optimization in the waiting loop by calculating the maximum time once and then compare millis directly to that value.
This is not mandatory but I just find it a bit more clean. Sign up to join this community. The best answers are voted up and rise to the top.
Home Questions Tags Users Unanswered. Asked 5 years, 8 months ago. Active 2 months ago. Viewed 19k times. I am having problems controlling a 3.
Here's the code I am running. Index:0 Track:0 Setup done. After fixing my problem, I found this in some Arduino documentation which made me realize the code examples I had were using an older version of the Arduino IDE : "Prior to Arduino 1. Both methods of enabling the pull-up work. Active Oldest Votes. Greenonline 2, 7 7 gold badges 23 23 silver badges 41 41 bronze badges. I can't thank you enough.Add the following snippet to your HTML:. An Arduino powered floppy disk controller and reader for making disk images from old AmigaDOS floppy disks.
Project tutorial by RobSmithDev. This is V1 of the project. V2 contains improved reading and writing! At first I played the games, but after a while I started getting curious about what else it could do. Every month I purchased the popular Amiga Format magazine. One month had a free copy of AMOS. You really had to chase them for prizes though! I was really surprised that most of it was closed source.
Massively into electronics and having played with Atmel devices AT89C whilst at University I decided to take a look at the Arduino credit to GreatScott for the inspiration showing just how easy it is to get started I wondered if this was possible. I did find a project based around an FPGA which was very interesting reading, but not the direction I wanted to go, so the only option was to build a solution myself.
The following websites were invaluable in my understanding on what happens and how they work:. Based on the research I now knew theoretically how the data was written to the disk, and how the disk spun. I began to work out some numbers.
Subscribe to RSS
Jump to decoding. First I needed to gather the hardware and interface to the floppy drive. Studying the pinout of the drive I realised I only needed a few of the wires from it, and after looking at the drive I realised it didn't use the 12v input either. Getting the drive spinning was achieved by selecting the drive and enabling the motor.
Moving the head was simple. This pulses once each rotation. As the Amiga doesn't use this to find the start of the track I didn't need it and could ignore it. With the high data rate requirement my first thought was to find a way to make this less of an issue by trying to reduce the requirements on this rate.
The plan was to use two 8-bit shift registers SN74HCN to reduce the required sampling frequency by a factor of 8.My brother posted a video about this on facebook almost a year ago. So I read about it when the author posted a how-to on his blog and did a couple of tweaking using SammyIAm's Musical Floppy program when the project gained a lot of attention. You just need to tweak something in the program with the pin assignments. In this mini-project however, I used Duemilanove.
Other than that, you would only be needing to determine 3 pins from your floppy. Pin assignments are available online, particularly here. Furthermore, I was trying to acquire a 5. As a result, this project is composed only of the 3.
You also need some floppy diskettes for this project. You can use any 5-volt power supply available but since an ATX power supply is just lying around at home, I conveniently used it instead. I want my wires to be color-coded.
Might as well use that to make it easier. Did you use this instructable in your classroom? Add a Teacher Note to share how you incorporated it into your lesson.
Again, it depends on you. You can use any 5-volt power supply available but since an ATX power supply is just lying around the house, it would be pretty convenient to use it here. Connect these two wires and your power supply is then activated. Like what I said earlier, you only need to determine 3 pins to make the floppy drive sing.
If you look at the back of your floppy drive you would see these 34 pins. Just check on the image to determine which is pin 1 and so on. The top pins are the even pins the bottom pins are the odd pins which is the ground. The even-numbered pins are activated by grounding them. Basically, computers have up to two floppy drives A and B.
Doesn't really matter which drive you connect your wires to. If you want to set your floppy drive to drive B, then connect wires to pins 12, 11 for the ground. If you want to set your floppy drive to drive A, then connect wires to pins 14, 13 for the ground.
But to avoid further complications, just select drive B, pin 12 and Another pin that we are interested in is the direction pin 18, 17 for the ground. Direction pin determines which direction to move, forward or backward. This movement is actually the one causing the low-note and high-note sound coming out of the floppy drive. Finally, the last pins we need to connect wires to is the step pin 20, 19 for the ground which basically activates the stepper motor to move.
Connect your floppy to your power supply and test the stepper motor. Notice that if you connect your floppy drive to the power supply nothing is happening, that is because you need to connect pins 11 and 12 to activate it. To activate your floppy, you need to permanently connect the drive select pins 11 and 12, so you can go on twist those wires or solder them.I bet I could go home tonight and do it!
The position of the head is controlled by a stepper motor, and floppy drives have a convenient interface that moves the head one track at a time with a signal pulse to the right pin. After getting a glimpse of the potential musical floppy drives had to offer, I dug out an Arduino, mooched a grocery bag full of floppy drives off a friend, and set to work making beautiful or at least recognizable music. The result? A Java application and Arduino sketch that, as this article will show you, can be used to make floppy drives sing.
Hardware Assembly. The floppy drive pins are arranged in pairs: odd pins are grounded and even are data. Signals are sent to the data pins by grounding them. The Drive Select pin is used to activate the drive so it will respond to signals. When the drive is powered and activated, its LED indicator will light up. And each time the Step pin transitions from ungrounded floating or at 5V to grounded, the drive will move the head one step in the direction of travel.
The Drive Select wire should be connected to its matching ground either 12—11 or 14— Arduino Sketch. Download and install the Arduino IDE. It may take a moment for the drivers to initialize, but installing the Arduino IDE should have taken care of driver installation as well.
The IDE should have automatically detected that you have your Arduino plugged in, but if not you may need to select the appropriate board type and port in the Tools menu. Click the Upload button at the top of the IDE. The IDE should successfully compile and upload the sketch to your Arduino.
Pay close attention to the black console at the bottom of the window to make sure that there are no errors in red text. If the upload was successful and your power supply is on, the first floppy drive you connected should play a little four-note startup sound anytime the Arduino is reset.
Control Software. Select the checkbox under Network Bridges that corresponds to the serial port your Arduino is associated with; the Arduino should reset and will display as a device on the right side of the window. The software is all open source too, so any customizations are only a fork away. When i click the moppycontrolGUI. What is wrong?
LED is lit. Related Stories from Make:. January 8,am PST. Parts Parts Floppy drive, 3. Sam Archer Software engineer by day, gamer and tech hobbyist by night. Send this to a friend Your email Recipient email Send Cancel. Thanks for signing up. Please try again.