USB Floppy support on MiSTer? Possible? Needed?

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, Greenious, spiny, Sorgelig, Moderator Team

seastalker
Captain Atari
Captain Atari
Posts: 298
Joined: Sun May 15, 2016 3:44 pm

USB Floppy support on MiSTer? Possible? Needed?

Postby seastalker » Sun Dec 01, 2019 11:25 am

I like theoretical discussions and thought to ask. I have yet to test support for usb hard drives or networked files. Maybe it is already possible, but are USB floppy drives supported? I am wondering what I can do with the floppy port of my WIP "Mister-in-an-Amiga-1200-case" project. Floppy formats may differ and I don't think you can cross-pollinate a Windows based USB drive with legacy computers (I could be wrong).

Still, maybe in FPGA territory, at least in theory, could I utilize an IBM 3.5 inch floppy USB drive I have laying around in a meaningful way with MiSTER?
Maybe not as feature advanced as a KryoFlux, but could people use their original and homebrew software this way? Maybe some read-only computer cores without save support could use a 3.5 inch floppy drive as a workaround? It would be cool saving an Atari 800xl file to a 3.5 inch disk after all the years with a 1050 floppy drive. :)

ReedSolomon
Atari User
Atari User
Posts: 40
Joined: Tue Oct 09, 2018 1:52 am

Re: USB Floppy support on MiSTer? Possible? Needed?

Postby ReedSolomon » Mon Dec 02, 2019 12:37 am

USB floppy drives are not possible because USB floppy drives are PC compatible only and won't read Amiga disks.

Maybe an old FDD floppy drive can be used at least in read only mode if someone implements an adapter for FDD to expansion port, but someone would have to design an expansion port to FDD interface and also implement it in minimig. I agree it would be nice to be able to backup /read floppies on minimig via MiSTer though.

zomgugoff
Atari freak
Atari freak
Posts: 66
Joined: Tue Jan 29, 2019 10:12 am

Re: USB Floppy support on MiSTer? Possible? Needed?

Postby zomgugoff » Mon Dec 02, 2019 1:09 am

ReedSolomon wrote:USB floppy drives are not possible because USB floppy drives are PC compatible only and won't read Amiga disks.

Maybe an old FDD floppy drive can be used at least in read only mode if someone implements an adapter for FDD to expansion port, but someone would have to design an expansion port to FDD interface and also implement it in minimig. I agree it would be nice to be able to backup /read floppies on minimig via MiSTer though.


There's flux imaging tools like FluxEngine (https://github.com/davidgiven/fluxengine) that use PC floppy drives with some additional, low-cost hardware. The compatibility list is pretty short so far, but Amiga is on there as 'tested'. I don't know if that would be suitable for realtime read/write activities as it is, but it's open-source, so maybe?

JimDrew
Atari Super Hero
Atari Super Hero
Posts: 854
Joined: Mon Nov 04, 2013 5:23 pm

Re: USB Floppy support on MiSTer? Possible? Needed?

Postby JimDrew » Mon Dec 02, 2019 1:47 am

The SuperCard Pro image file format has an open API and is very popular with emulation authors. WinUAE, FS-UAE, STeeM, and numerous other emulators for various computers systems all support .scp image files natively. FX CAST Atari ST emulator supports it with MiSTer already. There is plenty of source code available for it for Linux, Mac, and Windows platforms. There are thousands of SuperCard Pro boards out there and tens of thousands of image files. These image files are flux level image files, meaning that everything, including copy protected disks, will work.

With a USB interface the MiSTer system would be able to also use a real floppy drive with the SuperCard Pro board. It is already designed to do that.
I am the flux ninja

ReedSolomon
Atari User
Atari User
Posts: 40
Joined: Tue Oct 09, 2018 1:52 am

Re: USB Floppy support on MiSTer? Possible? Needed?

Postby ReedSolomon » Mon Dec 02, 2019 7:12 am

zomgugoff wrote:There's flux imaging tools like FluxEngine (https://github.com/davidgiven/fluxengine) that use PC floppy drives with some additional, low-cost hardware. The compatibility list is pretty short so far, but Amiga is on there as 'tested'. I don't know if that would be suitable for realtime read/write activities as it is, but it's open-source, so maybe?


An interesting device.. It even uses an FPGA. Still, for the purposes of OPs theoretical scenario it would be more beneficial to implement direct floppy drive reading directly in the core itself. Maybe the flux engine code or documentation can be used in some fashion with a simplified floppy header to expansion adapter with minimig doing most of the work.

JimDrew wrote: a USB interface the MiSTer system would be able to also use a real floppy drive with the SuperCard Pro board. It is already designed to do that.


Could also work, but kinda seems like overkill.

ericgus
Captain Atari
Captain Atari
Posts: 475
Joined: Fri Apr 08, 2016 4:53 am
Location: Boston MA - USA

Re: USB Floppy support on MiSTer? Possible? Needed?

Postby ericgus » Mon Dec 02, 2019 7:53 am

There is also Keir Fraser opensource Greaseweazle "Tools and USB interface for accessing a floppy drive at the raw flux level."

https://github.com/keirf/Greaseweazle

This might be adapted for this use with no closed source/proprietary strings.

seastalker
Captain Atari
Captain Atari
Posts: 298
Joined: Sun May 15, 2016 3:44 pm

Re: USB Floppy support on MiSTer? Possible? Needed?

Postby seastalker » Mon Dec 02, 2019 11:58 am

Possibly overkil indeed, but I'm glad to get the theoretical discussion wheels turning, and gauge how many would use such a feature. I didn't know if the ao486 would benefit the most from this because of the mentioned compatibility issues like Amiga disks on a Windows floppy drive. I never know the limitations of this FPGA platform because of how often I am surprised and amazed by the devs. I thought maybe an IO board or the arm side could implement the feature, but think people would be less inclined to create this feature unless a huge benefit comes of it. IF write support happens to some computer read-only cores, I imagine it would be to the SD card first. Though I think a 'flux' type of feature being able to backup floppies for the benefit of software preservation would be the motivation for devs. Speculation of course. I know the Mister project is for roms and real cartridges are for Analogue, yet wonder if real floppies will one day find a place in all of this.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5377
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: USB Floppy support on MiSTer? Possible? Needed?

Postby Sorgelig » Mon Dec 02, 2019 1:50 pm

For preservation purpose there are lot of tools for PC to do such backups. It's definitely out of MiSTer scope.
Real floppy support today needed for a single purpose - make a backup from aged disks ASAP. So do this in tools designed for such purpose.

hubersn
Atari maniac
Atari maniac
Posts: 99
Joined: Fri Sep 11, 2015 8:10 pm

Re: USB Floppy support on MiSTer? Possible? Needed?

Postby hubersn » Mon Dec 02, 2019 4:32 pm

seastalker wrote:I didn't know if the ao486 would benefit the most from this because of the mentioned compatibility issues like Amiga disks on a Windows floppy drive.


The following is all IIRC - I researched the whole stuff when looking at doing an USB driver for Acorn RISC OS floppies, probably in 2007.

"Windows floppy drive" is a bit misleading. It is an issue of "actually existing USB floppy drives". The USB standard that governs floppy devices makes only support for certain standard formats mandatory - basically standard DOS 720 KiB and 1.44 MiB formats. The actual implementation is free to detect any format it wants, but the defined API to drive the floppy makes it hard to go as far as supporting copy protection methods, because you actually only get something like LBA addressing, you can't access information about the disc geometry or address tracks and sectors. So you'd need a device that, additionally to the standardized access API, would also provide vendor-specific calls. As far as I know, no mass-market device provides such things.

Even in PC world (i.e. ao486), there were "special" formats that were sometimes used for software distribution - e.g. IBM PC DOS 7 shipped with floppies in XDF format (only the first floppy had standard format and loaded a special driver to allow access to XDF), which is no readable on USB floppy drives.

Though I think a 'flux' type of feature being able to backup floppies for the benefit of software preservation would be the motivation for devs. Speculation of course. I know the Mister project is for roms and real cartridges are for Analogue, yet wonder if real floppies will one day find a place in all of this.


Full read/write support for all cores for all existing disc image formats for the respective platform would provide all you'd really ever need (like Sorgelig said) - well, once the cores also get true floppy sound of course :-)

A connection method for a real floppy could be done via already mentioned projects like Supercard Pro, KryoFlux, FluxEngine, Greaseweazel or SlamySTM32Floppy via USB. It would "just" need some drivers on the MiSTer side, but this is not easy - ideally, you'd want to translate the simulated core floppy controller commands into USB commands for one of those projects (and I am greatly simplifying here). I don' even know if you'd run into timing problems when trying to simulate "the real thing".

It is a similar discussion to the "how to connect the original gamepads" or "I want to connect my Zorro expansion card and Podule to Minimig and Acorn Archimedes core". If you want the 100% retro experience, you'd either need the real hardware or do it yourself for MiSTer.

Have fun
hubersn

JimDrew
Atari Super Hero
Atari Super Hero
Posts: 854
Joined: Mon Nov 04, 2013 5:23 pm

Re: USB Floppy support on MiSTer? Possible? Needed?

Postby JimDrew » Mon Dec 02, 2019 6:24 pm

I have a Windows driver in the works that lets you read/write various disk types/file systems using the SCP board plugged into your PC. Basic USB commands can be used by anything that can access a USB device as a COM port or as an HID.

Like I said, FX CAST for MiSTer already has flux level support using .scp image files. So, Ijor apparently has that done already. That work could be used with any core to provide flux level support for any MiSTer based emulation. FluxEngine and Greaseweazle also both support .scp image file format. The .scp image file format is open for anyone to use, and there is a SDK for the SuperCard Pro hardware.

http://www.cbmstuff.com/downloads/scp/s ... _specs.txt

http://www.cbmstuff.com/downloads/scp/scp_sdk.pdf

Keir Fraser is the person who did the .scp image file support in FS-UAE (forked to WinUAE by Toni). So, it should be possible to do something similar with Minimig to allow original copy-protected disk images to load. MikeJ's Replay board already supports .scp image files, so there is FPGA code available there as well.
I am the flux ninja

ijor
Hardware Guru
Hardware Guru
Posts: 3854
Joined: Sat May 29, 2004 7:52 pm
Contact:

Re: USB Floppy support on MiSTer? Possible? Needed?

Postby ijor » Tue Dec 03, 2019 12:54 am

hubersn wrote:A connection method for a real floppy could be done via already mentioned projects like Supercard Pro, KryoFlux, FluxEngine, Greaseweazel or SlamySTM32Floppy via USB. It would "just" need some drivers on the MiSTer side, but this is not easy - ideally, you'd want to translate the simulated core floppy controller commands into USB commands for one of those projects (and I am greatly simplifying here). I don' even know if you'd run into timing problems when trying to simulate "the real thing".


You certainly will have latency issues. You would need to buffer the whole disk on RAM if you want any timing accuracy. And you will need to buffer writes as well. IMHO, this kinda defeats the idea. If you are going to buffer the whole disk, then why not just use an image? Personally, I think that connecting USB floppy drives is not very interesting.

Connecting old PC floppy drives directly through a shugart (or similar) interface could be interesting. But there are two problems. First you need some kind of adapter. It is not too difficult to develop such an adapter, but you need more signals than (I think) we have free right now. This means you would need to either implement some kind of muxing, or either you would need to disconnect the I/O board. Probably most people wold consider this not worth.

Then you need to implement low level access at the core. Most cores have a floppy interface designed for high level images. It is completely different than accessing a floppy drive directly. As having personal interest in all things floppy and copy protections, I already implemented flux level access at the FX CAST core. I would gladly implement, or cooperate, to provide similar functionality in other cores like Minimig or A486. But I doubt there is enough interest to grant developing a hardware interface in the first place.
Fx Cast: Atari St cycle accurate fpga core

AbstractZero
Atarian
Atarian
Posts: 1
Joined: Tue Dec 03, 2019 3:50 am

Re: USB Floppy support on MiSTer? Possible? Needed?

Postby AbstractZero » Tue Dec 03, 2019 3:54 am

Wouldn't it make a lot more sense to just run the floppy drive control signals out to the GPIO header and attach a standard mechanism? Or are the cores "cheating" and not fully implementing the drive controllers in the first place?

seastalker
Captain Atari
Captain Atari
Posts: 298
Joined: Sun May 15, 2016 3:44 pm

Re: USB Floppy support on MiSTer? Possible? Needed?

Postby seastalker » Sun Dec 08, 2019 3:29 pm

Even if USB floppy drive support doesn't become part of Mister, I am very happy to read everyone's comments and discussion.


Return to “MiSTer”

Who is online

Users browsing this forum: No registered users and 8 guests