Real Floppy Drive

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 11708 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.
Lukage
Posts: 47
Joined: Wed Aug 05, 2020 7:34 pm
Been thanked: 53 times

Re: Real floppy drive

Unread post by Lukage »

retrorepair wrote: Mon Dec 07, 2020 10:17 am Do you mean an error when using clk_sys? Have you created a PLL for 50mhz?
No, I meant slight error in producing exact 2us out of 7,09379 MHz clk7_ena for write bits. But it was overdone, there is always error in motor spinning, so there is no point doing it exact. I've redone it using clk7_ena, it integrates much better.
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 »

Lukage wrote: Wed Dec 02, 2020 8:22 pm 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.
That's good news, thanks for your reply.

If I'm honest, the floppy sound (and using of floppies) is more important for the Amiga to myself as well, but it would seem like a lost opportunity to have such a wonderful feature be reused in other cores.

Thanks for your hard work. I look forward to see the final result!

Cheers
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 »

Also, an option just to export the motor control signals when using adfs would be nice :)
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 »

From what I have heard, and what I understand, it would probably be much much simpler getting a floppy and CD drive to work for the AO486 core, so it would mainly be for the convenience an neatness to have this capable of supporting both cores. I do suspect that AO486 might be able to even use a USB floppy and a USB CD drive. The main problem with that from what I have heard, is the Linux core on MiSTer currently does not have the drivers to support this... or something like that. This is from the guy who is trying to make an expansion for the AO486 core on the MiSTer that can support a PCI port. Which, if it succeeds might also be useful for the Minimig core I guess, but I suspect that would require some love from one of the experienced Minimig developers.

Btw. I would be up to supporting the Minimig floppy project via Patreon if there is one or one was setup... ;)
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 »

The thing is, this is interfacing directly with the Amiga floppy controller so it's certainly not a trivial thing to implement in another core, each will be a special case and in the case of AO486 I'm not sure these signals are even exposed.
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 »

retrorepair wrote: Tue Dec 08, 2020 11:33 am The thing is, this is interfacing directly with the Amiga floppy controller so it's certainly not a trivial thing to implement in another core, each will be a special case and in the case of AO486 I'm not sure these signals are even exposed.
They should be. Its already floppy drives that are implemented, afaik, and I think more than one actually got it working with custom cores.

So it should only be a matter of taking this and solution and mapping the floppy signals of the different cores to this. F.ex. I think two of the signals are swapped when comparing Amiga and PC floppy signals, but I think there might be a bit more to it. But should not be more than could be gotten around in the FPGA core code. Otherwise, he has already talked about adding a hardware switch that could be used to make the floppy adapter support Amiga or PC drives. But I do think it might be better to have it be something the cores handle, so nothing physical has to be done when switching between cores.
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 »

There's more to it than that.

I've looked at the AO486 core and it's not obvious which if any signals are being used. I'm not sure that core uses a floppy controller as such, even though it does handle images (I assume).

Not saying it can't be done, I'd like to see it, but only the hardware would be relevant and some of the menu code. The rest would need to be rewritten for each 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 »

I think there would be no getting around having to rewrite / add code for each core to make it work no matter how its done.
User avatar
Newsdee
Top Contributor
Posts: 830
Joined: Mon May 25, 2020 1:07 am
Has thanked: 98 times
Been thanked: 209 times

Re: Real floppy drive

Unread post by Newsdee »

Let's worry about other cores only after this is done for minimig :)
Lukage
Posts: 47
Joined: Wed Aug 05, 2020 7:34 pm
Been thanked: 53 times

Re: Real floppy drive

Unread post by Lukage »

A quick update: Below is a link to a video file showing MiSTer Floppy working with read, write, and DFx selection in MiSTer menu. It is still work in progress, there are still some bugs to catch.

First, there is a blank/erased floppy inserted under XCopy as DF1. It shows that it is not a DOS disk. Next, it is written with Workbench image from ADF in DF0. Then you can see that it was successfully written, and Minimig core is rebooted using DF0 only as external drive. As a next step, Workbench is loaded from physical floppy, and then formatted under Workbench. It shows both read and write capability, and possibility to migrate external drive to any DFx.

https://uloz.to/file/VZ8tla7rXvUI/miste ... totype-mp4

Link on the sharing server will expire on 31.12.2020. Hopefully, I will have better video prepared till that date ;)

On technical side: Because I am still catching bugs, you can see that floppy is connected with additional wires to MiSTer besides user port. I still do have heavy trouble shifting control signals in a serial manner, especially if I am trying to debug floppy core inside Minimig. I needed to have one trouble less, hence I've connected floppy signals to unused I/O on analog board. It is possible to have full floppy connected via these additional wires (7 user port, 5 additional on unused GPIO). This gives in total 12 I/O, which is exactly what is needed to have all signals for one floppy connected (only things which are not connected are density select, motor enable A and select A signals). This way, a simple open-drain level conversion is all what is needed to glue floppy to MiSTer, and still have all original peripherals connected.

Sure, the written disks can be read by real Amiga and vice versa ;)

Please let me know, if someone wants to tinker with this 12 I/O GPIO version and make some level conversion, I can eventually publish some code to play with :)
Post Reply