Real Floppy Drive

flynnsbit
Top Contributor
Posts: 550
Joined: Sun May 24, 2020 8:07 pm
Has thanked: 179 times
Been thanked: 307 times
Contact:

Re: Real floppy drive

Unread post by flynnsbit »

I think it's cool and getting any hardware interface to fpga is fun! I know I have a few floppies I would get out just to see them load, even if my primary usage would be images.
Lukage
Posts: 47
Joined: Wed Aug 05, 2020 7:34 pm
Been thanked: 53 times

Re: Real floppy drive

Unread post by Lukage »

Update: Reading is done. I think I've resolved all bugs in physical floppy controller FPGA part. I've actually found out, that the ADF read speed should match real hardware, as it is using 3 DMA slots, if "Floppy disk turbo : off" choice is selected in MiSTer menu. I needed to replicate this on real floppy, and found out some more bugs in controlling hardware and inputting disk data.

Shrunk down the XCopy checkdisk time to 38 seconds, without single read retry on real Amiga-written disk on unmodified PC floppy drive. So far I booted everything I threw at it directly from Kickstart, so I think it works. You can see on the picture Workbench booted off DF2 physical floppy.

Next is write support. I should also have parts for prototype sometime next week.
Attachments
wb.jpg
wb.jpg (254.9 KiB) Viewed 12043 times
disk3.jpg
disk3.jpg (245.18 KiB) Viewed 12043 times
User avatar
kathleen
Top Contributor
Posts: 409
Joined: Fri Jun 26, 2020 4:23 am
Location: Belgium
Has thanked: 224 times
Been thanked: 131 times

Re: Real floppy drive

Unread post by kathleen »

Thank you @Lukage for the update about your progress, I'm a big fan of this new feature, for the reasons that I and others members already mentioned, Prior your project, I've never thought that it will happen a day despite it was one of the things that I wanted to see. You did it ! Thanks again for that. I'm looking forward to be able to use it on my Mister once everything on your side will be debugged.

I've one question however, the Amiga can boot on DF0 ,1 ,2, 3 etc for most applications and/or workbench it is fine, but the story is different for the games where 99% of them need to be placed in DF0: otherwise they'll not run, if I well understood it is because the game always look for DF0 to load the game.
This being said, do you think that the physical disk could be addressed to DF0: instead of DF2: (In another way than using the early startup which doesn't work for games) ?

Thanks and regards,
Kathleen.

かすりん

User avatar
Caldor
Top Contributor
Posts: 930
Joined: Sat Jul 25, 2020 11:20 am
Has thanked: 112 times
Been thanked: 111 times

Re: Real floppy drive

Unread post by Caldor »

@Kathleen pretty sure he just did it for testing. For all single disk games usually you can get around using DF2 and such by using the special Amiga boot where you hold down the left and right mouse-button during boot and force some specific drive to be the primary boot drive. Which also works for harddrives.

@Lukage that sounds great. I have this personal dream to see different IO boards being made for the MiSTer for different systems. That way making it possible to integrate the MiSTer in an original Amiga casing f.ex. Might also be relevant at some point for the AO486 core and C64 core. Not sure about the consoles and such, and not sure how many cores will even get enough attention to get these kinds of features.

But its mainly the Amiga where I hope to see this. The Amiga only had one FPGA solution with physical floppy connector support and it was expensive and relied on an 060 CPU expansion but what put me off the most was that it was an arcade board not designed to fit into an original Amiga casing.

The Ultimate 64 is my benchmark for FPGAs for other systems. I mostly use digital media with it and it supports those, both tapes, cartridges and floppies. Even different types of floppies. But also supports physical tapes, cartridges and floppies. Also supports the original video and audio outputs, but at the same time has an HDMI output. I think it has the most features on the HDMI output when it comes to overlays, but both are working and viable.

I think the MiSTer is in a good position to do both as well. Especially with all the amazing updates it has been getting already has rather good CRT support even though its a bit complicated to setup. But the floppy drive support seems like the most relevant to add. But would be nice to also have some other ports supported, like PCMCIA and I think it was the serial port that was used for multi-player?
attle
Posts: 5
Joined: Tue Jun 02, 2020 8:52 am
Has thanked: 3 times

Re: Real floppy drive

Unread post by attle »

Caldor wrote: Fri Nov 27, 2020 11:04 am @Kathleen pretty sure he just did it for testing. For all single disk games usually you can get around using DF2 and such by using the special Amiga boot where you hold down the left and right mouse-button during boot and force some specific drive to be the primary boot drive. Which also works for harddrives.
That only works for Kickstarts above 2.0+. I guess some of the point of this add-on would be to run older games and demos from old floppies. A lot of them only work on Kickstart 1.0-1.3, so not having DF0: support would be a real shame. :)
kolla
Posts: 188
Joined: Sat Jun 13, 2020 7:56 am
Has thanked: 17 times
Been thanked: 33 times

Re: Real floppy drive

Unread post by kolla »

Caldor wrote: Fri Nov 27, 2020 11:04 am For all single disk games usually you can get around using DF2 and such by using the special Amiga boot where you hold down the left and right mouse-button during boot and force some specific drive to be the primary boot drive.
No, that was exactly what she wrote is not the case with many old games, they typically use a custom trackloader that throws out the OS (ie ignores whatever you select in early startup menu) and assume that DF0 is used.
Lukage
Posts: 47
Joined: Wed Aug 05, 2020 7:34 pm
Been thanked: 53 times

Re: Real floppy drive

Unread post by Lukage »

kathleen wrote: Fri Nov 27, 2020 5:08 am This being said, do you think that the physical disk could be addressed to DF0: instead of DF2: (In another way than using the early startup which doesn't work for games) ?
There will be selection possible in MiSTer menu in floppy configuration, you should be able to select DF0 - DF3 as physical floppy, blocking ADF emulation access to the same drive. I think that you will not need to reset the Amiga, so you can freely migrate which drive is physical while the Amiga is running.
attle wrote: Fri Nov 27, 2020 11:58 am That only works for Kickstarts above 2.0+. I guess some of the point of this add-on would be to run older games and demos from old floppies. A lot of them only work on Kickstart 1.0-1.3, so not having DF0: support would be a real shame.
Yes, exactly. You should be able to select DF0 as physical floppy adapter.
User avatar
kathleen
Top Contributor
Posts: 409
Joined: Fri Jun 26, 2020 4:23 am
Location: Belgium
Has thanked: 224 times
Been thanked: 131 times

Re: Real floppy drive

Unread post by kathleen »

Lukage wrote: Fri Nov 27, 2020 7:25 pm There will be selection possible in MiSTer menu in floppy configuration, you should be able to select DF0 - DF3 as physical floppy, blocking ADF emulation access to the same drive. I think that you will not need to reset the Amiga, so you can freely migrate which drive is physical while the Amiga is running.
Brilliant @Lukage !, even if the reboot of the Amiga is needed it would be perfect, it this change can operate on the fly, it is more that perfect;

かすりん

kolla
Posts: 188
Joined: Sat Jun 13, 2020 7:56 am
Has thanked: 17 times
Been thanked: 33 times

Re: Real floppy drive

Unread post by kolla »

Big question is - does it click? Will noclick commodities work, or break the hardware? :)
Lukage
Posts: 47
Joined: Wed Aug 05, 2020 7:34 pm
Been thanked: 53 times

Re: Real floppy drive

Unread post by Lukage »

kolla wrote: Sat Nov 28, 2020 2:07 am Big question is - does it click? Will noclick commodities work, or break the hardware?
You mean that clicking sound when no disk is inserted ? Short answer: Yes, of course it clicks ;).
mlenardon
Posts: 6
Joined: Sat Nov 28, 2020 1:38 pm

Re: Real floppy drive

Unread post by mlenardon »

Excellent work. Will this hardware support a real Amiga floppy drive also instead of just a PC drive? Hopefully you will be able to add a jumper to pick either an Amiga or PC drive.

Michael
User avatar
kathleen
Top Contributor
Posts: 409
Joined: Fri Jun 26, 2020 4:23 am
Location: Belgium
Has thanked: 224 times
Been thanked: 131 times

Re: Real floppy drive

Unread post by kathleen »

Lukage wrote: Sat Nov 28, 2020 1:00 pm
kolla wrote: Sat Nov 28, 2020 2:07 am Big question is - does it click? Will noclick commodities work, or break the hardware?
You mean that clicking sound when no disk is inserted ? Short answer: Yes, of course it clicks ;).
I think that the question from kolla is more related to the program "NoClick" http://aminet.net/package/disk/misc/NoClick
This application once launched stop this click sound coming from the real floppy drive when there is no disk inside. The drive of course continues to run as usual also detects if a disk is inserted as it should but you cannot hear anymore this click when no disk is inserted.
From my side, I like to hear this click so typical but this annoys some people after a while :-)

Is this application will work ?

かすりん

robinsonb5
Posts: 129
Joined: Fri Jun 19, 2020 8:54 pm
Has thanked: 13 times
Been thanked: 57 times

Re: Real floppy drive

Unread post by robinsonb5 »

kathleen wrote: Sat Nov 28, 2020 3:36 pm Is this application will work ?
The NoClick program works by patching the system so that instead of stepping the heads between two tracks to update the diskchange signal, it attempts to step beyond the legal range, to track -1. Most floppy drives will silently ignore that request, but still update the diskchange signal. The problem is that some drives try and obey the request, and can damage themselves in the process.

NoClick should work fine with this interface, provided the interface doesn't itself attempt to prevent the heads being stepped beyond the legal range. It will then be luck-of-the-draw whether any particular drive will be silenced by NoClick.
retrorepair
Posts: 257
Joined: Sun May 24, 2020 9:06 pm
Has thanked: 64 times
Been thanked: 13 times

Re: Real floppy drive

Unread post by retrorepair »

robinsonb5 wrote: Sat Nov 28, 2020 4:06 pm
kathleen wrote: Sat Nov 28, 2020 3:36 pm Is this application will work ?
The NoClick program works by patching the system so that instead of stepping the heads between two tracks to update the diskchange signal, it attempts to step beyond the legal range, to track -1. Most floppy drives will silently ignore that request, but still update the diskchange signal. The problem is that some drives try and obey the request, and can damage themselves in the process.

NoClick should work fine with this interface, provided the interface doesn't itself attempt to prevent the heads being stepped beyond the legal range. It will then be luck-of-the-draw whether any particular drive will be silenced by NoClick.
This adapter is literally a connection directly to the floppy signals so will do anything a real drive would with no interface as such. There is only multiplexing/demultiplexing going on since there are so few IO available.
robinsonb5
Posts: 129
Joined: Fri Jun 19, 2020 8:54 pm
Has thanked: 13 times
Been thanked: 57 times

Re: Real floppy drive

Unread post by robinsonb5 »

retrorepair wrote: Sat Nov 28, 2020 5:38 pm This adapter is literally a connection directly to the floppy signals so will do anything a real drive would with no interface as such. There is only multiplexing/demultiplexing going on since there are so few IO available.
Sure - I should have said "provided the interface and its supporting glue logic in the FPGA..."
Lukage
Posts: 47
Joined: Wed Aug 05, 2020 7:34 pm
Been thanked: 53 times

Re: Real floppy drive

Unread post by Lukage »

mlenardon wrote: Sat Nov 28, 2020 1:42 pm Excellent work. Will this hardware support a real Amiga floppy drive also instead of just a PC drive? Hopefully you will be able to add a jumper to pick either an Amiga or PC drive.
I have prepared prototype interface with both PC and Amiga floppy drive in mind, I want to have floppy drive type selectable via MiSTer menu. This could be a drawback with support for some other systems / floppies. I am completely unfamiliar with either Atari ST or Apple drive connection mechanisms for example, and if drives for these systems were something special. Since floppy drive is a completely dumb device, it should not pose any problems, but I will appreciate some info about any differencies.
retrorepair wrote: Sat Nov 28, 2020 5:38 pm This adapter is literally a connection directly to the floppy signals so will do anything a real drive would with no interface as such. There is only multiplexing/demultiplexing going on since there are so few IO available.
This. It is really connected internally as in real Amiga, so it is unknown, how will some drives be impacted with NoClick. Also, there are PC drives, which provides unknown / wrong signal on diskchange pins, so far I am torturing one single drive, so I will see how it would work with different floppy drive models. To be fair, it is one of the latest PC drives, so it definitely does not account for connection to any other system than PC (it is a model which is a combination floppy / SD / any card reader sold somewhere from 2010, I do see they are selling even today in some shops). I have a quite a pile of different 3,5" PC floppy drives from different eras, as well as Amiga drives from three of my real Amigas, but I will test them when the prototype interface is done.

Also, the clicking is why I am doing this :D
Comatron
Posts: 2
Joined: Sun Sep 20, 2020 8:11 pm
Has thanked: 5 times

Re: Real floppy drive

Unread post by Comatron »

OMG! This is THE BEST news! THANX for making this stuff possible. I am an absolute floppy freak. Much love <3
User avatar
Caldor
Top Contributor
Posts: 930
Joined: Sat Jul 25, 2020 11:20 am
Has thanked: 112 times
Been thanked: 111 times

Re: Real floppy drive

Unread post by Caldor »

The NoClick... driver I guess it is, for Workbench was always a bit dicey. It says in the description of this that if it does not work on your Amiga that you should probably disable the feature again. The Click certainly is part of the nostalgia though. A bit like when a hard disk in an old PC is ticking away as you boot, load games and such. But those old disks were just so slow, so I have usually just gone with IDE to SD or CF adapters. Maybe some day I will make a nostalgia based PC build to get that sound again, but I guess I am not really missing it enough.

Really nice seeing how this is turning out. I really hope I will be able to do this for my MiSTer once you are done with it.
Lukage
Posts: 47
Joined: Wed Aug 05, 2020 7:34 pm
Been thanked: 53 times

Re: Real floppy drive

Unread post by Lukage »

Update: I created better prototyping board. This board should be fully usable as floppy adapter, there are some connectors which are not necessary for actual function, and JTAG connector can be way smaller. It is still more about experimenting than actual production-ready hardware. I needed to do this because of write support, I hadn't enough connections in current breadboard variant.

I have preliminary write support in Minimig core, which will be tested on this new board. Currently I am working on some meaningful integration into MiSTer binary. Do you all think, that is a good idea to support two drives on one adapter ? There is absolutely nothing which is preventing two drives to be hooked up to the interface, but it is a nightmare to do some logical way of assigning these drives in MiSTer menu. How to integrate this interface ?

Currently, you are adding and/or removing ADF drives with KP +/-, from DF0 to DF3. I am currently thinking about moving "Floppy drive turbo" option into Floppy drive submenu. In this floppy drive submenu you would be able to enable floppy adapter board, and assign DFx to it. But this will collide with that KP +/- add/remove selection of ADF.... Best would be to have DF0 - DF4 in root menu enabled, and just select if it is ADF or floppy adapter..... What do you think ? Any ideas ?
Attachments
proto2.jpg
proto2.jpg (154.75 KiB) Viewed 11709 times
User avatar
kathleen
Top Contributor
Posts: 409
Joined: Fri Jun 26, 2020 4:23 am
Location: Belgium
Has thanked: 224 times
Been thanked: 131 times

Re: Real floppy drive

Unread post by kathleen »

Lukage wrote: Tue Dec 01, 2020 4:02 pm Do you all think, that is a good idea to support two drives on one adapter ? There is absolutely nothing which is preventing two drives to be hooked up to the interface, but it is a nightmare to do some logical way of assigning these drives in MiSTer menu. How to integrate this interface ?

Best would be to have DF0 - DF4 in root menu enabled, and just select if it is ADF or floppy adapter..... What do you think ? Any ideas ?
Thank you for this nice update @Lukage,

from my point of view, I'd say who can do more can do less so if 2 real floppy drives are possible I'd vote for it but if this is too complicate and could create problems, having already the possibility to have one real floppy is more than nice.

For the second point, I agree also with this choice to select ADF or Floppy Adapter on any DFx.

Last but not least, if you permit me to make a comment, when you'll design your final board, maybe think that a box to cover it will be necessary, either reserve spaces for holes and/or do not draw tracks or place components to close to the edge. I designed a box for another project which was the HID2AMI and it was not easy as those things were not taken into account during the design of the PCB.

かすりん

User avatar
LamerDeluxe
Top Contributor
Posts: 1160
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 798 times
Been thanked: 257 times

Re: Real floppy drive

Unread post by LamerDeluxe »

This is a really amazing project, very impressive job!

One cool idea I saw with the developer version of the Mega65 yesterday is that its disk drive also operates when loading a disk image from SD card, so you get all the drive sounds even when not actually loading from a disk. I have no idea how difficult that would be to add to this project, but it would be great if that was possible.
User avatar
NightShadowPT
Posts: 208
Joined: Mon May 25, 2020 9:56 am
Has thanked: 5 times
Been thanked: 9 times

Re: Real floppy drive

Unread post by NightShadowPT »

I'm very excited about this project!

Will it be possible, after the adapter is finished to add Floppy disk support to other cores from computers that had floppy drives back in the day? Or is this an Amiga exclusive?

Cheers.
PauloCastor
Posts: 6
Joined: Sun Jun 28, 2020 2:13 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Real floppy drive

Unread post by PauloCastor »

one of those cheap usb drives could work for the ao486 core?
User avatar
Caldor
Top Contributor
Posts: 930
Joined: Sat Jul 25, 2020 11:20 am
Has thanked: 112 times
Been thanked: 111 times

Re: Real floppy drive

Unread post by Caldor »

PauloCastor wrote: Wed Dec 02, 2020 2:05 pm one of those cheap usb drives could work for the ao486 core?
I had a chat with someone about that. Should actually be possible, the main problem seems to be that the MiSTer Main core does not seem to support USB floppy or CD drives. Otherwise it should be possible to take such a drive connected to the Linux system and use it with the AO486 core. From what I was told.

But I think the solution here, with an actual floppy IDE connector and a switch between... well, maybe just Amiga or AO486 mode, would be nice so it could be used for these two systems and maybe more. Because its probably only the AO486 core that would be able to use a USB floppy or CD drive directly through the Linux system as they use the same type of USB and CD drives. I do not think it would work for the Minimig core. Especially not the floppy drive.
User avatar
limi
Top Contributor
Posts: 619
Joined: Sun May 24, 2020 6:53 pm
Has thanked: 135 times
Been thanked: 418 times

Re: Real floppy drive

Unread post by limi »

…and if you want to have a case that can fit the MiSTer and a floppy drive, this might be of interest. 😄
Lukage
Posts: 47
Joined: Wed Aug 05, 2020 7:34 pm
Been thanked: 53 times

Re: Real floppy drive

Unread post by Lukage »

NightShadowPT wrote: Wed Dec 02, 2020 8:31 am Will it be possible, after the adapter is finished to add Floppy disk support to other cores from computers that had floppy drives back in the day? Or is this an Amiga exclusive?
TBH my primary interest is Amiga. I have floppy drive associated with that computer. But my primary objective is to wire the floppy drive to MiSTer in dumbest way possible in term of any interface intelligence. Anyone should be able to use floppy drive with any core, if it is (or was, in that era) possible to use PC drive in that one specific system, even with some modifications. Everything about specific floppy drive code is in FPGA, and needs to be done in per-core basis. For example, there is incompatibility between Amiga and PC drive on two signals, and it needs to be emulated/worked around in FPGA, very much as there were/still are interfaces available for connecting PC drives to real Amiga.
User avatar
toastboy
Posts: 69
Joined: Wed Sep 09, 2020 9:20 pm
Has thanked: 13 times
Been thanked: 19 times

Re: Real floppy drive

Unread post by toastboy »

Lukage wrote: Tue Dec 01, 2020 4:02 pm I am currently thinking about moving "Floppy drive turbo" option into Floppy drive submenu. In this floppy drive submenu you would be able to enable floppy adapter board, and assign DFx to it. But this will collide with that KP +/- add/remove selection of ADF.... Best would be to have DF0 - DF4 in root menu enabled, and just select if it is ADF or floppy adapter..... What do you think ? Any ideas ?
As far as KP+/- goes, I'm guessing from your question that it'll be a pain to make mister skip that behaviour on real floppy drives, but perhaps it's possible to just stub in the code, just do nothing and return success.

On the 2-floppy quesion, I'd say only pursue this if it doesn't hurt the overall aim of having a simple stable device and config. Besides, we know sorg generally avoids things that are needlessly complicated, so keeping it simple might help sell the thing to him.

For the floppy menu, why not keep the current layout with df0,1,2,3 and allow them to be selectable between [disabled|ADF|real_device0|real_device1], assuming the more complex case of 2 floppies on same cable as d0/d1.
Lukage
Posts: 47
Joined: Wed Aug 05, 2020 7:34 pm
Been thanked: 53 times

Re: Real floppy drive

Unread post by Lukage »

toastboy wrote: Fri Dec 04, 2020 1:07 pm On the 2-floppy quesion, I'd say only pursue this if it doesn't hurt the overall aim of having a simple stable device and config. Besides, we know sorg generally avoids things that are needlessly complicated, so keeping it simple might help sell the thing to him.
Yeah, I will probably stick with just one drive for now. I am planning on using only one floppy drive in a MiSTer box anyway.

Also, just a quick update - write is working. I have to admit, I did use 50MHz clock as a baseline for generating precise bit clock for floppy output. In this way, I was able to create exact bit clock for floppy writes. It is possible to use Amiga frequencies for this, but they are not 100% exact, there is always a small error.

I will try to create some meaningful way for that floppy selection in MiSTer menu.
User avatar
Caldor
Top Contributor
Posts: 930
Joined: Sat Jul 25, 2020 11:20 am
Has thanked: 112 times
Been thanked: 111 times

Re: Real floppy drive

Unread post by Caldor »

limi wrote: Wed Dec 02, 2020 6:37 pm …and if you want to have a case that can fit the MiSTer and a floppy drive, this might be of interest. 😄
Well, another option might be modifying this case a bit:
viewtopic.php?f=9&t=1450&p=12385&hilit=3d+print#p12385
retrorepair
Posts: 257
Joined: Sun May 24, 2020 9:06 pm
Has thanked: 64 times
Been thanked: 13 times

Re: Real floppy drive

Unread post by retrorepair »

Lukage wrote: Sat Dec 05, 2020 10:21 am Also, just a quick update - write is working. I have to admit, I did use 50MHz clock as a baseline for generating precise bit clock for floppy output. In this way, I was able to create exact bit clock for floppy writes. It is possible to use Amiga frequencies for this, but they are not 100% exact, there is always a small error.
Do you mean an error when using clk_sys? Have you created a PLL for 50mhz?

There shouldn't be any errors using the base clock if it's triggering on the edge, at least I don't know why there would be.
Post Reply