I'm just trying to read sectors off a floppy drive that's not mounted because it doesn't have a FAT12 filesystem!
surely this is an everyday occurrence in windows 11, why is this so hard?
ah-ha!
r"\\.\GLOBALROOT\Device\Floppy0"
a reasonable thing to do would be to adjust my video bitrate so that it stores something like 45-60s instead of 252s, since I can read one disk every 28s.
this'd get me MAXIMUM VIDEO QUALITY at the expense of increasing the video size from 12 floppies to 51-68
Greaseweazle + TEAC FD-235HF:
default settings: 97s
--revs 1: 66s
"The 4x USB Floppy Drive is 400% faster than a typical 1x floppy drive, making it the fastest drive available today. "
NOT HOW MATH WORKS
I just realized I'm writing a file/disk marker to each floppy that consists of "FLOP"
yes, of course they're a floppy, foone! this is not a useful distinguishing signature!
there we go, reading the metadata too:
>python readdisk.py
Reading 12 chunks of 131072 bytes each
FlopPlayer 0.1 video AMOKTIME disk 1 of 12
Exact file size is 16504149 bytes
Read 1474560 bytes in in 28.71s
I wonder if I can autodetect the next disk insertion. The drive definitely does detect new disks, it spins them up as soon as you put them in.
but does that info make it all the way to windows? I'm not sure.
and I don't want to do read(1) in a loop until it succeeds, that's nasty. and can be noisy on floppy drives
okay I now have a working disk-swap-detector.
It basically just calls DeviceIoControl(IOCTL_DISK_GET_DRIVE_GEOMETRY) in a loop. That'll fail if the drive is empty.
It starts "full", waits for it to go empty, then waits for it to go back to full.
what if the user puts in the wrong disk?
PANIC
oh I was trying to check that the title was the same on later disks, but the title is only saved on the first disk (can't waste 8 bytes)
whooops
this is arguably a mis-design of my disk format and I should fix it and make it use the same metadata format for all the disks
but consider:
that'd require rewriting 12 floppy disks
@foone
The solution is simple.
Build a floppy disk library with a robot arm to feed the disks to the drive at the perfect interval.
That's all.
How hard can it be? 😈
@foone Digression: would that be true if you'd written it in C89? Meh, probably only if you didn't use any libraries.
Still, I've never really forgiven Python for Python3. Such a lot of unnecessary work.
that's a fun story
https://forum.vcfed.org/index.php?threads/windows-95-almost-had-floppy-insertion-detection.60427/
One feature which Windows 95 almost had was floppy disk insertion detection. In other words, Windows 95 almost had the ability to detect when a floppy disk was present in the drive without spinning up the drive. The person responsible for Windows 95's 32-bit floppy driver studied the floppy...
I'd imagine that it could but nobody wanted to deal with de-bouncing the cheapest switch in unknown drives.
@gloriouscow @foone this is cool as hell
Sucks that they only made 1000
@foone there's always Floppy RAID 0
@foone i wonder if i can read a usb floppy from the arduino giga's host port
just need to make a simple protocol to read sectors via wifi
then you have a wireless floppy
i am gobsmacked to learn that there exists a project @foone considers too silly to attempt
</affectionate>