davidgiven / fluxengine

PSOC5 floppy disk imaging interface
MIT License
354 stars 68 forks source link

lib/API for fluxengine ? #184

Open Buanderie opened 4 years ago

Buanderie commented 4 years ago

Hello :)

I've stumbled across your project as I'm doing some research for mine.

I'm trying to store digitally encoded voice on a floppy, in order to use it as an audio "cassette". That might sound silly, but well... Here I am, working on it.

So far, so good. I'm able to make everything work on a Linux machine. I can use any block device I want as storage backend, so for the first phase of development, I used an SD card.

Then, I ordered a TEAC USB floppy drive, in order to try my application on the real thing. I think the internal USB/Floppy interface PCB is doing some kind of weird buffering, or that might be the Linux driver, I don't know, but I can't see the head of the floppy drive move to the right section of the disk when I read to the end, for example... I ordered a "real" IDE floppy drive with a compatible IDE to USB interface card for $10, I will check how this one behave.

So my question was, would it be possible to use FluxEngine to read an IBM floppy byte by byte ? By that I mean, random byte-level access to the floppy data through an API or a library. That way I would have total control on the floppy drive (much more predictable read/write latencies, no unsollicited buffering, etc.). If not, would that be made possible given the current state of the project ?

I just skimmed through the repo superficially, as for now... Just asking before investing more time/money into this.

Thank you in advance !

davidgiven commented 4 years ago

No, FluxEngine's not suitable for that --- it transfers entire tracks at a time and then decodes them offline.

You're unlikely to have much luck with USB drives, or IDE to USB cards, because both Linux and the interface will do massive buffering. For this kind of application, you'll most likely want a PC with a real floppy drive interface. But of course Linux has just dropped support for these...

The other thing you could do is to build a FluxEngine and then customise the firmware.

Buanderie commented 4 years ago

Thank you for the insight. Well, that's what I feared... The only option left is indeed to build a FluxEngine (or Greaseweazle). The thing is, it's not that bad since I could design my own formatting scheme tailored for my application :) By the way, thanks for providing the much needed technical specs regarding floppy drives !

Regards,