tag:blogger.com,1999:blog-17268189183332164412024-03-25T15:16:05.405-07:00AMIGA RPI DRIVEHow to use a Raspberry PI to replace the Amiga floppy drivemaurizioramhttp://www.blogger.com/profile/16250672856278244340noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-1726818918333216441.post-72988942998550872972013-11-21T07:03:00.002-08:002016-03-16T00:16:06.032-07:00How to use a Raspberry PI as an Amiga Floppy Drive Emulator<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: center;">
<h3>
<span style="color: #999999; font-family: Trebuchet MS, sans-serif;"><i style="font-weight: normal;">After several years of hard work, my Amiga floppy drive stopped working leaving me in trouble... do I have to buy a new drive (but several disks are in bad condition too), buy a floppy emulator (nice but expensive for retro fun) ... or try to use my Raspberry PI other than as xbmc player?</i></span></h3>
</div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span></div>
<hr />
<div style="text-align: justify;">
<b style="font-family: 'Trebuchet MS', sans-serif;"><span style="color: red;">Dislaimer</span></b><br />
<div>
<span style="font-family: Trebuchet MS, sans-serif;"><span style="color: red;">Whatever you do with the information in these pages or on the linked pages, I am not responsible for any damage you have for using this information. The information herein is provided AS-IS and there is no warranty whatsoever!</span></span></div>
<span style="font-family: Trebuchet MS, sans-serif;"></span></div>
<hr />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<br />
<div style="text-align: justify;">
<span style="font-family: Trebuchet MS, sans-serif;">This is a very simple and finally very cheap (5-10 eur) project: a very common chip (74LS06), a couple of resistors and diodes, a protoboard. This interface doesn't require any change to the Amiga, you have only to remove the internal floppy and put the interface and the Raspberry PI in place. </span></div>
<br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjremAfXDojHK1JBXM62kwjMAPTounRrfcq_mbYkSqv9SLNBmQNRqNo8FF0N7O8eXqhUkbOR8NYcJ2aYixDM5qqsA5_B28Q3e9LkXGW0v2qO5_OsU86elaW5spXRFCgNeGNSoWBpDYrY6q_/s1600/Amiga+RPI+Drive+Design.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjremAfXDojHK1JBXM62kwjMAPTounRrfcq_mbYkSqv9SLNBmQNRqNo8FF0N7O8eXqhUkbOR8NYcJ2aYixDM5qqsA5_B28Q3e9LkXGW0v2qO5_OsU86elaW5spXRFCgNeGNSoWBpDYrY6q_/s640/Amiga+RPI+Drive+Design.JPG" height="381" width="640" /></a></div>
<div style="text-align: center;">
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span></div>
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<br />
<div style="text-align: justify;">
<span style="font-family: Trebuchet MS, sans-serif;">You can put the RPI so you can change/update the SD card without open the Amiga, as you see in the pictures.. </span></div>
<br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis8ot055Hj_WwyA0hV1bNoWvjE0Ec677_Wd_hYMB4WM-yWyVzAHBrLn5ygwdEXtj6ohOL-LNwV-7bi9Zvtm24lEYN6HxfsbzuDL7vIMDIBC7VG-v_XC7vZnPtZYyaPHJZ__9fZw5c0VK1y/s1600/Amiga+RPI+Drive+Outside+.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis8ot055Hj_WwyA0hV1bNoWvjE0Ec677_Wd_hYMB4WM-yWyVzAHBrLn5ygwdEXtj6ohOL-LNwV-7bi9Zvtm24lEYN6HxfsbzuDL7vIMDIBC7VG-v_XC7vZnPtZYyaPHJZ__9fZw5c0VK1y/s640/Amiga+RPI+Drive+Outside+.JPG" height="478" width="640" /></a></div>
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<br />
<div style="text-align: justify;">
<span style="font-family: Trebuchet MS, sans-serif;"><span style="font-family: Trebuchet MS, sans-serif;">The blue led on interface can be </span><span style="font-family: 'Trebuchet MS', sans-serif;">easily</span><span style="font-family: 'Trebuchet MS', sans-serif;"> seen through the case holes without touching the case. As you can see, the interface needs 2 buttons I located in place of the remove disk button: the black one is the "change disk button", when pressed the next virtual floppy disk is inserted in virtual drive, and the red one is to "write to SD button", when pressed it saves all the modified disks on SD. If you push both the buttons, the interface goes in setup mode where you can choose the disk you would like to use.</span></span></div>
<br />
<span style="font-family: 'Trebuchet MS', sans-serif;"><br /></span>
<span style="font-family: 'Trebuchet MS', sans-serif;">In the following video you can see how it works.</span><br />
<span style="font-family: 'Trebuchet MS', sans-serif;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='640' height='480' src='https://www.youtube.com/embed/uG8lcDisK7o?feature=player_embedded' frameborder='0'></iframe></div>
<br />
<div>
<ul style="text-align: left;"><span style="font-family: 'Trebuchet MS', sans-serif;">
<li style="text-align: justify;">at power up the setup program will start automatically</li>
<li style="text-align: justify;">choice all the disks you would like to use </li>
<li style="text-align: justify;">start playing games; if you want to use another disk, push the "change button"</li>
<li style="text-align: justify;">when you want to play another game just press both the button and reset the amiga, the system will go in the setup mode</li>
</span></ul>
<span style="font-family: 'Trebuchet MS', sans-serif;">
</span>
<br />
<div>
<span style="font-family: 'Trebuchet MS', sans-serif;">Each drive has a stack of disks chosen during setup. When the "change button" is pressed the next disk in each stack is inserted in virtual drive. As example, if I do this in setup:</span><br />
<br />
<span style="font-family: Trebuchet MS, sans-serif;">drive 0:</span><br />
<br />
<ul style="text-align: left;">
<li><span style="font-family: Trebuchet MS, sans-serif;">Monkey Island Disk1</span></li>
<li><span style="font-family: Trebuchet MS, sans-serif;">Monkey Island Disk3</span></li>
</ul>
<span style="font-family: Trebuchet MS, sans-serif;">drive 1:</span><br />
<br />
<ul style="text-align: left;">
<li><span style="font-family: Trebuchet MS, sans-serif;">Monkey Island Disk2</span></li>
<li><span style="font-family: Trebuchet MS, sans-serif;">Monkey Island Disk Savegame</span></li>
</ul>
<span style="font-family: Trebuchet MS, sans-serif;">after reboot Amiga will have "Monkey Island Disk1" inserted in drive 0 and "Monkey Island Disk2" inserted in drive 1. When the games asks for disk 3 or savegame disk I press the "change button" and the Raspberry PI will insert </span><span style="font-family: 'Trebuchet MS', sans-serif;">"Monkey Island Disk3" in drive 0 and "Monkey Island Disk Savegame" in drive 1. When the game asks again for disk 1 or disk 2 I only need to press again the "change button". To use is simpler than to explain...</span></div>
<span style="font-family: 'Trebuchet MS', sans-serif;">
</span>
<br />
<div>
<div style="text-align: justify;">
<span style="font-family: 'Trebuchet MS', sans-serif;">Because the Amiga internal floppy drive connector has only 2 select line, it is not possible to have more than <b>2 virtual drives without modifying the Amiga</b>, so you can only use the first and the second drive during setup (the others two will be useful with the external version of the interface).</span></div>
<span style="font-family: 'Trebuchet MS', sans-serif;"><br /></span>
<br />
<h3 style="text-align: left;">
<span style="font-family: 'Trebuchet MS', sans-serif;">The interface</span></h3>
<div>
<span style="font-family: 'Trebuchet MS', sans-serif;">The schematic:</span></div>
<div>
<span style="font-family: 'Trebuchet MS', sans-serif;"><br /></span></div>
<div style="text-align: left;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1GAnc2w18OOp4N_LU-5pfv3ELjBPTeOKWiXkdfgSI8E3_TDEWtIq4AdwL02ZYEWJpdalwhI82UGtSKrVIBjd_yVfgt7OUznw4OAfuq6SkWjIOFnHIe-yzQwTRCVtQMaOw40OoIvmj9gBU/s1600/Amiga+RPI+Drive+Mini+Schematic.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1GAnc2w18OOp4N_LU-5pfv3ELjBPTeOKWiXkdfgSI8E3_TDEWtIq4AdwL02ZYEWJpdalwhI82UGtSKrVIBjd_yVfgt7OUznw4OAfuq6SkWjIOFnHIe-yzQwTRCVtQMaOw40OoIvmj9gBU/s640/Amiga+RPI+Drive+Mini+Schematic.png" height="440" width="640" /></a></div>
<span style="font-family: 'Trebuchet MS', sans-serif;"><br /></span></div>
</div>
<div style="text-align: left;">
<span style="font-family: 'Trebuchet MS', sans-serif;">
</span>
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: left;">
<h2 style="text-align: left;">
</h2>
</div>
</div>
<div style="text-align: left;">
<pre> Partlist
IC1 74LS06
C1 10uF
C2 100nF
C3 220pf
D1-D5/D7 SB140 (*6)
D6 1N4148
R8/R14/R16/R26/R27 4k7 (*5)
R15 10k
R1-R7 1k (*7)
R9-R13/R17/R18 2k7 (*7)
R19-R25 6k8 (*7)
R28 330
LED1 3mm 2.7V 2ma
S1 switch
JP1 Amiga Floppy Power 1X4
JP2 Amiga Internal Drive 2X17
JP3 Raspberry PI 2X13
</pre>
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<br />
<div style="text-align: justify;">
<span style="font-family: Trebuchet MS, sans-serif;"><span style="font-family: Trebuchet MS, sans-serif;">Basically, for the input lines there are pull-up resistors and voltage dividers to adapt the 5V to the 3V3 of the Raspberry PI. The <span style="text-decoration: overline;">SEL1</span> line pass through a switch so we can disable the second drive, <b>needed if you want to attach external drives (for ripping a real floppy disk into adf file in SD)</b>.</span></span></div>
<div style="text-align: justify;">
<span style="font-family: Trebuchet MS, sans-serif;"><span style="font-family: Trebuchet MS, sans-serif;">The outputs go through the 74LS06 containing 6 inverter with open-collector outputs, needed to correctly manage the disk bus. The </span><span style="font-family: 'Trebuchet MS', sans-serif; text-decoration: overline;">RDY</span><span style="font-family: 'Trebuchet MS', sans-serif;"> line is managed directly by the interface and it used to help protecting the bus when there are external drives disabling the </span><span style="font-family: 'Trebuchet MS', sans-serif; text-decoration: overline;">CHNG</span><span style="font-family: 'Trebuchet MS', sans-serif;"> line and the </span><span style="font-family: 'Trebuchet MS', sans-serif; text-decoration: overline;">DKRD</span><span style="font-family: 'Trebuchet MS', sans-serif;"> line (the other lines are managed by software).</span></span></div>
<div style="text-align: justify;">
<span style="font-family: Trebuchet MS, sans-serif;"><span style="font-family: 'Trebuchet MS', sans-serif;">The Raspberry PI is powered from the floppy power connection which it is enough for the model A. I tried model B, which require more power, without any problem, but I can't recommend because the maximum power requested in this case (700ma on certain conditions) is more than the power Amiga can provide through the connector (550ma). The interface require Raspberry PI v.2. </span></span></div>
<br />
<div style="text-align: justify;">
<span style="font-family: 'Trebuchet MS', sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: 'Trebuchet MS', sans-serif;">These are the connectors on the Amiga we need to use, probably you would like to use the same cables used by internal floppy disk drives:</span></div>
<span style="font-family: 'Trebuchet MS', sans-serif;"><br /></span>
<br />
<div style="float: left; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVmuLSrKioLiLMZMABqU5esftg73btCrnWPlzP-LhHBTYo9VaZ43r2LCVWxEYRq73omoSFk4DbwO4eRxNow3w8J9T2adVf3lJrYLp_nLs3j2FNNnuaLTD3YAvIggMWYAOe0aVUEpFFOsiU/s1600/Amiga_Internal_Drive_Connector.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVmuLSrKioLiLMZMABqU5esftg73btCrnWPlzP-LhHBTYo9VaZ43r2LCVWxEYRq73omoSFk4DbwO4eRxNow3w8J9T2adVf3lJrYLp_nLs3j2FNNnuaLTD3YAvIggMWYAOe0aVUEpFFOsiU/s400/Amiga_Internal_Drive_Connector.png" height="400" width="253" /></a></div>
<div style="float: left; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigSA0IiotRkAKg70MCOHH_A2OPlUTVpx3kkD7-8irkszbfxZ6W_z0hLBvUIbiS7T35dq5tPb_pvs-iLdAZiDzJDMb7ayFO2wu8mzU3f7v8R8YjNxeYp1B_EERhsPQjFlIVBa_a0D7whozp/s1600/Amiga_Floppy_Power.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigSA0IiotRkAKg70MCOHH_A2OPlUTVpx3kkD7-8irkszbfxZ6W_z0hLBvUIbiS7T35dq5tPb_pvs-iLdAZiDzJDMb7ayFO2wu8mzU3f7v8R8YjNxeYp1B_EERhsPQjFlIVBa_a0D7whozp/s320/Amiga_Floppy_Power.png" height="186" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: 'Trebuchet MS', sans-serif;">In the following image you can see the connectors of my Amiga 500 (rev.5!), I marked the pin 1 of the CN11 (it is the one near the yellow triangle) and the pin1 of the power connection (near the plastic line, 5V cable I have is brown). Be careful, the red cable (pin 4) is 12V and if you swap the cables red and brown (and there is no protection against that) you could damage Amiga and/or Raspberry PI and/or the interface.</span></div>
<span style="font-family: 'Trebuchet MS', sans-serif;"><br /></span>
<br />
<div style="text-align: left;">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg03ZKu2A81Bg3Fgc75wftE4a6P928VNwrn6YejBPycYch6OTdKK4ALfhmtiTEYV53roBLl9KZW05ul9q2GhCq_ts4JV4SaQTPl5Xn7_e-1uDE8jacjJTfod90fEh80SNyPRgr17tD3vCoW/s1600/Amiga+RPI+Drive+Connectors.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg03ZKu2A81Bg3Fgc75wftE4a6P928VNwrn6YejBPycYch6OTdKK4ALfhmtiTEYV53roBLl9KZW05ul9q2GhCq_ts4JV4SaQTPl5Xn7_e-1uDE8jacjJTfod90fEh80SNyPRgr17tD3vCoW/s640/Amiga+RPI+Drive+Connectors.JPG" height="358" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-family: Trebuchet MS, sans-serif;"><b>Amiga Internal Floppy Connector and Floppy Power</b></span></td></tr>
</tbody></table>
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span><span style="font-family: Trebuchet MS, sans-serif;">These are the connections between Amiga and the interface:</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_-abRU8jFl5WH8ob_mXyiQ7gWnZN4pp6xGv1Al6raCw-gu2Busz2NVfmQZ9Ale3AI6sUTQHt_UKZn__z9lx_nWkffVzRu9VnQ_UzgmlH5SKVy3gZ4ZQFfxxygm1cQkGDzmue-yfCkMzud/s1600/Amiga+RPI+Drive+Connection.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_-abRU8jFl5WH8ob_mXyiQ7gWnZN4pp6xGv1Al6raCw-gu2Busz2NVfmQZ9Ale3AI6sUTQHt_UKZn__z9lx_nWkffVzRu9VnQ_UzgmlH5SKVy3gZ4ZQFfxxygm1cQkGDzmue-yfCkMzud/s640/Amiga+RPI+Drive+Connection.JPG" height="358" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-family: Trebuchet MS, sans-serif;"><b>Amiga RPI Drive Connections</b></span></td></tr>
</tbody></table>
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<br />
<div style="text-align: justify;">
<span style="font-family: Trebuchet MS, sans-serif;">As you can see, for the interface board I didn't made a specific PCB, indeed the circuit is finally so simple I preferred to use a protoboard. </span></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB292JsyuCLyNoiRZjX2sIOZOlLe62a_rSylTBAVH9iZQAsyOkZvUQ9GlGDG7UpE8yZmqGLc9KSq357idL5p0s-LY4WPjpsrigs_Un07xpbOOiZnhGDPj17SGuSbCTw08uWe875ixGi0Uj/s1600/Amiga+RPI+Drive+Interface.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB292JsyuCLyNoiRZjX2sIOZOlLe62a_rSylTBAVH9iZQAsyOkZvUQ9GlGDG7UpE8yZmqGLc9KSq357idL5p0s-LY4WPjpsrigs_Un07xpbOOiZnhGDPj17SGuSbCTw08uWe875ixGi0Uj/s640/Amiga+RPI+Drive+Interface.JPG" height="640" width="422" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-family: Trebuchet MS, sans-serif;"><b>Amiga RPI Drive Interface</b></span></td></tr>
</tbody></table>
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">All the dirty work is made by the software.</span><br />
<br />
<h3>
<span style="font-family: 'Trebuchet MS', sans-serif;">The software</span></h3>
<div>
<div style="text-align: justify;">
<span style="font-family: 'Trebuchet MS', sans-serif;"><a href="https://sites.google.com/site/amigarpidrive/home/Amiga%20RPI%20Drive.zip?attredirects=0&d=1">Here</a> you can download the software. You have to unzip in a <b>fat32 SD</b> (like most of the Raspberry PI distro) and add <b>yours adf or adz files</b>. I recommend to use adz, they are much shorter and they will be loaded faster. The adz files are naturally "write protected", disk modified are saved always in adf files. To make adz files you just need to gzip the adf files with some free utility like 7-zip and change the extension to adz, or you could use powershell command: gzip filename.</span></div>
</div>
<div>
<div style="text-align: justify;">
<span style="font-family: 'Trebuchet MS', sans-serif;">That's all. The emulation is "complete" so Amiga will save the changes you made on the disks: <b>the changes will stay only in memory until you press the "write to sd button"</b>. You can see the disks modified (which probably need to be saved on SD) during setup, they will have an asterisk before the name. Then if the disks are modified, they will be write back to sd making or overwriting the adf files, unless the files are marked as "read-only" on SD.</span></div>
<div style="text-align: justify;">
<span style="font-family: 'Trebuchet MS', sans-serif;">You can easily rip your disks just using an external drive and XCopy (I put inside the zip file) or you can do the opposite, you can create an Amiga floppy disk from an adf file, just remember to disable the second drive on interface before attaching external drive.</span></div>
<span style="font-family: 'Trebuchet MS', sans-serif;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='640' height='480' src='https://www.youtube.com/embed/eoGgXZn4f20?feature=player_embedded' frameborder='0'></iframe></div>
<span style="font-family: 'Trebuchet MS', sans-serif;"><br /></span></div>
<div>
<span style="font-family: 'Trebuchet MS', sans-serif;">In the video you can see me ripping my old Workbench disk.</span><br />
<span style="font-family: 'Trebuchet MS', sans-serif;"><br /></span>
<br />
<h3>
<span style="font-family: Trebuchet MS, sans-serif;">Interface details</span></h3>
<div style="text-align: justify;">
<span style="font-family: Trebuchet MS, sans-serif;">This interface don't use Linux kernel, but is bare metal, so everything it is done from scratch starting without any O.S. support. All the code is in kernel.img in only 240kb, it holds also the Amiga setup software (and sounds and graphics). So it is only needed 7 second to power up the system and start the emulation. This choise was because the floppy disk interface needs real time response and Linux can't manage that without adding external hardware. Since this interface manages more than 1 drive (it can manage 4) and it is suppose the disk bus is shared eventually with external drives, several signals (as CHNG) need to be managed by software in real time (answers not after than 400 ns) and only a bare metal system, with optimized code, can manage that. You can find more info on timings <a href="http://amigadev.elowar.com/read/ADCD_2.1/Hardware_Manual_guide/node018E.html" target="_blank">here</a> (example for Amiga floppy) and <a href="http://bitsavers.trailing-edge.com/pdf/nec/FD1035_Product_Description_Jul84.pdf" target="_blank">here</a> (for generic PC floppy).</span></div>
<div style="text-align: justify;">
<span style="font-family: Trebuchet MS, sans-serif;">During SD operations like read or write an adf/adz disk image, the system can't manage the bus requests. In this case the full emulation is stopped and the system appears like without disks inserted (all the disks will be 'ejected'): in this way the hardware can directly manage the requests without generate errors or blocks. In this way the RPI is free to do something else. After these operations the emulation will start again and all the disks will be re-inserted in drives.</span></div>
<div style="text-align: justify;">
<span style="font-family: Trebuchet MS, sans-serif;">In order to manage the DKRD line (disk read) and have a <b>full stream of data with exact timing (2us per cell) sent without any interruptions,holes or delays</b>, the software uses the SPI interface in continuous mode: all the MFM data goes through the SDO pin while other SPI pins are not used and they are configured and treated as standard GPIO. In order to have a better shape for the DKRD line, the signal should stay low for less than 2 us (400ns should be good) so the signal was 'reshaped' by the resistor R15, the capacitor C3 and the diode D6, improving the compatibility with the Amiga software (really only few games are sensible to this timing). For the data in input, the DKWD line, indeed it was not possible to use SDI because without a clock or a PLL, errors will appear soon. The approach in this case was to take the times between the 0 cells (on the falling edge) and use these to obtain the data stream. So if between 2 zeros there are 4 us, the system recognizes a '10' sequence (the line is inverted), if there are 6 us the system recognizes a '100' sequence and if there are 8 us the system recognize '1000', as it's the MFM coding. To know more about MFM coding anyway and other useful stuff <a href="http://lclevy.free.fr/adflib/adf_info.html" target="_blank">here</a> there are lot of infos.</span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<div style="-webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
</div>
<h3 style="text-align: left;">
<span style="font-family: Trebuchet MS, sans-serif;">Requirements</span></h3>
<span style="font-family: 'Trebuchet MS', sans-serif;">It works with all Amiga versions. Minimum requirements are kickstart 1.2 and at least 512kb.</span><br />
<div>
<span style="font-family: Trebuchet MS, sans-serif;">Amiga 1000 users, in order to let the system get the kickstart, have to put the kickstart file on SD and call it "kickstart12.adz". The Rasperry PI will load it automatically on system power up. </span></div>
</div>
<span style="font-family: 'Trebuchet MS', sans-serif;"><br /></span>
<br />
<!--<h3>
<span style="font-family: Trebuchet MS, sans-serif;">Where to buy?</span></h3>
<div style="text-align: justify;">
<span style="font-family: Trebuchet MS, sans-serif;">While this interface is extremely easy to build, for people who can't or just don't want to touch the solder, these are the links to interfaces made buy volunteers:</span></div>
<div style="text-align: justify;">
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Trebuchet MS, sans-serif;"><a href="http://www.a1k.org/forum/showthread.php?t=41193" target="_blank">http://www.a1k.org/forum/showthread.php?t=41193</a> (German)</span></div>
<div style="text-align: justify;">
<span style="font-family: Trebuchet MS, sans-serif;"><a href="http://eab.abime.net/showthread.php?t=71572" target="_blank">eab.abime.net/showthread.php?t=71572</a> (English)</span></div>
<div style="text-align: justify;">
<span style="font-family: Trebuchet MS, sans-serif;"><a href="http://retronia.cl/foro/viewtopic.php?f=21&t=985&start=10" target="_blank">http://retronia.cl/foro/viewtopic.php?f=21&t=985&start=10</a> (Chile)</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span></div>-->
<div style="text-align: justify;">
<span style="font-family: 'Trebuchet MS', sans-serif;">The Amiga RPI Drive project, software and hardware, is totally free. So feel free to use these information for your own or to build and sell you own interface or just enjoy the work made by those Amiga fans.</span></div>
<!--<div style="text-align: justify;">
<span style="font-family: Trebuchet MS, sans-serif;">I provide these links only for your information as I'm not related in any way to these projects and to these people. </span></div>-->
<div>
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Trebuchet MS, sans-serif;">In the comments you can probably find the FAQ...</span></div>
<div>
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span></div>
<span style="font-family: 'Trebuchet MS', sans-serif;">I hope you enjoy again Amiga as I did!</span><br />
<span style="font-family: 'Trebuchet MS', sans-serif;"><br /></span>
<span style="font-family: 'Trebuchet MS', sans-serif;"><br /></span><br />
<h3>
<span style="font-family: Trebuchet MS, sans-serif;">Downloads</span></h3>
<span style="font-family: 'Trebuchet MS', sans-serif;">Software to put on SD </span><span style="font-family: 'Trebuchet MS', sans-serif;"><a href="https://sites.google.com/site/amigarpidrive/home/Amiga%20RPI%20Drive.zip?attredirects=0&d=1">Amiga RPI Drive.zip</a> or <a href="http://ramondo.net/Amiga%20RPI%20Drive.zip">Mirror1</a></span><br />
<span style="font-family: Trebuchet MS, sans-serif;">Schematic PDF <a href="https://sites.google.com/site/amigarpidrive/home/Amiga%20RPI%20Drive%20Mini%20Schematic.pdf?attredirects=0&d=1" target="_blank">Amiga_RPI_Drive_Schematic.pdf</a></span><br />
<span style="font-family: Trebuchet MS, sans-serif;">Schematic sch (Eagle) <a href="https://sites.google.com/site/amigarpidrive/home/Amiga%20RPI%20Drive%20Mini%202.3.sch.zip?attredirects=0&d=1" target="_blank">Amiga_RPI_Drive.sch.zip</a></span><br />
<span style="font-family: Trebuchet MS, sans-serif;">Stripboard or Veroboard (Eagle) <a href="https://sites.google.com/site/amigarpidrive/home/protoboard.zip?attredirects=0&d=1" target="_blank">Protoboard.zip</a></span><br />
<span style="font-family: 'Trebuchet MS', sans-serif;">Stripboard or Veroboard</span><span style="font-family: Trebuchet MS, sans-serif;"> (png) <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyRFj32o-mwdritJBAQpuu9iLNrQjoTAqTFU4LvXW3i122dgASkFG_oW4yqKom2S0Ff-XhYhpU6qvGH6HLuWcQ0iJVjyPJrOLJb7b3iofpcz85TLCNJGRYsWjuwchOm8zwp32zUIRqz4U/s1600/Protoboard.png" target="_blank">Protoboard.png</a></span><br />
<br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">Feel free to use and distribute.</span><br />
<br />
<span style="font-family: Trebuchet MS, sans-serif;">Feel free to leave comments/suggestions.</span><br />
<br />
<span style="font-family: Trebuchet MS, sans-serif;">Special thanks for the FatFS module to <a href="http://elm-chan.org/fsw/ff/00index_e.html" target="_blank">http://elm-chan.org/fsw/ff/00index_e.html</a></span></div>
<br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span></div>
<hr />
</div>
</div>
</div>
maurizioramhttp://www.blogger.com/profile/16250672856278244340noreply@blogger.com117