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
originally I got 20 disks, and formatted them all. I tossed 7 failures, leaving me at 13 working disks, so I had 12 for the video + one spare.
I wasn't really expecting any of them to fail inbetween that format-test and now
Read all disks in 430.22s
336s is the maximum instant-disk-change speed, so I had 94 seconds of overhead, or about 10s to change each disk (with presorted disks)
@foone just thinking about this and there is a super easy way to make this work where you don't risk the user taking too long to flip disks or put them in the wrong order: 12 disk drives doing one gigantic parallel read.
As long as you've sequenced the streams all you have to do then is sort by disk number. Easy peasy. Bonus is you can ramp the quality right up to the edge. I see no problems with this.
@SteveSyfuhs I actually tested it on linux, figuring that would have a greater chance of working (no offense).
I'll have to try on Windows one of these days