the best time to do win32 development is when microsoft's entire cloud has shit the bed
gotta pull out my visual studio 6 MSDN CD because the online stuff keeps timing out
and lets see if the internet archive has WinObj, because sysinternals is not responding

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"

I'm benchmarking how long it takes to read a floppy disk, for my video player. test one is calling read(512) 2880 times
305 seconds, that's five minutes.
My video is 252s/floppy, so that's sub-realtime. NOT GOOD
½kb: 305s
1kb: 161s
2kb: 89s
4kb: 58s
8kb: 42s
16kb: 34s
32kb: 30s
64kb: 28s
128kb: 28s
256kb: 28s
512kb: 28s
1024kb: 28s
1440kb: 28s
That's speeds on a Teac FD-05PUW

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

that makes sense. The USB Teac is a 2X drive, so it's running the disk at 600 RPM instead of the intended 300 RPM, and it gets roughly twice the speed.
there are 4x drives, but they're rare and I think they've mainly been used inside mavicas
I've got one but I'm not gonna build a video player that runs off a camera, that's just silly.
but it's good to know I have plenty of headroom on this 2x drive. even if the user takes a full minute to find and insert the next floppy disk, I can load it fast enough to keep the video going
next step would obviously be to measure how long it takes me to swap through 12 floppy disks
if I could instantly load the next floppy disk that'd be 336s to read all 12. obviously it's going to be more than that, but how much more?
maybe I'll run two tests: one with the disks sorted, and one with them shuffled.
I should mod a card shuffler to work on floppy disks

"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

annoyingly I had mostly solved this problem in software I wrote back in 2018 but it's all python2 so adapting it to py3 would take a minute
fortunately my desktop has enough old python versions installed that I can get 2to3 to help me

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

0%| | 0/1474560 [00:00<?, ?it/s]FlopPlayer 0.1 video 2j▐TDMí disk 2 of 12
Exact file size is 4039327740 bytes
Disk info mismatch! Expected title to be AMOKTIME, but was 2j▐TDMí
0%| | 0/1474560 [00:00<?, ?it/s]
Traceback (most recent call last

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

ugh. my test read was stopped by disk #5 being bad. it wasn't showing bad sectors when I formatted and wrote it an hour ago!
I can't believe these 30 year old floppy disks are unreliable.
DISK 8 TOO?!
how could this handwritten novel netware license disk fail me
now I gotta wait until my standing up recharges enough to go grab some more disks from the garage, as I only had one spare

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

@foone I assume you are determining this experimentally
@foone Wait, why are you trying to summon netware into the world?
@Stormgren I'm not! I formatted the disk and put my own shit on it
@foone it came from Provo, Utah.

@foone I would've expected the 30 year old ones to be at least halfway reliable!

... the 20-some year old ones, though, I expect none to survive

@foone A few years ago I was delighted that I was able to fully recover files from floppies I wrote in 1982. I got back the full source to my first product.
@foone make some new ones then
a guy on youtube did it
@foone @Seg I can’t believe they’re not butter!
@foone You're making me nostalgic (again) for how and when we reached the limits of rotating removable flexible magnetic media.
@foone if you don't start taking backwards compatibility seriously now ... : )

@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? 😈

@Smingleigh jokes on you, I already built one of those years ago
@foone
Curses, your time travel shenanigans have defeated me again for the first time.
@foone in a vacuum this post sounds cursed 😂
@foone as long as things don't reach this point, that shouldn't be too much to worry about https://xkcd.com/1987
@littlemisssynth I think my desktop passed that point long ago. a quick search shows 68 separate non-symlink python.exe files
@foone oh, god... i think it might be past the point of throwing in a lake, and straight to entombing in concrete and then burying deep under a mountain

@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.

Windows 95 almost had floppy insertion detection

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...

Vintage Computer Federation Forums

@foone

I'd imagine that it could but nobody wanted to deal with de-bouncing the cheapest switch in unknown drives.

@foone 400% faster is 500% as fast.
@foone reminds me of how the LSI disk readers are noticeably faster with standard floppies
Mob used X-ray tables, contact lenses and ex-NBA stars to cheat NYC poker games, feds say

Prosecutors say three New York crime families used high-tech gadgets and celebrity bait to rig poker games, scamming wealthy players out of at least $7 million.

Gothamist
@kaced waow, I didn't know the mob was shuffling floppies!
@foone can you blue-green two drives like a dual-clutch transmission? Swap one while the program reads from the other drive?
@babble_endanger yeah. but I don't need to at current bitrates.