<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://alnwlsn.com/projectrepository/index.php?action=history&amp;feed=atom&amp;title=Floppy_disk_drive_hacking</id>
	<title>Floppy disk drive hacking - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://alnwlsn.com/projectrepository/index.php?action=history&amp;feed=atom&amp;title=Floppy_disk_drive_hacking"/>
	<link rel="alternate" type="text/html" href="https://alnwlsn.com/projectrepository/index.php?title=Floppy_disk_drive_hacking&amp;action=history"/>
	<updated>2026-04-05T18:22:41Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.38.2</generator>
	<entry>
		<id>https://alnwlsn.com/projectrepository/index.php?title=Floppy_disk_drive_hacking&amp;diff=552&amp;oldid=prev</id>
		<title>Alnwlsn at 23:59, 16 February 2020</title>
		<link rel="alternate" type="text/html" href="https://alnwlsn.com/projectrepository/index.php?title=Floppy_disk_drive_hacking&amp;diff=552&amp;oldid=prev"/>
		<updated>2020-02-16T23:59:15Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:59, 16 February 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[File:Flop.png|thumb|Logic signals from a disk being formatted in MS-DOS]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;I recently got a bunch of 5-1/4&amp;quot; 40 track, double sided floppy drives off eBay for some reason. These drives are very old, and not in the best condition. I got lucky though, and in testing them on a floppy controller inside a computer, several of them worked straight away, formatting disks properly with no issues.  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;I recently got a bunch of 5-1/4&amp;quot; 40 track, double sided floppy drives off eBay for some reason. These drives are very old, and not in the best condition. I got lucky though, and in testing them on a floppy controller inside a computer, several of them worked straight away, formatting disks properly with no issues.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Alnwlsn</name></author>
	</entry>
	<entry>
		<id>https://alnwlsn.com/projectrepository/index.php?title=Floppy_disk_drive_hacking&amp;diff=550&amp;oldid=prev</id>
		<title>Alnwlsn at 23:56, 16 February 2020</title>
		<link rel="alternate" type="text/html" href="https://alnwlsn.com/projectrepository/index.php?title=Floppy_disk_drive_hacking&amp;diff=550&amp;oldid=prev"/>
		<updated>2020-02-16T23:56:52Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:56, 16 February 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;I recently got a bunch of 5-1/4&amp;quot; 40 track, double sided floppy drives off eBay for some reason. These drives are very old, and not in the best condition. I got lucky though, and in testing them on a floppy controller inside a computer, several of them worked straight away, formatting disks properly with no issues.  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;I recently got a bunch of 5-1/4&amp;quot; 40 track, double sided floppy drives off eBay for some reason. These drives are very old, and not in the best condition. I got lucky though, and in testing them on a floppy controller inside a computer, several of them worked straight away, formatting disks properly with no issues.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For the drives that did not work right away, I needed some way to diagnose them; MS-DOS just assumes the disk is bad and says &amp;quot;Track 0 bad.&amp;quot; I also wanted to check the alignment of the drives, however, the original alignment disks that technicians used are long gone. I wanted to try connecting an Arduino to a floppy drive to control stepping between tracks, and try to write a repeating pattern to a disk. Then, I could check the output from the heads or /RDATA pin to make sure the disk is being read correctly.  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For the drives that did not work right away, I needed some way to diagnose them; MS-DOS just assumes the disk is bad and says &amp;quot;Track 0 bad.&amp;quot; I also wanted to check the alignment of the drives, however, the original alignment disks that technicians used are long gone. I wanted to try connecting an Arduino to a floppy drive to control stepping between tracks, and try to write a repeating pattern to a disk. Then, I could check the output from the heads or /RDATA pin to make sure the disk is being read correctly&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, or write something on a good drive and read the disk on a questionable drive&lt;/ins&gt;.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To begin, I connected all the inputs from the disk drive to digital outputs on an Arduino Mega. The floppy drive interface works at a very low level, more like a tape recorder than a modern hard drive.  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To begin, I connected all the inputs from the disk drive to digital outputs on an Arduino Mega. The floppy drive interface works at a very low level, more like a tape recorder than a modern hard drive.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l20&quot;&gt;Line 20:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 20:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Alignment / Read/Write test==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Alignment / Read/Write test==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The trick here is to connect an analog oscilloscope to the /RDATA pin, so we can see the live signal as the disk rotates. Then, we need to write a repeating pattern onto the disk so that the oscilloscope can display it properly.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The trick here is to connect an analog oscilloscope to the /RDATA pin, so we can see the live signal as the disk rotates. Then, we need to write a repeating pattern onto the disk so that the oscilloscope can display it properly&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;. I suspect that this is what was written on one of those alignment disks. To actually make one, we need to write it on a known good drive&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;I made the signal using the Arduino; an Atmega at 16Mhz is barely fast enough to do it, using direct port writes to make the data write pin turn on and off, and a bunch of assembley NOP instructions to do delays of a couple microseconds, but it isn't perfect. Every now and then the waveform gets interrupted, presumably as the processor checks something else (related to loops?), but it's still good enough for the oscilloscope display.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;I made the signal using the Arduino; an Atmega at 16Mhz is barely fast enough to do it, using direct port writes to make the data write pin turn on and off, and a bunch of assembley NOP instructions to do delays of a couple microseconds, but it isn't perfect. Every now and then the waveform gets interrupted, presumably as the processor checks something else (related to loops?), but it's still good enough for the oscilloscope display.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Alnwlsn</name></author>
	</entry>
	<entry>
		<id>https://alnwlsn.com/projectrepository/index.php?title=Floppy_disk_drive_hacking&amp;diff=549&amp;oldid=prev</id>
		<title>Alnwlsn at 23:55, 16 February 2020</title>
		<link rel="alternate" type="text/html" href="https://alnwlsn.com/projectrepository/index.php?title=Floppy_disk_drive_hacking&amp;diff=549&amp;oldid=prev"/>
		<updated>2020-02-16T23:55:12Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:55, 16 February 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;I recently got a bunch of 5-1/4&amp;quot; 40 track, double sided floppy drives off eBay for some reason. These drives are very old, and not in the best condition. I got lucky though, and in testing them on a floppy controller inside a computer, several of them worked straight away, formatting disks properly with no issues.  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;I recently got a bunch of 5-1/4&amp;quot; 40 track, double sided floppy drives off eBay for some reason. These drives are very old, and not in the best condition. I got lucky though, and in testing them on a floppy controller inside a computer, several of them worked straight away, formatting disks properly with no issues.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For the drives that did not work right away, I needed some way to diagnose them; MS-DOS just assumes the disk is bad and says &amp;quot;Track 0 bad.&amp;quot; I also wanted to check the alignment of the drives, however, the original alignment disks that technicians used are long gone. I wanted to try connecting an Arduino to a floppy drive and try to write a repeating pattern to a disk. Then, I could check the output from the heads or /RDATA pin to make sure the disk is being read correctly.  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For the drives that did not work right away, I needed some way to diagnose them; MS-DOS just assumes the disk is bad and says &amp;quot;Track 0 bad.&amp;quot; I also wanted to check the alignment of the drives, however, the original alignment disks that technicians used are long gone. I wanted to try connecting an Arduino to a floppy drive &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;to control stepping between tracks, &lt;/ins&gt;and try to write a repeating pattern to a disk. Then, I could check the output from the heads or /RDATA pin to make sure the disk is being read correctly.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To begin, I connected all the inputs from the disk drive to digital outputs on an Arduino Mega. The floppy drive interface works at a very low level, more like a tape recorder than a modern hard drive.  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To begin, I connected all the inputs from the disk drive to digital outputs on an Arduino Mega. The floppy drive interface works at a very low level, more like a tape recorder than a modern hard drive.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Alnwlsn</name></author>
	</entry>
	<entry>
		<id>https://alnwlsn.com/projectrepository/index.php?title=Floppy_disk_drive_hacking&amp;diff=547&amp;oldid=prev</id>
		<title>Alnwlsn at 23:51, 16 February 2020</title>
		<link rel="alternate" type="text/html" href="https://alnwlsn.com/projectrepository/index.php?title=Floppy_disk_drive_hacking&amp;diff=547&amp;oldid=prev"/>
		<updated>2020-02-16T23:51:17Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:51, 16 February 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l4&quot;&gt;Line 4:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 4:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To begin, I connected all the inputs from the disk drive to digital outputs on an Arduino Mega. The floppy drive interface works at a very low level, more like a tape recorder than a modern hard drive.  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To begin, I connected all the inputs from the disk drive to digital outputs on an Arduino Mega. The floppy drive interface works at a very low level, more like a tape recorder than a modern hard drive.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/del&gt;These pins were:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;These pins were:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* /Motor enable - turns on the disk motor when LOW&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* /Motor enable - turns on the disk motor when LOW&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* /Drive select - tells the drive it's supposed to be being used, so activate your output pins.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* /Drive select - tells the drive it's supposed to be being used, so activate your output pins.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Alnwlsn</name></author>
	</entry>
	<entry>
		<id>https://alnwlsn.com/projectrepository/index.php?title=Floppy_disk_drive_hacking&amp;diff=546&amp;oldid=prev</id>
		<title>Alnwlsn: Created page with &quot;I recently got a bunch of 5-1/4&quot; 40 track, double sided floppy drives off eBay for some reason. These drives are very old, and not in the best condition. I got lucky though, a...&quot;</title>
		<link rel="alternate" type="text/html" href="https://alnwlsn.com/projectrepository/index.php?title=Floppy_disk_drive_hacking&amp;diff=546&amp;oldid=prev"/>
		<updated>2020-02-16T23:51:06Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;I recently got a bunch of 5-1/4&amp;quot; 40 track, double sided floppy drives off eBay for some reason. These drives are very old, and not in the best condition. I got lucky though, a...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;I recently got a bunch of 5-1/4&amp;quot; 40 track, double sided floppy drives off eBay for some reason. These drives are very old, and not in the best condition. I got lucky though, and in testing them on a floppy controller inside a computer, several of them worked straight away, formatting disks properly with no issues. &lt;br /&gt;
&lt;br /&gt;
For the drives that did not work right away, I needed some way to diagnose them; MS-DOS just assumes the disk is bad and says &amp;quot;Track 0 bad.&amp;quot; I also wanted to check the alignment of the drives, however, the original alignment disks that technicians used are long gone. I wanted to try connecting an Arduino to a floppy drive and try to write a repeating pattern to a disk. Then, I could check the output from the heads or /RDATA pin to make sure the disk is being read correctly. &lt;br /&gt;
&lt;br /&gt;
To begin, I connected all the inputs from the disk drive to digital outputs on an Arduino Mega. The floppy drive interface works at a very low level, more like a tape recorder than a modern hard drive. &lt;br /&gt;
 These pins were:&lt;br /&gt;
* /Motor enable - turns on the disk motor when LOW&lt;br /&gt;
* /Drive select - tells the drive it's supposed to be being used, so activate your output pins.&lt;br /&gt;
These two pins are just set LOW when the Arduino starts up, so we start off with a drive that is selected and rotating the disk.&lt;br /&gt;
* /Direction - Set the direction to move the heads&lt;br /&gt;
* /Step - a pulse on this pin moves the heads on track over. Doing this repeatedly is how people make those musical floppy drive videos.&lt;br /&gt;
* /WGate - enables writing to happen on the disk&lt;br /&gt;
* /WData - data to write. Each one of these pulses is written as a pulse onto the disk. &lt;br /&gt;
* /Head - select either the top or bottom head to write/read.&lt;br /&gt;
&lt;br /&gt;
I also connected the index and the track0 signal to the Arduino (on an input-pullup pin), though I haven't used them for anything yet.&lt;br /&gt;
&lt;br /&gt;
The Arduino is far too slow to actually read data from the drive. To do that, I'll hook up one of those cheap $20 USB logic analyzers, which seems to be fast enough at 12 M samples/second to read all data from the disk. With the index and track0 signals, and stepping through each track, we could conceivably read the raw data from entire floppies, like a Cryoflux or similar tool.&lt;br /&gt;
&lt;br /&gt;
==Alignment / Read/Write test==&lt;br /&gt;
&lt;br /&gt;
The trick here is to connect an analog oscilloscope to the /RDATA pin, so we can see the live signal as the disk rotates. Then, we need to write a repeating pattern onto the disk so that the oscilloscope can display it properly.&lt;br /&gt;
&lt;br /&gt;
I made the signal using the Arduino; an Atmega at 16Mhz is barely fast enough to do it, using direct port writes to make the data write pin turn on and off, and a bunch of assembley NOP instructions to do delays of a couple microseconds, but it isn't perfect. Every now and then the waveform gets interrupted, presumably as the processor checks something else (related to loops?), but it's still good enough for the oscilloscope display.&lt;br /&gt;
&lt;br /&gt;
I actually did 2 signals, one at 200kHz and one at 250kHz, which I write to alternating tracks and heads. That way, I will see an alternating pattern on the scope as I move from track to track, and head to head on the same track.  The signals aren't straight square waves, they are more like low pulses of about 1uS, with the remainder of the time High.&lt;br /&gt;
&lt;br /&gt;
I used this technique to discover why one of my drives was malfunctioning - instead of /RDATA reading one pulse per flux change (normal operation), I was getting two pulses - a low-high-low instead. Very strange behavior, and I'm not sure what is causing it, but at least now I know what is going on instead of the simple &amp;quot;Track 0 Bad&amp;quot; or &amp;quot;General Failure&amp;quot; messages.&lt;/div&gt;</summary>
		<author><name>Alnwlsn</name></author>
	</entry>
</feed>